ccrypto

package
v0.0.0-...-72a0dfd Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func ChiselKey2PEM

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

func GenerateKeyFile(keyFilePath, seed string) error

GenerateKeyFile generates an ChiselKey

func GenerateKeyGo119

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

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

func IsChiselKey

func IsChiselKey(chiselKey []byte) bool

func NewDetermRand

func NewDetermRand(seed []byte) io.Reader

func Seed2PEM

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