ulrich
2016-12-27 b7910bcd54ccf93afd23f64b1dfa6df1565ba4f8
commit | author | age
6240cd 1 /*
1fc020 2  Nutzerverwaltung - A Generic User Manager
U 3  Copyright (c) 2016  Ulrich Hilger
4
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Affero General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  GNU Affero General Public License for more details.
14
15  You should have received a copy of the GNU Affero General Public License
16  along with this program.  If not, see <http://www.gnu.org/licenses/>.
6240cd 17  */
U 18 package de.uhilger.um;
19
20 /**
1fc020 21  * Klassen, die eine Verschl&uuml;sselungsfunktion f&6uml;r den 
U 22  * UserMgr bereitstellen wollen, m&uuml;ssen diese Schnittstelle 
23  * implementieren
6240cd 24  *
1fc020 25  * @author Copyright (c) Ulrich Hilger, http://uhilger.de
U 26  * @author Published under the terms and conditions of the
27  * <a href="http://www.gnu.org/licenses/agpl-3.0" target="_blank">GNU Affero
28  * General Public License</a>
29  *
30  * @version 2, December 27, 2016
6240cd 31  */
U 32 public interface Digester {
1fc020 33   
U 34   /** Name des MD5-Algorithmus zum Verschl&uuml;sseln */
6240cd 35   public static final String MD5 = "MD5";
U 36
1fc020 37   /**
U 38    * Einen Ausdruck verschl&uuml;sseln
39    * 
40    * @param text  der Ausdruck, der verschl&uuml;sselt werden soll
41    * @param algorithm  der Name des Algorithmus, der zum Verschl&uuml;sseln verwendet werden soll
42    * @param encoding  das Encoding, in dem der Ausdruck vorliegt
43    * @return  der verschl&uuml;sselte Ausdruck
44    */
6240cd 45   String digest(String text, String algorithm, String encoding);
U 46 }