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 MarshalPKCS1PrivateKey ¶ added in v1.0.2014
func MarshalPKCS1PrivateKey(key *dsa.PrivateKey) ([]byte, error)
包装私钥
func MarshalPKCS1PublicKey ¶ added in v1.0.2014
包装公钥
func MarshalPKCS8PrivateKey ¶ added in v1.0.1022
func MarshalPKCS8PrivateKey(key *dsa.PrivateKey) ([]byte, error)
PKCS8 包装私钥
func MarshalPKCS8PublicKey ¶ added in v1.0.1022
PKCS8 包装公钥
func MarshalXMLPrivateKey ¶ added in v1.0.2015
func MarshalXMLPrivateKey(key *dsa.PrivateKey) ([]byte, error)
func MarshalXMLPublicKey ¶ added in v1.0.2015
func ParsePKCS1PrivateKey ¶ added in v1.0.2014
func ParsePKCS1PrivateKey(derBytes []byte) (*dsa.PrivateKey, error)
解析私钥
func ParsePKCS1PublicKey ¶ added in v1.0.2014
解析公钥
func ParsePKCS8PrivateKey ¶ added in v1.0.1022
func ParsePKCS8PrivateKey(derBytes []byte) (key *dsa.PrivateKey, err error)
PKCS8 解析私钥
func ParsePKCS8PublicKey ¶ added in v1.0.1022
PKCS8 解析公钥
func ParseXMLPrivateKey ¶ added in v1.0.2015
func ParseXMLPrivateKey(der []byte) (*dsa.PrivateKey, error)
Types ¶
type PKCS1Key ¶ added in v1.0.1032
type PKCS1Key struct{}
*
- dsa pkcs1 密钥 *
- @create 2022-3-19
- @author deatil
func (PKCS1Key) MarshalPrivateKey ¶ added in v1.0.1032
func (this PKCS1Key) MarshalPrivateKey(key *dsa.PrivateKey) ([]byte, error)
包装私钥
func (PKCS1Key) MarshalPublicKey ¶ added in v1.0.1032
包装公钥
func (PKCS1Key) ParsePrivateKey ¶ added in v1.0.1032
func (this PKCS1Key) ParsePrivateKey(derBytes []byte) (*dsa.PrivateKey, error)
解析私钥
type PKCS8Key ¶ added in v1.0.1032
type PKCS8Key struct{}
*
- dsa pkcs8 密钥 *
- @create 2022-3-19
- @author deatil
func (PKCS8Key) MarshalPrivateKey ¶ added in v1.0.2014
func (this PKCS8Key) MarshalPrivateKey(key *dsa.PrivateKey) ([]byte, error)
PKCS8 包装私钥
func (PKCS8Key) MarshalPublicKey ¶ added in v1.0.2014
PKCS8 包装公钥
func (PKCS8Key) ParsePrivateKey ¶ added in v1.0.2014
func (this PKCS8Key) ParsePrivateKey(der []byte) (key *dsa.PrivateKey, err error)
PKCS8 解析私钥
type XMLKey ¶ added in v1.0.2015
type XMLKey struct{}
*
- dsa xml密钥 *
- @create 2023-6-5
- @author deatil
func (XMLKey) MarshalPrivateKey ¶ added in v1.0.2015
func (this XMLKey) MarshalPrivateKey(key *dsa.PrivateKey) ([]byte, error)
包装私钥
func (XMLKey) MarshalPublicKey ¶ added in v1.0.2015
包装公钥
func (XMLKey) ParsePrivateKey ¶ added in v1.0.2015
func (this XMLKey) ParsePrivateKey(data []byte) (*dsa.PrivateKey, error)
解析私钥
Click to show internal directories.
Click to hide internal directories.