Documentation ¶
Index ¶
- Variables
- func AesDecrypt(data []byte, key []byte) ([]byte, error)
- func AesEncrypt(data []byte, key []byte) ([]byte, error)
- func DecryptByAes(data string) ([]byte, error)
- func EncryptByAes(data []byte) (string, error)
- type Rsa
- func (r *Rsa) CreateKeys(keyLength int) (privateKey, publicKey string)
- func (r *Rsa) CreatePkcs8Keys(keyLength int) (privateKey, publicKey string)
- func (r *Rsa) Decrypt(data []byte) ([]byte, error)
- func (r *Rsa) Encrypt(data []byte) ([]byte, error)
- func (r *Rsa) Pkcs1ToPkcs8(key []byte) []byte
- func (r *Rsa) Sign(data []byte, sHash crypto.Hash) ([]byte, error)
- func (r *Rsa) Verify(data []byte, sign []byte, sHash crypto.Hash) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var PwdKey = []byte("ABCDABCDABCDABCD")
Functions ¶
func DecryptByAes ¶
func EncryptByAes ¶
Types ¶
type Rsa ¶
type Rsa struct {
// contains filtered or unexported fields
}
func (*Rsa) CreateKeys ¶
func (*Rsa) CreatePkcs8Keys ¶
func (*Rsa) Pkcs1ToPkcs8 ¶
Click to show internal directories.
Click to hide internal directories.