Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PublicKey = PublicKey {
- unPublicKey :: PublicKey
- buildPublicKey :: ByteArrayAccess ba => String -> ba -> Either String PublicKey
- mkPublicKeyHexQ :: String -> Q Exp
- publicKeySize :: Int
- toCheckedPublicKey :: ByteArrayAccess ba => ba -> Either String PublicKey
- fromCheckedPublicKey :: PublicKey -> PrimArray Word8
- publicKeyChecksumSize :: Int
- newtype SecretKey = SecretKey {
- unSecretKey :: SecretKey
- buildSecretKey :: ByteArrayAccess ba => String -> ba -> Either String SecretKey
- generateSecretKey :: MonadRandom m => m SecretKey
- secretKeySize :: Int
- toPublicKey :: SecretKey -> PublicKey
- newtype Signature = Signature {
- unSignature :: Signature
- buildSignature :: ByteArrayAccess ba => ba -> Either String Signature
- signatureSize :: Int
- sign :: ByteArrayAccess ba => SecretKey -> PublicKey -> ba -> Signature
- verify :: ByteArrayAccess ba => PublicKey -> ba -> Signature -> Bool
Documentation
PublicKey | |
|
Instances
Eq PublicKey # | |
Show PublicKey # | |
NFData PublicKey # | |
Defined in Gini.Crypto.PubKey | |
ByteArrayAccess PublicKey # | |
Display PublicKey # | |
Defined in Gini.Crypto.PubKey display :: PublicKey -> Utf8Builder textDisplay :: PublicKey -> Text | |
Persist PublicKey # | |
Defined in Gini.Crypto.PubKey | |
Validity PublicKey # | |
Defined in Gini.Crypto.PubKey | |
PersistField PublicKey # | |
Defined in Gini.Crypto.PubKey toPersistValue :: PublicKey -> PersistValue fromPersistValue :: PersistValue -> Either Text PublicKey | |
PersistFieldSql PublicKey # | |
Defined in Gini.Crypto.PubKey |
:: ByteArrayAccess ba | |
=> String | Alternate name for the public key type for the error message |
-> ba | |
-> Either String PublicKey |
Create PublicKey
from a sequence of bytes
mkPublicKeyHexQ :: String -> Q Exp #
Construct a PublicKey from a Base16 encoded string at compile time.
publicKeySize :: Int #
toCheckedPublicKey :: ByteArrayAccess ba => ba -> Either String PublicKey #
Supply an array containing concatenation of public key together with its checksum
fromCheckedPublicKey :: PublicKey -> PrimArray Word8 #
SecretKey | |
|
Instances
Eq SecretKey # | |
Show SecretKey # | This instance will use show from Cryptonite, rather than hex |
NFData SecretKey # | |
Defined in Gini.Crypto.PubKey | |
ByteArrayAccess SecretKey # | |
Display SecretKey # | |
Defined in Gini.Crypto.PubKey display :: SecretKey -> Utf8Builder textDisplay :: SecretKey -> Text | |
Persist SecretKey # | |
Defined in Gini.Crypto.PubKey | |
Validity SecretKey # | |
Defined in Gini.Crypto.PubKey |
:: ByteArrayAccess ba | |
=> String | Alternate name for the secret key type for the error message |
-> ba | |
-> Either String SecretKey |
Create SecretKey
from a sequence of bytes
generateSecretKey :: MonadRandom m => m SecretKey #
secretKeySize :: Int #
toPublicKey :: SecretKey -> PublicKey #
Signature | |
|
Instances
Eq Signature # | |
Show Signature # | |
NFData Signature # | |
Defined in Gini.Crypto.PubKey | |
ByteArrayAccess Signature # | |
Display Signature # | |
Defined in Gini.Crypto.PubKey display :: Signature -> Utf8Builder textDisplay :: Signature -> Text | |
Persist Signature # | |
Defined in Gini.Crypto.PubKey | |
Validity Signature # | |
Defined in Gini.Crypto.PubKey | |
PersistField Signature # | |
Defined in Gini.Crypto.PubKey toPersistValue :: Signature -> PersistValue fromPersistValue :: PersistValue -> Either Text Signature | |
PersistFieldSql Signature # | |
Defined in Gini.Crypto.PubKey |
buildSignature :: ByteArrayAccess ba => ba -> Either String Signature #
Create Signature
from a sequence of bytes
signatureSize :: Int #