use of com.github.zhenwei.pkix.operator.bc.BcDigestProvider in project LinLong-Java by zhenwei1108.
the class EnvelopedDataHelper method createTable.
private static Map createTable() {
Map table = new HashMap();
table.put(PKCSObjectIdentifiers.id_hmacWithSHA1, new BcDigestProvider() {
public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) {
return new SHA1Digest();
}
});
table.put(PKCSObjectIdentifiers.id_hmacWithSHA224, new BcDigestProvider() {
public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) {
return new SHA224Digest();
}
});
table.put(PKCSObjectIdentifiers.id_hmacWithSHA256, new BcDigestProvider() {
public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) {
return new SHA256Digest();
}
});
table.put(PKCSObjectIdentifiers.id_hmacWithSHA384, new BcDigestProvider() {
public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) {
return new SHA384Digest();
}
});
table.put(PKCSObjectIdentifiers.id_hmacWithSHA512, new BcDigestProvider() {
public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) {
return new SHA512Digest();
}
});
return Collections.unmodifiableMap(table);
}
Aggregations