Documentation ¶
Index ¶
- func BigIntArrayToElementArray(bi []*big.Int) []*ff.Element
- func BigIntLEBytes(v *big.Int) [32]byte
- func CheckBigIntArrayInField(arr []*big.Int) bool
- func CheckBigIntInField(a *big.Int) bool
- func ElementArrayToBigIntArray(e []*ff.Element) []*big.Int
- func HexDecode(h string) ([]byte, error)
- func HexDecodeInto(dst, h []byte) error
- func HexEncode(bs []byte) string
- func NewIntFromString(s string) *big.Int
- func SetBigIntFromLEBytes(v *big.Int, leBuf []byte) *big.Int
- func SwapEndianness(xs []byte) []byte
- type Hex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BigIntArrayToElementArray ¶ added in v0.0.3
BigIntArrayToElementArray converts an array of *big.Int into an array of *ff.Element
func BigIntLEBytes ¶
BigIntLEBytes encodes a big.Int into an array in Little-Endian.
func CheckBigIntArrayInField ¶
CheckBigIntArrayInField checks if given *big.Int fits in a Field Q element
func CheckBigIntInField ¶
CheckBigIntInField checks if given *big.Int fits in a Field Q element
func ElementArrayToBigIntArray ¶ added in v0.0.5
ElementArrayToBigIntArray converts an array of *ff.Element into an array of *big.Int
func HexDecodeInto ¶
HexDecodeInto decodes a hex string into an array of bytes (dst), verifying that the decoded array has the same length as dst.
func NewIntFromString ¶
NewIntFromString creates a new big.Int from a decimal integer encoded as a string. It will panic if the string is not a decimal integer.
func SetBigIntFromLEBytes ¶
SetBigIntFromLEBytes sets the value of a big.Int from a Little-Endian encoded value.
func SwapEndianness ¶
SwapEndianness swaps the endianness of the value encoded in xs. If xs is Big-Endian, the result will be Little-Endian and viceversa.