class EBICS::Key
Attributes
created_at[W]
rsa[RW]
type[RW]
Public Class Methods
new(type)
click to toggle source
# File lib/ebics.rb, line 80 def initialize(type) @type = type end
Public Instance Methods
created_at()
click to toggle source
# File lib/ebics.rb, line 100 def created_at @created_at.iso8601(10) end
public_exponent()
click to toggle source
# File lib/ebics.rb, line 88 def public_exponent Base64.strict_encode64(@rsa.public_key.e.to_s(2)) end
public_modulus()
click to toggle source
# File lib/ebics.rb, line 84 def public_modulus Base64.strict_encode64(@rsa.public_key.n.to_s(16)) end
public_sha_256()
click to toggle source
# File lib/ebics.rb, line 92 def public_sha_256 public_key_string = "#{ @rsa.public_key.e.to_s(16).downcase } #{ @rsa.public_key.n.to_s(16).downcase }" public_key_string.gsub! /\A0/, '' puts public_key_string public_key_string.encode!('US-ASCII') Digest::SHA256.hexdigest(public_key_string) end