Encrypt and save crash reports, send them the next time TorPlugin start

Will currently fail at runtime; requires a public key and a server onion.
This commit is contained in:
str4d
2016-03-31 11:11:55 +00:00
parent 28086cd359
commit d545aaa892
18 changed files with 342 additions and 32 deletions

View File

@@ -3,6 +3,7 @@ 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;
@@ -156,4 +157,9 @@ public interface CryptoComponent {
* authenticated (for example, if the password is wrong).
*/
byte[] decryptWithPassword(byte[] ciphertext, String password);
/**
* Encrypts the given plaintext to the given public key.
*/
String encryptToKey(byte[] publicKey, byte[] plaintext);
}