mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-08 17:12:16 +00:00
transports/noise: Fix compilation with additional generic-array features (#2264)
For crate that depends on `generic-array = { version = "0.14.3", features = ["serde", "more_lengths"] }` It's seems that `as_ref()` is ambiguous.
This commit is contained in:
parent
5cbd4735dd
commit
c7abb6f70c
@ -219,7 +219,7 @@ impl SecretKey<X25519> {
|
||||
// let ed25519_sk = ed25519::SecretKey::from(ed);
|
||||
let mut curve25519_sk: [u8; 32] = [0; 32];
|
||||
let hash = Sha512::digest(ed25519_sk.as_ref());
|
||||
curve25519_sk.copy_from_slice(&hash.as_ref()[..32]);
|
||||
curve25519_sk.copy_from_slice(&hash[..32]);
|
||||
let sk = SecretKey(X25519(curve25519_sk)); // Copy
|
||||
curve25519_sk.zeroize();
|
||||
sk
|
||||
|
Loading…
x
Reference in New Issue
Block a user