PKI-Lite - v1.0.5
    Preparing search index...

    KeyGen class provides functionality to generate cryptographic key pairs.

    This class leverages the configured cryptographic provider to create key pairs for various algorithms such as RSA, ECDSA, and EdDSA. The generated keys are returned in standard formats suitable for storage and usage in cryptographic operations.

    // Generate an RSA key pair
    const { privateKey, publicKey } = await KeyGen.generate({
    algorithm: 'RSA',
    params: {
    modulusLength: 2048,
    publicExponent: new Uint8Array([0x01, 0x00, 0x01]), // 65537
    hash: 'SHA-256'
    }
    Index

    Constructors

    Methods

    Constructors

    Methods