/* 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 . */ package de.uhilger.um; /** * Klassen, die eine Verschlüsselungsfunktion f&6uml;r den * UserMgr bereitstellen wollen, müssen diese Schnittstelle * implementieren * * @author Copyright (c) Ulrich Hilger, http://uhilger.de * @author Published under the terms and conditions of the * GNU Affero * General Public License * * @version 2, December 27, 2016 */ public interface Digester { /** Name des MD5-Algorithmus zum Verschlüsseln */ public static final String MD5 = "MD5"; /** * Einen Ausdruck verschlüsseln * * @param text der Ausdruck, der verschlüsselt werden soll * @param algorithm der Name des Algorithmus, der zum Verschlüsseln verwendet werden soll * @param encoding das Encoding, in dem der Ausdruck vorliegt * @return der verschlüsselte Ausdruck */ String digest(String text, String algorithm, String encoding); }