mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-04-25 15:12:32 +00:00
Merge remote-tracking branch 'remotes/origin/master' into morrigan/encrypt-stream
# Conflicts: # src/@types/it-pb-rpc/index.d.ts # src/@types/libp2p.ts # src/crypto.ts # src/handshake.ts # src/noise.ts # src/utils.ts # src/xx.ts
This commit is contained in:
commit
91af449231
4
src/@types/it-pair/index.d.ts
vendored
4
src/@types/it-pair/index.d.ts
vendored
@ -1,6 +1,6 @@
|
||||
export type Duplex = [Stream, Stream];
|
||||
|
||||
type Stream = {
|
||||
sink(source: Iterable<any>),
|
||||
source: Object,
|
||||
sink(source: Iterable<any>);
|
||||
source: Record<string, any>;
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import { bytes32, uint32, uint64, bytes } from './@types/basic'
|
||||
import { KeyPair } from './@types/libp2p'
|
||||
import { generateKeypair } from './utils';
|
||||
|
||||
|
||||
export interface MessageBuffer {
|
||||
ne: bytes32;
|
||||
ns: bytes;
|
||||
@ -156,7 +155,7 @@ export class XXHandshake {
|
||||
return { cs, ck, h };
|
||||
}
|
||||
|
||||
private mixKey(ss: SymmetricState, ikm: bytes32) {
|
||||
private mixKey(ss: SymmetricState, ikm: bytes32): void {
|
||||
const [ ck, tempK ] = this.getHkdf(ss.ck, ikm);
|
||||
ss.cs = this.initializeKey(tempK) as CipherState;
|
||||
ss.ck = ck;
|
||||
|
Loading…
x
Reference in New Issue
Block a user