How to use the browserify-cipher/browser.createDecipheriv function in browserify-cipher

To help you get started, we’ve selected a few browserify-cipher examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AudiusProject / hedgehog / src / authentication.js View on Github external
static decrypt (ivBuffer, keyBuffer, cipherTextHex) {
    let decryptFn = Cipher.createDecipheriv(mode, keyBuffer, ivBuffer)
    let cipherText = BufferSafe.from(Utils.bufferFromHexString(cipherTextHex))
    let decryptedEntropyBuffer = BufferSafe.concat([decryptFn.update(cipherText), decryptFn.final()])
    let decryptedEntropy = verifyDecryptString(decryptedEntropyBuffer)
    return decryptedEntropy
  }
}