keygener

package
v0.0.0-...-73b5ff1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownAlgoType = errors.New("unknown algo type")

未知的算法错误

Functions

func GenEcdsaKey

func GenEcdsaKey(keyname string) error

GenEcdsaKey 生成Ecdsa公私钥对

func GenEd25519Key

func GenEd25519Key(keyname string) error

GenEd25519Key 生成ed25519公私钥对

func GenKey

func GenKey(algotype AlgoType, keyname string) error

GenKey 随机生成指定类型的公私钥对

func GenRsaKey

func GenRsaKey(keyname string) error

GenRsaKey 生成rsa公私钥对

Types

type AlgoType

type AlgoType int32

支持的算法类型

const (
	AlgoType_RSA AlgoType = iota
	AlgoType_ECDSA
	AlgoType_ED25519
)

func StringTOAlgoType

func StringTOAlgoType(algoname string) (AlgoType, error)

StringTOAlgoType 将算法名转成算法枚举

Jump to

Keyboard shortcuts

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