This commit is contained in:
李子铭 2025-03-25 09:07:37 +08:00
parent 7fb061c9a3
commit d9edfb0b71
1 changed files with 1 additions and 2 deletions

View File

@ -13,8 +13,6 @@ import (
"voucher/internal/pkg/cmb/encrypt" "voucher/internal/pkg/cmb/encrypt"
) )
const messageSeparator = byte(0x7C)
type Decrypts struct { type Decrypts struct {
EncryptBody string EncryptBody string
PrivateKey string PrivateKey string
@ -34,6 +32,7 @@ func EncryptBody(encrypts *Encrypts) (string, error) {
if _, err := rand.Read(randomKey); err != nil { if _, err := rand.Read(randomKey); err != nil {
return "", fmt.Errorf("生成randomKey失败:%v", err) return "", fmt.Errorf("生成randomKey失败:%v", err)
} }
if _, err := rand.Read(randomIV); err != nil { if _, err := rand.Read(randomIV); err != nil {
return "", fmt.Errorf("生成randomIV失败: %v", err) return "", fmt.Errorf("生成randomIV失败: %v", err)
} }