| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private static String | |
| private static Map | |
| private static Map | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static MPInteger[] | |
| public static String | Returns: a string representation of the OID.the EC curve object identifier in the PGP key oid)Return the EC curve name for the passed in OID. |
| public static InputStream | Returns: a stream that will return PGP binary encoded data.the stream to be checked and possibly wrapped. in)Obtains a stream that can be used to read PGP data from the provided stream. |
| public static String | Returns: the name of the default provider.
Deprecated
unused
Return the JCA/JCE provider that will be used by factory classes in situations where a provider must be determined on the fly. |
| public static int | |
| public static String | Returns: a String representation of the hash name.the algorithm ID for a hash algorithm. hashAlgorithm)Return an appropriate name for the hash algorithm represented by the passed in hash algorithm ID number. |
| public static String | Returns: a String representation of the signature name.the algorithm ID for the public key algorithm used in the signature. keyAlgorithm, int the algorithm ID for the hash algorithm used. hashAlgorithm)Return an appropriate name for the signature algorithm represented by the passed in public key and hash algorithm ID numbers. |
| public static String | Returns: a String representation of the cipher name.the algorithm ID for a symmetric cipher. algorithm)Return an appropriate name for the symmetric algorithm represented by the passed in symmetric algorithm ID number. |
| public static boolean | Returns: true if data likely represents a key box stream.Return true if the byte[] blob probably represents key box data. |
| public static boolean | Returns: true if data likely represents a key ring stream.Return true if the byte[] blob probably represents key ring data. |
| private static boolean | |
| public static byte[] | Returns: a key of the length required by the specified encryption algorithm.the symmetric key algorithm identifier. algorithm, SecureRandom a source of random data. random)Generates a random key for a |
| pack-priv static void | |
| public static void | setDefaultProvider(String
the name of the JCA/JCE provider to use by default. provider)
Deprecated
unused
Set the provider to be used by the package when it is necessary to find one on the fly. |
| public static void | writeFileToLiteralData(OutputStream
the stream to write the literal data to. out, char the fileType, File PGPLiteralData type to use for the file data.the file to write the contents of. file)Write out the contents of the provided file as a literal data packet. |
| public static void | writeFileToLiteralData(OutputStream
the stream to write the literal data to. out, char the fileType, File PGPLiteralData type to use for the file data.the file to write the contents of. file, byte[] buffer to be used to chunk the file into partial packets. buffer)Write out the contents of the provided file as a literal data packet in partial packet format. |
| defProvider | back to summary |
|---|---|
| private static String defProvider | |
| nameToHashId | back to summary |
|---|---|
| private static Map<String, Integer> nameToHashId | |
| oidToName | back to summary |
|---|---|
| private static Map<ASN1ObjectIdentifier, String> oidToName | |
| READ_AHEAD | back to summary |
|---|---|
| private static final int READ_AHEAD | |
| PGPUtil | back to summary |
|---|---|
| public PGPUtil() | |
| dsaSigToMpi | back to summary |
|---|---|
| pack-priv static MPInteger[] dsaSigToMpi(byte[] encoding) throws PGPException | |
| getCurveName | back to summary |
|---|---|
| public static String getCurveName(ASN1ObjectIdentifier oid) Return the EC curve name for the passed in OID.
| |
| getDecoderStream | back to summary |
|---|---|
| public static InputStream getDecoderStream(InputStream in) throws IOException Obtains a stream that can be used to read PGP data from the provided stream.
If the initial bytes of the underlying stream are binary PGP encodings, then the stream will
be returned directly, otherwise an
| |
| getDefaultProvider | back to summary |
|---|---|
| public static String getDefaultProvider()
Deprecated unused Return the JCA/JCE provider that will be used by factory classes in situations where a provider must be determined on the fly.
| |
| getDigestIDForName | back to summary |
|---|---|
| public static int getDigestIDForName(String name) | |
| getDigestName | back to summary |
|---|---|
| public static String getDigestName(int hashAlgorithm) throws PGPException Return an appropriate name for the hash algorithm represented by the passed in hash algorithm ID number.
| |
| getSignatureName | back to summary |
|---|---|
| public static String getSignatureName(int keyAlgorithm, int hashAlgorithm) throws PGPException Return an appropriate name for the signature algorithm represented by the passed in public key and hash algorithm ID numbers.
| |
| getSymmetricCipherName | back to summary |
|---|---|
| public static String getSymmetricCipherName(int algorithm) Return an appropriate name for the symmetric algorithm represented by the passed in symmetric algorithm ID number.
| |
| isKeyBox | back to summary |
|---|---|
| public static boolean isKeyBox(byte[] data) throws IOException Return true if the byte[] blob probably represents key box data.
| |
| isKeyRing | back to summary |
|---|---|
| public static boolean isKeyRing(byte[] blob) throws IOException Return true if the byte[] blob probably represents key ring data.
| |
| isPossiblyBase64 | back to summary |
|---|---|
| private static boolean isPossiblyBase64(int ch) | |
| makeRandomKey | back to summary |
|---|---|
| public static byte[] makeRandomKey(int algorithm, SecureRandom random) throws PGPException Generates a random key for a
| |
| pipeFileContents | back to summary |
|---|---|
| pack-priv static void pipeFileContents(File file, OutputStream pOut, int bufferSize) throws IOException | |
| setDefaultProvider | back to summary |
|---|---|
| public static void setDefaultProvider(String provider)
Deprecated unused Set the provider to be used by the package when it is necessary to find one on the fly.
| |
| writeFileToLiteralData | back to summary |
|---|---|
| public static void writeFileToLiteralData(OutputStream out, char fileType, File file) throws IOException Write out the contents of the provided file as a literal data packet.
| |
| writeFileToLiteralData | back to summary |
|---|---|
| public static void writeFileToLiteralData(OutputStream out, char fileType, File file, byte[] buffer) throws IOException Write out the contents of the provided file as a literal data packet in partial packet format.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream. |
| BufferedInputStreamExt | back to summary |
|---|---|
| pack-priv BufferedInputStreamExt(InputStream input) | |
| available | back to summary |
|---|---|
| public synchronized int available() throws IOException Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream. The next invocation might be the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes.
This method returns the sum of the number of bytes remaining to be read in
the buffer (
| |