Documentation ¶
Index ¶
- Variables
- func MarshalPKCS1PrivateKey(key *dsa.PrivateKey) ([]byte, error)
- func MarshalPKCS1PublicKey(key *dsa.PublicKey) ([]byte, error)
- func MarshalPKCS8PrivateKey(key *dsa.PrivateKey) ([]byte, error)
- func MarshalPKCS8PublicKey(pub *dsa.PublicKey) ([]byte, error)
- func MarshalXMLPrivateKey(key *dsa.PrivateKey) ([]byte, error)
- func MarshalXMLPublicKey(key *dsa.PublicKey) ([]byte, error)
- func ParsePKCS1PrivateKey(derBytes []byte) (*dsa.PrivateKey, error)
- func ParsePKCS1PublicKey(derBytes []byte) (*dsa.PublicKey, error)
- func ParsePKCS8PrivateKey(derBytes []byte) (key *dsa.PrivateKey, err error)
- func ParsePKCS8PublicKey(derBytes []byte) (*dsa.PublicKey, error)
- func ParseXMLPrivateKey(der []byte) (*dsa.PrivateKey, error)
- func ParseXMLPublicKey(der []byte) (*dsa.PublicKey, error)
- type PKCS1Key
- func (this PKCS1Key) MarshalPrivateKey(key *dsa.PrivateKey) ([]byte, error)
- func (this PKCS1Key) MarshalPublicKey(key *dsa.PublicKey) ([]byte, error)
- func (this PKCS1Key) ParsePrivateKey(derBytes []byte) (*dsa.PrivateKey, error)
- func (this PKCS1Key) ParsePublicKey(derBytes []byte) (*dsa.PublicKey, error)
- type PKCS8Key
- func (this PKCS8Key) MarshalPrivateKey(key *dsa.PrivateKey) ([]byte, error)
- func (this PKCS8Key) MarshalPublicKey(key *dsa.PublicKey) ([]byte, error)
- func (this PKCS8Key) ParsePrivateKey(der []byte) (key *dsa.PrivateKey, err error)
- func (this PKCS8Key) ParsePublicKey(der []byte) (*dsa.PublicKey, error)
- type XMLKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 默认为 pkcs1 模式 MarshalPublicKey = MarshalPKCS1PublicKey ParsePublicKey = ParsePKCS1PublicKey MarshalPrivateKey = MarshalPKCS1PrivateKey ParsePrivateKey = ParsePKCS1PrivateKey )
Functions ¶
func MarshalPKCS8PrivateKey ¶
func MarshalPKCS8PrivateKey(key *dsa.PrivateKey) ([]byte, error)
PKCS8 包装私钥
func MarshalPKCS8PublicKey ¶
PKCS8 包装公钥
func MarshalXMLPrivateKey ¶
func MarshalXMLPrivateKey(key *dsa.PrivateKey) ([]byte, error)
func ParsePKCS1PrivateKey ¶
func ParsePKCS1PrivateKey(derBytes []byte) (*dsa.PrivateKey, error)
解析私钥
func ParsePKCS8PrivateKey ¶
func ParsePKCS8PrivateKey(derBytes []byte) (key *dsa.PrivateKey, err error)
PKCS8 解析私钥
func ParsePKCS8PublicKey ¶
PKCS8 解析公钥
func ParseXMLPrivateKey ¶
func ParseXMLPrivateKey(der []byte) (*dsa.PrivateKey, error)
Types ¶
type PKCS1Key ¶
type PKCS1Key struct{}
*
- dsa pkcs1 密钥 *
- @create 2022-3-19
- @author deatil
func (PKCS1Key) MarshalPrivateKey ¶
func (this PKCS1Key) MarshalPrivateKey(key *dsa.PrivateKey) ([]byte, error)
包装私钥
func (PKCS1Key) MarshalPublicKey ¶
包装公钥
func (PKCS1Key) ParsePrivateKey ¶
func (this PKCS1Key) ParsePrivateKey(derBytes []byte) (*dsa.PrivateKey, error)
解析私钥
type PKCS8Key ¶
type PKCS8Key struct{}
*
- dsa pkcs8 密钥 *
- @create 2022-3-19
- @author deatil
func (PKCS8Key) MarshalPrivateKey ¶
func (this PKCS8Key) MarshalPrivateKey(key *dsa.PrivateKey) ([]byte, error)
PKCS8 包装私钥
func (PKCS8Key) MarshalPublicKey ¶
PKCS8 包装公钥
func (PKCS8Key) ParsePrivateKey ¶
func (this PKCS8Key) ParsePrivateKey(der []byte) (key *dsa.PrivateKey, err error)
PKCS8 解析私钥
type XMLKey ¶
type XMLKey struct{}
*
- dsa xml密钥 *
- @create 2023-6-5
- @author deatil
func (XMLKey) MarshalPrivateKey ¶
func (this XMLKey) MarshalPrivateKey(key *dsa.PrivateKey) ([]byte, error)
包装私钥
func (XMLKey) MarshalPublicKey ¶
包装公钥
func (XMLKey) ParsePrivateKey ¶
func (this XMLKey) ParsePrivateKey(data []byte) (*dsa.PrivateKey, error)
解析私钥
Click to show internal directories.
Click to hide internal directories.