Class: SSHData::PublicKey::SKED25519
- Defined in:
- lib/ssh_data/public_key/sked25519.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
Attributes inherited from ED25519
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(algo:, pk:, application:) ⇒ SKED25519
constructor
A new instance of SKED25519.
-
#rfc4253 ⇒ Object
RFC4253 binary encoding of the public key.
- #verify(signed_data, signature) ⇒ Object
Methods inherited from ED25519
ed25519_gem_required!, enabled?
Methods inherited from Base
Constructor Details
#initialize(algo:, pk:, application:) ⇒ SKED25519
Returns a new instance of SKED25519.
6 7 8 9 |
# File 'lib/ssh_data/public_key/sked25519.rb', line 6 def initialize(algo:, pk:, application:) @application = application super(algo: algo, pk: pk) end |
Instance Attribute Details
#application ⇒ Object (readonly)
Returns the value of attribute application.
4 5 6 |
# File 'lib/ssh_data/public_key/sked25519.rb', line 4 def application @application end |
Class Method Details
.algorithm_identifier ⇒ Object
11 12 13 |
# File 'lib/ssh_data/public_key/sked25519.rb', line 11 def self.algorithm_identifier ALGO_SKED25519 end |
Instance Method Details
#==(other) ⇒ Object
30 31 32 |
# File 'lib/ssh_data/public_key/sked25519.rb', line 30 def ==(other) super && other.application == application end |
#rfc4253 ⇒ Object
RFC4253 binary encoding of the public key.
Returns a binary String.
18 19 20 21 22 23 24 |
# File 'lib/ssh_data/public_key/sked25519.rb', line 18 def rfc4253 Encoding.encode_fields( [:string, algo], [:string, pk], [:string, application], ) end |
#verify(signed_data, signature) ⇒ Object
26 27 28 |
# File 'lib/ssh_data/public_key/sked25519.rb', line 26 def verify(signed_data, signature) raise UnsupportedError, "SK-Ed25519 verification is not supported." end |