Use one connection per dev report.

This allows simpler server-side code, and a failure part-way through sending won't require restarting from the beginning next time.
This commit is contained in:
akwizgran
2016-08-22 16:12:57 +01:00
parent d24e18a5d9
commit c6c62cab6c
3 changed files with 71 additions and 45 deletions

View File

@@ -3,7 +3,6 @@ package org.briarproject.api.crypto;
import org.briarproject.api.TransportId;
import org.briarproject.api.transport.TransportKeys;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
@@ -163,5 +162,11 @@ public interface CryptoComponent {
/**
* Encrypts the given plaintext to the given public key.
*/
String encryptToKey(PublicKey publicKey, byte[] plaintext);
byte[] encryptToKey(PublicKey publicKey, byte[] plaintext);
/**
* Encodes the given data as a hex string divided into lines of the given
* length. The line terminator is CRLF.
*/
String asciiArmour(byte[] b, int lineLength);
}