/** * * Copyright (c) 2016 SafeBash * Cryptography consultant: Andrew Kozlik, Ph.D. * * @link https://github.com/safebash/opencrypto * */ interface PemPublicToCryptoOptions { name?: string; hash?: string; usages?: KeyUsage[]; isExtractable: boolean; } /** * * Converts asymmetric public key from PEM to CryptoKey * - publicKey {String} default: "undefined" PEM public key * - options {Object} default: (depends on algorithm) * -- ECDH: { name: 'ECDH', usages: [], isExtractable: true } * -- ECDSA: { name: 'ECDSA', usages: ['verify'], isExtractable: true } * -- RSA-OAEP: { name: 'RSA-OAEP', hash: { name: 'SHA-512' }, usages: ['encrypt', 'wrapKey'], isExtractable: true } * -- RSA-PSS: { name: 'RSA-PSS', hash: { name: 'SHA-512' }, usages: ['verify'], isExtractable: true } */ export default function pemPublicToCrypto(pem: string, options?: PemPublicToCryptoOptions): Promise; export declare function extractPublicFromCertToCrypto(pem: string, options?: PemPublicToCryptoOptions): Promise; export {}; //# sourceMappingURL=pemPublicToCrypto.d.ts.map