Refactor MessageEncrypter interface to use PublicKey and PrivateKey

This commit is contained in:
str4d
2016-04-21 00:32:58 +00:00
parent d545aaa892
commit 5c2f56549b
6 changed files with 83 additions and 49 deletions

View File

@@ -27,6 +27,8 @@ public interface CryptoComponent {
KeyParser getSignatureKeyParser();
KeyParser getMessageKeyParser();
/** Generates a random invitation code. */
int generateBTInvitationCode();
@@ -161,5 +163,5 @@ public interface CryptoComponent {
/**
* Encrypts the given plaintext to the given public key.
*/
String encryptToKey(byte[] publicKey, byte[] plaintext);
String encryptToKey(PublicKey publicKey, byte[] plaintext);
}