Class: MicrosoftRSA::Utils
- Inherits:
-
Object
- Object
- MicrosoftRSA::Utils
- Defined in:
- lib/microsoft_rsa/utils.rb
Overview
this Utils class contains helpful methods for MicrosoftRSA
Class Method Summary collapse
Class Method Details
.base64_to_bn(base64_string) ⇒ Object
11 12 13 |
# File 'lib/microsoft_rsa/utils.rb', line 11 def base64_to_bn(base64_string) OpenSSL::BN.new(Base64.decode64(base64_string), 2) end |
.bn_to_base64(bn) ⇒ Object
7 8 9 |
# File 'lib/microsoft_rsa/utils.rb', line 7 def bn_to_base64(bn) Base64.encode64(bn.to_s(2)).gsub(/\s+/, '') end |