Package org.pgpainless.util
Class ArmorUtils
- java.lang.Object
-
- org.pgpainless.util.ArmorUtils
-
public class ArmorUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringHEADER_CHARSETstatic java.lang.StringHEADER_COMMENTstatic java.lang.StringHEADER_HASHstatic java.lang.StringHEADER_MESSAGEIDstatic java.lang.StringHEADER_VERSION
-
Constructor Summary
Constructors Constructor Description ArmorUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddCommentHeader(org.bouncycastle.bcpg.ArmoredOutputStream armor, java.lang.String comment)static voidaddHashAlgorithmHeader(org.bouncycastle.bcpg.ArmoredOutputStream armor, HashAlgorithm hashAlgorithm)static voidaddMessageIdHeader(org.bouncycastle.bcpg.ArmoredOutputStream armor, java.lang.String messageId)static java.util.List<java.lang.String>getArmorHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor, java.lang.String headerKey)static java.util.List<java.lang.String>getCharsetHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor)static java.util.List<java.lang.String>getCommendHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor)static java.util.List<HashAlgorithm>getHashAlgorithms(org.bouncycastle.bcpg.ArmoredInputStream armor)static java.util.List<java.lang.String>getHashHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor)static java.util.List<java.lang.String>getMessageIdHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor)static java.util.List<java.lang.String>getVersionHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor)static java.lang.StringtoAsciiArmoredString(byte[] bytes)static java.lang.StringtoAsciiArmoredString(byte[] bytes, MultiMap<java.lang.String,java.lang.String> additionalHeaderValues)static java.lang.StringtoAsciiArmoredString(java.io.InputStream inputStream)static java.lang.StringtoAsciiArmoredString(java.io.InputStream inputStream, MultiMap<java.lang.String,java.lang.String> additionalHeaderValues)static java.lang.StringtoAsciiArmoredString(org.bouncycastle.openpgp.PGPPublicKeyRing publicKeys)static java.lang.StringtoAsciiArmoredString(org.bouncycastle.openpgp.PGPPublicKeyRingCollection publicKeyRings)static java.lang.StringtoAsciiArmoredString(org.bouncycastle.openpgp.PGPSecretKeyRing secretKeys)static java.lang.StringtoAsciiArmoredString(org.bouncycastle.openpgp.PGPSecretKeyRingCollection secretKeyRings)
-
-
-
Field Detail
-
HEADER_COMMENT
public static final java.lang.String HEADER_COMMENT
- See Also:
- Constant Field Values
-
HEADER_VERSION
public static final java.lang.String HEADER_VERSION
- See Also:
- Constant Field Values
-
HEADER_MESSAGEID
public static final java.lang.String HEADER_MESSAGEID
- See Also:
- Constant Field Values
-
HEADER_HASH
public static final java.lang.String HEADER_HASH
- See Also:
- Constant Field Values
-
HEADER_CHARSET
public static final java.lang.String HEADER_CHARSET
- See Also:
- Constant Field Values
-
-
Method Detail
-
toAsciiArmoredString
public static java.lang.String toAsciiArmoredString(org.bouncycastle.openpgp.PGPSecretKeyRing secretKeys) throws java.io.IOException- Throws:
java.io.IOException
-
toAsciiArmoredString
public static java.lang.String toAsciiArmoredString(org.bouncycastle.openpgp.PGPPublicKeyRing publicKeys) throws java.io.IOException- Throws:
java.io.IOException
-
toAsciiArmoredString
public static java.lang.String toAsciiArmoredString(org.bouncycastle.openpgp.PGPSecretKeyRingCollection secretKeyRings) throws java.io.IOException- Throws:
java.io.IOException
-
toAsciiArmoredString
public static java.lang.String toAsciiArmoredString(org.bouncycastle.openpgp.PGPPublicKeyRingCollection publicKeyRings) throws java.io.IOException- Throws:
java.io.IOException
-
toAsciiArmoredString
public static java.lang.String toAsciiArmoredString(byte[] bytes) throws java.io.IOException- Throws:
java.io.IOException
-
toAsciiArmoredString
public static java.lang.String toAsciiArmoredString(byte[] bytes, MultiMap<java.lang.String,java.lang.String> additionalHeaderValues) throws java.io.IOException- Throws:
java.io.IOException
-
toAsciiArmoredString
public static java.lang.String toAsciiArmoredString(java.io.InputStream inputStream) throws java.io.IOException- Throws:
java.io.IOException
-
addHashAlgorithmHeader
public static void addHashAlgorithmHeader(org.bouncycastle.bcpg.ArmoredOutputStream armor, HashAlgorithm hashAlgorithm)
-
addCommentHeader
public static void addCommentHeader(org.bouncycastle.bcpg.ArmoredOutputStream armor, java.lang.String comment)
-
addMessageIdHeader
public static void addMessageIdHeader(org.bouncycastle.bcpg.ArmoredOutputStream armor, java.lang.String messageId)
-
toAsciiArmoredString
public static java.lang.String toAsciiArmoredString(java.io.InputStream inputStream, MultiMap<java.lang.String,java.lang.String> additionalHeaderValues) throws java.io.IOException- Throws:
java.io.IOException
-
getCommendHeaderValues
public static java.util.List<java.lang.String> getCommendHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor)
-
getMessageIdHeaderValues
public static java.util.List<java.lang.String> getMessageIdHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor)
-
getHashHeaderValues
public static java.util.List<java.lang.String> getHashHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor)
-
getHashAlgorithms
public static java.util.List<HashAlgorithm> getHashAlgorithms(org.bouncycastle.bcpg.ArmoredInputStream armor)
-
getVersionHeaderValues
public static java.util.List<java.lang.String> getVersionHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor)
-
getCharsetHeaderValues
public static java.util.List<java.lang.String> getCharsetHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor)
-
getArmorHeaderValues
public static java.util.List<java.lang.String> getArmorHeaderValues(org.bouncycastle.bcpg.ArmoredInputStream armor, java.lang.String headerKey)
-
-