biscuit-haskell-0.2.2.0: Library support for the Biscuit security token
Safe HaskellNone
LanguageHaskell2010

Auth.Biscuit.Crypto

Synopsis

Documentation

data PublicKey #

An Ed25519 public key

Instances

Instances details
Eq PublicKey 
Instance details

Defined in Crypto.PubKey.Ed25519

Show PublicKey 
Instance details

Defined in Crypto.PubKey.Ed25519

NFData PublicKey 
Instance details

Defined in Crypto.PubKey.Ed25519

Methods

rnf :: PublicKey -> () #

ByteArrayAccess PublicKey 
Instance details

Defined in Crypto.PubKey.Ed25519

Methods

length :: PublicKey -> Int #

withByteArray :: PublicKey -> (Ptr p -> IO a) -> IO a #

copyByteArrayToPtr :: PublicKey -> Ptr p -> IO () #

data SecretKey #

An Ed25519 Secret key

Instances

Instances details
Eq SecretKey 
Instance details

Defined in Crypto.PubKey.Ed25519

Show SecretKey 
Instance details

Defined in Crypto.PubKey.Ed25519

NFData SecretKey 
Instance details

Defined in Crypto.PubKey.Ed25519

Methods

rnf :: SecretKey -> () #

ByteArrayAccess SecretKey 
Instance details

Defined in Crypto.PubKey.Ed25519

Methods

length :: SecretKey -> Int #

withByteArray :: SecretKey -> (Ptr p -> IO a) -> IO a #

copyByteArrayToPtr :: SecretKey -> Ptr p -> IO () #

data Signature #

An Ed25519 signature

Instances

Instances details
Eq Signature 
Instance details

Defined in Crypto.PubKey.Ed25519

Show Signature 
Instance details

Defined in Crypto.PubKey.Ed25519

NFData Signature 
Instance details

Defined in Crypto.PubKey.Ed25519

Methods

rnf :: Signature -> () #

ByteArrayAccess Signature 
Instance details

Defined in Crypto.PubKey.Ed25519

Methods

length :: Signature -> Int #

withByteArray :: Signature -> (Ptr p -> IO a) -> IO a #

copyByteArrayToPtr :: Signature -> Ptr p -> IO () #

convert :: (ByteArrayAccess bin, ByteArray bout) => bin -> bout #

Convert a bytearray to another type of bytearray

publicKey :: ByteArrayAccess ba => ba -> CryptoFailable PublicKey #

Try to build a public key from a bytearray

secretKey :: ByteArrayAccess ba => ba -> CryptoFailable SecretKey #

Try to build a secret key from a bytearray

signature :: ByteArrayAccess ba => ba -> CryptoFailable Signature #

Try to build a signature from a bytearray

eitherCryptoError :: CryptoFailable a -> Either CryptoError a #

Transform a CryptoFailable to an Either

maybeCryptoError :: CryptoFailable a -> Maybe a #

Transform a CryptoFailable to a Maybe

generateSecretKey :: MonadRandom m => m SecretKey #

Generate a secret key

toPublic :: SecretKey -> PublicKey #

Create a public key from a secret key