Documentation ¶
Index ¶
- Constants
- type Option
- type Options
- type Rsa
- func (r *Rsa) GenRsaKey() error
- func (r *Rsa) LoadRsaKey() (*rsa.PrivateKey, *rsa.PublicKey, error)
- func (r *Rsa) ParseBase64Key(base64PublicKey, base64PrivateKey string) error
- func (r *Rsa) ParsePemKey(publicKey, privateKey string) error
- func (r *Rsa) RsaDecrypt(ciphertext []byte) ([]byte, error)
- func (r *Rsa) RsaEncrypt(origData []byte) ([]byte, error)
- func (r *Rsa) RsaSign(data []byte) ([]byte, error)
- func (r *Rsa) RsaVerySign(origData, signData []byte) error
Constants ¶
View Source
const ( PKCS1 = "PKCS1" PKCS8 = "PKCS8" )
View Source
const ( MD5 = "MD5" SHA1 = "SHA1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
func WithFormat ¶
func WithPrivatePemFile ¶
func WithPublicPemFile ¶
func WithSignatureAlgorithm ¶
type Rsa ¶
type Rsa struct {
// contains filtered or unexported fields
}
func (*Rsa) LoadRsaKey ¶
LoadRsaKey 加载私匙公匙
func (*Rsa) ParseBase64Key ¶
func (*Rsa) ParsePemKey ¶
func (*Rsa) RsaVerySign ¶
Click to show internal directories.
Click to hide internal directories.