Class: Shhh::App::PrivateKey::Base64Decoder
- Inherits:
-
Struct
- Object
- Struct
- Shhh::App::PrivateKey::Base64Decoder
- Defined in:
- lib/shhh/app/private_key/base64_decoder.rb
Instance Attribute Summary collapse
-
#encoded_key ⇒ Object
Returns the value of attribute encoded_key.
Instance Method Summary collapse
Instance Attribute Details
#encoded_key ⇒ Object
Returns the value of attribute encoded_key
4 5 6 |
# File 'lib/shhh/app/private_key/base64_decoder.rb', line 4 def encoded_key @encoded_key end |
Instance Method Details
#key ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/shhh/app/private_key/base64_decoder.rb', line 6 def key return nil if encoded_key.nil? begin Base64.urlsafe_decode64(encoded_key) rescue ArgumentError encoded_key end end |