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.digest_required?

digest_required?(key)

Returns whether the key requires an explicit digest algorithm for signing and verification. ML-DSA has a built-in digest and does not accept one. Any other algorithm raises, since a gem carries no record of how its signature was produced and RubyGems must not guess.