/
consts.go
32 lines (31 loc) · 1.54 KB
/
consts.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package utils
const (
GcmIvLength = 12
EktIdLength = 36
EncryptApiName = "Encrypt"
AsymmetricEncryptApiName = "AsymmetricEncrypt"
DecryptApiName = "Decrypt"
AsymmetricDecryptApiName = "AsymmetricDecrypt"
AsymmetricSignApiName = "AsymmetricSign"
AsymmetricVerifyApiName = "AsymmetricVerify"
GenerateDataKeyApiName = "GenerateDataKey"
GenerateDataKeyWithoutPlaintextApiName = "GenerateDataKeyWithoutPlaintext"
GetPublicKeyApiName = "GetPublicKey"
GetSecretValueApiName = "GetSecretValue"
DigestMessageType = "DIGEST"
KMSKeySpecAES256 = "AES_256"
KMSKeySpecAES128 = "AES_128"
MigrationKeyVersionIdKey = "x-kms-migrationkeyversionid"
NumberOfBytesAes256 = 32
NumberOfBytesAes128 = 16
MagicNum = '$'
MagicNumLength = 1
CipherVerAndPaddingModeLength = 1
AlgorithmLength = 1
CipherVer = 0
AlgAesGcm = 2
SDKName = "alibabacloud-kms-go-sdk"
SDKVersion = "1.2.4"
ClientUserAgent = SDKName + "-client/" + SDKVersion
TransferClientUserAgent = SDKName + "-transfer-client/" + SDKVersion
)