# Function ethcore_util::triehash::sec_trie_root [−] [src]

    pub fn sec_trie_root(input: Vec<(Vec<u8>, Vec<u8>)>) -> H256

Generates a key-hashed (secure) trie root hash for a vector of key-values.

    extern crate ethcore_util as util;
    use std::str::FromStr;
    use util::triehash::*;
    use util::hash::*;

    fn main() {
        let v = vec![
            (From::from("doe"), From::from("reindeer")),
            (From::from("dog"), From::from("puppy")),
            (From::from("dogglesworth"), From::from("cat")),
        ];

        let root = "d4cd937e4a4368d7931a9cf51686b7e10abb3dce38a39000fd7902a092b64585";
        assert_eq!(sec_trie_root(v), H256::from_str(root).unwrap());
    }

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)