import { Sha256 } from './sha256'; import { Sha512 } from './sha512'; /** * Instantiate a hash-based message authentication code (HMAC) function as * specified by RFC 2104. * * @param hashFunction - a cryptographic hash function which iterates a basic * compression function on blocks of data * @param blockByteLength - the byte-length of blocks used in `hashFunction` */ export declare const instantiateHmacFunction: (hashFunction: (input: Uint8Array) => Uint8Array, blockByteLength: number) => (secret: Uint8Array, message: Uint8Array) => Uint8Array; /** * Create a hash-based message authentication code using HMAC-SHA256 as * specified in `RFC 4231`. Returns a 32-byte Uint8Array. * * Secrets longer than the block byte-length (64 bytes) are hashed before * use, shortening their length to the minimum recommended length (32 bytes). * See `RFC 2104` for details. * * @param sha256 - an implementation of Sha256 * @param secret - the secret key (recommended length: 32-64 bytes) * @param message - the message to authenticate */ export declare const hmacSha256: (sha256: { hash: Sha256['hash']; }, secret: Uint8Array, message: Uint8Array) => Uint8Array; /** * Create a hash-based message authentication code using HMAC-SHA512 as * specified in `RFC 4231`. Returns a 64-byte Uint8Array. * * Secrets longer than the block byte-length (128 bytes) are hashed before * use, shortening their length to the minimum recommended length (64 bytes). * See `RFC 2104` for details. * * @param sha512 - an implementation of Sha512 * @param secret - the secret key (recommended length: 64-128 bytes) * @param message - the message to authenticate */ export declare const hmacSha512: (sha512: { hash: Sha512['hash']; }, secret: Uint8Array, message: Uint8Array) => Uint8Array; //# sourceMappingURL=hmac.d.ts.map