class CrxAppid
Constants
- VERSION
Public Class Methods
calculate(pem)
click to toggle source
# File lib/crx_appid.rb, line 15 def calculate(pem) new.calculate(pem) end
calculate_from_file(pem)
click to toggle source
# File lib/crx_appid.rb, line 19 def calculate_from_file(pem) new.calculate_from_file(pem) end
Public Instance Methods
calculate(pem)
click to toggle source
# File lib/crx_appid.rb, line 6 def calculate(pem) Digest::SHA256.hexdigest(OpenSSL::PKey::RSA.new(pem).public_key.to_der)[0...32].tr('0-9a-f', 'a-p') end
calculate_from_file(pem)
click to toggle source
# File lib/crx_appid.rb, line 10 def calculate_from_file(pem) calculate(open(pem).read) end