Search in sources :

Example 1 with SHA512Digest

use of org.bouncycastle.crypto.digests.SHA512Digest in project robovm by robovm.

the class BcDefaultDigestProvider method createTable.

private static Map createTable() {
    Map table = new HashMap();
    table.put(OIWObjectIdentifiers.idSHA1, new BcDigestProvider() {

        public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) {
            return new SHA1Digest();
        }
    });
    // BEGIN android-removed
    // table.put(NISTObjectIdentifiers.id_sha224, new BcDigestProvider()
    // {
    //     public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
    //     {
    //         return new SHA224Digest();
    //     }
    // });
    // END android-removed
    table.put(NISTObjectIdentifiers.id_sha256, new BcDigestProvider() {

        public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) {
            return new SHA256Digest();
        }
    });
    table.put(NISTObjectIdentifiers.id_sha384, new BcDigestProvider() {

        public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) {
            return new SHA384Digest();
        }
    });
    table.put(NISTObjectIdentifiers.id_sha512, new BcDigestProvider() {

        public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) {
            return new SHA512Digest();
        }
    });
    table.put(PKCSObjectIdentifiers.md5, new BcDigestProvider() {

        public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier) {
            return new MD5Digest();
        }
    });
    return Collections.unmodifiableMap(table);
}
Also used : ExtendedDigest(org.bouncycastle.crypto.ExtendedDigest) SHA512Digest(org.bouncycastle.crypto.digests.SHA512Digest) MD5Digest(org.bouncycastle.crypto.digests.MD5Digest) HashMap(java.util.HashMap) SHA256Digest(org.bouncycastle.crypto.digests.SHA256Digest) SHA1Digest(org.bouncycastle.crypto.digests.SHA1Digest) HashMap(java.util.HashMap) Map(java.util.Map) SHA384Digest(org.bouncycastle.crypto.digests.SHA384Digest) AlgorithmIdentifier(org.bouncycastle.asn1.x509.AlgorithmIdentifier)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 AlgorithmIdentifier (org.bouncycastle.asn1.x509.AlgorithmIdentifier)1 ExtendedDigest (org.bouncycastle.crypto.ExtendedDigest)1 MD5Digest (org.bouncycastle.crypto.digests.MD5Digest)1 SHA1Digest (org.bouncycastle.crypto.digests.SHA1Digest)1 SHA256Digest (org.bouncycastle.crypto.digests.SHA256Digest)1 SHA384Digest (org.bouncycastle.crypto.digests.SHA384Digest)1 SHA512Digest (org.bouncycastle.crypto.digests.SHA512Digest)1