Documentation ¶
Index ¶
- func ComparePublicKeys(key1, key2 crypto.PublicKey) (bool, error)
- func KeySize(key interface{}) int
- func ParseECDSA(s string) (*ecdsa.PrivateKey, error)
- func ParsePublicKey(s string) (crypto.PublicKey, error)
- func ParseRSA(s string) (*rsa.PrivateKey, error)
- func ParseX509(s string) (*x509.Certificate, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePublicKeys ¶
ComparePublicKeys reports whether 2 public keys are equal, error if not comparable.
func KeySize ¶
func KeySize(key interface{}) int
KeySize returns the key size in bits for a given crypto.PrivateKey or crypto.PublicKey. Returns -1 it key type is unsupported.
func ParseECDSA ¶
func ParseECDSA(s string) (*ecdsa.PrivateKey, error)
ParseECDSA private key from a PEM formatted block.
func ParsePublicKey ¶
ParsePublicKey RSA and ECDSA public keys from a PEM formatted block.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.