UNPKG

js-crypto-utils

Version:

JavaScript cryptographic utilities for OpenSSL-WebCrypto compatibility including PEM/X509-JWK converter.

15 lines (14 loc) 556 B
/** * pkcec.js */ import { ECDecryptionOption, ECEncryptionOption } from './typedef'; export declare const encryptEc: (msg: Uint8Array, publicKey: JsonWebKey, { privateKey, hash, encrypt, keyLength, info }: ECEncryptionOption) => Promise<{ data: Uint8Array; salt: Uint8Array; iv: Uint8Array; } | { data: Uint8Array; salt: Uint8Array; iv?: undefined; }>; export declare const decryptEc: (data: Uint8Array, privateKey: JsonWebKey, { publicKey, hash, encrypt, keyLength, info, salt, iv }: ECDecryptionOption) => Promise<Uint8Array>;