bitcoin-hs-0.0.1: Partial implementation of the Bitcoin protocol (as of 2013)

Safe HaskellNone
LanguageHaskell98

Bitcoin.Crypto.Word256

Description

Word256 implementation, with arithmetic written in C.

Should work on both little-endian and big-endian architectures, but only tested on little-endian.

Synopsis

Documentation

data Word256 Source #

Word256 is represented internally as 8 native 32 bit unsigned integers, in little-endian order.

word256ToByteStringLE :: Word256 -> ByteString Source #

Converts to a little-endian bytestring

word256ToByteStringBE :: Word256 -> ByteString Source #

Converts to a big-endian bytestring

word256ToWord8ListLE :: Word256 -> [Word8] Source #

Converts to a little-endian sequence of bytes

shiftl256_small :: Word256 -> Int -> Word256 Source #

Shifts left by at most 31 bits

shiftr256_small :: Word256 -> Int -> Word256 Source #

Shifts right by at most 31 bits

shiftl256_fullword :: Word256 -> Word256 Source #

Shifts left by 32 bits

shiftr256_fullword :: Word256 -> Word256 Source #

Shifts right by 32 bits

shiftr256by1 :: Word256 -> Word256 Source #

Shifts right by 1 bit