Class CryptoUtil
java.lang.Object
com.itextpdf.kernel.crypto.CryptoUtil
This file is a helper class for internal usage only.
Be aware that it's API and functionality may be changed in the future.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IASN1OutputStreamcreateAsn1OutputStream(OutputStream outputStream, String asn1Encoding) CreatesIASN1OutputStreaminstance and asserts for unexpected ASN1 encodings.(package private) static MessageDigestgetMessageDigest(String hashAlgorithm, String provider) static Certificate
-
Field Details
-
BOUNCY_CASTLE_FACTORY
-
-
Constructor Details
-
CryptoUtil
private CryptoUtil()
-
-
Method Details
-
readPublicCertificate
- Throws:
CertificateException
-
createAsn1OutputStream
public static IASN1OutputStream createAsn1OutputStream(OutputStream outputStream, String asn1Encoding) CreatesIASN1OutputStreaminstance and asserts for unexpected ASN1 encodings.- Parameters:
outputStream- the underlying streamasn1Encoding- ASN1 encoding that will be used for writing. Only DER and BER are allowed as values. See alsoIASN1Encoding.- Returns:
- an
IASN1OutputStreaminstance. Exact stream implementation is chosen based on passed encoding.
-
getMessageDigest
static MessageDigest getMessageDigest(String hashAlgorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
-