commit | author | age
|
6240cd
|
1 |
/* |
51c9e3
|
2 |
* Nutzerverwaltung - User and role management in your browser |
U |
3 |
* Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de |
|
4 |
* |
|
5 |
* This program is free software: you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU 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 General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program. If not, see http://www.gnu.org/licenses/ |
6240cd
|
17 |
*/ |
51c9e3
|
18 |
|
6240cd
|
19 |
package de.uhilger.um; |
U |
20 |
|
|
21 |
/** |
1fc020
|
22 |
* Klassen, die eine Verschlüsselungsfunktion f&6uml;r den |
U |
23 |
* UserMgr bereitstellen wollen, müssen diese Schnittstelle |
|
24 |
* implementieren |
6240cd
|
25 |
* |
1fc020
|
26 |
* @author Copyright (c) Ulrich Hilger, http://uhilger.de |
U |
27 |
* @author Published under the terms and conditions of the |
|
28 |
* <a href="http://www.gnu.org/licenses/agpl-3.0" target="_blank">GNU Affero |
|
29 |
* General Public License</a> |
|
30 |
* |
|
31 |
* @version 2, December 27, 2016 |
6240cd
|
32 |
*/ |
U |
33 |
public interface Digester { |
1fc020
|
34 |
|
U |
35 |
/** Name des MD5-Algorithmus zum Verschlüsseln */ |
6240cd
|
36 |
public static final String MD5 = "MD5"; |
U |
37 |
|
1fc020
|
38 |
/** |
U |
39 |
* Einen Ausdruck verschlüsseln |
|
40 |
* |
|
41 |
* @param text der Ausdruck, der verschlüsselt werden soll |
|
42 |
* @param algorithm der Name des Algorithmus, der zum Verschlüsseln verwendet werden soll |
|
43 |
* @param encoding das Encoding, in dem der Ausdruck vorliegt |
|
44 |
* @return der verschlüsselte Ausdruck |
|
45 |
*/ |
6240cd
|
46 |
String digest(String text, String algorithm, String encoding); |
U |
47 |
} |