Uploading and retrieving files
This section contains the following topics:
Uploading files
The maximum upload file size is 10MB.
The Merchant ID of the file is saved along with the uploaded file.
Note
The file can only be retrieved by the one who uploaded the file.
The file types that are supported by Clearpay are:
- GIF
- JPEG
- PNG
Upload file - endpoint
Connection Timeouts
Request Headers
Request Parameters
Response
Response example
Retrieving files
Retrieve file - endpoint
Connection Timeouts
Request Headers
Request Parameters
Response
Response example
Errors
Key exchange
Diffie-Hellman key exchange
Wiki page: https://wiki.openssl.org/index.php/Diffie_Hellman
Dependency
Openssl version = LibreSSL 2.8.3
Steps in the key exchange process
Assume Alice and Bob are doing key exchange, Alice is working for corporation A, Bob is working for corporation B.
-
Alice generates a pem file in the current directory which contains the parameters
gandpin aDHalgorithm. -
Alice publicly sends the
dhp1.pemfile to Bob. -
Alice generates a private key in her laptop, and exports the public key.
-
Bob generates a private key in his laptop.
-
Alice and Bob publicly exchange public keys, Alice gets the
dhpub2.pemfile, Bob gets thedhpub1.pemfile. -
Alice generates a secret key.
-
Bob generates a secret key.
-
Currently Alice and Bob should have the same secret key, which is completely secure.
(secret1 == secret2)
Encryption and decryption
- Alice wants to send a file to Bob securely. She uses the
secret1to encrypt the file. Assumes the origin file named text. - Alice publicly sends the encrypted file
text.encto Bob. - Bob uses
secret2to decrypt the file.