Documentation
¶
Index ¶
- func AesDecrypt(cryted string, key string) string
- func AesEncrypt(orig string, key string) string
- func MD5(i interface{}) string
- func PKCS7Padding(ciphertext []byte, blocksize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- type Rsa
- func (r *Rsa) CreateKeys(keyLength int) (privateKey, publicKey string)
- func (r *Rsa) CreatePkcs8Keys(keyLength int) (privateKey, publicKey string)
- func (r *Rsa) Decrypt(secretData []byte) ([]byte, error)
- func (r *Rsa) Encrypt(data []byte) ([]byte, error)
- func (r *Rsa) MarshalPKCS8PrivateKey(key *rsa.PrivateKey) []byte
- func (r *Rsa) Sign(data []byte, algorithmSign crypto.Hash) ([]byte, error)
- func (r *Rsa) Verify(data []byte, sign []byte, algorithmSign crypto.Hash) bool
- type Serializable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
Types ¶
type Rsa ¶
type Rsa struct {
// contains filtered or unexported fields
}
func (*Rsa) MarshalPKCS8PrivateKey ¶
func (r *Rsa) MarshalPKCS8PrivateKey(key *rsa.PrivateKey) []byte
type Serializable ¶
type Serializable interface {
Serialize() []byte
}
Click to show internal directories.
Click to hide internal directories.