| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Gini.Crypto.PubKey
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
Constructors
| PublicKey | |
Fields
| |
Instances
| Eq PublicKey # | |
| Show PublicKey # | |
| NFData PublicKey # | |
Defined in Gini.Crypto.PubKey | |
| ByteArrayAccess PublicKey # | |
| Display PublicKey # | |
Defined in Gini.Crypto.PubKey | |
| Persist PublicKey # | |
Defined in Gini.Crypto.PubKey | |
| Validity PublicKey # | |
Defined in Gini.Crypto.PubKey | |
| PersistField PublicKey # | |
Defined in Gini.Crypto.PubKey Methods toPersistValue :: PublicKey -> PersistValue fromPersistValue :: PersistValue -> Either Text PublicKey | |
| PersistFieldSql PublicKey # | |
Defined in Gini.Crypto.PubKey | |
Arguments
| :: 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 #
Constructors
| SecretKey | |
Fields
| |
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 | |
| Persist SecretKey # | |
Defined in Gini.Crypto.PubKey | |
| Validity SecretKey # | |
Defined in Gini.Crypto.PubKey | |
Arguments
| :: 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 #
Constructors
| Signature | |
Fields
| |
Instances
| Eq Signature # | |
| Show Signature # | |
| NFData Signature # | |
Defined in Gini.Crypto.PubKey | |
| ByteArrayAccess Signature # | |
| Display Signature # | |
Defined in Gini.Crypto.PubKey | |
| Persist Signature # | |
Defined in Gini.Crypto.PubKey | |
| Validity Signature # | |
Defined in Gini.Crypto.PubKey | |
| PersistField Signature # | |
Defined in Gini.Crypto.PubKey Methods 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 #
