sign_msg :: (CryptoRandomGen g) => Message -> Integer -> g -> BS.ByteString -> BS.ByteString
sign_msg  keys time rng payload =
  Armor.encode [armor] where
    wtime = (fromIntegral time :: Binary.Word32)
    lazy_payload = B.fromChunks [payload]
    pgp_payload = LiteralDataPacket 'b' "" wtime lazy_payload
    input = (DataSignature pgp_payload [])
    (DataSignature _ [sig], _) = PGP.sign keys input SHA256 [] time rng
    options = [("Version", "OpenPrivacy 0.99"), ("Hash", "SHA256")]
    encoded_sig = Binary.encode sig
    armor = Armor.Armor Armor.ArmorSignature options encoded_sig
sign_msg :: (CryptoRandomGen g) => Message -> Integer -> g -> BS.ByteString -> BS.ByteString
sign_msg  keys time rng payload =
  Armor.encode [armor] where
    wtime = (fromIntegral time :: Binary.Word32)
    lazy_payload = B.fromChunks [payload]
    pgp_payload = LiteralDataPacket 'b' "" wtime lazy_payload
    input = (DataSignature pgp_payload [])
    (DataSignature _ [sig], _) = PGP.sign keys input SHA256 [] time rng
    options = [("Version", "OpenPrivacy 0.99"), ("Hash", "SHA256")]
    encoded_sig = Binary.encode sig
    armor = Armor.Armor Armor.ArmorSignature options encoded_sig
sign_msg  keys time rng payload =
  Armor.encode [armor] where
    wtime = (fromIntegral time :: Binary.Word32)
    lazy_payload = B.fromChunks [payload]
    pgp_payload = LiteralDataPacket 'b' "" wtime lazy_payload
    input = (DataSignature pgp_payload [])
    (DataSignature _ [sig], _) = PGP.sign keys input SHA256 [] time rng
    options = [("Version", "OpenPrivacy 0.99"), ("Hash", "SHA256")]
    encoded_sig = Binary.encode sig
    armor = Armor.Armor Armor.ArmorSignature options encoded_sig