add signatures to messages to avoid double processing
This commit is contained in:
@@ -2,6 +2,7 @@ package util
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"crypto/rand"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -135,3 +136,9 @@ func Base64Md5ToBytes(contentMd5 string) []byte {
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
func RandomInt32() int32 {
|
||||
buf := make([]byte, 4)
|
||||
rand.Read(buf)
|
||||
return int32(BytesToUint32(buf))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user