Documentation
¶
Index ¶
- func Base64Decode(src []byte) (dst []byte, err error)
- func Base64Encode(src []byte) (dst []byte)
- func GenRsaKey() ([]byte, []byte, error)
- func ParsePrivateKey(key []byte) (*rsa.PrivateKey, error)
- func ParsePublicKey(key []byte) (*rsa.PublicKey, error)
- type AesCipher
- type RsaCipher
- func (r *RsaCipher) Decrypt(cipherText []byte) ([]byte, error)
- func (r *RsaCipher) DecryptToString(cipherText string) (string, error)
- func (r *RsaCipher) Encrypt(plainText []byte) ([]byte, error)
- func (r *RsaCipher) EncryptToString(plainText string) (string, error)
- func (r *RsaCipher) Sign(text []byte) ([]byte, error)
- func (r *RsaCipher) VerifySign(text, signature []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func Base64Encode ¶
func ParsePrivateKey ¶
func ParsePrivateKey(key []byte) (*rsa.PrivateKey, error)
ParsePrivateKey 解析私钥
Types ¶
type AesCipher ¶
type AesCipher struct {
// contains filtered or unexported fields
}
func NewAesCipher ¶
func (*AesCipher) DecryptToString ¶
type RsaCipher ¶
type RsaCipher struct {
// contains filtered or unexported fields
}
func NewRsaCipher ¶
func (*RsaCipher) DecryptToString ¶
func (*RsaCipher) EncryptToString ¶
Click to show internal directories.
Click to hide internal directories.