From 10a5439fc50f549701090f15bb1330b0d1ed28a9 Mon Sep 17 00:00:00 2001 From: ulrich@undisclosed <ulrich@ulrich-vaio> Date: Tue, 19 May 2020 13:13:28 +0000 Subject: [PATCH] In Arbeit: Piktogramme, Abmelden, Stile verfeinert --- src/java/de/uhilger/um/Digester.java | 47 +++++++++++++++++++++++++++++++---------------- 1 files changed, 31 insertions(+), 16 deletions(-) diff --git a/src/java/de/uhilger/um/Digester.java b/src/java/de/uhilger/um/Digester.java index 0ca00c2..1d2403f 100644 --- a/src/java/de/uhilger/um/Digester.java +++ b/src/java/de/uhilger/um/Digester.java @@ -1,20 +1,21 @@ /* - Nutzerverwaltung - A Generic User Manager - Copyright (c) 2016 Ulrich Hilger - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. + * Nutzerverwaltung - User and role management in your browser + * Copyright (C) 2011-2017 Ulrich Hilger, http://uhilger.de + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/ */ + package de.uhilger.um; /** @@ -33,7 +34,8 @@ /** Name des MD5-Algorithmus zum Verschlüsseln */ public static final String MD5 = "MD5"; - + public static final String SHA256 = "sha-256"; + /** * Einen Ausdruck verschlüsseln * @@ -43,4 +45,17 @@ * @return der verschlüsselte Ausdruck */ String digest(String text, String algorithm, String encoding); + + /** + * Einen Klartext-Ausdruck mit seiner verschluesselten Fassung vergleichen + * @param inputCredentials der Klartext-Ausdruck fuer den festgestellt werden soll, + * ob er zum gespeicherten Ausdruck passt + * @param storedCredentials der gespeicherte (verschluesselte) Ausdruck, fuer den + * festgestellt werden soll, ob er zum Klartext-Ausdruck passt + * @param algorithm der Verschluesselungs-Algorithmus + * @param encoding das Encoding + * @return wahr, wenn der Klartext-Ausdruck dem hinterlegten verschluesselten Ausdruck + * entspricht, falsch, wenn nicht + */ + boolean matches(String inputCredentials, String storedCredentials, String algorithm, String encoding); } -- Gitblit v1.9.3