aa
This commit is contained in:
@@ -103,7 +103,7 @@ func (a *API) Encrypt(msg string) (encryptedMsg string, err error) {
|
||||
binary.Write(buf, binary.BigEndian, int32(len(msg)))
|
||||
buf.WriteString(msg)
|
||||
buf.WriteString(a.corpID)
|
||||
binResult, err := utils.AESCBCEncpryt(buf.Bytes(), aesKey, aesKey[:16])
|
||||
binResult, err := utils.AESCBCEncpryt(buf.Bytes(), aesKey, []byte(a.corpID[:16]))
|
||||
encryptedMsg = base64.StdEncoding.EncodeToString(binResult)
|
||||
return encryptedMsg, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user