ccrypto

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 14 Imported by: 22

Documentation

Index

Constants

View Source
const ChiselKeyPrefix = "ck-"
View Source
const DetermRandIter = 2048

Variables

This section is empty.

Functions

func ChiselKey2PEM added in v1.9.0

func ChiselKey2PEM(chiselKey []byte) ([]byte, error)

func FingerprintKey

func FingerprintKey(k ssh.PublicKey) string

FingerprintKey calculates the SHA256 hash of an SSH public key

func GenerateKey

func GenerateKey(seed string) ([]byte, error)

GenerateKey generates a PEM key

func GenerateKeyFile added in v1.9.0

func GenerateKeyFile(keyFilePath, seed string) error

GenerateKeyFile generates an ChiselKey

func GenerateKeyGo119 added in v1.9.0

func GenerateKeyGo119(c elliptic.Curve, rand io.Reader) (*ecdsa.PrivateKey, error)

This function is copied from ecdsa.GenerateKey() of Go 1.19

func IsChiselKey added in v1.9.0

func IsChiselKey(chiselKey []byte) bool

func NewDetermRand

func NewDetermRand(seed []byte) io.Reader

func Seed2PEM added in v1.9.0

func Seed2PEM(seed string) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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