From 7742f014feea4dbcd8d812821c099b8ee160164f Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 6 Jan 2014 19:34:44 -0500 Subject: Option --show-ssh (works like --show-pem, but ssh-rsa format). --- LengthPrefixedBE.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'LengthPrefixedBE.hs') diff --git a/LengthPrefixedBE.hs b/LengthPrefixedBE.hs index 9d8472d..dd74fe3 100644 --- a/LengthPrefixedBE.hs +++ b/LengthPrefixedBE.hs @@ -10,6 +10,7 @@ import Control.Monad (when) import Data.Bits import Data.Binary import Data.Binary.Get +import Data.Binary.Put (putWord32be, putLazyByteString) import Data.Int {- @@ -41,8 +42,8 @@ newtype LengthPrefixedBE = LengthPrefixedBE Integer instance Binary LengthPrefixedBE where put (LengthPrefixedBE n) = do - put len - put bytes + putWord32be len + putLazyByteString bytes where bytes = encode_bigendian n len = fromIntegral (L.length bytes) :: Word32 -- cgit v1.2.3