Module: VisaNetUy::Encoder

Included in:
Cipher, Signer
Defined in:
lib/visa_net_uy/encoder.rb

Instance Method Summary collapse

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