Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Cipher = Cipher {
- cType :: CipherType
- cMode :: CipherMode
- cBlockSize :: Int
- cKeySize :: Int
- data CipherType = AES
- data CipherMode = CBC
- data HMAC = HMAC {
- hDigestSize :: Int
- hFunction :: ByteString -> ByteString
- data PublicKey
- data KeyPair
- = RSAKeyPair { }
- | DSAKeyPair { }
- rsaKeyPairFromFile :: FilePath -> IO KeyPair
- keyPairFromFile :: FilePath -> IO KeyPair
- removeKeyPairHeaderFooter :: [String] -> (String, [String])
- addKeyPairHeaderFooter :: String -> [String] -> [String]
- parseKeyPair :: String -> KeyPair
- printKeyPair :: KeyPair -> String
- generator :: Integer
- safePrime :: Integer
- toBlocks :: Integral a => a -> ByteString -> [ByteString]
- fromBlocks :: [ByteString] -> ByteString
- rsaKeyLen :: PublicKey -> Int
- blob :: PublicKey -> ByteString
- blobToKey :: ByteString -> PublicKey
- sign :: KeyPair -> ByteString -> IO ByteString
- actualSignatureLength :: PublicKey -> Int
- verify :: PublicKey -> ByteString -> ByteString -> IO Bool
Documentation
Cipher | |
|
data CipherType Source
data CipherMode Source
HMAC | |
|
keyPairFromFile :: FilePath -> IO KeyPair Source
removeKeyPairHeaderFooter :: [String] -> (String, [String]) Source
addKeyPairHeaderFooter :: String -> [String] -> [String] Source
parseKeyPair :: String -> KeyPair Source
Parse an key pair from OpenSSH private key file format.
printKeyPair :: KeyPair -> String Source
Turn an key pair into OpenSSH private key file format.
toBlocks :: Integral a => a -> ByteString -> [ByteString] Source
fromBlocks :: [ByteString] -> ByteString Source
blob :: PublicKey -> ByteString Source
blobToKey :: ByteString -> PublicKey Source
sign :: KeyPair -> ByteString -> IO ByteString Source
actualSignatureLength :: PublicKey -> Int Source
The length of the actual signature for a given key The actual signature data is always found at the end of a complete signature, so can be extracted by just grabbing this many bytes at the end.
verify :: PublicKey -> ByteString -> ByteString -> IO Bool Source