use base64.nowrap for omemo keys

This commit is contained in:
Daniel Gultsch 2016-11-17 10:58:44 +01:00
parent 4d965e96ed
commit ad9a8c2281
1 changed files with 3 additions and 3 deletions

View File

@ -204,13 +204,13 @@ public class XmppAxolotlMessage {
for (Map.Entry<Integer, byte[]> keyEntry : keys.entrySet()) {
Element keyElement = new Element(KEYTAG);
keyElement.setAttribute(REMOTEID, keyEntry.getKey());
keyElement.setContent(Base64.encodeToString(keyEntry.getValue(), Base64.DEFAULT));
keyElement.setContent(Base64.encodeToString(keyEntry.getValue(), Base64.NO_WRAP));
headerElement.addChild(keyElement);
}
headerElement.addChild(IVTAG).setContent(Base64.encodeToString(iv, Base64.DEFAULT));
headerElement.addChild(IVTAG).setContent(Base64.encodeToString(iv, Base64.NO_WRAP));
if (ciphertext != null) {
Element payload = encryptionElement.addChild(PAYLOAD);
payload.setContent(Base64.encodeToString(ciphertext, Base64.DEFAULT));
payload.setContent(Base64.encodeToString(ciphertext, Base64.NO_WRAP));
}
return encryptionElement;
}