Documentation ¶
Index ¶
- Variables
- func ParseBase64PKCS1PrivateKey(s string) (priv *rsa.PrivateKey, err error)
- func ParseBase64PKCS8PrivateKey(s string) (priv *rsa.PrivateKey, err error)
- func ParseBase64PKIXPublicKey(s string) (pub *rsa.PublicKey, err error)
- func ParsePemPKCS1PrivateKey(s string) (priv *rsa.PrivateKey, err error)
- func ParsePemPKCS8PrivateKey(s string) (priv *rsa.PrivateKey, err error)
- func ParsePemPKIXPublicKey(s string) (pub *rsa.PublicKey, err error)
- func RsaSignWithHash(content string, hash crypto.Hash, priv *rsa.PrivateKey) (string, error)
- func VerifyKeyPair(priv *rsa.PrivateKey, pub *rsa.PublicKey) error
- func VerifyRsaSignWithHash(content, sign string, hash crypto.Hash, pub *rsa.PublicKey) error
- type RsaKeyPair
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMalformedPem = errors.New("malformed pem")
)
Functions ¶
func ParseBase64PKCS1PrivateKey ¶
func ParseBase64PKCS1PrivateKey(s string) (priv *rsa.PrivateKey, err error)
ParseBase64PKCS1PrivateKey ...
func ParseBase64PKCS8PrivateKey ¶
func ParseBase64PKCS8PrivateKey(s string) (priv *rsa.PrivateKey, err error)
ParseBase64PKCS8PrivateKey ...
func ParseBase64PKIXPublicKey ¶
ParseBase64PKIXPublicKey ...
func ParsePemPKCS1PrivateKey ¶
func ParsePemPKCS1PrivateKey(s string) (priv *rsa.PrivateKey, err error)
ParsePemPKCS1PrivateKey ...
func ParsePemPKCS8PrivateKey ¶
func ParsePemPKCS8PrivateKey(s string) (priv *rsa.PrivateKey, err error)
ParsePemPKCS8PrivateKey ...
func ParsePemPKIXPublicKey ¶
ParsePemPKIXPublicKey ...
func RsaSignWithHash ¶
RsaSignWithHash ...
func VerifyKeyPair ¶
func VerifyKeyPair(priv *rsa.PrivateKey, pub *rsa.PublicKey) error
VerifyKeyPair ...
Types ¶
type RsaKeyPair ¶
type RsaKeyPair struct { Priv *rsa.PrivateKey Pub *rsa.PublicKey PrivPKCS1Pem string PubPKIXPem string }
RsaKeyPair ...
Click to show internal directories.
Click to hide internal directories.