Fields Summary |
---|
static Logger | log{@link java.util.logging} logging facility |
public static final String | ALGO_ID_DIGEST_NOT_RECOMMENDED_MD5Message Digest - NOT RECOMMENDED MD5 |
public static final String | ALGO_ID_DIGEST_SHA1Digest - Required SHA1 |
public static final String | ALGO_ID_DIGEST_SHA256Message Digest - RECOMMENDED SHA256 |
public static final String | ALGO_ID_DIGEST_SHA384Message Digest - OPTIONAL SHA384 |
public static final String | ALGO_ID_DIGEST_SHA512Message Digest - OPTIONAL SHA512 |
public static final String | ALGO_ID_DIGEST_RIPEMD160Message Digest - OPTIONAL RIPEMD-160 |
MessageDigest | algorithmField algorithm stores the actual {@link java.security.MessageDigest} |
Methods Summary |
---|
public byte[] | digest()Proxy method for {@link java.security.MessageDigest#digest()}
which is executed on the internal {@link java.security.MessageDigest} object.
return this.algorithm.digest();
|
public byte[] | digest(byte[] input)Proxy method for {@link java.security.MessageDigest#digest(byte[])}
which is executed on the internal {@link java.security.MessageDigest} object.
return this.algorithm.digest(input);
|
public int | digest(byte[] buf, int offset, int len)Proxy method for {@link java.security.MessageDigest#digest(byte[], int, int)}
which is executed on the internal {@link java.security.MessageDigest} object.
return this.algorithm.digest(buf, offset, len);
|
public java.security.MessageDigest | getAlgorithm()Returns the actual {@link java.security.MessageDigest} algorithm object
return this.algorithm;
|
public java.lang.String | getBaseLocalName()
return Constants._TAG_DIGESTMETHOD;
|
public java.lang.String | getBaseNamespace()
return Constants.SignatureSpecNS;
|
public int | getDigestLength()Proxy method for {@link java.security.MessageDigest#getDigestLength}
which is executed on the internal {@link java.security.MessageDigest} object.
return this.algorithm.getDigestLength();
|
public static com.sun.org.apache.xml.internal.security.algorithms.MessageDigestAlgorithm | getInstance(org.w3c.dom.Document doc, java.lang.String algorithmURI)Factory method for constructing a message digest algorithm by name.
String algorithmID = JCEMapper.translateURItoJCEID(algorithmURI);
if (algorithmID == null) {
Object[] exArgs = { algorithmURI };
throw new XMLSignatureException("algorithms.NoSuchMap", exArgs);
}
MessageDigest md;
String provider=JCEMapper.getProviderId();
try {
if (provider==null) {
md = MessageDigest.getInstance(algorithmID);
} else {
md = MessageDigest.getInstance(algorithmID,provider);
}
} catch (java.security.NoSuchAlgorithmException ex) {
Object[] exArgs = { algorithmID,
ex.getLocalizedMessage() };
throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
} catch (NoSuchProviderException ex) {
Object[] exArgs = { algorithmID,
ex.getLocalizedMessage() };
throw new XMLSignatureException("algorithms.NoSuchAlgorithm", exArgs);
}
return new MessageDigestAlgorithm(doc, md, algorithmURI);
|
public java.lang.String | getJCEAlgorithmString()Proxy method for {@link java.security.MessageDigest#getAlgorithm}
which is executed on the internal {@link java.security.MessageDigest} object.
return this.algorithm.getAlgorithm();
|
public java.security.Provider | getJCEProvider()Proxy method for {@link java.security.MessageDigest#getProvider}
which is executed on the internal {@link java.security.MessageDigest} object.
return this.algorithm.getProvider();
|
public static boolean | isEqual(byte[] digesta, byte[] digestb)Proxy method for {@link java.security.MessageDigest#isEqual}
which is executed on the internal {@link java.security.MessageDigest} object.
return java.security.MessageDigest.isEqual(digesta, digestb);
|
public void | reset()Proxy method for {@link java.security.MessageDigest#reset}
which is executed on the internal {@link java.security.MessageDigest} object.
this.algorithm.reset();
|
public void | update(byte[] input)Proxy method for {@link java.security.MessageDigest#update(byte[])}
which is executed on the internal {@link java.security.MessageDigest} object.
this.algorithm.update(input);
|
public void | update(byte input)Proxy method for {@link java.security.MessageDigest#update(byte)}
which is executed on the internal {@link java.security.MessageDigest} object.
this.algorithm.update(input);
|
public void | update(byte[] buf, int offset, int len)Proxy method for {@link java.security.MessageDigest#update(byte[], int, int)}
which is executed on the internal {@link java.security.MessageDigest} object.
this.algorithm.update(buf, offset, len);
|