From 4b5edb3e74deed2c9b08bc7f56965cb8adf5c897 Mon Sep 17 00:00:00 2001 From: ferbas Date: Thu, 10 Dec 2009 09:31:39 +0000 Subject: added atrust bku support git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@497 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../wag/egov/egiz/sig/sigid/SimpleIdFormatter.java | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/SimpleIdFormatter.java (limited to 'src/main/java/at/knowcenter/wag/egov') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/SimpleIdFormatter.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/SimpleIdFormatter.java new file mode 100644 index 0000000..50da463 --- /dev/null +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/sigid/SimpleIdFormatter.java @@ -0,0 +1,25 @@ +package at.knowcenter.wag.egov.egiz.sig.sigid; + +/** + * {@link IdFormatter} implementation that uses specified algorithmid but not additional parameters.
+ * usage A-Trust bku + * @author dferbas + * + */ +public class SimpleIdFormatter implements IdFormatter { + private String algorithmId; + + public SimpleIdFormatter(String algorithmId) { + this.algorithmId = algorithmId; + } + + public String formatIds(String[] ids, String algorithmParams) { + // dferbas + if (algorithmParams != null && algorithmParams.length() > 0) { + return this.algorithmId + ":" + algorithmParams; + } else { + return this.algorithmId; + } + } + +} -- cgit v1.2.3