End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenSSL::Cipher#ccm_data_len=
cipher.ccm_data_len = integer → integer
ext/openssl/ossl_cipher.c
View on GitHub ↗
static VALUE
ossl_cipher_set_ccm_data_len(VALUE self, VALUE data_len)
{
int in_len, out_len;
EVP_CIPHER_CTX *ctx;
in_len = NUM2INT(data_len);
GetCipher(self, ctx);
if (EVP_CipherUpdate(ctx, NULL, &out_len, NULL, in_len) != 1)
ossl_raise(eCipherError, NULL);
return data_len;
}
Sets the length of the plaintext / ciphertext message that will be processed in CCM mode. Make sure to call this method after key= and iv= have been set, and before auth_data=.
Only call this method after calling Cipher#encrypt or Cipher#decrypt.