# File lib/rye/key.rb, line 27 27: def self.generate_pkey(authtype="RSA", bits=1024) 28: unless Rye::Key.supported_authentication?(authtype) 29: raise OpenSSL::PKey::PKeyError, "Unknown authentication: #{authttype}" 30: end 31: bits &&= bits.to_i 32: klass = authtype.upcase == "RSA" ? OpenSSL::PKey::RSA : OpenSSL::PKey::DSA 33: pk = klass.new(bits) 34: end