@ldclabs/cose-ts
Version:
Implemented Keys, Algorithms (RFC9053), COSE (RFC9052) and CWT (RFC8392) in TypeScript.
13 lines • 633 B
JavaScript
// (c) 2023-present, LDC Labs. All rights reserved.
// See the file LICENSE for licensing terms.
import { hkdf } from '@noble/hashes/hkdf';
import { sha256, sha512 } from '@noble/hashes/sha2';
// hkdf256 derives a key from the given secret, salt, info and key size, using HKDF-SHA-256.
export function hkdf256(secret, salt, info, keySize) {
return hkdf(sha256, secret, salt, info, keySize);
}
// hkdf512 derives a key from the given secret, salt, info and key size, using HKDF-SHA-512.
export function hkdf512(secret, salt, info, keySize) {
return hkdf(sha512, secret, salt, info, keySize);
}
//# sourceMappingURL=hkdf.js.map