Bitcoinex.Utils (bitcoinex v0.1.2) View Source

Contains useful utility functions used in Bitcoinex.

Link to this section Summary

Types

The pad_type describes the padding to use.

Functions

pads binary according to the byte length and the padding type. A binary can be padded with leading or trailing zeros.

Link to this section Types

Specs

pad_type() :: :leading | :trailing

The pad_type describes the padding to use.

Link to this section Functions

Specs

double_sha256(iodata()) :: binary()
Link to this function

pad(bin, byte_len, pad_type)

View Source

Specs

pad(bin :: binary(), byte_len :: integer(), pad_type :: pad_type()) :: binary()

pads binary according to the byte length and the padding type. A binary can be padded with leading or trailing zeros.

Specs

replicate(term(), integer()) :: [term()]

Specs

sha256(iodata()) :: binary()