import { KeyUse } from '../types.js'; import type { RsaSize, Msg, CharSize, HashAlg, DID, PublicKey } from '../types.js'; export declare function verify(msg: Msg, sig: Msg, publicKey: string | CryptoKey, charSize?: CharSize, hashAlg?: HashAlg): Promise; export declare function sign(msg: Msg, privateKey: CryptoKey, charSize?: CharSize): Promise; export declare function encrypt(msg: Msg, publicKey: string | CryptoKey, opts?: { format: 'base64'; }, charSize?: CharSize, hashAlg?: HashAlg): Promise; /** * Decrypt the given Uint8Array */ export declare function decrypt(data: Uint8Array | string, privateKey: CryptoKey | Uint8Array): Promise; export declare function decryptKey(encryptedKey: string, keypair: CryptoKeyPair): Promise; /** * Return a CryptoKey from the given Uint8Array or string. */ export declare function importPublicKey(base64Key: string | Uint8Array, hashAlg?: HashAlg, use?: KeyUse): Promise; export declare function exportKey(key: PublicKey): Promise; export declare function exportKey(key: PublicKey, opts: { format: 'string'; }): Promise; export declare function create(use: KeyUse, size?: RsaSize, hashAlg?: HashAlg): Promise; export declare function verifyWithDid(msg: string, sig: string, did: DID): Promise; /** * Convert a public key to a DID format string. */ export declare function publicKeyToDid(publicKey: Uint8Array | PublicKey): Promise; /** * Convert the given DID string to a public key Uint8Array. */ export declare function didToPublicKey(did: DID): ({ publicKey: Uint8Array; type: 'rsa'; }); /** * Convert the given DID string to a public key. */ export declare function importDid(did: DID, hashAlgorithm?: HashAlg, use?: KeyUse): Promise; //# sourceMappingURL=webcrypto.d.ts.map