UNPKG

js-crypto-ec

Version:

Universal Module for Elliptic Curve Cryptography (ECDSA and ECDH) in JavaScript

15 lines (14 loc) 1.26 kB
/** * index */ export declare const generateKey: (namedCurve?: import("./typedef").CurveTypes) => Promise<import("./typedef").JsonWebKeyPair>; export declare const sign: (msg: Uint8Array, privateJwk: JsonWebKey, hash?: import("./typedef").HashTypes, signatureFormat?: import("./typedef").SignatureFormat) => Promise<Uint8Array>; export declare const verify: (msg: Uint8Array, signature: Uint8Array, publicJwk: JsonWebKey, hash?: import("./typedef").HashTypes, signatureFormat?: import("./typedef").SignatureFormat) => Promise<boolean>; export declare const deriveSecret: (publicJwk: JsonWebKey, privateJwk: JsonWebKey) => Promise<Uint8Array>; declare const _default: { generateKey: (namedCurve?: import("./typedef").CurveTypes) => Promise<import("./typedef").JsonWebKeyPair>; sign: (msg: Uint8Array, privateJwk: JsonWebKey, hash?: import("./typedef").HashTypes, signatureFormat?: import("./typedef").SignatureFormat) => Promise<Uint8Array>; verify: (msg: Uint8Array, signature: Uint8Array, publicJwk: JsonWebKey, hash?: import("./typedef").HashTypes, signatureFormat?: import("./typedef").SignatureFormat) => Promise<boolean>; deriveSecret: (publicJwk: JsonWebKey, privateJwk: JsonWebKey) => Promise<Uint8Array>; }; export default _default;