Class FileTransfer
EBICS specification 2.4.2 - 6.2 Encryption at application level
In the event of an upload transaction, a random symmetrical key is generated in the customer system that is used exclusively within the framework of this transaction both for encryption of the ES’s and for encryption of the order data. This key is encrypted asymmetrically with the financial institution’s public encryption key and is transmitted by the customer system to the bank system during the initialization phase of the transaction.
Analogously, in the case of a download transaction a random symmetrical key is generated in the bank system that is used for encryption of the order data that is to be downloaded and for encryption of the bank-technical signature that has been provided by the financial institution. This key is asymmetrically encrypted and is transmitted by the bank system to the customer system during the initialization phase of the transaction. The asymmetrical encryption takes place with the technical subscriber’s public encryption key if the transaction’s EBICS messages are sent by a technical subscriber. Otherwise the asymmetrical encryption takes place with the public encryption key of the non-technical subscriber, i.e. the submitter of the order.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfetchFile(EbicsOrderType orderType, int segmentNumber, boolean lastSegment, byte[] transactionId, Joiner joiner) Fetches a given portion of a file.voidfetchFile(EbicsOrderType orderType, File outputFile) Fetches a file of the given order type from the bank.voidsendFile(byte[] content, EbicsOrderType orderType, EbicsUploadParams params) Initiates a file transfer to the bank.voidsendFile(ContentFactory factory, int segmentNumber, boolean lastSegment, byte[] transactionId, EbicsOrderType orderType) Sends a segment to the ebics bank server.
-
Constructor Details
-
FileTransfer
Constructs a new FileTransfer session- Parameters:
session- the user session
-
-
Method Details
-
sendFile
public void sendFile(byte[] content, EbicsOrderType orderType, EbicsUploadParams params) throws IOException, EbicsException Initiates a file transfer to the bank.- Parameters:
content- The bytes you want to send.orderType- As which order type- Throws:
IOExceptionEbicsException
-
sendFile
public void sendFile(ContentFactory factory, int segmentNumber, boolean lastSegment, byte[] transactionId, EbicsOrderType orderType) throws IOException, EbicsException Sends a segment to the ebics bank server.- Parameters:
factory- the content factory that contain the segment data.segmentNumber- the segment numberlastSegment- is it the last segment?transactionId- the transaction idorderType- the order type- Throws:
IOExceptionEbicsException
-
fetchFile
Fetches a file of the given order type from the bank. You may give an optional start and end date. This type of transfer will run until everything is processed. No transaction recovery is possible.- Parameters:
orderType- type of file to fetchoutputFile- where to put the data- Throws:
IOException- communication errorEbicsException- server generated error
-
fetchFile
public void fetchFile(EbicsOrderType orderType, int segmentNumber, boolean lastSegment, byte[] transactionId, Joiner joiner) throws IOException, EbicsException Fetches a given portion of a file.- Parameters:
orderType- the order typesegmentNumber- the segment numberlastSegment- is it the last segment?transactionId- the transaction IDjoiner- the portions joiner- Throws:
IOException- communication errorEbicsException- server generated error
-