StableLib / stablelib

A stable library of useful TypeScript/JavaScript code
https://www.stablelib.com
Other
175 stars 36 forks source link

hkdf: info must be passed to extract #27

Open armfazh opened 3 years ago

armfazh commented 3 years ago

Changing the signature of HKDF functions. Specifically passing info to expand, thus, the hkdf key can be reused across multiple calls to expand.

class HKDF {
    constructor(hash: new () => Hash, key: Uint8Array, salt?: Uint8Array);
    expand(length: number, info?: Uint8Array):
}
dchest commented 3 years ago

Thank you, this makes sense. I'll look into it.