Documentation ¶
Index ¶
- func ToECDSAPrivateKey(key []byte) (*ecdsa.PrivateKey, error)
- func ToECDSAPublicKey(key []byte) (*ecdsa.PublicKey, error)
- func ToEd25519PrivateKey(key []byte) (ed25519.PrivateKey, error)
- func ToEd25519PublicKey(key []byte) (ed25519.PublicKey, error)
- func ToRSAPrivateKey(key []byte) (*rsa.PrivateKey, error)
- func ToRSAPrivateKeyWithPassword(key []byte, password string) (*rsa.PrivateKey, error)deprecated
- func ToRSAPublicKey(key []byte) (*rsa.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToECDSAPrivateKey ¶
func ToECDSAPrivateKey(key []byte) (*ecdsa.PrivateKey, error)
ToECDSAPrivateKey parses a PEM encoded Elliptic Curve Private Key Structure
func ToECDSAPublicKey ¶
ToECDSAPublicKey parses a PEM encoded PKCS1 or PKCS8 public key
func ToEd25519PrivateKey ¶
func ToEd25519PrivateKey(key []byte) (ed25519.PrivateKey, error)
ToEd25519PrivateKey parses a PEM-encoded Edwards curve private key
func ToEd25519PublicKey ¶
ToEd25519PublicKey parses a PEM-encoded Edwards curve public key
func ToRSAPrivateKey ¶
func ToRSAPrivateKey(key []byte) (*rsa.PrivateKey, error)
ToRSAPrivateKey parses a PEM encoded PKCS1 or PKCS8 private key
func ToRSAPrivateKeyWithPassword
deprecated
func ToRSAPrivateKeyWithPassword(key []byte, password string) (*rsa.PrivateKey, error)
ToRSAPrivateKeyWithPassword parses a PEM encoded PKCS1 or PKCS8 private key protected with password
Deprecated: This function is deprecated and should not be used anymore. It uses the deprecated x509.DecryptPEMBlock function, which was deprecated since RFC 1423 is regarded insecure by design. Unfortunately, there is no alternative in the Go standard library for now. See https://github.com/golang/go/issues/8860.
Types ¶
This section is empty.