utils

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package utils provides auxiliary functions used throughout the repo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressECPBytes

func CompressECPBytes(b []byte) ([]byte, error)

CompressECPBytes takes the uncompressed byte representation of an EC point and returns corresponding compressed representation.

func FromPEMFile

func FromPEMFile(o encoding.BinaryUnmarshaler, f, pemType string) error

func GenerateRandomBytes

func GenerateRandomBytes(n int) ([]byte, error)

GenerateRandomBytes return slice of bytes of specified size of cryptographically secure random numbers. Refer to https://golang.ir/pkg/crypto/rand/ for details regarding sources of entropy.

func ToPEMFile

func ToPEMFile(o encoding.BinaryMarshaler, f, pemType string) error

To be used as main entry point by all calls (need to actually do it)

Types

This section is empty.

Jump to

Keyboard shortcuts

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