Skip to content

Commit ce7f1d6

Browse files
logist322rainliu
authored andcommitted
Fix decrypt
1 parent 393f2bd commit ce7f1d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

srtp/src/cipher/cipher_aes_cm_hmac_sha1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ impl Cipher for CipherAesCmHmacSha1 {
236236
);
237237

238238
writer.put_bytes(0, encrypted.len() - header_len - self.auth_tag_len());
239-
self.ctx.encrypt_init(None, None, Some(&nonce)).unwrap();
239+
self.ctx.decrypt_init(None, None, Some(&nonce)).unwrap();
240240
let count = self.ctx.cipher_update(&cipher_text[header_len..], Some(&mut writer[header_len..])).unwrap();
241241
self.ctx.cipher_final(&mut writer[count..]).unwrap();
242242

0 commit comments

Comments
 (0)