#generateBoxKeyPair Source

generateBoxKeyPair :: forall e. Eff (naclRandom :: NACL_RANDOM | e) BoxKeyPair

Generate a BoxKeyPair for NaCl Box operations

#getBoxKeyPair Source

getBoxKeyPair :: BoxSecretKey -> BoxKeyPair

Get a BoxKeyPair from the given BoxSecretKey

#getBoxPublicKey Source

getBoxPublicKey :: BoxKeyPair -> BoxPublicKey

Get a BoxPublicKey from the given BoxKeyPair

#getBoxSecretKey Source

getBoxSecretKey :: BoxKeyPair -> BoxSecretKey

Get a BoxSecretKey from the given BoxKeyPair

#box Source

box :: Message -> Nonce -> BoxPublicKey -> BoxSecretKey -> Box

Create a Box, which is an encrypted, authenticated message

#boxAfter Source

boxAfter :: Message -> Nonce -> BoxSharedKey -> Box

Create a Box with a BoxSharedKey

#boxBefore Source

boxBefore :: BoxPublicKey -> BoxSecretKey -> BoxSharedKey

Create a BoxSharedKey from one user's BoxPublicKey and a separate user's BoxSecretKey

#boxOpen Source

boxOpen :: Box -> Nonce -> BoxPublicKey -> BoxSecretKey -> Maybe Message

Opening a box decrypts and authenticates the message. This will return the Message plaintext if decryption and SignatureB64 validation succeeds, and Nothing if authentication or decryption fails.

#boxOpenAfter Source

boxOpenAfter :: Box -> Nonce -> BoxSharedKey -> Maybe Message

Similar to boxOpen, but opens a box with a BoxSharedKey that has been generated with boxBefore instead of a BoxPublicKey and BoxSecretKey