Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::Integrations::SagePayForm::Encryption

Public Instance Methods

sage_decrypt(ciphertext, key) click to toggle source
# File lib/active_merchant/billing/integrations/sage_pay_form/encryption.rb, line 10
def sage_decrypt(ciphertext, key)
  sage_encrypt_xor(ActiveSupport::Base64.decode64(ciphertext), key)
end
sage_encrypt(plaintext, key) click to toggle source
# File lib/active_merchant/billing/integrations/sage_pay_form/encryption.rb, line 6
def sage_encrypt(plaintext, key)
  ActiveSupport::Base64.encode64s(sage_encrypt_xor(plaintext, key))
end
sage_encrypt_salt(min, max) click to toggle source
# File lib/active_merchant/billing/integrations/sage_pay_form/encryption.rb, line 14
def sage_encrypt_salt(min, max)
  length = rand(max - min + 1) + min
  SecureRandom.base64(length + 4)[0, length]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.