-
Notifications
You must be signed in to change notification settings - Fork 48
H003 schematic support #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jplot
wants to merge
38
commits into
railslove:master
Choose a base branch
from
jplot:h003-a005
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
7643a26
Adds h003 schematic support
jplot c32fdf8
Adds a005 signature support
jplot 3a5eb7f
Adds h005 schematic support
jplot 0737966
Fixes after code review
jplot 82918b7
Fixes order id for ebics 2.4
jplot 0d62382
Fixes letter renderer
jplot ae89f21
Refacts keys management
jplot 4cae65e
Adds schematics for version H003
jplot 5351c0f
Adds H003 schema validity tests
jplot 70faf83
Adds schematics for version H005
jplot c19b73d
Fixes failure message for be_a_valid_ebics_doc matcher
jplot 94f64a1
Adds new xml schema generator
jplot d74586b
Uses new xml schema generator
jplot cf9b42f
Adds early support for version H005
jplot 544acde
Migrate Z01 order type to factories/builders architecture
jplot 74dbdd9
Migrate FUL order type to factories/builders architecture
jplot 539b04c
Fix version support correctness for Z01 and FUL
jplot e3ae911
Add comprehensive H004 structural tests for all order types and phases
jplot b774da3
Parameterize structural shared examples for H003/H004 and add H003 tests
jplot 253e966
Add H003 structural tests for all order types
jplot b6b07d2
Add H003 download and upload support for all order types
jplot 9ca9e40
Consolidate X509 certificate handling on Epics::Crypt::X509
jplot 3ffe4cb
Activate H005 support: certificates, CryptService.sign, BTD/BTU mappings
jplot 3a32e00
Add unit tests for CryptService and DigestResolver V2/V3
jplot 4361e3e
Add unit tests for all builder classes
jplot 00e39ac
Add unit tests for all handler classes
jplot 49de2a1
Add comprehensive unit tests for RequestFactory V24/V25/V3
jplot d8276ba
Add unit tests for Keyring, key serialization, and Client.setup
jplot 6dc0516
Remove dead Signer class
jplot 7913fed
Refactor XCT to use factory pattern and remove dead HeaderRequest
jplot 9066751
Fix AZV to inherit from GenericUploadRequest instead of CD1
jplot c157731
Add specs for CDS and XCT order types
jplot ad8b5d9
Add missing scope assertions in H005 specs for XCT and CDD
jplot 4e41179
Remove unused password attribute from Keyring
jplot 2b6ce7f
Add xsi:schemaLocation to all EBICS XML requests
jplot 54f4638
Add EBICS documentation references
jplot 1059607
Merge INI letter templates into a single conditional template
jplot 19c3589
Update lib/epics/letter_renderer.rb
janz93 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,169 @@ | ||
| # EBICS Documentation — Complete Reference | ||
|
|
||
| > Last updated: 2026-03-05 | ||
|
|
||
| --- | ||
|
|
||
| ## 1. Official Specifications (ebics.org) | ||
|
|
||
| | Document | Link | Version | Language | | ||
| |---|---|---|---| | ||
| | **Specification main page** | https://www.ebics.org/en/technical-information/ebics-specification | V3.0.2 (current) | EN/DE/FR | | ||
| | **XSD Schemas** | https://www.ebics.org/en/technical-information/ebics-schema | H003/H004/H005 | — | | ||
| | **Implementation Guide** | https://www.ebics.org/en/technical-information/implementation-guide | All | EN/DE | | ||
| | **BTF Mapping (BTD/BTU)** | https://www.ebics.org/en/technical-information/btf-mapping | H005 | EN/DE | | ||
| | **Examples** | https://www.ebics.org/en/technical-information/examples | All | EN | | ||
| | **Additional Standards** | https://www.ebics.org/en/technical-information/additional-standards | All | EN/DE | | ||
| | **Change Requests (archive)** | https://www.ebics.org/en/technical-information/archive-ebics/change-requests | Historical | EN/DE | | ||
| | **Passed CRs** | https://www.ebics.org/en/technical-information/maintain-advance/passed-crs | Maintenance | EN/DE | | ||
| | **Technical News** | https://www.ebics.org/en/current-topics/technical-news | — | EN/DE | | ||
| | **Archived Specifications** | https://www.ebics.org/en/technical-information/archive-ebics/specification | V2.4/2.5 | EN/DE | | ||
|
|
||
| --- | ||
|
|
||
| ## 2. Specification PDFs — Direct Download | ||
|
|
||
| ### Main Specification | ||
|
|
||
| | Document | Link | Version | | ||
| |---|---|---| | ||
| | **EBICS V3.0 Spec (SIX)** | https://www.six-group.com/dam/download/banking-services/interbank-clearing/en/standardization/ebics/ebics_3_0.pdf | H005 / V3.0 | | ||
| | **EBICS V3.0 Spec (Gitea mirror)** | https://gitea.szsolutions.ch/Mirror/odoo_account_ebics/raw/branch/15.0/account_ebics/doc/2017-03-29-EBICS_V_3.0-FinalVersion.pdf | H005 / V3.0 | | ||
| | **EBICS V2.5 Spec (CFONB)** | https://www.cfonb.org/fichiers/20130612170023_6_4_EBICS_Specification_2.5_final_2011_05_16_2012_07_01.pdf | H004 / V2.5 | | ||
| | **EBICS V2.4.2 Spec (CFONB)** | https://www.cfonb.org/fichiers/20130612170103_6_7_EBICS_Specification_2.4.2_final_2010_02_16.pdf | H003 / V2.4 | | ||
|
|
||
| ### Annexes & Supplements | ||
|
|
||
| | Document | Link | Content | | ||
| |---|---|---| | ||
| | **Annex 1 — Return Codes** | https://www.cfonb.org/fichiers/20130612170037_6_5_EBICS_Annex1_ReturnCodes_final_16_05_2011_2012_07_01.pdf | All EBICS return codes | | ||
| | **Annex 2 — Order Type Identifiers** | https://www.cfonb.org/fichiers/20140423153546_Annex_2_%E2%80%93_EBICS_Specification_april_2014.pdf | Order type identifiers | | ||
| | **EBICS SC 2021** | https://www.cfonb.org/fichiers/20210420081014_EBICS_SC_2021.pdf | EBICS SC overview | | ||
|
|
||
| ### France Implementation Guides (CFONB) | ||
|
|
||
| | Document | Link | Content | | ||
| |---|---|---| | ||
| | **IG CFONB V2.1.5 (FR)** | https://www.cfonb.org/fichiers/20141029101016_6_10_EBICS_IG_CFONB_VF_2_1_5_2014_06_23.pdf | France implementation guide | | ||
| | **IG CFONB V2.1.4 (EN)** | https://www.cfonb.org/fichiers/20130612170302_6_16_EBICS_IG_CFONB_V2_1.4_english_version_2012_02_24.pdf | France implementation guide (English) | | ||
| | **IG Annex 2 — File names** | https://www.cfonb.org/fichiers/20130612170321_6_17_EBICS_IG_V1.2._Annexe_2_File_names_VE_final_2010_01.pdf | File naming conventions | | ||
| | **IG Annex A3.1 — Certificate error codes** | https://www.cfonb.org/fichiers/20130612170148_6_11_EBICS_IG_V1_1_Annexe_A3_1_Certificates_error_codes_2009_04.pdf | X.509 certificate error codes | | ||
| | **EBICS test scenarios** | https://www.cfonb.org/fichiers/20130612170423_6_21_Proposition_tests_EBICS_V1_0_2009_05_15.pdf | Test scenarios | | ||
|
|
||
| ### BTF / BTD / BTU (EBICS 3.0) | ||
|
|
||
| | Document | Link | Content | | ||
| |---|---|---| | ||
| | **File Format → BTF mapping (CFONB)** | https://www.cfonb.org/sites/www.cfonb.org/files/documents/Tables%20de%20correspondance%20File%20Format%20vers%20BTF-Business%20Transaction%20Format%20(EBICS%20v3.0%20et%20suivantes)%20.pdf | Order type → BTF mapping | | ||
| | **BTF Parameters (konfipay wiki)** | https://wiki.konfipay.de/konfipay/btf-parameters-ebics-3-0 | BTF parameter reference | | ||
| | **CPG — EBICS BTU, BTD and BTF** | https://www.cpg.de/en/ebics-btu-btd-and-btf/ | BTD/BTU/BTF explained | | ||
| | **CPG — EBICS 3.0 innovations** | https://www.cpg.de/en/ebics-3-0/ | EBICS 3.0 overview | | ||
|
|
||
| --- | ||
|
|
||
| ## 3. Switzerland — SIX Group | ||
|
|
||
| | Document | Link | Content | | ||
| |---|---|---| | ||
| | **Swiss Market Practice Guidelines EBICS 3.0 v1.3** | https://www.six-group.com/dam/download/banking-services/standardization/ebics/market-practice-guidelines-ebics3.0-v1.3-en.pdf | Swiss guidelines H005 | | ||
| | **Swiss Market Practice Guidelines EBICS 3.0 v1.2** | https://www.six-group.com/dam/download/banking-services/standardization/ebics/market-practice-guidelines-ebics3.0-v1.2-en.pdf | Swiss guidelines H005 (older) | | ||
| | **EBICS in Switzerland (overview)** | https://www.six-group.com/dam/download/banking-services/interbank-clearing/en/standardization/ebics/ebics.pdf | EBICS Switzerland overview | | ||
| | **SIX EBICS page** | https://www.six-group.com/en/products-services/banking-services/payment-standardization/standards/ebics.html | SIX EBICS portal | | ||
|
|
||
| --- | ||
|
|
||
| ## 4. Germany — Deutsche Kreditwirtschaft / Bundesbank | ||
|
|
||
| | Document | Link | Content | | ||
| |---|---|---| | ||
| | **DFÜ-Abkommen — Anlage 3 Datenformate V3.8** | http://www.bayernlb.de/internet/media/de/ir/downloads_1/zahlungsverkehr/richtlinien/2024-11-17_Anlage_3_Datenformate_V3.8.pdf | Data format specification | | ||
| | **ebics.de — Datenformate** | https://www.ebics.de/de/datenformate | Data formats portal | | ||
| | **DFÜ-Verfahren EBICS — DK** | https://die-dk.de/zahlungsverkehr/electronic-banking/dfu-verfahren-ebics/ | DK EBICS page | | ||
| | **Verfahrensregeln EBICS 2025 (Bundesbank)** | https://www.bundesbank.de/resource/blob/964236/6f3129a9aab710eae9b2939e0021a7bc/472B63F073F071307366337C94F8C870/verfahrensregeln-ebics-2025-data.pdf | Procedural rules 2025 | | ||
| | **Verfahrensregeln EBICS V3.9 (Bundesbank)** | https://www.bundesbank.de/resource/blob/764544/2bfc83ca09df0c7a4a53c96caec1ac55/mL/verfahrensregeln-ebics-3-9-data.pdf | Procedural rules V3.9 | | ||
| | **Besondere Bedingungen EBICS 2024 (Bundesbank)** | https://www.bundesbank.de/resource/blob/925930/8b5c5b9da853666a3b1638b0005aa3e4/mL/besondere-bedingungen-ebics-2024-data.pdf | Special conditions | | ||
| | **Deutsche Bank — Order Types (EN)** | https://www.deutsche-bank.de/dam/deutschebank/de/shared/pdf/ebics-dfu-explanation-of-order-type-identifiers-e.pdf | Order type reference (EN) | | ||
| | **Deutsche Bank — Auftragsarten (DE)** | https://www.deutsche-bank.de/dam/deutschebank/de/shared/pdf/ub/ebics-dfue-erlaeuterungen-der-auftragsarten-d.pdf | Order type reference (DE) | | ||
|
|
||
| --- | ||
|
|
||
| ## 5. DFÜ-Abkommen — English Translation | ||
|
|
||
| | Document | Link | Content | | ||
| |---|---|---| | ||
| | **DFÜ Agreement Appendix 3 (EN, Isabel)** | https://www.isabel.eu/content/dam/knowledge_base_ibs6/documents/en-US/Anlage_3_Datenformate_V29_engl.pdf | Data formats (English translation) | | ||
|
|
||
| --- | ||
|
|
||
| ## 6. Reference Implementations (source code) | ||
|
|
||
| | Project | Link | Language | Versions | | ||
| |---|---|---|---| | ||
| | **ebics-client-php** | https://github.com/ebics-api/ebics-client-php | PHP | H003/H004/H005 | | ||
| | **ebics-java-client** | https://github.com/ebics-java/ebics-java-client | Java | H004 | | ||
| | **EBICS.php (Synap)** | https://github.com/Synap/EBICS.php | PHP | H003/H004 | | ||
| | **node-ebics-client** | https://github.com/nicemann/node-ebics-client | Node.js | H004 | | ||
| | **epics (railslove)** | https://github.com/railslove/epics | Ruby | H004 | | ||
| | **epics (our fork)** | https://github.com/jplot/epics | Ruby | H003/H004/H005 | | ||
|
|
||
| --- | ||
|
|
||
| ## 7. Third-party References | ||
|
|
||
| | Resource | Link | Content | | ||
| |---|---|---| | ||
| | **Wikipedia — EBICS** | https://en.wikipedia.org/wiki/Electronic_Banking_Internet_Communication_Standard | Overview | | ||
| | **Wikipedia — DFÜ-Abkommen** | https://de.wikipedia.org/wiki/Abkommen_%C3%BCber_die_Datenfern%C3%BCbertragung_zwischen_Kunden_und_Kreditinstituten | DFÜ-Abkommen (DE) | | ||
| | **Axway — EBICS standard** | https://docs.axway.com/bundle/EBICSClient_11_allOS_en_HTML5/page/the_ebics_standard.html | Axway reference | | ||
| | **Axway — EBICS error codes** | https://docs.axway.com/bundle/TransferCFT_332_LocalAdministrationGuide_allOS_en_HTML5/page/Content/Prots/French/EBICS/r_ebics_error_mess_codes.htm | Error codes (full list) | | ||
| | **IBM — EBICS return codes** | https://www.ibm.com/docs/SS3JSW_5.2.0/com.ibm.help.ebics_client_user_525.doc/EBICS_Client_returncodes_events.html | IBM return codes | | ||
| | **BL Banking — EBICS errors** | https://www.blbanking.de/webhelp/topic/de.businesslogics.banking.web/help/html/appendix/faq-ebicserrors.html | BL Banking error messages | | ||
| | **konfipay — BTF parameters** | https://wiki.konfipay.de/konfipay/btf-parameters-ebics-3-0 | BTF parameters | | ||
| | **Sage XRT — EBICS 3.0 Guide (FR)** | https://sxbe-onlinehelp.sage.com/PDF/SXBE/SXBE.12.1.EBICS.3.0.UserGuide_FR.pdf | Sage user guide | | ||
| | **UBS — EBICS 3.0** | https://www.ubs.com/ch/en/corporates/payment-solutions/cash-management/connection-ubs/ebics.html | UBS EBICS 3.0 page | | ||
| | **BCV — EBICS parameters factsheet** | https://www.bcv.ch/content/dam/bcv/brochure---flyer/44-516e_Fiche-technique-BCV-connect_web.pdf | BCV technical factsheet | | ||
|
|
||
| --- | ||
|
|
||
| ## 8. Local XSD Schemas in This Project | ||
|
|
||
| XSD schemas are stored in `spec/xsd/`: | ||
|
|
||
| ``` | ||
| spec/xsd/ | ||
| ├── H003/ | ||
| │ └── (H003 schemas) | ||
| ├── H004/ | ||
| │ ├── ebics_H004.xsd (H004 root schema) | ||
| │ ├── ebics_hev.xsd (HEV protocol) | ||
| │ ├── ebics_keymgmt_request_H004.xsd | ||
| │ ├── ebics_keymgmt_response_H004.xsd | ||
| │ ├── ebics_orders_H004.xsd (89K — order types) | ||
| │ ├── ebics_request_H004.xsd | ||
| │ ├── ebics_response_H004.xsd | ||
| │ ├── ebics_signature.xsd (S001) | ||
| │ ├── ebics_types_H004.xsd (86K — types) | ||
| │ └── xmldsig-core-schema.xsd | ||
| └── H005/ | ||
| ├── ebics_H005.xsd (H005 root schema) | ||
| ├── ebics_hev.xsd | ||
| ├── ebics_keymgmt_request_H005.xsd | ||
| ├── ebics_keymgmt_response_H005.xsd | ||
| ├── ebics_orders_H005.xsd | ||
| ├── ebics_request_H005.xsd | ||
| ├── ebics_response_H005.xsd | ||
| ├── ebics_signature_S002.xsd (S002 — A005) | ||
| ├── ebics_types_H005.xsd | ||
| └── xmldsig-core-schema.xsd | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Notes | ||
|
|
||
| - Specifications on **ebics.org** require accepting terms of use before downloading | ||
| - Current version: **V3.0.2** (valid since December 30, 2022) | ||
| - Last BTF list update: **October 23, 2024** | ||
| - **DFÜ-Abkommen Anlage 3** is the reference document for data formats in Germany | ||
| - X/Y/Z prefixed order types = bank-individual (not core EBICS) | ||
| - FUL/FDL = core EBICS H003/H004, removed in H005 (replaced by BTU/BTD) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,6 @@ | ||
| class Epics::AZV < Epics::GenericUploadRequest | ||
| def header | ||
| client.header_request.build( | ||
| nonce: nonce, | ||
| timestamp: timestamp, | ||
| order_type: 'CD1', | ||
| order_attribute: 'OZHNN', | ||
| order_params: {}, | ||
| num_segments: 1, | ||
| mutable: { TransactionPhase: 'Initialisation' } | ||
| ) | ||
| def to_xml | ||
| builder = request_factory.create_azv(document_digest, transaction_key) | ||
| builder.to_xml | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,6 @@ | ||
| class Epics::B2B < Epics::GenericUploadRequest | ||
| def header | ||
| client.header_request.build( | ||
| nonce: nonce, | ||
| timestamp: timestamp, | ||
| order_type: 'B2B', | ||
| order_attribute: 'OZHNN', | ||
| order_params: {}, | ||
| num_segments: 1, | ||
| mutable: { TransactionPhase: 'Initialisation' } | ||
| ) | ||
| def to_xml | ||
| builder = request_factory.create_b2b(document_digest, transaction_key) | ||
| builder.to_xml | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,6 @@ | ||
| class Epics::BKA < Epics::GenericRequest | ||
| def header | ||
| client.header_request.build( | ||
| nonce: nonce, | ||
| timestamp: timestamp, | ||
| order_type: 'BKA', | ||
| order_attribute: 'DZHNN', | ||
| order_params: { | ||
| DateRange: { | ||
| Start: options[:from], | ||
| End: options[:to] | ||
| } | ||
| }, | ||
| mutable: { TransactionPhase: 'Initialisation' } | ||
| ) | ||
| def to_xml | ||
| builder = request_factory.create_bka(options[:from], options[:to]) | ||
| builder.to_xml | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| module Epics::Builders | ||
| end | ||
|
|
||
| require 'epics/builders/body_builder' | ||
| require 'epics/builders/data_encryption_info_builder' | ||
| require 'epics/builders/data_transfer_builder' | ||
| require 'epics/builders/header_builder' | ||
| require 'epics/builders/mutable_builder' | ||
| require 'epics/builders/order_details_builder' | ||
| require 'epics/builders/request_builder' | ||
| require 'epics/builders/static_builder' | ||
| require 'epics/builders/transfer_receipt_builder' | ||
| require 'epics/builders/xml_builder' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| module Epics::Builders::BodyBuilder | ||
| end | ||
|
|
||
| require 'epics/builders/body_builder/base' | ||
| require 'epics/builders/body_builder/v2' | ||
| require 'epics/builders/body_builder/v3' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| class Epics::Builders::BodyBuilder::Base | ||
| def initialize | ||
| Nokogiri::XML::Builder.new do |xml| | ||
| @xml = xml | ||
| xml.body do | ||
| yield self | ||
| end | ||
| end | ||
| end | ||
|
|
||
| def add_data_transfer | ||
| raise NotImplementedError | ||
| end | ||
|
|
||
| def add_transfer_receipt | ||
| instance = Epics::Builders::TransferReceiptBuilder.new do |instance| | ||
| yield instance | ||
| end | ||
| @xml.parent.add_child(instance.doc) | ||
| self | ||
| end | ||
|
|
||
| def doc | ||
| @xml.doc.root | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| class Epics::Builders::BodyBuilder::V2 < Epics::Builders::BodyBuilder::Base | ||
| def add_data_transfer | ||
| instance = Epics::Builders::DataTransferBuilder::V2.new do |instance| | ||
| yield instance | ||
| end | ||
| @xml.parent.add_child(instance.doc) | ||
| self | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| class Epics::Builders::BodyBuilder::V3 < Epics::Builders::BodyBuilder::Base | ||
| def add_data_transfer | ||
| instance = Epics::Builders::DataTransferBuilder::V3.new do |instance| | ||
| yield instance | ||
| end | ||
| @xml.parent.add_child(instance.doc) | ||
| self | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| class Epics::Builders::DataEncryptionInfoBuilder | ||
| def initialize | ||
| @crypt_service = Epics::Services::CryptService.new | ||
| Nokogiri::XML::Builder.new do |xml| | ||
| @xml = xml | ||
| xml.DataEncryptionInfo(authenticate: true) do | ||
| yield self | ||
| end | ||
| end | ||
| end | ||
|
|
||
| def add_encryption_pubkey_digest(keyring, algorithm = 'sha256') | ||
| certificate_digest = @crypt_service.calculate_digest(keyring.bank_encryption.key, algorithm) | ||
| attribues = { Version: keyring.bank_encryption.version, Algorithm: "http://www.w3.org/2001/04/xmlenc##{algorithm}" } | ||
| @xml.EncryptionPubKeyDigest Base64.strict_encode64(certificate_digest), **attribues | ||
| self | ||
| end | ||
|
|
||
| def add_transaction_key(transaction_key, keyring) | ||
| transaction_key_encrypted = @crypt_service.encrypt_transaction_key(keyring.bank_encryption.key, transaction_key) | ||
| @xml.TransactionKey Base64.strict_encode64(transaction_key_encrypted) | ||
| self | ||
| end | ||
|
|
||
| def doc | ||
| @xml.doc.root | ||
| end | ||
| end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the readme could reflect which one is the default when initializing a new or existing client and how to work with another version