@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
19 lines • 983 B
text/typescript
/**
* Generate a PKCS12 key from a password, based on the algorithm defined in
* PKCS #5 (IETF RFC 7292) Appendix B.
*
* See: https://tools.ietf.org/html/rfc7292#appendix-B
*
* This is based on the `node-forge` implementation.
*
* @param password The password from which to generate the key.
* @param salt A random salt.
* @param id The ID parameter. 1 = Encipherment key, 2 = IV, 3 = MAC key.
* @param iter The number of iterations of hashing.
* @param n The number of bytes to generate.
* @param hashAlgorithm The hash algorithm to use.
* @param blockLength The number of bytes in a block, based on the `hashAlgorithm`.
* @param digestLength The number of bytes in the resulting digest, based on the `hashAlgorithm`.
*/
export default function generatePKCS12Key(password: string, salt: Uint8Array, id: 1 | 2 | 3, iter: number, n: number, hashAlgorithm: string, blockLength: number, digestLength: number): Uint8Array;
//# sourceMappingURL=generatePKCS12Key.d.mts.map