-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | The high-level library aimed at casual users of cryptography, by the -- Haskell Cryptography Group @package sel @version 0.0.2.0 -- | Sel is the library for casual users by the Haskell Cryptography -- Group. -- -- It builds on Libsodium, a reliable and audited library for -- common operations. -- -- ⚠️ Important note: if you want to use any of this code in an -- executable, ensure that you use secureMain or -- secureMainWithError in your main function -- before you call any functions from this library. Failing to do -- so will cause problems. For libraries, this is not necessary. module Sel secureMain :: IO a -> IO a secureMainWithError :: IO a -> IO a -> IO a -- | HMAC provides a way to both encrypt a communication and -- authenticate its origin. -- -- This relies on a shared pair of secret keys between all the parties -- -- The function computing the tag deterministic: the same (message, -- key) tuple will always produce the same output. However, even if -- the message is public, knowing the key is required in order to be able -- to compute a valid tag. Therefore, the key should remain confidential. -- The tag, however, can be public. -- -- The following keyed message authentication codes are availabled: -- --
-- >>> hash <- SHA512.withMultipart $ \multipartState -> do -- we are in MonadIO -- ... message1 <- getMessage -- ... SHA512.updateMultipart multipartState message1 -- ... message2 <- getMessage -- ... SHA512.updateMultipart multipartState message2 --data Multipart s -- | Perform streaming hashing with a Multipart cryptographic -- context. -- -- Use updateMultipart and finaliseMultipart inside of the -- continuation. -- -- The context is safely allocated and deallocated inside of the -- continuation. withMultipart :: forall (a :: Type) (m :: Type -> Type). MonadIO m => (forall s. Multipart s -> m a) -> m Hash -- | Add a message portion to be hashed. -- -- This function should be used within withMultipart. updateMultipart :: Multipart s -> StrictByteString -> IO () instance GHC.Classes.Eq Sel.Hashing.SHA512.Hash instance GHC.Classes.Ord Sel.Hashing.SHA512.Hash instance Foreign.Storable.Storable Sel.Hashing.SHA512.Hash instance Data.Text.Display.Core.Display Sel.Hashing.SHA512.Hash instance GHC.Show.Show Sel.Hashing.SHA512.Hash module Sel.Hashing.SHA256 -- | A hashed value from the SHA-256 algorithm. data Hash -- | Hash a StrictByteString with the SHA-256 algorithm. hashByteString :: StrictByteString -> IO Hash -- | Hash a UTF8-encoded strict Text with the SHA-256 algorithm. hashText :: Text -> IO Hash -- | Multipart is a cryptographic context for streaming hashing. -- This API can be used when a message is too big to fit in memory or -- when the message is received in portions. -- -- Use it like this: -- --
-- >>> hash <- SHA256.withMultipart $ \multipartState -> do -- we are in MonadIO -- ... message1 <- getMessage -- ... SHA256.updateMultipart multipartState message1 -- ... message2 <- getMessage -- ... SHA256.updateMultipart multipartState message2 --data Multipart s -- | Perform streaming hashing with a Multipart cryptographic -- context. -- -- Use updateMultipart within the continuation. -- -- The context is safely allocated first, then the continuation is run -- and then it is deallocated after that. withMultipart :: forall (a :: Type) (m :: Type -> Type). MonadIO m => (forall s. Multipart s -> m a) -> m Hash -- | Add a message portion to be hashed. -- -- This function should be used within withMultipart. updateMultipart :: Multipart s -> StrictByteString -> IO () -- | Convert a Hash to a binary StrictByteString. hashToBinary :: Hash -> StrictByteString -- | Convert a Hash to a strict hexadecimal Text. hashToHexText :: Hash -> Text -- | Convert a Hash to a strict, hexadecimal-encoded -- StrictByteString. hashToHexByteString :: Hash -> StrictByteString instance GHC.Classes.Eq Sel.Hashing.SHA256.Hash instance GHC.Classes.Ord Sel.Hashing.SHA256.Hash instance Foreign.Storable.Storable Sel.Hashing.SHA256.Hash instance Data.Text.Display.Core.Display Sel.Hashing.SHA256.Hash instance GHC.Show.Show Sel.Hashing.SHA256.Hash module Sel.Hashing.Password -- | A hashed password from the Argon2id algorithm. data PasswordHash -- | Hash the password with the Argon2id algorithm and a set of pre-defined -- parameters. -- -- The hash is encoded in a human-readable format that includes: -- --
-- >>> hashKey <- Hashing.newHashKey -- -- >>> hash <- Hashing.withMultipart (Just hashKey) $ \multipartState -> do -- we are in MonadIO -- ... message1 <- getMessage -- ... Hashing.updateMultipart multipartState message1 -- ... message2 <- getMessage -- ... Hashing.updateMultipart multipartState message2 --data Multipart s -- | Perform streaming hashing with a Multipart cryptographic -- context. If there is no HashKey, you will get the same output -- for the same input all the time. -- -- Use updateMultipart within the continuation to add more message -- parts to be hashed. -- -- The context is safely allocated first, then the continuation is run -- and then it is deallocated after that. withMultipart :: forall (a :: Type) (m :: Type -> Type). MonadIO m => Maybe HashKey -> (forall s. Multipart s -> m a) -> m Hash -- | Add a message portion to be hashed. -- -- This function is to be used within withMultipart. updateMultipart :: forall (m :: Type -> Type) (s :: Type). MonadIO m => Multipart s -> StrictByteString -> m () -- | Convert a Hash to a strict, hexadecimal-encoded Text. hashToHexText :: Hash -> Text -- | Convert a Hash to a strict, hexadecimal-encoded -- StrictByteString. hashToHexByteString :: Hash -> StrictByteString -- | Convert a Hash to a strict binary StrictByteString. hashToBinary :: Hash -> StrictByteString instance GHC.Classes.Eq Sel.Hashing.Hash instance GHC.Classes.Ord Sel.Hashing.Hash instance Foreign.Storable.Storable Sel.Hashing.Hash instance Data.Text.Display.Core.Display Sel.Hashing.Hash instance GHC.Show.Show Sel.Hashing.Hash instance GHC.Classes.Eq Sel.Hashing.HashKey instance GHC.Classes.Ord Sel.Hashing.HashKey module Sel.HMAC.SHA512_256 -- | Compute an authentication tag for a message with a secret key shared -- by all parties. authenticate :: StrictByteString -> AuthenticationKey -> IO AuthenticationTag -- | Multipart is a cryptographic context for streaming hashing. -- This API can be used when a message is too big to fit in memory or -- when the message is received in portions. -- -- Use it like this: -- --
-- >>> secretKey <- HMAC.newSecreKey -- -- >>> hash <- HMAC.withMultipart secretKey $ \multipartState -> do -- we are in MonadIO -- ... message1 <- getMessage -- ... HMAC.updateMultipart multipartState message1 -- ... message2 <- getMessage -- ... HMAC.updateMultipart multipartState message2 --data Multipart s -- | Perform streaming hashing with a Multipart cryptographic -- context. -- -- Use updateMultipart within the continuation. -- -- The context is safely allocated first, then the continuation is run -- and then it is deallocated after that. withMultipart :: forall (a :: Type) (m :: Type -> Type). MonadIO m => AuthenticationKey -> (forall s. Multipart s -> m a) -> m AuthenticationTag -- | Add a message portion to be hashed. -- -- This function should be used within withMultipart. updateMultipart :: Multipart s -> StrictByteString -> IO () -- | Verify that the tag is valid for the provided message and secret key. verify :: AuthenticationTag -> AuthenticationKey -> StrictByteString -> Bool -- | A secret authentication key of size -- cryptoAuthHMACSHA512256Bytes. data AuthenticationKey -- | Generate a new random secret key of size -- cryptoAuthHMACSHA512256KeyBytes. newAuthenticationKey :: IO AuthenticationKey -- | Create an AuthenticationKey from a binary -- StrictByteString that you have obtained on your own, usually -- from the network or disk. -- -- The input secret key, once decoded from base16, must be of length -- cryptoAuthHMACSHA512256Bytes. authenticationKeyFromHexByteString :: StrictByteString -> Either Text AuthenticationKey -- | Convert a 'AuthenticationKey to a hexadecimal-encoded -- StrictByteString. -- -- ⚠️ Be prudent as to where you store it! unsafeAuthenticationKeyToHexByteString :: AuthenticationKey -> StrictByteString -- | Convert a 'AuthenticationKey to a hexadecimal-encoded -- StrictByteString. -- -- This format is useful if you need conversion to base32 or base64. -- -- ⚠️ Be prudent as to where you store it! unsafeAuthenticationKeyToBinary :: AuthenticationKey -> StrictByteString -- | A secret authentication key of size -- cryptoAuthHMACSHA512256Bytes. data AuthenticationTag -- | Convert an AuthenticationTag to a hexadecimal-encoded -- StrictByteString. authenticationTagToHexByteString :: AuthenticationTag -> StrictByteString -- | Convert an AuthenticationTag to a binary -- StrictByteString. authenticationTagToBinary :: AuthenticationTag -> StrictByteString -- | Create an AuthenticationTag from a binary -- StrictByteString that you have obtained on your own, usually -- from the network or disk. -- -- The input secret key, once decoded from base16, must be of length -- cryptoAuthHMACSHA512256Bytes. authenticationTagFromHexByteString :: StrictByteString -> Either Text AuthenticationTag instance Data.Text.Display.Core.Display Sel.HMAC.SHA512_256.AuthenticationKey instance Data.Text.Display.Core.Display Sel.HMAC.SHA512_256.AuthenticationTag instance GHC.Classes.Eq Sel.HMAC.SHA512_256.AuthenticationTag instance GHC.Classes.Ord Sel.HMAC.SHA512_256.AuthenticationTag instance GHC.Show.Show Sel.HMAC.SHA512_256.AuthenticationTag instance GHC.Classes.Eq Sel.HMAC.SHA512_256.AuthenticationKey instance GHC.Classes.Ord Sel.HMAC.SHA512_256.AuthenticationKey instance GHC.Show.Show Sel.HMAC.SHA512_256.AuthenticationKey module Sel.HMAC.SHA512 -- | Compute an authentication tag for a message with a secret key shared -- by all parties. authenticate :: StrictByteString -> AuthenticationKey -> IO AuthenticationTag -- | Multipart is a cryptographic context for streaming hashing. -- This API can be used when a message is too big to fit in memory or -- when the message is received in portions. -- -- Use it like this: -- --
-- >>> secretKey <- HMAC.newSecreKey -- -- >>> hash <- HMAC.withMultipart secretKey $ \multipartState -> do -- we are in MonadIO -- ... message1 <- getMessage -- ... HMAC.updateMultipart multipartState message1 -- ... message2 <- getMessage -- ... HMAC.updateMultipart multipartState message2 --data Multipart s -- | Perform streaming hashing with a Multipart cryptographic -- context. -- -- Use updateMultipart within the continuation. -- -- The context is safely allocated first, then the continuation is run -- and then it is deallocated after that. withMultipart :: forall (a :: Type) (m :: Type -> Type). MonadIO m => AuthenticationKey -> (forall s. Multipart s -> m a) -> m AuthenticationTag -- | Add a message portion to be hashed. -- -- This function should be used within withMultipart. updateMultipart :: Multipart s -> StrictByteString -> IO () -- | Verify that the tag is valid for the provided message and secret key. verify :: AuthenticationTag -> AuthenticationKey -> StrictByteString -> Bool -- | A secret authentication key of size cryptoAuthHMACSHA512Bytes. data AuthenticationKey -- | Generate a new random secret key of size -- cryptoAuthHMACSHA512KeyBytes. newAuthenticationKey :: IO AuthenticationKey -- | Create an AuthenticationKey from a binary -- StrictByteString that you have obtained on your own, usually -- from the network or disk. -- -- The input secret key, once decoded from base16, must be of length -- cryptoAuthHMACSHA512Bytes. authenticationKeyFromHexByteString :: StrictByteString -> Either Text AuthenticationKey -- | Convert a 'AuthenticationKey to a hexadecimal-encoded -- StrictByteString. -- -- ⚠️ Be prudent as to where you store it! unsafeAuthenticationKeyToHexByteString :: AuthenticationKey -> StrictByteString -- | Convert a 'AuthenticationKey to a hexadecimal-encoded -- StrictByteString. -- -- This format is useful if you need conversion to base32 or base64. -- -- ⚠️ Be prudent as to where you store it! unsafeAuthenticationKeyToBinary :: AuthenticationKey -> StrictByteString -- | A secret authentication key of size cryptoAuthHMACSHA512Bytes. data AuthenticationTag -- | Convert an AuthenticationTag to a hexadecimal-encoded -- StrictByteString. authenticationTagToHexByteString :: AuthenticationTag -> StrictByteString -- | Convert an AuthenticationTag to a binary -- StrictByteString. authenticationTagToBinary :: AuthenticationTag -> StrictByteString -- | Create an AuthenticationTag from a binary -- StrictByteString that you have obtained on your own, usually -- from the network or disk. -- -- The input secret key, once decoded from base16, must be of length -- cryptoAuthHMACSHA512Bytes. authenticationTagFromHexByteString :: StrictByteString -> Either Text AuthenticationTag instance Data.Text.Display.Core.Display Sel.HMAC.SHA512.AuthenticationKey instance Data.Text.Display.Core.Display Sel.HMAC.SHA512.AuthenticationTag instance GHC.Classes.Eq Sel.HMAC.SHA512.AuthenticationTag instance GHC.Classes.Ord Sel.HMAC.SHA512.AuthenticationTag instance GHC.Show.Show Sel.HMAC.SHA512.AuthenticationTag instance GHC.Classes.Eq Sel.HMAC.SHA512.AuthenticationKey instance GHC.Classes.Ord Sel.HMAC.SHA512.AuthenticationKey instance GHC.Show.Show Sel.HMAC.SHA512.AuthenticationKey module Sel.HMAC.SHA256 -- | Compute an authentication tag for a message with a secret key shared -- by all parties. authenticate :: StrictByteString -> AuthenticationKey -> IO AuthenticationTag -- | Multipart is a cryptographic context for streaming hashing. -- This API can be used when a message is too big to fit in memory or -- when the message is received in portions. -- -- Use it like this: -- --
-- >>> secretKey <- HMAC.newSecreKey -- -- >>> hash <- HMAC.withMultipart secretKey $ \multipartState -> do -- we are in MonadIO -- ... message1 <- getMessage -- ... HMAC.updateMultipart multipartState message1 -- ... message2 <- getMessage -- ... HMAC.updateMultipart multipartState message2 --data Multipart s -- | Perform streaming hashing with a Multipart cryptographic -- context. -- -- Use updateMultipart within the continuation. -- -- The context is safely allocated first, then the continuation is run -- and then it is deallocated after that. withMultipart :: forall (a :: Type) (m :: Type -> Type). MonadIO m => AuthenticationKey -> (forall s. Multipart s -> m a) -> m AuthenticationTag -- | Add a message portion to be hashed. -- -- This function should be used within withMultipart. updateMultipart :: Multipart s -> StrictByteString -> IO () -- | Verify that the tag is valid for the provided message and secret key. verify :: AuthenticationTag -> AuthenticationKey -> StrictByteString -> Bool -- | A secret authentication key of size cryptoAuthHMACSHA256Bytes. data AuthenticationKey -- | Generate a new random secret key of size -- cryptoAuthHMACSHA256KeyBytes. newAuthenticationKey :: IO AuthenticationKey -- | Create an AuthenticationKey from a binary -- StrictByteString that you have obtained on your own, usually -- from the network or disk. -- -- The input secret key, once decoded from base16, must be of length -- cryptoAuthHMACSHA256Bytes. authenticationKeyFromHexByteString :: StrictByteString -> Either Text AuthenticationKey -- | Convert a 'AuthenticationKey to a hexadecimal-encoded -- StrictByteString. -- -- This format is useful if you need conversion to base32 or base64. -- -- ⚠️ Be prudent as to where you store it! unsafeAuthenticationKeyToBinary :: AuthenticationKey -> StrictByteString -- | Convert a 'AuthenticationKey to a hexadecimal-encoded -- StrictByteString. -- -- ⚠️ Be prudent as to where you store it! unsafeAuthenticationKeyToHexByteString :: AuthenticationKey -> StrictByteString -- | A secret authentication key of size cryptoAuthHMACSHA256Bytes. data AuthenticationTag -- | Convert an AuthenticationTag to a hexadecimal-encoded -- StrictByteString. authenticationTagToHexByteString :: AuthenticationTag -> StrictByteString -- | Convert an AuthenticationTag to a binary -- StrictByteString. authenticationTagToBinary :: AuthenticationTag -> StrictByteString -- | Create an AuthenticationTag from a binary -- StrictByteString that you have obtained on your own, usually -- from the network or disk. -- -- The input secret key, once decoded from base16, must be of length -- cryptoAuthHMACSHA256Bytes. authenticationTagFromHexByteString :: StrictByteString -> Either Text AuthenticationTag instance Data.Text.Display.Core.Display Sel.HMAC.SHA256.AuthenticationKey instance Data.Text.Display.Core.Display Sel.HMAC.SHA256.AuthenticationTag instance GHC.Classes.Eq Sel.HMAC.SHA256.AuthenticationTag instance GHC.Classes.Ord Sel.HMAC.SHA256.AuthenticationTag instance GHC.Show.Show Sel.HMAC.SHA256.AuthenticationTag instance GHC.Classes.Eq Sel.HMAC.SHA256.AuthenticationKey instance GHC.Classes.Ord Sel.HMAC.SHA256.AuthenticationKey instance GHC.Show.Show Sel.HMAC.SHA256.AuthenticationKey module Sel.PublicKey.Cipher -- | Generate a new random secret key. -- -- May throw KeyPairGenerationException if the generation fails. newKeyPair :: IO (PublicKey, SecretKey) -- | A secret key of size cryptoBoxSecretKeyBytes. newtype SecretKey SecretKey :: ForeignPtr CUChar -> SecretKey -- | Convert a SecretKey to a hexadecimal-encoded -- StrictByteString. -- -- ⚠️ Be prudent as to where you store it! unsafeSecretKeyToHexByteString :: SecretKey -> StrictByteString -- | A public key of size cryptoBoxPublicKeyBytes. newtype PublicKey PublicKey :: ForeignPtr CUChar -> PublicKey -- | Convert a PublicKey to a hexadecimal-encoded -- StrictByteString. publicKeyToHexByteString :: PublicKey -> StrictByteString -- | Create a pair of SecretKey and PublicKey from -- hexadecimal-encoded StrictByteStrings that you have obtained on -- your own, usually from the network or disk. -- -- The public and secret keys, once decoded from base16, must -- respectively be at least of length cryptoBoxPublicKeyBytes and -- 'cryptoBoxSecretKeyBytes. keyPairFromHexByteStrings :: StrictByteString -> StrictByteString -> Either Text (PublicKey, SecretKey) -- | Convert a SecretKey to a hexadecimal-encoded -- StrictByteString. -- -- ⚠️ Be prudent as to where you store it! -- -- A random number that must only be used once per exchanged message. It -- does not have to be confidential. It is of size -- cryptoBoxNonceBytes. newtype Nonce Nonce :: ForeignPtr CUChar -> Nonce -- | Create a Nonce from a hexadecimal-encoded -- StrictByteString that you have obtained on your own, usually -- from the network or disk. nonceFromHexByteString :: StrictByteString -> Either Text Nonce -- | Convert a Nonce to a hexadecimal-encoded -- StrictByteString. nonceToHexByteString :: Nonce -> StrictByteString -- | A ciphertext consisting of an encrypted message and an authentication -- tag. data CipherText CipherText :: CULLong -> ForeignPtr CUChar -> CipherText [messageLength] :: CipherText -> CULLong [cipherTextForeignPtr] :: CipherText -> ForeignPtr CUChar -- | Create a CipherText from a binary StrictByteString that -- you have obtained on your own, usually from the network or disk. It -- must be a valid cipherText built from the concatenation of the -- encrypted message and the authentication tag. -- -- The input cipher text, once decoded from base16, must be at least of -- length cryptoBoxMACBytes. cipherTextFromHexByteString :: StrictByteString -> Either Text CipherText -- | Convert a CipherText to a hexadecimal-encoded Text. -- -- ⚠️ Be prudent as to where you store it! cipherTextToHexText :: CipherText -> Text -- | Convert a CipherText to a hexadecimal-encoded -- StrictByteString. -- -- ⚠️ Be prudent as to where you store it! cipherTextToHexByteString :: CipherText -> StrictByteString -- | Convert a CipherText to a binary StrictByteString. -- -- ⚠️ Be prudent as to where you store it! cipherTextToBinary :: CipherText -> StrictByteString -- | Create an authenticated CipherText from a message, a -- SecretKey, and a one-time cryptographic Nonce that must -- never be re-used with the same secret key to encrypt another message. encrypt :: StrictByteString -> PublicKey -> SecretKey -> IO (Nonce, CipherText) -- | Decrypt a CipherText and authenticated message with the shared -- secret key and the one-time cryptographic nonce. decrypt :: CipherText -> PublicKey -> SecretKey -> Nonce -> Maybe StrictByteString -- | Exception thrown upon error during the generation of the key pair by -- newKeyPair. data KeyPairGenerationException KeyPairGenerationException :: KeyPairGenerationException -- | Exception thrown upon error during the encryption of the message by -- encrypt. data EncryptionError EncryptionError :: EncryptionError instance Data.Text.Display.Core.Display Sel.PublicKey.Cipher.SecretKey instance Data.Text.Display.Core.Display Sel.PublicKey.Cipher.PublicKey instance Data.Text.Display.Core.Display Sel.PublicKey.Cipher.Nonce instance GHC.Exception.Type.Exception Sel.PublicKey.Cipher.KeyPairGenerationException instance GHC.Show.Show Sel.PublicKey.Cipher.KeyPairGenerationException instance GHC.Classes.Ord Sel.PublicKey.Cipher.KeyPairGenerationException instance GHC.Classes.Eq Sel.PublicKey.Cipher.KeyPairGenerationException instance GHC.Exception.Type.Exception Sel.PublicKey.Cipher.EncryptionError instance GHC.Show.Show Sel.PublicKey.Cipher.EncryptionError instance GHC.Classes.Ord Sel.PublicKey.Cipher.EncryptionError instance GHC.Classes.Eq Sel.PublicKey.Cipher.EncryptionError instance GHC.Classes.Eq Sel.PublicKey.Cipher.CipherText instance GHC.Classes.Ord Sel.PublicKey.Cipher.CipherText instance Data.Text.Display.Core.Display Sel.PublicKey.Cipher.CipherText instance GHC.Show.Show Sel.PublicKey.Cipher.CipherText instance GHC.Classes.Eq Sel.PublicKey.Cipher.Nonce instance GHC.Classes.Ord Sel.PublicKey.Cipher.Nonce instance GHC.Show.Show Sel.PublicKey.Cipher.Nonce instance GHC.Classes.Eq Sel.PublicKey.Cipher.PublicKey instance GHC.Classes.Ord Sel.PublicKey.Cipher.PublicKey instance GHC.Show.Show Sel.PublicKey.Cipher.PublicKey instance GHC.Classes.Eq Sel.PublicKey.Cipher.SecretKey instance GHC.Classes.Ord Sel.PublicKey.Cipher.SecretKey instance GHC.Show.Show Sel.PublicKey.Cipher.SecretKey module Sel.PublicKey.Seal -- | A public key of size cryptoBoxPublicKeyBytes. newtype PublicKey PublicKey :: ForeignPtr CUChar -> PublicKey -- | A secret key of size cryptoBoxSecretKeyBytes. newtype SecretKey SecretKey :: ForeignPtr CUChar -> SecretKey -- | Generate a new random secret key. -- -- May throw KeyPairGenerationException if the generation fails. newKeyPair :: IO (PublicKey, SecretKey) -- | Encrypt a message with the recipient's public key. A key pair for the -- sender is generated, and the public key of that pair is attached to -- the cipher text. The secret key of the sender's pair is automatically -- destroyed. seal :: StrictByteString -> PublicKey -> IO CipherText -- | Open a sealed message from an unknown sender. You need your public and -- secret keys. open :: CipherText -> PublicKey -> SecretKey -> Maybe StrictByteString -- | Exception thrown upon error during the generation of the key pair by -- newKeyPair. data KeyPairGenerationException -- | Exception thrown upon error during the encryption of the message by -- encrypt. data EncryptionError module Sel.PublicKey.Signature data PublicKey data SecretKey data SignedMessage -- | Generate a pair of public and secret key. -- -- The length parameters used are cryptoSignPublicKeyBytes and -- cryptoSignSecretKeyBytes. generateKeyPair :: IO (PublicKey, SecretKey) -- | Sign a message. signMessage :: StrictByteString -> SecretKey -> IO SignedMessage -- | Open a signed message with the signatory's public key. The function -- returns Nothing if there is a key mismatch. openMessage :: SignedMessage -> PublicKey -> Maybe StrictByteString -- | Get the signature part of a SignedMessage. getSignature :: SignedMessage -> StrictByteString -- | Get the message part of a SignedMessage without verifying -- the signature. unsafeGetMessage :: SignedMessage -> StrictByteString -- | Combine a message and a signature into a SignedMessage. mkSignature :: StrictByteString -> StrictByteString -> SignedMessage instance GHC.Classes.Eq Sel.PublicKey.Signature.SignedMessage instance GHC.Classes.Ord Sel.PublicKey.Signature.SignedMessage instance GHC.Classes.Eq Sel.PublicKey.Signature.SecretKey instance GHC.Classes.Ord Sel.PublicKey.Signature.SecretKey instance GHC.Classes.Eq Sel.PublicKey.Signature.PublicKey instance GHC.Classes.Ord Sel.PublicKey.Signature.PublicKey module Sel.Scrypt -- | A hashed password from the Scrypt algorithm. data ScryptHash -- | Hash the password with the Scrypt algorithm and a set of pre-defined -- parameters. -- -- The hash is encoded in a human-readable format that includes: -- --