X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2FdbObjects%2FDigest.java;h=1bf2b77b74b84a593b0ad8bee0c5f8da6beb9d50;hb=3238dff5b3beca228359b370bc104f48d6247632;hp=59247121c5ef04c064386b40270f674efd1fe488;hpb=ec155eec51606c19970c9099ef23f700fb6aa53a;p=gigi.git diff --git a/src/org/cacert/gigi/dbObjects/Digest.java b/src/org/cacert/gigi/dbObjects/Digest.java index 59247121..1bf2b77b 100644 --- a/src/org/cacert/gigi/dbObjects/Digest.java +++ b/src/org/cacert/gigi/dbObjects/Digest.java @@ -2,9 +2,13 @@ package org.cacert.gigi.dbObjects; import org.cacert.gigi.output.template.Outputable; import org.cacert.gigi.output.template.TranslateCommand; +import org.cacert.gigi.output.template.SprintfCommand; +import java.util.Arrays; public enum Digest { - SHA256("Currently recommended, because the other algorithms" + " might break on some older versions of the GnuTLS library" + " (older than 3.x) still shipped in Debian for example."), SHA384(""), SHA512("Highest protection against hash collision attacks of the algorithms offered here."); + SHA256(new SprintfCommand("Most compatible choice (see {0}documentation{1} for details)", Arrays.asList("!'", "!'"))), + SHA384("Best matched with ECC P-384"), + SHA512("Highest collision resistance, recommended"); private final Outputable exp; @@ -12,12 +16,16 @@ public enum Digest { exp = new TranslateCommand(explanation); } + private Digest(Outputable exp) { + this.exp = exp; + } + public Outputable getExp() { return exp; } public static Digest getDefault() { - return SHA256; + return SHA512; } }