Documentation ¶
Index ¶
- type Aes
- func (Aes) DecryptCBC(cipherText, key, iv []byte, ivs ...[]byte) ([]byte, error)
- func (Aes) EncryptCBC(plainText, key, iv []byte, ivs ...[]byte) ([]byte, error)
- func (Aes) New() *Aes
- func (Aes) PKCS7Padding(src []byte, blockSize int) []byte
- func (Aes) PKCS7UnPadding(src []byte, blockSize int) ([]byte, error)
- type PemBase64
- func (r *PemBase64) GeneratePemPrivateKey() (*PemBase64, error)
- func (r *PemBase64) GeneratePemPublicKey() (*PemBase64, error)
- func (r *PemBase64) GetBase64PrivateKey() string
- func (r *PemBase64) GetBase64PublicKey() string
- func (r *PemBase64) GetPemPrivateKey() []byte
- func (r *PemBase64) GetPemPublicKey() []byte
- func (PemBase64) New() *PemBase64
- func (r *PemBase64) SetBase64PrivateKye(base64PrivateKye string) *PemBase64
- func (r *PemBase64) SetBase64PublicKey(base64PublicKey string) *PemBase64
- type Rsa
- func (r *Rsa) DecryptByBase64(base64PrivateKey string, cipherText []byte) ([]byte, error)
- func (*Rsa) DecryptByPem(pemPrivateKey []byte, cipherText []byte) []byte
- func (r *Rsa) EncryptByBase64(base64PublicKey string, plainText []byte) ([]byte, error)
- func (*Rsa) EncryptByPem(pemPublicKey []byte, plainText []byte) []byte
- func (Rsa) New() *Rsa
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aes ¶ added in v1.1.1
type Aes struct{}
var AesHelper Aes
func (Aes) DecryptCBC ¶ added in v1.1.1
func (Aes) EncryptCBC ¶ added in v1.1.1
type PemBase64 ¶ added in v1.1.1
type PemBase64 struct {
// contains filtered or unexported fields
}
var PemBase64Helper PemBase64
func (*PemBase64) GeneratePemPrivateKey ¶ added in v1.1.1
func (*PemBase64) GeneratePemPublicKey ¶ added in v1.1.1
func (*PemBase64) GetBase64PrivateKey ¶ added in v1.1.1
func (*PemBase64) GetBase64PublicKey ¶ added in v1.1.1
func (*PemBase64) GetPemPrivateKey ¶ added in v1.1.1
func (*PemBase64) GetPemPublicKey ¶ added in v1.1.1
func (*PemBase64) SetBase64PrivateKye ¶ added in v1.1.1
func (*PemBase64) SetBase64PublicKey ¶ added in v1.1.1
type Rsa ¶
type Rsa struct{}
var (
RsaHelper Rsa
)
func (*Rsa) DecryptByBase64 ¶ added in v1.1.0
func (*Rsa) DecryptByPem ¶ added in v1.1.0
DecryptByPem 使用PEM私钥进行RSA解密
func (*Rsa) EncryptByBase64 ¶ added in v1.0.9
EncryptByBase64 通过base64公钥加密
func (*Rsa) EncryptByPem ¶ added in v1.1.0
EncryptByPem 通过pem公钥加密
Click to show internal directories.
Click to hide internal directories.