Safe Haskell | None |
---|---|
Language | Haskell2010 |
OpenSSL.EVP.PKey
Contents
Description
An interface to asymmetric cipher keypair.
Synopsis
- class (Eq k, Typeable k, PKey k) => PublicKey k where
- fromPublicKey :: k -> SomePublicKey
- toPublicKey :: SomePublicKey -> Maybe k
- class PublicKey a => KeyPair a where
- fromKeyPair :: a -> SomeKeyPair
- toKeyPair :: SomeKeyPair -> Maybe a
- data SomePublicKey
- data SomeKeyPair
Documentation
class (Eq k, Typeable k, PKey k) => PublicKey k where #
Instances of this class has at least public portion of a keypair. They might or might not have the private key.
Minimal complete definition
Nothing
Methods
fromPublicKey :: k -> SomePublicKey #
Wrap an arbitrary public key into polymorphic type
SomePublicKey
.
toPublicKey :: SomePublicKey -> Maybe k #
Cast from the polymorphic type SomePublicKey
to the concrete
type. Return Nothing
if failed.
Instances
PublicKey RSAKeyPair # | |
Defined in OpenSSL.EVP.PKey Methods fromPublicKey :: RSAKeyPair -> SomePublicKey # toPublicKey :: SomePublicKey -> Maybe RSAKeyPair # | |
PublicKey RSAPubKey # | |
Defined in OpenSSL.EVP.PKey Methods fromPublicKey :: RSAPubKey -> SomePublicKey # toPublicKey :: SomePublicKey -> Maybe RSAPubKey # | |
PublicKey DSAKeyPair # | |
Defined in OpenSSL.EVP.PKey Methods fromPublicKey :: DSAKeyPair -> SomePublicKey # toPublicKey :: SomePublicKey -> Maybe DSAKeyPair # | |
PublicKey DSAPubKey # | |
Defined in OpenSSL.EVP.PKey Methods fromPublicKey :: DSAPubKey -> SomePublicKey # toPublicKey :: SomePublicKey -> Maybe DSAPubKey # | |
PublicKey SomeKeyPair # | |
Defined in OpenSSL.EVP.PKey Methods fromPublicKey :: SomeKeyPair -> SomePublicKey # toPublicKey :: SomePublicKey -> Maybe SomeKeyPair # | |
PublicKey SomePublicKey # | |
Defined in OpenSSL.EVP.PKey Methods fromPublicKey :: SomePublicKey -> SomePublicKey # toPublicKey :: SomePublicKey -> Maybe SomePublicKey # |
class PublicKey a => KeyPair a where #
Instances of this class has both of public and private portions of a keypair.
Minimal complete definition
Nothing
Methods
fromKeyPair :: a -> SomeKeyPair #
Wrap an arbitrary keypair into polymorphic type SomeKeyPair
.
toKeyPair :: SomeKeyPair -> Maybe a #
Cast from the polymorphic type SomeKeyPair
to the concrete
type. Return Nothing
if failed.
Instances
KeyPair RSAKeyPair # | |
Defined in OpenSSL.EVP.PKey | |
KeyPair DSAKeyPair # | |
Defined in OpenSSL.EVP.PKey | |
KeyPair SomeKeyPair # | |
Defined in OpenSSL.EVP.PKey |
data SomePublicKey #
This is an opaque type to hold an arbitrary public key in it. The
actual key type can be safelly type-casted using toPublicKey
.
Instances
Eq SomePublicKey # | |
Defined in OpenSSL.EVP.PKey | |
PKey SomePublicKey # | |
Defined in OpenSSL.EVP.PKey Methods toPKey :: SomePublicKey -> IO VaguePKey # fromPKey :: VaguePKey -> IO (Maybe SomePublicKey) # pkeySize :: SomePublicKey -> Int # pkeyDefaultMD :: SomePublicKey -> IO Digest # | |
PublicKey SomePublicKey # | |
Defined in OpenSSL.EVP.PKey Methods fromPublicKey :: SomePublicKey -> SomePublicKey # toPublicKey :: SomePublicKey -> Maybe SomePublicKey # |
data SomeKeyPair #
This is an opaque type to hold an arbitrary keypair in it. The
actual key type can be safelly type-casted using toKeyPair
.
Instances
Eq SomeKeyPair # | |
Defined in OpenSSL.EVP.PKey | |
PKey SomeKeyPair # | |
Defined in OpenSSL.EVP.PKey Methods toPKey :: SomeKeyPair -> IO VaguePKey # fromPKey :: VaguePKey -> IO (Maybe SomeKeyPair) # pkeySize :: SomeKeyPair -> Int # pkeyDefaultMD :: SomeKeyPair -> IO Digest # | |
KeyPair SomeKeyPair # | |
Defined in OpenSSL.EVP.PKey | |
PublicKey SomeKeyPair # | |
Defined in OpenSSL.EVP.PKey Methods fromPublicKey :: SomeKeyPair -> SomePublicKey # toPublicKey :: SomePublicKey -> Maybe SomeKeyPair # |
Orphan instances
PKey RSAKeyPair # | |
Methods toPKey :: RSAKeyPair -> IO VaguePKey # fromPKey :: VaguePKey -> IO (Maybe RSAKeyPair) # pkeySize :: RSAKeyPair -> Int # pkeyDefaultMD :: RSAKeyPair -> IO Digest # | |
PKey RSAPubKey # | |
PKey DSAKeyPair # | |
Methods toPKey :: DSAKeyPair -> IO VaguePKey # fromPKey :: VaguePKey -> IO (Maybe DSAKeyPair) # pkeySize :: DSAKeyPair -> Int # pkeyDefaultMD :: DSAKeyPair -> IO Digest # | |
PKey DSAPubKey # | |