Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.ByteString.Base58
Synopsis
- newtype Alphabet = Alphabet {}
- bitcoinAlphabet :: Alphabet
- rippleAlphabet :: Alphabet
- flickrAlphabet :: Alphabet
- encodeBase58 :: Alphabet -> ByteString -> ByteString
- decodeBase58 :: Alphabet -> ByteString -> Maybe ByteString
- encodeBase58I :: Alphabet -> Integer -> ByteString
- decodeBase58I :: Alphabet -> ByteString -> Maybe Integer
Alphabet
Constructors
Alphabet | |
Fields |
Instances
Eq Alphabet Source # | |
Ord Alphabet Source # | |
Defined in Data.ByteString.Base58.Internal | |
Show Alphabet Source # | |
IsString Alphabet Source # | |
Defined in Data.ByteString.Base58.Internal Methods fromString :: String -> Alphabet # | |
Generic Alphabet Source # | |
type Rep Alphabet Source # | |
Defined in Data.ByteString.Base58.Internal type Rep Alphabet = D1 ('MetaData "Alphabet" "Data.ByteString.Base58.Internal" "base58-bytestring-0.1.0-5I8yhCRGEqbIIN0nBBsX7K" 'True) (C1 ('MetaCons "Alphabet" 'PrefixI 'True) (S1 ('MetaSel ('Just "unAlphabet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) |
Encoding and decoding bytestrings
encodeBase58 :: Alphabet -> ByteString -> ByteString Source #
Encode a bytestring to a base 58 representation.
decodeBase58 :: Alphabet -> ByteString -> Maybe ByteString Source #
Decode a base 58 encoded bytestring. This can fail if the input bytestring contains invalid base 58 characters such as 0,O,l,I
Encoding and decoding integers
encodeBase58I :: Alphabet -> Integer -> ByteString Source #
decodeBase58I :: Alphabet -> ByteString -> Maybe Integer Source #