Class: Net::SSH::Authentication::ED25519::PubKey
- Inherits:
-
Object
- Object
- Net::SSH::Authentication::ED25519::PubKey
show all
- Includes:
- PubKeyFingerprint
- Defined in:
- lib/net/ssh/authentication/ed25519.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
#fingerprint, fingerprint
Constructor Details
#initialize(data) ⇒ PubKey
Returns a new instance of PubKey.
110
111
112
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 110
def initialize(data)
@verify_key = ::Ed25519::VerifyKey.new(data)
end
|
Instance Attribute Details
#verify_key ⇒ Object
Returns the value of attribute verify_key.
108
109
110
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 108
def verify_key
@verify_key
end
|
Class Method Details
.read_keyblob(buffer) ⇒ Object
114
115
116
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 114
def self.read_keyblob(buffer)
PubKey.new(buffer.read_string)
end
|
Instance Method Details
#ssh_do_verify(sig, data, options = {}) ⇒ Object
130
131
132
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 130
def ssh_do_verify(sig, data, options = {})
@verify_key.verify(sig, data)
end
|
#ssh_signature_type ⇒ Object
126
127
128
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 126
def ssh_signature_type
ssh_type
end
|
#ssh_type ⇒ Object
122
123
124
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 122
def ssh_type
"ssh-ed25519"
end
|
#to_blob ⇒ Object
118
119
120
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 118
def to_blob
Net::SSH::Buffer.from(:mstring, "ssh-ed25519".dup, :string, @verify_key.to_bytes).to_s
end
|
#to_pem ⇒ Object
134
135
136
137
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 134
def to_pem
ssh_type + Base64.encode64(@verify_key.to_bytes)
end
|