11 lines
214 B
Plaintext
11 lines
214 B
Plaintext
let check_hash_key = (kh1_k2: (key_hash, key)) : (bool, key_hash) => {
|
|
let kh1, k2 = kh1_k2;
|
|
let kh2 : key_hash = Crypto.hash_key(k2);
|
|
if (kh1 == kh2) {
|
|
(true, kh2);
|
|
}
|
|
else {
|
|
(false, kh2);
|
|
}
|
|
};
|