]> WPIA git - gigi.git/blob - src/org/cacert/gigi/dbObjects/Digest.java
1bf2b77b74b84a593b0ad8bee0c5f8da6beb9d50
[gigi.git] / src / org / cacert / gigi / dbObjects / Digest.java
1 package org.cacert.gigi.dbObjects;
2
3 import org.cacert.gigi.output.template.Outputable;
4 import org.cacert.gigi.output.template.TranslateCommand;
5 import org.cacert.gigi.output.template.SprintfCommand;
6 import java.util.Arrays;
7
8 public enum Digest {
9     SHA256(new SprintfCommand("Most compatible choice (see {0}documentation{1} for details)", Arrays.asList("!'<a href='//links.teracara.org/sha2-256'>", "!'</a>"))),
10     SHA384("Best matched with ECC P-384"),
11     SHA512("Highest collision resistance, recommended");
12
13     private final Outputable exp;
14
15     private Digest(String explanation) {
16         exp = new TranslateCommand(explanation);
17     }
18
19     private Digest(Outputable exp) {
20         this.exp = exp;
21     }
22
23     public Outputable getExp() {
24         return exp;
25     }
26
27     public static Digest getDefault() {
28         return SHA512;
29     }
30
31 }