feat: fix clippy

This commit is contained in:
2023-10-13 08:47:38 +08:00
parent c873a52ac6
commit c9774d7542
10 changed files with 31 additions and 34 deletions

View File

@@ -8,7 +8,7 @@ use p384::elliptic_curve::sec1::FromEncodedPoint;
pub fn compute_p384_shared_secret(public_key_point_hex: &str) -> XResult<(Vec<u8>, Vec<u8>)> {
let public_key_point_bytes = opt_result!(hex::decode(public_key_point_hex), "Parse public key point hex failed: {}");
let encoded_point = opt_result!(EncodedPoint::from_bytes(&public_key_point_bytes), "Parse public key point failed: {}");
let encoded_point = opt_result!(EncodedPoint::from_bytes(public_key_point_bytes), "Parse public key point failed: {}");
let public_key = PublicKey::from_encoded_point(&encoded_point).unwrap();
let esk = EphemeralSecret::random(&mut OsRng);