mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2024-11-25 16:42:07 +01:00
Properly format session keys for --session-key-out
This commit is contained in:
parent
40919be3f7
commit
dd5d790e21
1 changed files with 3 additions and 1 deletions
|
@ -18,6 +18,7 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -137,7 +138,8 @@ public class DecryptCmd extends AbstractSopCmd {
|
||||||
} else {
|
} else {
|
||||||
SessionKey sessionKey = result.getSessionKey().get();
|
SessionKey sessionKey = result.getSessionKey().get();
|
||||||
outputStream.write(sessionKey.getAlgorithm());
|
outputStream.write(sessionKey.getAlgorithm());
|
||||||
outputStream.write(sessionKey.getKey());
|
// noinspection CharsetObjectCanBeUsed
|
||||||
|
outputStream.write(sessionKey.toString().getBytes(Charset.forName("UTF8")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue