UNPKG

js-crypto-utils

Version:

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

54 lines (53 loc) 1.63 kB
/** * index.ts * Structure of API * ---- Key (Key object with methods handling EC and RSA public keys) * | * |-- pkc (public key crypto, EC and RSA) // TODO: Encrypt/decrypt with ECDH standardized procedure * | |-- generateKey * | |-- encrypt * | |-- decrypt * | |-- sign * | |-- verify * | * |-- x509 // TODO verify self-signed certificate in single line * | |-- toJwk * | |-- fromJwk * | |-- parse (verify) * | * |-- aes * |-- random * |-- hash * |-- hmac * |-- hkdf * |-- pbkdf */ import * as jscaes from 'js-crypto-aes'; import * as jscrandom from 'js-crypto-random'; import * as jschash from 'js-crypto-hash'; import * as jschmac from 'js-crypto-hmac'; import * as jschkdf from 'js-crypto-hkdf'; import * as jsx509 from 'js-x509-utils'; import * as jscpbkdf from 'js-crypto-pbkdf'; import * as jscpkc from './pkc'; export declare const Key: typeof import("js-crypto-key-utils/dist/key").Key; export declare const pkc: typeof jscpkc; export declare const x509: typeof jsx509; export declare const aes: typeof jscaes; export declare const random: typeof jscrandom; export declare const hash: typeof jschash; export declare const hmac: typeof jschmac; export declare const hkdf: typeof jschkdf; export declare const pbkdf: typeof jscpbkdf; declare const _default: { Key: typeof import("js-crypto-key-utils/dist/key").Key; pkc: typeof jscpkc; x509: typeof jsx509; aes: typeof jscaes; random: typeof jscrandom; hash: typeof jschash; hmac: typeof jschmac; hkdf: typeof jschkdf; pbkdf: typeof jscpbkdf; }; export default _default;