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.
30
31
32
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 30
def initialize(data)
@verify_key = ::Ed25519::VerifyKey.new(data)
end
|
Instance Attribute Details
#verify_key ⇒ Object
Returns the value of attribute verify_key.
28
29
30
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 28
def verify_key
@verify_key
end
|
Class Method Details
.read_keyblob(buffer) ⇒ Object
34
35
36
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 34
def self.read_keyblob(buffer)
PubKey.new(buffer.read_string)
end
|
Instance Method Details
#ssh_do_verify(sig, data) ⇒ Object
50
51
52
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 50
def ssh_do_verify(sig,data)
@verify_key.verify(sig,data)
end
|
#ssh_signature_type ⇒ Object
46
47
48
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 46
def ssh_signature_type
ssh_type
end
|
#ssh_type ⇒ Object
42
43
44
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 42
def ssh_type
"ssh-ed25519"
end
|
#to_blob ⇒ Object
38
39
40
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 38
def to_blob
Net::SSH::Buffer.from(:mstring,"ssh-ed25519",:string,@verify_key.to_bytes).to_s
end
|
#to_pem ⇒ Object
54
55
56
57
|
# File 'lib/net/ssh/authentication/ed25519.rb', line 54
def to_pem
ssh_type + Base64.encode64(@verify_key.to_bytes)
end
|