fix mac full 3DES iv generation

This commit is contained in:
Andrea Franz 2018-10-02 15:52:12 +02:00
parent 2f4bf27ce0
commit 7971bc3e09
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ func MacFull3DES(key, data, iv []byte) ([]byte, error) {
tmp := make([]byte, length)
mode := cipher.NewCBCEncrypter(desBlock, iv)
mode.CryptBlocks(tmp, data[:length])
des3IV = tmp
des3IV = tmp[length-8:]
}
ciphertext := make([]byte, 8)