INNER CODE UNIT · TypeScript
isHkdfKeyCompressed
ecies/js · src/config.ts:14
isHkdfKeyCompressed: boolean = false; // secp256k1 only
symmetricAlgorithm: SymmetricAlgorithm = "aes-256-gcm";
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");