Add helper method for encoding authors.

This commit is contained in:
akwizgran
2018-01-16 17:22:35 +00:00
parent 1d81110fe5
commit 68634e0f28
3 changed files with 19 additions and 0 deletions

View File

@@ -351,6 +351,11 @@ class ClientHelperImpl implements ClientHelper {
raw.length - MESSAGE_HEADER_LENGTH);
}
@Override
public BdfList toList(Author a) {
return BdfList.of(a.getFormatVersion(), a.getName(), a.getPublicKey());
}
@Override
public byte[] sign(String label, BdfList toSign, byte[] privateKey)
throws FormatException, GeneralSecurityException {