Make sure output also has correct size
This commit is contained in:
parent
297df740ad
commit
0edd785659
1 changed files with 1 additions and 1 deletions
|
@ -112,9 +112,9 @@ func EncryptAndSign(v Message, key *rsa.PrivateKey, pub *rsa.PublicKey, signatur
|
|||
return err
|
||||
}
|
||||
|
||||
encBody := make([]byte, len(body))
|
||||
enc := cipher2.NewCBCEncrypter(cipher, iv)
|
||||
body = append(body, Pad(body)...)
|
||||
encBody := make([]byte, len(body))
|
||||
enc.CryptBlocks(encBody, body)
|
||||
writer.Write([]byte(hex.EncodeToString(encBody)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue