org.apache.maven.mercury.crypto.pgp
Class PgpHelper
java.lang.Object
org.apache.maven.mercury.crypto.pgp.PgpHelper
public class PgpHelper
- extends java.lang.Object
PGP helper - collection of utility methods, loosely based on one of the
Bouncy Castle's SignedFileProcessor.java
|
Method Summary |
static java.lang.String |
fileToString(java.lang.String fileName)
|
static long |
hexToId(java.lang.String hexId)
|
static org.bouncycastle.openpgp.PGPSecretKeyRing |
readKeyRing(java.io.InputStream in,
java.lang.String hexId)
load a key ring stream and find the secret key by hex id |
static org.bouncycastle.openpgp.PGPSignature |
readSignature(java.io.InputStream inS)
|
static java.lang.String |
streamToString(java.io.InputStream in)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROVIDER
public static final java.lang.String PROVIDER
- See Also:
- Constant Field Values
EXTENSION
public static final java.lang.String EXTENSION
- See Also:
- Constant Field Values
PgpHelper
public PgpHelper()
readKeyRing
public static org.bouncycastle.openpgp.PGPSecretKeyRing readKeyRing(java.io.InputStream in,
java.lang.String hexId)
throws java.io.IOException,
org.bouncycastle.openpgp.PGPException
- load a key ring stream and find the secret key by hex id
- Parameters:
in - PGP keystorehexId - key id
- Returns:
-
- Throws:
java.io.IOException
org.bouncycastle.openpgp.PGPException
hexToId
public static long hexToId(java.lang.String hexId)
readSignature
public static org.bouncycastle.openpgp.PGPSignature readSignature(java.io.InputStream inS)
throws java.io.IOException,
org.bouncycastle.openpgp.PGPException
- Throws:
java.io.IOException
org.bouncycastle.openpgp.PGPException
streamToString
public static java.lang.String streamToString(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
fileToString
public static java.lang.String fileToString(java.lang.String fileName)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.