Documentation
¶
Index ¶
- Constants
- func AesDecrypt(crypted, iv []byte) ([]byte, error)
- func AesDecryptString(crypted, iv string) (string, error)
- func AesEncrypt(origData, iv []byte) ([]byte, error)
- func AesEncryptString(src, blockSize string) (string, error)
- func CreateKeys(publicKeyWriter, privateKeyWriter io.Writer, keyLength int) error
- func MarshalPKCS8PrivateKey(key *rsa.PrivateKey) []byte
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(src []byte) ([]byte, error)
- func PwdSlat(password, slat string) string
- func PwdSlatWithInt64Hex16(password string, i64 int64) string
- func SlatBuilder(a ...int) string
- type XRsa
Constants ¶
View Source
const ( CHAR_SET = "UTF-8" BASE_64_FORMAT = "UrlSafeNoPadding" RSA_ALGORITHM_KEY_TYPE = "PKCS8" RSA_ALGORITHM_SIGN = crypto.SHA256 )
Variables ¶
This section is empty.
Functions ¶
func CreateKeys ¶
生成密钥对
func MarshalPKCS8PrivateKey ¶
func MarshalPKCS8PrivateKey(key *rsa.PrivateKey) []byte
func PKCS7Padding ¶
func PKCS7UnPadding ¶
func PwdSlatWithInt64Hex16 ¶
PwdSlatWithInt64Hex16 给密码加盐, 盐是 int64 格式的的数字转成 16 进制字符串
Types ¶
Click to show internal directories.
Click to hide internal directories.