Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "src/compat/cryptojs"

Index

Functions

Object literals

Functions

AESDecrypt

  • AESDecrypt(cipherText: string, pass: string): Buffer
  • This function emulates CryptoJS.AES.decrypt (aes.js), which delegates to PasswordBasedCipher (cipher-core.js)

    PasswordBasedCipher.cfg = { kdf: OpenSSLKdf } BlockCipher.cfg = { format: OpenSSLFormatter }

    AES extends BlockCipher OpenSSLFormatter is CryptoJS.format.OpenSSL (cipher-core.js) OpenSSLKdf is CryptoJS.kdf.OpenSSL (cipher-core.js)

    Parameters

    • cipherText: string
    • pass: string

    Returns Buffer

reencryptWithJolocomLib

  • reencryptWithJolocomLib(cipherTextBase64: string, password: string): string

Object literals

Const CryptoJS

CryptoJS: object

This is a compatibility layer for decrypting AES encrypted base64 encoded strings from CryptoJS.AES.encrypt

based on crypto-js 3.1.9-1

The wallet used to depend on crypto-js for en/decryption of the seed, but then migrated to using the jolocom-lib (which uses crypto-browserify). The details of the encryption (IV, key derivation) are slightly different, so previously stored encrypted seeds needed to be re-encrypted.

AES

AES: object

decrypt

decrypt: AESDecrypt = AESDecrypt

algo

algo: object

AES

AES: object

ivSize

ivSize: number = 128 / 32

keySize

keySize: number = 256 / 32

format

format: object

OpenSSL

OpenSSL: object

parse

parse: OpenSSLFormatterParse = OpenSSLFormatterParse

kdf

kdf: object

OpenSSL

OpenSSL: object

execute

execute: OpenSSLKdfExecute = OpenSSLKdfExecute

Generated using TypeDoc