at.gv.egiz.pdfas.algorithmSuite
Class AlgorithmMapper

java.lang.Object
  extended byat.gv.egiz.pdfas.algorithmSuite.AlgorithmMapper

public class AlgorithmMapper
extends Object

Utility for mapping signature and hash algorithms between URI and abbreviation.
Supported algorithms are defined in external resource {@value}
e.g. sha1 <-> http://www.w3.org/2000/09/xmldsig#sha1

Author:
dferbas

Constructor Summary
AlgorithmMapper()
           
 
Method Summary
static String getAbbreviation(String algorithmUri)
          Get algorithm abbreviation (equals last part after namespace#) from uri
e.g.
static String getHashAbbrFromSuite(String suite)
          Get hash (abbreviation) from signature method (eg. sha1 from ecdsa-sha1).
static String getHashUriFromSuite(String suite)
          Get hash method (URI) from signature method
static String getUri(String algorithmShort)
          Get valid URI from algorithm abbreviation
e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlgorithmMapper

public AlgorithmMapper()
Method Detail

getAbbreviation

public static String getAbbreviation(String algorithmUri)
Get algorithm abbreviation (equals last part after namespace#) from uri
e.g. sha1 from http://www.w3.org/2000/09/xmldsig#sha1

Parameters:
algorithmUri - algorithm URI
Returns:
algorithm abbreviation

getUri

public static String getUri(String algorithmShort)
Get valid URI from algorithm abbreviation
e.g. http://www.w3.org/2000/09/xmldsig#sha1 from sha1

Parameters:
algorithmShort -
Returns:
URI

getHashAbbrFromSuite

public static String getHashAbbrFromSuite(String suite)
Get hash (abbreviation) from signature method (eg. sha1 from ecdsa-sha1).

Parameters:
suite - abbreviation or full qualified signature method
Returns:
digest method abbreviation

getHashUriFromSuite

public static String getHashUriFromSuite(String suite)
Get hash method (URI) from signature method

Parameters:
suite - abbreviation or full qualified signature method
Returns:
digest method URI


Copyright © 2006-2010. All Rights Reserved.