Maintained by Fedor Gogolev

Module documentation for 0.2.7

This version can be pinned in stack with:crypto-pubkey-openssh-0.2.7@sha256:18c75602b80a5c601780a4ea8536ce8f82ce8867760177351ba88de579bf703c,2518

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