Module: VisaNetUy::Encoder
Instance Method Summary collapse
-
#custom_base64_urlsafe_decode(encoded_data) ⇒ Object
Decodes from URLSafe Base64 and replaces .
-
#custom_base64_urlsafe_encode(data) ⇒ Object
Encodes to URLSafe Base64 and replaces = with .
Instance Method Details
#custom_base64_urlsafe_decode(encoded_data) ⇒ Object
Decodes from URLSafe Base64 and replaces . with =
11 12 13 |
# File 'lib/visa_net_uy/encoder.rb', line 11 def custom_base64_urlsafe_decode(encoded_data) Base64.urlsafe_decode64(encoded_data.gsub('.','=')) end |
#custom_base64_urlsafe_encode(data) ⇒ Object
Encodes to URLSafe Base64 and replaces = with .
6 7 8 |
# File 'lib/visa_net_uy/encoder.rb', line 6 def custom_base64_urlsafe_encode(data) Base64.urlsafe_encode64(data).gsub('=','.') end |