projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bitcoin crate 0.28.1
[rust-lightning]
/
lightning
/
src
/
ln
/
peer_channel_encryptor.rs
diff --git
a/lightning/src/ln/peer_channel_encryptor.rs
b/lightning/src/ln/peer_channel_encryptor.rs
index fbd32526ea658470f810c487bcb88da608904e8b..da6dc67aba5c4f52ec9e9dcd819aebf131d33084 100644
(file)
--- a/
lightning/src/ln/peer_channel_encryptor.rs
+++ b/
lightning/src/ln/peer_channel_encryptor.rs
@@
-16,7
+16,7
@@
use bitcoin::hashes::{Hash, HashEngine};
use bitcoin::hashes::sha256::Hash as Sha256;
use bitcoin::secp256k1::Secp256k1;
use bitcoin::hashes::sha256::Hash as Sha256;
use bitcoin::secp256k1::Secp256k1;
-use bitcoin::secp256k1::
key::
{PublicKey,SecretKey};
+use bitcoin::secp256k1::{PublicKey,SecretKey};
use bitcoin::secp256k1::ecdh::SharedSecret;
use bitcoin::secp256k1;
use bitcoin::secp256k1::ecdh::SharedSecret;
use bitcoin::secp256k1;
@@
-163,7
+163,7
@@
impl PeerChannelEncryptor {
#[inline]
fn hkdf(state: &mut BidirectionalNoiseState, ss: SharedSecret) -> [u8; 32] {
#[inline]
fn hkdf(state: &mut BidirectionalNoiseState, ss: SharedSecret) -> [u8; 32] {
- let (t1, t2) = hkdf_extract_expand_twice(&state.ck,
&ss[..]
);
+ let (t1, t2) = hkdf_extract_expand_twice(&state.ck,
ss.as_ref()
);
state.ck = t1;
t2
}
state.ck = t1;
t2
}
@@
-473,7
+473,7
@@
impl PeerChannelEncryptor {
mod tests {
use super::LN_MAX_MSG_LEN;
mod tests {
use super::LN_MAX_MSG_LEN;
- use bitcoin::secp256k1::
key::
{PublicKey,SecretKey};
+ use bitcoin::secp256k1::{PublicKey,SecretKey};
use hex;
use hex;