OpenSSH keys decoder/encoder https://github.com/knsd/crypto-pubkey-openssh
|Latest on Hackage:||0.2.7|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
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