```
use cryptonote_crypto::chacha;
let password = "your password";
let key = chacha::generate(passowrd); ```
```
use cryptonotecrypto::hash; // Version 6 let a = b"hello world!"; let hash = hash::cnslow_hash(&a[0..], hash::HashVersion::Version6);
// Version 7 // a must be a bytestring with more than 64 bytes long let a = bytestring::stringtou8array("0707cff699d605f7eb4dbdcad3a38b462b52e9b8ecdf06fb4c95bc5b058a177f84d327f27db739430000000363862429fb90c0fc35fcb9f760c484c8532ee5f2a7cbea4e769d44cd12a7f201"); let hash = hash::cnslow_hash(&a[0..], hash::HashVersion::Version7); ```
use cryptonote_crypto::hash;
let a = b"hello world!";
let hash = hash::cn_fast_hash(&a[0..]);