From 4f5654b67d1c4c1138e5755ef282096076e07da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Mon, 22 Jul 2019 19:00:20 +0200 Subject: [PATCH] Document `decl_storage!` hashers (#3170) --- substrate/srml/support/procedural/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/substrate/srml/support/procedural/src/lib.rs b/substrate/srml/support/procedural/src/lib.rs index b8bcb15de1..f6da2f751d 100644 --- a/substrate/srml/support/procedural/src/lib.rs +++ b/substrate/srml/support/procedural/src/lib.rs @@ -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;`