Skip to content

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

class method

Gem::Security.ml_dsa_key?

ml_dsa_key?(key)

Returns whether key uses ML-DSA. OpenSSL::PKey::PKey#oid raises for the provider-backed keys ML-DSA uses, so the algorithm is read from the SubjectPublicKeyInfo instead.