tink-crypto
Version:
A multi-language, cross-platform library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.
22 lines (21 loc) • 839 B
TypeScript
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Computes an HKDF.
*
* @param size The length of the generated pseudorandom string in
* bytes. The maximal size is 255 * DigestSize, where DigestSize is the size
* of the underlying HMAC.
* @param hash the name of the hash function. Accepted names are SHA-1,
* SHA-256 and SHA-512
* @param ikm Input keying material.
* @param info Context and application specific
* information (can be a zero-length array).
* @param opt_salt Salt value (a non-secret random
* value). If not provided, it is set to a string of hash length zeros.
* @return Output keying material (okm).
*/
export declare function compute(size: number, hash: string, ikm: Uint8Array, info: Uint8Array, opt_salt?: Uint8Array): Promise<Uint8Array>;