Documentation ¶
Overview ¶
Utility for key and cert file
Index ¶
- func FormatPrivateKey(privateKey string) (pKey string)
- func FormatPublicKey(publicKey string) (pKey string)
- func LoadCertSN(certPathOrData interface{}) (sn string, err error)
- func LoadPrivateKeyFormBytes(privateKeyType string, input []byte) sign.LoadPrivateKeyFunc
- func LoadPrivateKeyFormString(privateKeyType string, privateKey string) sign.LoadPrivateKeyFunc
- func LoadPublicCertFormBytes(input []byte) (publicKey *rsa.PublicKey, err error)
- func LoadPublicKeyFormBytes(input []byte) (publicKey *rsa.PublicKey, err error)
- func LoadRootCertSN(rootCertPathOrData interface{}) (sn string, err error)
- func PublicCertFormBytes(input []byte) sign.LoadPublicKeyFunc
- func PublicCertFormPath(input string) sign.LoadPublicKeyFunc
- func PublicKeyFormString(input string) sign.LoadPublicKeyFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatPrivateKey ¶
FormatPrivateKey convert private key string to cert file text pattern
func FormatPublicKey ¶
FormatPublicKey convert public key string to cert file text pattern
func LoadCertSN ¶
LoadCertSN load root cert sn form path or bytes
func LoadPrivateKeyFormBytes ¶
func LoadPrivateKeyFormBytes(privateKeyType string, input []byte) sign.LoadPrivateKeyFunc
LoadPrivateKeyFormBytes load private key form byte
func LoadPrivateKeyFormString ¶
func LoadPrivateKeyFormString(privateKeyType string, privateKey string) sign.LoadPrivateKeyFunc
LoadPrivateKeyFormString load private key form string
by default key type is PKCS8, sign type is SHA256
func LoadPublicCertFormBytes ¶
LoadPublicCertFormBytes load public cert form byte
func LoadPublicKeyFormBytes ¶
LoadPublicKeyFormBytes load public key form byte
func LoadRootCertSN ¶
LoadRootCertSN load root cert sn form path or bytes
func PublicCertFormBytes ¶
func PublicCertFormBytes(input []byte) sign.LoadPublicKeyFunc
PublicCertFormBytes load public key form byte
func PublicCertFormPath ¶
func PublicCertFormPath(input string) sign.LoadPublicKeyFunc
PublicCertFormPath load public key form path
func PublicKeyFormString ¶
func PublicKeyFormString(input string) sign.LoadPublicKeyFunc
PublicKeyFormString load public key form string
Types ¶
This section is empty.