1
0
Fork 0
This repository has been archived on 2023-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/models/rsa_key.rb

27 lines
375 B
Ruby

# frozen_string_literal: true
class RSAKey < AsymmetricKey
ALGO_CLASS = 'RSA'
BITS = [2048, 4096].freeze
###############
# Validations #
###############
validates :bits, inclusion: { in: BITS }
validates :curve, absence: true
###########
# Methods #
###########
def algo_class
ALGO_CLASS
end
def algo_variant
"#{bits} bits"
end
end