derive method
Derives a dkLen-byte key from password and salt.
Implementation
BuBytes derive(List<int> password, List<int> salt, int dkLen) {
final B = QuickCrypto.pbkdf2Sha256DeriveKey(
password: password,
salt: salt,
iterations: 1,
dklen: p * 128 * r,
);
for (int i = 0; i < p; i++) {
final index = i * 128 * r;
final copy = B.sublist(index);
_smix(copy, r, n, _v, _xy);
B.setAll(index, copy);
}
final result = QuickCrypto.pbkdf2Sha256DeriveKey(
salt: B,
iterations: 1,
dklen: dkLen,
password: password,
);
BinaryOps.zero(B);
return result;
}