Module

Crypt.NaCl.SecretBox

Package
purescript-tweetnacl
Repository
AlexaDeWit/purescript-tweetnacl

#generateSecretBoxKey Source

generateSecretBoxKey :: Effect SecretBoxKey

Generate a key for use with a SecretBox

#secretBox Source

secretBox :: Message -> Nonce -> SecretBoxKey -> SecretBox

Create a SecretBox, which is an encrypted and authenticated message

#secretBoxOpen Source

secretBoxOpen :: SecretBox -> Nonce -> SecretBoxKey -> Maybe Message

Open a SecretBox, returning Maybe Message If decryption and authentication succeed, Just Message will be returned. If decryption or authentication fail, Nothing will be returned