Documentation ¶
Index ¶
- func SignRS256(r *rsa.PrivateKey, data []byte) ([]byte, error)
- func SignRS384(r *rsa.PrivateKey, data []byte) ([]byte, error)
- func SignRS512(r *rsa.PrivateKey, data []byte) ([]byte, error)
- func SignRS512Base64(r *rsa.PrivateKey, data []byte) (string, error)
- type CryptorOAEP
- func (enc *CryptorOAEP) DecryptOAEP(ciphertextBytes []byte, label []byte) ([]byte, error)
- func (enc *CryptorOAEP) DecryptOAEPBase64String(ciphertextBase64 string, label []byte) ([]byte, error)
- func (enc *CryptorOAEP) DecryptOAEPBase64StringFromPath(ciphertextBase64Path string, label []byte) ([]byte, error)
- func (enc *CryptorOAEP) EncryptOAEP(plaintextBytes []byte, label []byte) ([]byte, error)
- func (enc *CryptorOAEP) EncryptOAEPToBase64String(plaintextBytes []byte, label []byte) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SignRS256 ¶
func SignRS256(r *rsa.PrivateKey, data []byte) ([]byte, error)
SignRS256 signs data with rsa-sha256
func SignRS384 ¶
func SignRS384(r *rsa.PrivateKey, data []byte) ([]byte, error)
SignRS384 signs data with rsa-sha384
func SignRS512 ¶
func SignRS512(r *rsa.PrivateKey, data []byte) ([]byte, error)
SignRS512 signs data with rsa-sha512
func SignRS512Base64 ¶
func SignRS512Base64(r *rsa.PrivateKey, data []byte) (string, error)
SignRS512 signs data with rsa-sha512
Types ¶
type CryptorOAEP ¶
type CryptorOAEP struct { Hash hash.Hash RsaPrivateKey *rsa.PrivateKey RsaPublicKey *rsa.PublicKey }
func NewCryptorOAEP ¶
func NewCryptorOAEP() CryptorOAEP
func (*CryptorOAEP) DecryptOAEP ¶
func (enc *CryptorOAEP) DecryptOAEP(ciphertextBytes []byte, label []byte) ([]byte, error)
func (*CryptorOAEP) DecryptOAEPBase64String ¶
func (enc *CryptorOAEP) DecryptOAEPBase64String(ciphertextBase64 string, label []byte) ([]byte, error)
func (*CryptorOAEP) DecryptOAEPBase64StringFromPath ¶
func (enc *CryptorOAEP) DecryptOAEPBase64StringFromPath(ciphertextBase64Path string, label []byte) ([]byte, error)
func (*CryptorOAEP) EncryptOAEP ¶
func (enc *CryptorOAEP) EncryptOAEP(plaintextBytes []byte, label []byte) ([]byte, error)
func (*CryptorOAEP) EncryptOAEPToBase64String ¶
func (enc *CryptorOAEP) EncryptOAEPToBase64String(plaintextBytes []byte, label []byte) (string, error)
Click to show internal directories.
Click to hide internal directories.