rpc custom header

This commit is contained in:
withchao
2023-03-22 10:11:18 +08:00
parent c0d72d91fb
commit 900858e4ea
4 changed files with 17 additions and 4 deletions
+2 -2
View File
@@ -15,8 +15,8 @@ import (
)
var (
block cipher.Block
once sync.Once
block cipher.Block
)
func init() {
@@ -37,7 +37,7 @@ func initAesKey() {
func genReqKey(args []string) string {
initAesKey()
plaintext := md5.Sum([]byte(strings.Join(args, ":")))
var iv = make([]byte, aes.BlockSize, aes.BlockSize+md5.Size)
iv := make([]byte, aes.BlockSize, aes.BlockSize+md5.Size)
if _, err := rand.Read(iv); err != nil {
panic(err)
}