libsrtp正在使用AES GCM进行加密媒体,并且我尝试使用其他AES加密我的媒体,如AES OFB。
这里是libsrtp repo:https://github.com/cisco/libsrtp
static srtp_err_status_t srtp_aes_gcm_openssl_encrypt (void *cv, unsigned char *buf, unsigned int *enc_len)
{
srtp_aes_gcm_ctx_t *c = (srtp_aes_gcm_ctx_t *)cv;
if (c->dir != srtp_direction_encrypt && c->dir != srtp_direction_decrypt) {
return (srtp_err_status_bad_param);
}
/*
* Encrypt the data
*/
EVP_Cipher(c->ctx, buf, buf, *enc_len);
return (srtp_err_status_ok)
}
我应该将现有的AES GCM更改为AES OFB吗?我应该从哪里开始改变呢? 有什么建议吗?