Example usage for org.bouncycastle.tsp TSPAlgorithms SHA224

List of usage examples for org.bouncycastle.tsp TSPAlgorithms SHA224

Introduction

In this page you can find the example usage for org.bouncycastle.tsp TSPAlgorithms SHA224.

Prototype

ASN1ObjectIdentifier SHA224

To view the source code for org.bouncycastle.tsp TSPAlgorithms SHA224.

Click Source Link

Usage

From source file:es.mityc.firmaJava.ts.TSPAlgoritmos.java

License:LGPL

public static String getAlgName(String oid) {
    if (TSPAlgorithms.SHA1.equals(oid))
        return SHA1;
    else if (TSPAlgorithms.SHA256.equals(oid))
        return SHA2;
    else if (TSPAlgorithms.SHA224.equals(oid))
        return SHA224;
    else if (TSPAlgorithms.SHA256.equals(oid))
        return SHA256;
    else if (TSPAlgorithms.SHA384.equals(oid))
        return SHA384;
    else if (TSPAlgorithms.SHA512.equals(oid))
        return SHA512;
    return oid;//from   w  w w  .  j  ava2 s.c o  m
}

From source file:es.mityc.firmaJava.ts.TSPAlgoritmos.java

License:LGPL

public static String getOID(String algoritmo) {

    Set permitidos = new HashSet(Arrays.asList(getValoresPermitidos()));

    if (permitidos.contains(algoritmo)) {
        if (SHA1.equals(algoritmo))
            return TSPAlgorithms.SHA1;
        else if (SHA2.equals(algoritmo))
            return TSPAlgorithms.SHA256;
        else if (SHA224.equals(algoritmo))
            return TSPAlgorithms.SHA224;
        else if (SHA256.equals(algoritmo))
            return TSPAlgorithms.SHA256;
        else if (SHA384.equals(algoritmo))
            return TSPAlgorithms.SHA384;
        else if (SHA512.equals(algoritmo))
            return TSPAlgorithms.SHA512;
    }//  w ww  .j a  va2 s .  co  m
    return null;
}