Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data PublicKey
- data SecretKey
- class Storable pub => KeyPair sec pub | sec -> pub, pub -> sec where
- generateKeys :: Storage -> IO (sec, Stored pub)
- loadKey :: (KeyPair sec pub, MonadIO m, MonadError String m) => Stored pub -> m sec
- loadKeyMb :: (KeyPair sec pub, MonadIO m) => Stored pub -> m (Maybe sec)
- data Signature
- data Signed a
- signedData :: Signed a -> Stored a
- signedSignature :: Signed a -> [Stored Signature]
- sign :: MonadStorage m => SecretKey -> Stored a -> m (Signed a)
- signAdd :: MonadStorage m => SecretKey -> Signed a -> m (Signed a)
- isSignedBy :: Signed a -> Stored PublicKey -> Bool
- fromSigned :: Stored (Signed a) -> a
- unsafeMapSigned :: (a -> b) -> Signed a -> Signed b
- data PublicKexKey
- data SecretKexKey
- dhSecret :: SecretKexKey -> PublicKexKey -> ScrubbedBytes
Documentation
Instances
Show PublicKey Source # | |
Storable PublicKey Source # | |
KeyPair SecretKey PublicKey Source # | |
Defined in Erebos.PubKey generateKeys :: Storage -> IO (SecretKey, Stored PublicKey) Source # keyGetPublic :: SecretKey -> Stored PublicKey Source # keyGetData :: SecretKey -> ScrubbedBytes Source # keyFromData :: ScrubbedBytes -> Stored PublicKey -> Maybe SecretKey Source # |
Instances
KeyPair SecretKey PublicKey Source # | |
Defined in Erebos.PubKey generateKeys :: Storage -> IO (SecretKey, Stored PublicKey) Source # keyGetPublic :: SecretKey -> Stored PublicKey Source # keyGetData :: SecretKey -> ScrubbedBytes Source # keyFromData :: ScrubbedBytes -> Stored PublicKey -> Maybe SecretKey Source # |
class Storable pub => KeyPair sec pub | sec -> pub, pub -> sec where Source #
Instances
KeyPair SecretKexKey PublicKexKey Source # | |
Defined in Erebos.PubKey | |
KeyPair SecretKey PublicKey Source # | |
Defined in Erebos.PubKey generateKeys :: Storage -> IO (SecretKey, Stored PublicKey) Source # keyGetPublic :: SecretKey -> Stored PublicKey Source # keyGetData :: SecretKey -> ScrubbedBytes Source # keyFromData :: ScrubbedBytes -> Stored PublicKey -> Maybe SecretKey Source # |
signedData :: Signed a -> Stored a Source #
fromSigned :: Stored (Signed a) -> a Source #
unsafeMapSigned :: (a -> b) -> Signed a -> Signed b Source #
Passed function needs to preserve the object representation to be safe
data PublicKexKey Source #
Instances
Show PublicKexKey Source # | |
Defined in Erebos.PubKey showsPrec :: Int -> PublicKexKey -> ShowS # show :: PublicKexKey -> String # showList :: [PublicKexKey] -> ShowS # | |
Storable PublicKexKey Source # | |
Defined in Erebos.PubKey store' :: PublicKexKey -> Store Source # load' :: Load PublicKexKey Source # store :: forall (c :: Type -> Type). StorageCompleteness c => Storage' c -> PublicKexKey -> IO (Ref' c) Source # load :: Ref -> PublicKexKey Source # | |
KeyPair SecretKexKey PublicKexKey Source # | |
Defined in Erebos.PubKey |
data SecretKexKey Source #
Instances
KeyPair SecretKexKey PublicKexKey Source # | |
Defined in Erebos.PubKey |
dhSecret :: SecretKexKey -> PublicKexKey -> ScrubbedBytes Source #