1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-21 18:17:58 +01:00

Bump pgpainless-core to 1.3.1

This commit is contained in:
Paul Schaub 2022-06-29 15:46:17 +02:00
parent 44ad01a346
commit b7dd26af05
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 6 additions and 5 deletions

View file

@ -8,7 +8,7 @@ dependencies {
api project(':smack-extensions')
api project(':smack-experimental')
api 'org.pgpainless:pgpainless-core:1.1.1'
api 'org.pgpainless:pgpainless-core:1.3.1'
testImplementation "org.bouncycastle:bcprov-jdk15on:${bouncyCastleVersion}"

View file

@ -26,6 +26,7 @@ import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jivesoftware.smack.util.stringencoder.Base64;
import org.jivesoftware.smackx.ox.util.Util;
/**
@ -51,7 +52,8 @@ public class OpenPgpElement implements ExtensionElement {
}
public InputStream toInputStream() {
return new ByteArrayInputStream(base64EncodedOpenPgpMessage.getBytes(Util.UTF8));
return new ByteArrayInputStream(
Base64.decode(base64EncodedOpenPgpMessage.getBytes(Util.UTF8)));
}
/**

View file

@ -19,7 +19,6 @@ package org.jivesoftware.smackx.ox.store.abstr;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
@ -247,7 +246,7 @@ public abstract class AbstractOpenPgpKeyStore implements OpenPgpKeyStore {
@Override
public PGPSecretKeyRing generateKeyRing(BareJid owner)
throws PGPException, NoSuchAlgorithmException, NoSuchProviderException, InvalidAlgorithmParameterException {
return PGPainless.generateKeyRing().modernKeyRing("xmpp:" + owner.toString(), null);
throws PGPException, NoSuchAlgorithmException, InvalidAlgorithmParameterException {
return PGPainless.generateKeyRing().modernKeyRing("xmpp:" + owner.toString());
}
}