INNER CODE UNIT · TypeScript
symmetricNonceLength
ecies/js · src/config.ts:16
symmetricNonceLength: NonceLength = 16; // aes-256-gcm only
get ephemeralKeySize(): number {
const mapping = {
secp256k1: this.isEphemeralKeyCompressed
? COMPRESSED_PUBLIC_KEY_SIZE
: UNCOMPRESSED_PUBLIC_KEY_SIZE,
x25519: CURVE25519_PUBLIC_KEY_SIZE,
ed25519: CURVE25519_PUBLIC_KEY_SIZE,
};
/* v8 ignore else -- @preserve */
if (this.ellipticCurve in mapping) {
return mapping[this.ellipticCurve];
} else {
throw new Error("Not implemented");
}
}