01: package org.bouncycastle.tsp;
02:
03: import java.util.Arrays;
04: import java.util.HashSet;
05: import java.util.Set;
06:
07: import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
08: import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
09: import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
10: import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
11: import org.bouncycastle.asn1.teletrust.TeleTrusTObjectIdentifiers;
12:
13: /**
14: * Recognised hash algorithms for the time stamp protocol.
15: */
16: public interface TSPAlgorithms {
17: public static final String MD5 = PKCSObjectIdentifiers.md5.getId();
18:
19: public static final String SHA1 = OIWObjectIdentifiers.idSHA1
20: .getId();
21:
22: public static final String SHA224 = NISTObjectIdentifiers.id_sha224
23: .getId();
24: public static final String SHA256 = NISTObjectIdentifiers.id_sha256
25: .getId();
26: public static final String SHA384 = NISTObjectIdentifiers.id_sha384
27: .getId();
28: public static final String SHA512 = NISTObjectIdentifiers.id_sha512
29: .getId();
30:
31: public static final String RIPEMD128 = TeleTrusTObjectIdentifiers.ripemd128
32: .getId();
33: public static final String RIPEMD160 = TeleTrusTObjectIdentifiers.ripemd160
34: .getId();
35: public static final String RIPEMD256 = TeleTrusTObjectIdentifiers.ripemd256
36: .getId();
37:
38: public static final String GOST3411 = CryptoProObjectIdentifiers.gostR3411
39: .getId();
40:
41: public static final Set ALLOWED = new HashSet(Arrays
42: .asList(new String[] { GOST3411, MD5, SHA1, SHA224, SHA256,
43: SHA384, SHA512, RIPEMD128, RIPEMD160, RIPEMD256 }));
44: }
|