Class: SshHostKey::Fingerprint
- Inherits:
-
Gitlab::SSHPublicKey
- Object
- Gitlab::SSHPublicKey
- SshHostKey::Fingerprint
- Defined in:
- app/models/ssh_host_key.rb
Constant Summary
Constants inherited from Gitlab::SSHPublicKey
Gitlab::SSHPublicKey::TECHNOLOGIES
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
Attributes inherited from Gitlab::SSHPublicKey
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(key, index: nil) ⇒ Fingerprint
constructor
A new instance of Fingerprint.
Methods inherited from Gitlab::SSHPublicKey
#banned?, #bits, #fingerprint, #fingerprint_sha256, sanitize, supported_algorithms, supported_algorithms_for_name, supported_sizes, supported_types, technologies, technology, technology_for_key, #type, #valid?
Constructor Details
#initialize(key, index: nil) ⇒ Fingerprint
Returns a new instance of Fingerprint.
8 9 10 11 12 |
# File 'app/models/ssh_host_key.rb', line 8 def initialize(key, index: nil) super(key) @index = index end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
6 7 8 |
# File 'app/models/ssh_host_key.rb', line 6 def index @index end |
Instance Method Details
#as_json ⇒ Object
14 15 16 |
# File 'app/models/ssh_host_key.rb', line 14 def as_json(*) { bits: bits, type: type, index: index }.merge(fingerprint_data) end |