Documentation ¶
Index ¶
- func DecodePKIXPublicKeyPEM(publicKeyPEM []byte) (*rsa.PublicKey, error)
- func DecodePrivateKeyPEM(privateKeyPEM []byte) (*rsa.PrivateKey, error)
- func EncodePKIXPublicKeyPEM(publicKey *rsa.PublicKey) ([]byte, error)
- func EncodePrivateKeyPEM(privateKey *rsa.PrivateKey) ([]byte, error)
- func Sign(privateKeyPEM, bytesToSign []byte) (string, error)
- func Verify(publicKeyPEM []byte, signature string, signed []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodePKIXPublicKeyPEM ¶
DecodePKIXPublicKeyPEM decodes DER encoded RSA public key PEM
func DecodePrivateKeyPEM ¶
func DecodePrivateKeyPEM(privateKeyPEM []byte) (*rsa.PrivateKey, error)
DecodePrivateKeyPEM decodes RSA PKCS#1 v1.5 private key
func EncodePKIXPublicKeyPEM ¶
EncodePKIXPublicKeyPEM serialises a public key to DER-encoded PKIX format
func EncodePrivateKeyPEM ¶
func EncodePrivateKeyPEM(privateKey *rsa.PrivateKey) ([]byte, error)
EncodePrivateKeyPEM encodes RSA PKCS#1 v1.5 private key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.