Documentation
¶
Index ¶
- Constants
- func ChiselKey2PEM(chiselKey []byte) ([]byte, error)
- func FingerprintKey(k ssh.PublicKey) string
- func GenerateKey(seed string) ([]byte, error)
- func GenerateKeyFile(keyFilePath, seed string) error
- func GenerateKeyGo119(c elliptic.Curve, rand io.Reader) (*ecdsa.PrivateKey, error)
- func IsChiselKey(chiselKey []byte) bool
- func NewDetermRand(seed []byte) io.Reader
- func Seed2PEM(seed string) ([]byte, error)
- type Argon2idHash
- type HashSalt
Constants ¶
View Source
const ChiselKeyPrefix = "ck-"
View Source
const DetermRandIter = 2048
Variables ¶
This section is empty.
Functions ¶
func ChiselKey2PEM ¶
func FingerprintKey ¶
FingerprintKey calculates the SHA256 hash of an SSH public key
func GenerateKeyFile ¶
GenerateKeyFile generates an ChiselKey
func GenerateKeyGo119 ¶
This function is copied from ecdsa.GenerateKey() of Go 1.19
func IsChiselKey ¶
func NewDetermRand ¶
Types ¶
type Argon2idHash ¶
type Argon2idHash struct {
// contains filtered or unexported fields
}
func NewArgon2idHash ¶
func NewArgon2idHash(time, saltLen uint32, memory uint32, threads uint8, keyLen uint32) *Argon2idHash
NewArgon2idHash constructor function for Argon2idHash.
func (*Argon2idHash) GenerateHash ¶
func (a *Argon2idHash) GenerateHash(password []byte) (*HashSalt, error)
GenerateHash using the password and provided salt. If not salt value provided fallback to random value generated of a given length.
Click to show internal directories.
Click to hide internal directories.