Documentation ¶
Index ¶
- func CreateCertificate(template, parent *x509.Certificate, publicKey *sm2.PublicKey, ...) ([]byte, error)
- func CreateCertificateRequestToPem(template *x509.CertificateRequest, signer crypto.Signer) ([]byte, error)
- func CreateCertificateToPem(template, parent *x509.Certificate, pubKey *sm2.PublicKey, ...) ([]byte, error)
- func ReadCertificateFromPem(certPem []byte) (*x509.Certificate, error)
- func ReadCertificateRequestFromPem(certPem []byte) (*x509.CertificateRequest, error)
- func ReadPrivateKeyFromHex(Dhex string) (*sm2.PrivateKey, error)
- func ReadPrivateKeyFromPem(privateKeyPem []byte, pwd []byte) (*sm2.PrivateKey, error)
- func ReadPrivateKeyFromPemFile(filePath string, pwd []byte) (*sm2.PrivateKey, error)
- func ReadPublicKeyFromHex(Qhex string) (*sm2.PublicKey, error)
- func ReadPublicKeyFromPem(publicKeyPem []byte) (*sm2.PublicKey, error)
- func ReadPublicKeyFromPemFile(filePath string) (*sm2.PublicKey, error)
- func WritePrivateKeyToHex(key *sm2.PrivateKey) string
- func WritePrivateKeyToPem(key *sm2.PrivateKey, pwd []byte) ([]byte, error)
- func WritePrivateKeyToPemFile(filePath string, key *sm2.PrivateKey, pwd []byte) ([]byte, error)
- func WritePublicKeyToHex(key *sm2.PublicKey) string
- func WritePublicKeyToPem(key *sm2.PublicKey) ([]byte, error)
- func WritePublicKeyToPemFile(filePath string, key *sm2.PublicKey) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCertificate ¶
func CreateCertificateToPem ¶
func ReadCertificateFromPem ¶
func ReadCertificateFromPem(certPem []byte) (*x509.Certificate, error)
func ReadCertificateRequestFromPem ¶
func ReadCertificateRequestFromPem(certPem []byte) (*x509.CertificateRequest, error)
func ReadPrivateKeyFromHex ¶
func ReadPrivateKeyFromHex(Dhex string) (*sm2.PrivateKey, error)
func ReadPrivateKeyFromPem ¶
func ReadPrivateKeyFromPem(privateKeyPem []byte, pwd []byte) (*sm2.PrivateKey, error)
func ReadPrivateKeyFromPemFile ¶
func ReadPrivateKeyFromPemFile(filePath string, pwd []byte) (*sm2.PrivateKey, error)
func WritePrivateKeyToHex ¶
func WritePrivateKeyToHex(key *sm2.PrivateKey) string
func WritePrivateKeyToPem ¶
func WritePrivateKeyToPem(key *sm2.PrivateKey, pwd []byte) ([]byte, error)
func WritePublicKeyToHex ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.