Address PR comment, rename constant

This commit is contained in:
Belma Gutlic 2019-12-30 09:59:59 +01:00 committed by GitHub
parent 7bad317d0e
commit 4dc1a2ab95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ import {bytes, bytes32, uint32} from "../@types/basic";
import {CipherState, MessageBuffer, SymmetricState} from "../@types/handshake";
import {getHkdf} from "../utils";
const minNonce = 0;
export const MIN_NONCE = 0;
export abstract class AbstractHandshake {
public encryptWithAd(cs: CipherState, ad: bytes, plaintext: bytes): bytes {
@ -122,7 +122,7 @@ export abstract class AbstractHandshake {
}
protected initializeKey(k: bytes32): CipherState {
const n = minNonce;
const n = MIN_NONCE;
return { k, n };
}