Improve bls::SecretKey privacy (#1164)

* Improve bls::SecretKey privacy

* Add missed file

* Remove more methods from bls::SecretKey

* Add as_bytes() to SecretKey, remove as_raw

* Remove as_raw

* Add back as_raw

* Address review comments
This commit is contained in:
Paul Hauner
2020-05-19 11:23:08 +10:00
committed by GitHub
parent 314fae41fe
commit c93f9c351b
26 changed files with 102 additions and 295 deletions

View File

@@ -38,8 +38,8 @@ fn string_round_trip() {
);
assert_eq!(
decoded.decrypt_keypair(GOOD_PASSWORD).unwrap(),
keypair,
decoded.decrypt_keypair(GOOD_PASSWORD).unwrap().pk,
keypair.pk,
"should decrypt with good password"
);
}
@@ -77,8 +77,8 @@ fn file() {
);
assert_eq!(
decoded.decrypt_keypair(GOOD_PASSWORD).unwrap(),
keypair,
decoded.decrypt_keypair(GOOD_PASSWORD).unwrap().pk,
keypair.pk,
"should decrypt with good password"
);
}
@@ -102,8 +102,8 @@ fn scrypt_params() {
);
assert_eq!(
decoded.decrypt_keypair(GOOD_PASSWORD).unwrap(),
keypair,
decoded.decrypt_keypair(GOOD_PASSWORD).unwrap().pk,
keypair.pk,
"should decrypt with good password"
);
}