modulepackage
0.0.0-20210413102125-13e1c2baefb7
Repository: https://github.com/suisrc/crypto.zgo.git
Documentation: pkg.go.dev
# README
说明
GIN + ENT/SQLX + CASBIN + WIRE + I18N
为了保持系统精简性(目前数据库处理只使用SQLX), 暂时移除了ENT相关的内容, 结构暂时保留
# Functions
AesDecrypt aes.
AesDecryptBytes aes.
AesDecryptStr aes.
AesEncrypt aes.
AesEncryptBytes aes.
AesEncryptStr aes.
AesEncryptStr2 aes.
Base62DecodeString returns the bytes represented by the base64 string s.
Base62DecodeString2 returns the bytes represented by the base64 string s.
Base62DecodeString3 returns the bytes represented by the base64 string s.
Base62EncodeToString returns the base64 encoding of src.
Base62EncodeToString2 returns the base64 encoding of src.
Base62EncodeToString3 returns the base64 encoding of src.
Base64DecodeString returns the bytes represented by the base64 string s.
Base64DecodeStringURL returns the bytes represented by the base64 string s.
Base64EncodeToString returns the base64 encoding of src.
Base64EncodeToStringURL returns the base64 encoding of src.
BytesNetworkOrder2Number 4个字节的网络字节序bytes数组还原成一个数字.
CODE code.
CompareHashAndPassword compares a bcrypt hashed password with its possible plaintext equivalent.
DecodeBaseX32 64解码.
DecodeBaseX64 64解码.
EncodeBaseX32 64位编码.
EncodeBaseX62 ..
EncodeBaseX64 64位编码.
FixPreStrLen 获取固定长度内容,不够前段补齐0.
FixPreStrLen2 获取固定长度内容,不够前段补齐0, 超长, 保留原始数据.
FixRandomAes32 random aes 32.
FixSufStrLen 获取固定长度内容,不够前段补齐0.
GenerateFromPassword returns the bcrypt hash of the password at the given cost.
MaskDecrypt 简单的解密算法.
MaskEncrypt 简单的加密算法, 破坏其本身字符串的特征, 当用于对同一个MD5值进行处理.
MD5Hash MD5哈希值.
MD5HashString MD5哈希值.
Number2BytesInNetworkOrder 将一个数字转换成生成4个字节的网络字节序bytes数组.
PKCS7Padding 使用PKCS7进行填充.
PKCS7UnPadding 删除PKCS7填充.
RandomAes32 random aes 32.
RandomBytes random.
Reverse 字符串倒序.
SHA1Hash SHA1哈希值.
SHA1HashString SHA1哈希值.
UUID uuid.
UUID2 uuid.