utils

package
v0.0.0-...-3e22ef2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPubKeyType

func GetPubKeyType(key crypto.PublicKey) string

GetPubKeyType does a type-assertaion on the supplied crypto public key and returns it's x509.PublicKeyAlgorithm in string format

func MarshalBytes

func MarshalBytes(object interface{}) ([]byte, error)

MarshalBytes encodes arbitrary Go objects to a byte array

func UnmarshalBytes

func UnmarshalBytes(data []byte, object interface{}) error

UnmarshalBytes takes a byte array and decodes it into a Go object

Types

type ECCPublicKey

type ECCPublicKey struct {
	X, Y *big.Int
}

ECCPublicKey is the bare minimum data needed for an ECC public key. The standard public key structs have more data than is usable when marshaling.

type ECCSignature

type ECCSignature struct {
	R, S *big.Int
}

ECCSignature is the bare minimum of ECC signatures needed. The standard ECC signature structs available in other tools and libraries include fields we can't include when marshaling.

Jump to

Keyboard shortcuts

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