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.create_key

create_key(algorithm)

Creates a new key pair of the specified algorithm. RSA, DSA, EC, ML-DSA-44, ML-DSA-65, and ML-DSA-87 are supported.