Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public expand(prk: Uint8Array, info: string, outputLen: number): Uint8Array {
const prkBuffer = Buffer.from(prk)
const okm = hkdf.expand(this.hashAlgorithm, this.hashLength, prkBuffer, outputLen, info)
return new Uint8Array(okm)
}
public expand(prk: Uint8Array, info: BuffString, outputLen: number): Uint8Array {
const prkBuffer = Buffer.from(prk);
const okm = this.hashAlgorithm.toLowerCase() === 'sha3-256'
? this.sha3_256Expand(prkBuffer, outputLen, info)
: hkdf.expand(this.hashAlgorithm, this.hashLength, prkBuffer, outputLen, info)
return new Uint8Array(okm);
}