@expo/pkcs12
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

👋 Welcome to
@expo/pkcs12

PKCS#12 utility functions to extract certificates from conventional and keystore PKCS#12 files.

Examples

Extracting a certificate from a conventional PKCS#12 file

const p12 = parsePKCS12(base64EncodedP12, password); // deserializes encodedP12
const certificate = getX509Certificate(p12); // extracts single certificate from p12
const sha1Fingerprint = getCertificateFingerprint(certificate, {
  hashAlgorithm: 'sha1',
}); // Hash like 02ec75a7181c575757baa931fe3105b7125ff10a

Extracting a certificate from a keystore in a PKCS#12 file

const p12 = parsePKCS12(base64EncodedP12, password); // deserializes encodedP12
const certificate = getX509CertificateByFriendlyName(p12, alias); // extracts single certificate stored under alias in p12
const sha1Fingerprint = getCertificateFingerprint(certificate, {
  hashAlgorithm: 'sha1',
}); // Hash like 02ec75a7181c575757baa931fe3105b7125ff10a

/@expo/pkcs12/

    Package Sidebar

    Install

    npm i @expo/pkcs12

    Weekly Downloads

    79,464

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    11.9 kB

    Total Files

    5

    Last publish

    Collaborators

    • douglowder
    • betoatexpo
    • philpl
    • expo-bot
    • szdziedzic
    • alanhughes
    • kadikraman
    • radoslawkrzemien
    • aleqsio
    • marklawlor
    • gabrieldonadel
    • simek
    • keith-kurak
    • fiber-god
    • ide
    • brentvatne
    • evanbacon
    • quinlanj
    • expoadmin
    • tsapeta
    • exponent
    • wschurman
    • bycedric
    • lukmccall
    • jonsamp
    • princefleaswallow
    • kudochien