Document decl_storage! hashers (#3170)

This commit is contained in:
Bastian Köcher
2019-07-22 19:00:20 +02:00
committed by thiolliere
parent 2e70087810
commit 4f5654b67d
@@ -83,6 +83,14 @@ use proc_macro::TokenStream;
/// If the second key is untrusted, a cryptographic `hasher` such as `blake2_256` must be used.
/// Otherwise, other items in storage with the same first key can be compromised.
///
/// Supported hashers (ordered from least to best security):
///
/// * `twox_64_concat` - TwoX with 64bit + key concatenated.
/// * `twox_128` - TwoX with 128bit.
/// * `twox_256` - TwoX with with 256bit.
/// * `blake2_128` - Blake2 with 128bit.
/// * `blake2_256` - Blake2 with 256bit.
///
/// Basic storage can be extended as such:
///
/// `#vis #name get(#getter) config(#field_name) build(#closure): #type = #default;`