helpers

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ECDSABytesToPrivateKey

func ECDSABytesToPrivateKey(priv []byte) (*ecdsa.PrivateKey, error)

ECDSABytesToPrivateKey bytes to private key

func ECDSABytesToPublicKey

func ECDSABytesToPublicKey(pub []byte) *ecdsa.PublicKey

ECDSABytesToPublicKey bytes to private key

func ECDSAGenerateKeyPair

func ECDSAGenerateKeyPair() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)

ECDSAGenerateKeyPair generates a new key pair

func ECDSAPrivateKeyToBytes

func ECDSAPrivateKeyToBytes(priv *ecdsa.PrivateKey) []byte

ECDSAPrivateKeyToBytes private key to bytes

func ECDSAPublicKeyToBytes

func ECDSAPublicKeyToBytes(pub *ecdsa.PublicKey) []byte

ECDSAPublicKeyToBytes private key to bytes

func Ed25519BytesToPrivateKey

func Ed25519BytesToPrivateKey(priv []byte) (*ed25519.PrivateKey, error)

Ed25519BytesToPrivateKey bytes to private key

func Ed25519BytesToPublicKey

func Ed25519BytesToPublicKey(pub []byte) *ed25519.PublicKey

Ed25519BytesToPublicKey bytes to private key

func Ed25519GenerateKeyPair

func Ed25519GenerateKeyPair() (ed25519.PrivateKey, ed25519.PublicKey, error)

Ed25519GenerateKeyPair generates a new key pair

func Ed25519PrivateKeyToBytes

func Ed25519PrivateKeyToBytes(priv *ed25519.PrivateKey) []byte

Ed25519PrivateKeyToBytes private key to bytes

func Ed25519PublicKeyToBytes

func Ed25519PublicKeyToBytes(pub *ed25519.PublicKey) []byte

Ed25519PublicKeyToBytes private key to bytes

func RSABytesToPrivateKey

func RSABytesToPrivateKey(priv []byte) (*rsa.PrivateKey, error)

RSABytesToPrivateKey bytes to private key

func RSABytesToPublicKey

func RSABytesToPublicKey(pub []byte) (*rsa.PublicKey, error)

RSABytesToPublicKey bytes to public key

func RSAGenerateKeyPair

func RSAGenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)

RSAGenerateKeyPair generates a new key pair

func RSAPrivateKeyToBytes

func RSAPrivateKeyToBytes(priv *rsa.PrivateKey) []byte

RSAPrivateKeyToBytes private key to bytes

func RSAPublicKeyToBytes

func RSAPublicKeyToBytes(pub *rsa.PublicKey) ([]byte, error)

RSAPublicKeyToBytes public key to bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

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