Documentation
¶
Index ¶
- func AesDecrypt(cryted string, key string) string
- func AesEncrypt(orig string, key string) string
- func Base64Decode(src []byte) ([]byte, error)
- func Base64Encode(src []byte) []byte
- func Check(content, encrypted string) bool
- func DesDecrypt(decrypted string, key []byte) (string, error)
- func DesEncrypt(text string, key []byte) (string, error)
- func Encode(data string) string
- func GenRsaKey(bits int, path string) error
- func GetPriKeyLen(PriKey []byte) (int, error)
- func GetPubKeyLen(PubKey []byte) (int, error)
- func KeyPairs(keyName string) error
- func LoadRsaPrivateKey(private64 string) (*rsa.PrivateKey, error)
- func LoadRsaPublicKey(public64 string) (*rsa.PublicKey, error)
- func PKCS7Padding(ciphertext []byte, blocksize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func RsaDecrypt(ciphertext []byte, privateKey []byte) ([]byte, error)
- func RsaEncrypt(origData []byte, publicKey []byte) ([]byte, error)
- func RsaSign(privateKey *rsa.PrivateKey, data []byte) (string, error)
- func RsaVerify(signature string, publicKey *rsa.PublicKey, data []byte) error
- func Sha256(secret, data string) string
- func ZeroPadding(ciphertext []byte, blockSize int) []byte
- func ZeroUnPadding(origData []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
func Base64Decode ¶
func Base64Encode ¶
func LoadRsaPrivateKey ¶
func LoadRsaPrivateKey(private64 string) (*rsa.PrivateKey, error)
func ZeroPadding ¶
func ZeroUnPadding ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.