All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.tsp.TSPAlgorithms Maven / Gradle / Ivy

Go to download

The Bouncy Castle Java API for handling the Time Stamp Protocol (TSP). This jar contains the TSP API for JDK 1.6. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs.

There is a newer version: 1.46
Show newest version
package org.bouncycastle.tsp;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.bouncycastle.asn1.teletrust.TeleTrusTObjectIdentifiers;

/**
 * Recognised hash algorithms for the time stamp protocol.
 */
public interface TSPAlgorithms
{
    public static final String MD5 = PKCSObjectIdentifiers.md5.getId();

    public static final String SHA1 = OIWObjectIdentifiers.idSHA1.getId();
    
    public static final String SHA224 = NISTObjectIdentifiers.id_sha224.getId();
    public static final String SHA256 = NISTObjectIdentifiers.id_sha256.getId();
    public static final String SHA384 = NISTObjectIdentifiers.id_sha384.getId();
    public static final String SHA512 = NISTObjectIdentifiers.id_sha512.getId();

    public static final String RIPEMD128 = TeleTrusTObjectIdentifiers.ripemd128.getId();
    public static final String RIPEMD160 = TeleTrusTObjectIdentifiers.ripemd160.getId();
    public static final String RIPEMD256 = TeleTrusTObjectIdentifiers.ripemd256.getId();
    
    public static final String GOST3411 = CryptoProObjectIdentifiers.gostR3411.getId();
    
    public static final Set    ALLOWED = new HashSet(Arrays.asList(new String[] { GOST3411, MD5, SHA1, SHA224, SHA256, SHA384, SHA512, RIPEMD128, RIPEMD160, RIPEMD256 }));
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy