internal

package
v0.0.0-...-c4bf151 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package internal implements common functionality shared by the other packages in this library.

Index

Constants

This section is empty.

Variables

View Source
var HashFillFunction = (*[0]byte)(C.go_hash_fill)

HashFillFunction is a C function pointer that takes two array pointers and fills the first with the hash of the second.

View Source
var RandomBytesFunction = (*[0]byte)(C.go_random_bytes)

RandomBytesFunction is a C function pointer that takes an array pointer as input and fills the array with random bytes.

Functions

func BigIntFromC

func BigIntFromC(result *big.Int, bigInt unsafe.Pointer, bigIntSize int) *big.Int

BigIntFromC converts a BigInt of the given length to a Golang big.Int.

func BigIntToC

func BigIntToC(result unsafe.Pointer, resultSize int, scalar *big.Int) unsafe.Pointer

BigIntToC converts from a Golang big.Int to a BigInt of the appropriate length.

func PointerToByteSlice

func PointerToByteSlice(pointer unsafe.Pointer, capacity int) []byte

PointerToByteSlice builds a byte slice around a pointer to data.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL