class Travis::Client::Repository::Key
Attributes
fingerprint[R]
to_s[R]
Public Class Methods
new(data, fingerprint)
click to toggle source
# File lib/travis/client/repository.rb, line 10 def initialize(data, fingerprint) @to_s = data @fingerprint = fingerprint end
Public Instance Methods
==(other)
click to toggle source
# File lib/travis/client/repository.rb, line 28 def ==(other) other.to_s == self end
encrypt(value)
click to toggle source
# File lib/travis/client/repository.rb, line 15 def encrypt(value) encrypted = to_rsa.public_encrypt(value) Base64.encode64(encrypted).gsub(/\s+/, "") end
to_rsa()
click to toggle source
# File lib/travis/client/repository.rb, line 20 def to_rsa Tools::SSLKey.public_rsa_key(to_s) end
to_ssh()
click to toggle source
# File lib/travis/client/repository.rb, line 24 def to_ssh Tools::SSLKey.rsa_ssh(to_rsa) end