Documentation ¶
Index ¶
- Constants
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func GenAesKey() ([]byte, error)
- func GenRsaKey(bits int) (privateKey, publicKey string, err error)
- func PKCS5Padding(plaintext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func RsaDecryptHex(encryptedData, privateKey string) (string, error)
- func RsaEncryptHex(originalData, publicKey string) (string, error)
Constants ¶
View Source
const ( AlgRsa = "rsa" AlgAes = "aes" )
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func RsaDecryptHex ¶
func RsaEncryptHex ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.