Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

OpenSSL::PKCS12#set_mac

pkcs12.set_mac(pass, salt = nil, iter = nil, md_type = nil)

Sets MAC parameters and generates MAC over the PKCS #12 structure.

This method uses HMAC and the PKCS #12 specific password-based KDF as specified in the original PKCS #12.

See also the man page PKCS12_set_mac(3).

Added in version 3.3.0.

See also .new #to_der .create also in 4.0 · 3.4