lib/sepa/banks/danske/soap_danske.rb
def encrypt_ar
        cipher = OpenSSL::Cipher.new('DES-EDE3-CBC').encrypt

        key = cipher.random_key
        iv = cipher.random_iv

        encrypted_data = cipher.update(@application_request.to_xml)
        encrypted_data << cipher.final
        encrypted_data = iv + encrypted_data
        encrypted_data = encode encrypted_data

        [encrypted_data, key]
      end
# Encrypts the application request and returns it in base64 encoded format. Also returns the
# key needed to decrypt it. The encryption algorithm is 'DES-EDE3-CBC' and the iv is prepended
# to the encrypted data.
#
# @return [Array(String, String)] the encrypted application request and the key needed to
#   decrypt it
Encrypts the application request and returns it in base64 encoded format. Also returns the
key needed to decrypt it. The encryption algorithm is 'DES-EDE3-CBC' and the iv is prepended
to the encrypted data.
Encrypts the application request and returns it in base64 encoded format . Also returns the key needed to decrypt it . The encryption algorithm is ' DES - EDE3 - CBC ' and the iv is prepended to the encrypted data .
def encrypt_ar
        cipher = OpenSSL::Cipher.new('DES-EDE3-CBC').encrypt
        key = cipher.random_key
        iv = cipher.random_iv
        encrypted_data = cipher.update(@application_request.to_xml)
        encrypted_data << cipher.final
        encrypted_data = iv + encrypted_data
        encrypted_data = encode encrypted_data
        [encrypted_data, key]
      end
def encrypt_ar cipher = OpenSSL :: Cipher . new ( 'DES-EDE3-CBC' ) . encrypt key = cipher . random_key iv = cipher . random_iv encrypted_data = cipher . update ( @application_request . to_xml ) encrypted_data << cipher . final encrypted_data = iv + encrypted_data encrypted_data = encode encrypted_data [ encrypted_data , key ] end
Encrypts the application request and returns it in base64 encoded format.
Encrypts the application request and returns it in base64 encoded format .
the encrypted application request and the key needed to decrypt it
the encrypted application request and the key needed to decrypt it
Array(String, String)