crypto.pbkdf2 #
Based off: https://golang.org/x/crypto/pbkdf2
fn key #
fn key(password []u8, salt []u8, count int, key_length int, h hash.Hash) ![]u8
key derives a key from the password, salt and iteration count h selects the hash used by HMAC: a digest from crypto.sha1, crypto.sha256 (SHA-224, SHA-256) or crypto.sha512 (SHA-384, SHA-512, SHA-512/224, SHA-512/256). example pbkdf2.key('test'.bytes(), '123456'.bytes(), 1000, 64, sha512.new())