Documentation ¶
Index ¶
- Constants
- func CheckEncryptType(eType string, authType int) error
- func CheckSignType(sType string, authType int) error
- func CheckType(enTypes ...string) error
- func GetNameByType(enType string) string
- func GetNameByValue(enType int) string
- func GetTypes() []string
- func GetValueByName(enType string) int
Constants ¶
View Source
const ( Single = iota + 1 Multi Dynamic )
请求类型
View Source
const ( MD5Str = "md5" SHA1Str = "sha1" SHA256Str = "sha256" SHA512Str = "sha512" HMACStr = "hmac" RSAStr = "rsa" AESStr = "aes" DESStr = "des" CertStr = "cert" )
加密类型枚举值
View Source
const ( All = "all" Data = "data" Static = "static" )
签名原串排序方式
View Source
const ( Head = "head" Tail = "tail" HeadTail = "headtail" )
签名原串key拼接位置
View Source
const ( EUIDName = "euid" SignName = "sign" TimestampName = "timestamp" DynamicKeyName = "secret_id" )
公有字段默认名
View Source
const ( None = 0 MD5 = 1 SHA1 = 2 SHA256 = 4 SHA512 = 8 HMAC = 16 RSA = 32 AES = 64 DES = 128 Cert = 256 )
加密类型枚举值
View Source
const ( ERR_PARAMS = 901 ERR_NotExits = 902 // ERR_NotGenerate = 903 //该类型密钥未生成 ERR_NotSupport = 904 ERR_MissingParam = 905 ERR_NotRemoteConfig = 906 ERR_ExistsSecret = 907 ERR_NotExitsSecretType = 908 // ERR_DataFormat = 999 )
Variables ¶
This section is empty.
Functions ¶
func CheckEncryptType ¶
CheckEncryptType 检查加密类型是否支持
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.