Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/knsd/crypto-pubkey-openssh

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

Last synced: 2 months ago
JSON representation

OpenSSH keys decoder/encoder

Awesome Lists containing this project

README

        

crypto-pubkey-openssh [![Build Status](https://secure.travis-ci.org/knsd/crypto-pubkey-openssh.png)](http://travis-ci.org/knsd/crypto-pubkey-openssh)
=====================

OpenSSH keys decoder/encoder, example.

```haskell
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
```