crypto-pubkey-openssh

OpenSSH keys decoder/encoder https://github.com/knsd/crypto-pubkey-openssh

Version on this page:0.2.7
Stackage Nightly 2018-12-15:0.2.7
Latest on Hackage:0.2.7

See all snapshots crypto-pubkey-openssh appears in

Maintained by Fedor Gogolev

Module documentation for 0.2.7

There are no documented modules for this package.

crypto-pubkey-openssh Build Status

OpenSSH keys decoder/encoder, example.

import System.Environment (getArgs)
import qualified Data.ByteString as B

import Crypto.PubKey.OpenSsh (decodePrivate)

main :: IO ()
main = do
    fname <- fmap head getArgs
    content <- B.readFile fname
    case decodePrivate content of
        Left e -> error e
        Right key -> print key
comments powered byDisqus