Module

Node.Crypto.Decipher

#Decipher

data Decipher

https://nodejs.org/api/crypto.html#crypto_class_decipher

Usage:

buf <- Buffer.fromString "434cf3b56614fc8eb186ea866fbd33b4" Hex
pbuf <- Buffer.fromString "password" UTF8
sbuf <- Buffer.fromString "salt" UTF8
key <- Crypto.scryptSync pbuf sbuf 32
iv <- Buffer.fromString "iviviviviviviviv" UTF8
dec <- Decipher.createDecipheriv "aes256" key (Just iv)
rbuf1 <- Decipher.update buf dec
rbuf2 <- Decipher.final dec
Buffer.concat [ rbuf1, rbuf2 ] >>= Buffer.toString UTF8

Modules