Files
klz-cables.com/.pnpm-store/v10/files/5a/872e2d9cab83ae016aa53917ed9cf3556ddff02ec76b274f77d2ef9c0947cc27fddfcb605d65d0a5e209a94ae5d9b36944cc287b364ab971bd061697193d24
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

41 lines
1.8 KiB
Plaintext

import type { KeyLike } from '../types';
export interface GenerateKeyPairResult<KeyLikeType extends KeyLike = KeyLike> {
/** The generated Private Key. */
privateKey: KeyLikeType;
/** Public Key corresponding to the generated Private Key. */
publicKey: KeyLikeType;
}
export interface GenerateKeyPairOptions {
/**
* The EC "crv" (Curve) or OKP "crv" (Subtype of Key Pair) value to generate. The curve must be
* both supported on the runtime as well as applicable for the given JWA algorithm identifier.
*/
crv?: string;
/**
* A hint for RSA algorithms to generate an RSA key of a given `modulusLength` (Key size in bits).
* JOSE requires 2048 bits or larger. Default is 2048.
*/
modulusLength?: number;
/**
* (Only effective in Web Crypto API runtimes) The value to use as
* {@link !SubtleCrypto.generateKey} `extractable` argument. Default is false.
*
*/
extractable?: boolean;
}
/**
* Generates a private and a public key for a given JWA algorithm identifier. This can only generate
* asymmetric key pairs. For symmetric secrets use the `generateSecret` function.
*
* Note: Under Web Crypto API runtime the `privateKey` is generated with `extractable` set to
* `false` by default. See {@link GenerateKeyPairOptions.extractable} to generate an extractable
* `privateKey`.
*
* This function is exported (as a named export) from the main `'jose'` module entry point as well
* as from its subpath export `'jose/generate/keypair'`.
*
* @param alg JWA Algorithm Identifier to be used with the generated key pair.
* @param options Additional options passed down to the key pair generation.
*/
export declare function generateKeyPair<KeyLikeType extends KeyLike = KeyLike>(alg: string, options?: GenerateKeyPairOptions): Promise<GenerateKeyPairResult<KeyLikeType>>;