/** * @module */ import { Multikey } from "@iherman/multikey-webcrypto"; import { CryptoAlgorithm } from "./lib/keys.js"; import { KeyOptions, JWKeyPair } from "./lib/types.js"; export type { HashAlgorithm, KeyOptions, OutputOptions, CryptoSecretKey, CryptoPublicKey, BaseEncoding, JWKeyPair } from "./lib/types.js"; export type { CryptoAlgorithm } from "./lib/keys.js"; export { generateKeys } from "./lib/keys.js"; export type { Multibase, Multikey } from "@iherman/multikey-webcrypto"; export { multikeyToCrypto, cryptoToMultikey } from "@iherman/multikey-webcrypto"; export { calculateHash as hash } from "./lib/hash.js"; export { sign, verify, encrypt, decrypt } from "./lib/crypto.js"; /** * Utility function: get a binary crypto representation from a JWK encoded key/key pair. * * @param keys */ export declare function JWKToCrypto(keys: JWKeyPair): Promise; export declare function JWKToCrypto(keys: JsonWebKey): Promise; /** * Utility function: get a JWK representation from a binary crypto key/key pair. * * @param keys */ export declare function cryptoToJWK(keys: CryptoKeyPair): Promise; export declare function cryptoToJWK(keys: CryptoKey): Promise; /** * Generate a new public/private key pair in one of the ecdsa/eddsa/RSA crypto algorithms * (the term Ed25519 can also be used for eddsa). The result is a pair or JWK format for keys. * * Some of the algorithms can be (optionally) parametrized through the key options: * * * For ecdsa: the `nameCurve` field can be set to `"P-256"` or `"P-384"` to change the EC curve. Default is `"P-256"` * * For RSA: * * can be set to the modulus length of the key can be set with `modulusLength`. Value can be 1024, 2048, or 4096; * default is 2048 * * the `hash` value can be set to `"SHA-256"` or `"SHA-384"`; default is "SHA-256"` * * @param algorithm - can be ecdsa, eddsa, Ed25519, or RSA * @param options - depends on the algorithm chosen * @async */ export declare function generateKeysJWK(algorithm: CryptoAlgorithm, options?: KeyOptions): Promise; /** * Generate a new public/private key pair in one of the ecdsa or eddsa crypto algorithms * (the term Ed25519 can also be used for eddsa). The result is a pair or Multibase formatted keys, i.e., in Multikey. * * Ecdsa can be (optionally) parametrized through the key options: the `nameCurve` field can be set to `"P-256"` * or `"P-384"` to change the EC curve. Default is `"P-256"` * * @param algorithm - can be ecdsa, eddsa, Ed25519 * @param options - depends on the algorithm chosen * @async */ export declare function generateKeysMK(algorithm: CryptoAlgorithm, options?: KeyOptions): Promise; //# sourceMappingURL=index.d.ts.map