25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/epics/hia.rb', line 25
def order_data
Nokogiri::XML::Builder.new do |xml|
xml.HIARequestOrderData('xmlns:ds' => 'http://www.w3.org/2000/09/xmldsig#', 'xmlns' => 'urn:org:ebics:H004') {
xml.AuthenticationPubKeyInfo {
x509_data_xml(xml, client.x_509_certificate(:x))
xml.PubKeyValue {
xml.send('ds:RSAKeyValue') {
xml.send('ds:Modulus', Base64.strict_encode64([client.x.n].pack("H*")))
xml.send('ds:Exponent', Base64.strict_encode64(client.x.key.e.to_s(2)))
}
}
xml.AuthenticationVersion 'X002'
}
xml.EncryptionPubKeyInfo{
x509_data_xml(xml, client.x_509_certificate(:e))
xml.PubKeyValue {
xml.send('ds:RSAKeyValue') {
xml.send('ds:Modulus', Base64.strict_encode64([client.e.n].pack("H*")))
xml.send('ds:Exponent', Base64.strict_encode64(client.e.key.e.to_s(2)))
}
}
xml.EncryptionVersion 'E002'
}
xml.PartnerID partner_id
xml.UserID user_id
}
end.to_xml(save_with: Nokogiri::XML::Node::SaveOptions::AS_XML, encoding: 'utf-8')
end
|