poly1305 #1
1 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ impl EncryptedStream {
|
|||
let shared_secret = secret.diffie_hellman(&their_public);
|
||||
|
||||
let key =
|
||||
shared_secret.derive_key(|bytes| blake3::derive_key(KEY_DERIVATION_CONTEXT, &bytes));
|
||||
shared_secret.derive_key(|bytes| blake3::derive_key(KEY_DERIVATION_CONTEXT, bytes));
|
||||
|
||||
Ok(EncryptedStream::wrap(socket, key))
|
||||
}
|
||||
|
|
@ -152,7 +152,7 @@ impl TryFrom<TcpStream> for EncryptedStream {
|
|||
let shared_secret = secret.diffie_hellman(&their_public);
|
||||
|
||||
let key =
|
||||
shared_secret.derive_key(|bytes| blake3::derive_key(KEY_DERIVATION_CONTEXT, &bytes));
|
||||
shared_secret.derive_key(|bytes| blake3::derive_key(KEY_DERIVATION_CONTEXT, bytes));
|
||||
|
||||
Ok(EncryptedStream::wrap(socket, key))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue