lib/sepa/banks/danske/soap_danske.rb
# Builds the xml structure for the encrypted application request that can be base64 encoded
# and embedded to the soap.
#
# @param cert [#to_s] the certificate which public key was used for the asymmetric encryption
# @param encrypted_data [#to_s] the encrypted application request
# @param encrypted_key [#to_s] the encrypted key that was used for the symmetric encryption
# @return [Nokogiri::XML] the encrypted application request xml structure as a nokogiri
#   document
# @todo rename
Builds the xml structure for the encrypted application request that can be base64 encoded
and embedded to the soap.
Builds the xml structure for the encrypted application request that can be base64 encoded and embedded to the soap .
def build_encrypted_ar(cert, encrypted_data, encrypted_key)
        ar = Nokogiri::XML File.open "#{AR_TEMPLATE_PATH}/encrypted_request.xml"
        set_node(ar, 'dsig|X509Certificate', cert)
        set_node(ar, 'dsig|KeyInfo xenc|CipherValue', encrypted_data)
        set_node(ar, 'xenc|EncryptedData > xenc|CipherData > xenc|CipherValue', encrypted_key)
        ar
      end
def build_encrypted_ar ( cert , encrypted_data , encrypted_key ) ar = Nokogiri :: XML File . open "#{AR_TEMPLATE_PATH}/encrypted_request.xml" set_node ( ar , 'dsig|X509Certificate' , cert ) set_node ( ar , 'dsig|KeyInfo xenc|CipherValue' , encrypted_data ) set_node ( ar , 'xenc|EncryptedData > xenc|CipherData > xenc|CipherValue' , encrypted_key ) ar end
Builds the xml structure for the encrypted application request that can be base64 encoded
and embedded to the soap.
Builds the xml structure for the encrypted application request that can be base64 encoded and embedded to the soap .
the encrypted application request xml structure as a nokogiri document
the encrypted application request xml structure as a nokogiri document
Nokogiri::XML
cert
the certificate which public key was used for the asymmetric encryption
the certificate which public key was used for the asymmetric encryption
encrypted_data
the encrypted application request
the encrypted application request
encrypted_key
the encrypted key that was used for the symmetric encryption
the encrypted key that was used for the symmetric encryption
todo
None