Module: COSE::Algorithm
- Defined in:
- lib/cose/algorithm.rb,
lib/cose/algorithm/base.rb,
lib/cose/algorithm/hmac.rb,
lib/cose/algorithm/ecdsa.rb,
lib/cose/algorithm/eddsa.rb,
lib/cose/algorithm/rsa_pss.rb,
lib/cose/algorithm/signature_algorithm.rb
Defined Under Namespace
Classes: Base, ECDSA, EdDSA, HMAC, RSAPSS, SignatureAlgorithm
Class Method Summary
collapse
Class Method Details
.by_id(id) ⇒ Object
22
23
24
|
# File 'lib/cose/algorithm.rb', line 22
def self.by_id(id)
@registered_by_id[id]
end
|
.by_name(name) ⇒ Object
26
27
28
|
# File 'lib/cose/algorithm.rb', line 26
def self.by_name(name)
@registered_by_name[name]
end
|
.find(id_or_name) ⇒ Object
18
19
20
|
# File 'lib/cose/algorithm.rb', line 18
def self.find(id_or_name)
by_id(id_or_name) || by_name(id_or_name)
end
|
.register(algorithm) ⇒ Object
13
14
15
16
|
# File 'lib/cose/algorithm.rb', line 13
def self.register(algorithm)
@registered_by_id[algorithm.id] = algorithm
@registered_by_name[algorithm.name] = algorithm
end
|