Skip to content

Instantly share code, notes, and snippets.

View jordanbaucke's full-sized avatar

Jordan Baucke jordanbaucke

View GitHub Profile
private static String signMessageByteArray(String message,
PGPSecretKey pgpSec, char pass[]) throws IOException,
NoSuchAlgorithmException, NoSuchProviderException, PGPException,
SignatureException {
byte[] messageCharArray = message.getBytes();
ByteArrayOutputStream encOut = new ByteArrayOutputStream();
OutputStream out = encOut;
out = new ArmoredOutputStream(out);
public static String encryptByteArray(byte[] clearData,
PGPPublicKey encKey, boolean withIntegrityCheck, boolean armor)
throws IOException, PGPException, NoSuchProviderException {
ByteArrayOutputStream encOut = new ByteArrayOutputStream();
OutputStream out = encOut;
if (armor) {
out = new ArmoredOutputStream(out);
}

Keybase proof

I hereby claim:

  • I am jordanbaucke on github.
  • I am jordanbaucke (https://keybase.io/jordanbaucke) on keybase.
  • I have a public key whose fingerprint is 08CC 4540 252F 0CC7 C8BA 6E17 3FD6 CF71 5477 03B0

To claim this, I am signing this object: