Module
Crypt.NaCl.Sign
- Package
- purescript-crypt-nacl
- Repository
- throughnothing/purescript-crypt-nacl
#generateSignKeyPair Source
generateSignKeyPair :: forall e. Eff (naclRandom :: NACL_RANDOM | e) SignKeyPair
Generate a random key pair for signing messages
#getSignKeyPair Source
getSignKeyPair :: SignSecretKey -> SignKeyPair
Get the signing keypair for a given SignSecretKey
#getSignPublicKey Source
getSignPublicKey :: SignKeyPair -> SignPublicKey
Get the SignPublicKey
for a given SignKeyPair
#getSignSecretKey Source
getSignSecretKey :: SignKeyPair -> SignSecretKey
Get the SignSecretKey
for a given SignKeyPair
#sign Source
sign :: Message -> SignSecretKey -> SignedMessage
Sign a Message
using the given SignSecretKey
.
Returns the contents of the message, signed, as a SignedMessage
#signDetached Source
signDetached :: Message -> SignSecretKey -> Signature
Like sign
, but only returns the Signature
, not the message contents
#verifyDetached Source
verifyDetached :: Message -> Signature -> Boolean
Verifies a Signature
, given the Message
#signOpen Source
signOpen :: SignedMessage -> SignPublicKey -> Maybe Message
Varifies the signature contained in a SignedMessage
against a given
SignPublicKey
. Returns Just Message
if the signature verifies,
or Nothing
otherwise.