public final class CryptoUtilPdfBc
extends java.lang.Object
Utility class contains encryption and hash functions for digital signature.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
digest(java.lang.String algorithm,
byte[] data)
Method that obtains the hash computation from a array bytes.
|
static org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getAlgorithmIdentifierByName(java.lang.String hashAlgorithm)
Method that obtains the OID of a hash algorithm from the name.
|
static java.lang.String |
getDigestAlgorithmName(java.lang.String pseudoName)
Method that gets the name of a digest algorithm by name or alias.
|
static java.lang.String |
translateAlgorithmIdentifier(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)
Method that translates a
AlgorithmIdentifier object to a digest algorithm string. |
public static byte[] digest(java.lang.String algorithm,
byte[] data)
throws SigningException
algorithm - Parameter that represents the algorithm used in the hash computation.data - Parameter that represents the source data.SigningException - If a MessageDigestSpi implementation for the specified algorithm is not available
from the specified Provider object.public static java.lang.String translateAlgorithmIdentifier(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)
AlgorithmIdentifier object to a digest algorithm string.algorithmIdentifier - Parameter that represents the OID of the digest algorithm.public static org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifierByName(java.lang.String hashAlgorithm)
hashAlgorithm - Parameter that represents the name of the hash algorithm.public static java.lang.String getDigestAlgorithmName(java.lang.String pseudoName)
pseudoName - Parameter that represents the name or alias of the digest algorithm.