blob: e3457c159b2d913cc2f65ae5871fad5f01d6cf07 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
2 #include <sys/tls.h>
3
4 string hash(int method, string arg [, int iterations ] )
5 string hash(int method, int * arg [, int iterations ] )
6
7BESCHREIBUNG
8 Berechne den Hash <method> vom Argument <arg>. Der Hash wird
9 mit <iterations> Wiederholungen berechnet, wird der Wert weggelassen,
10 wird eine Wiederholung verwendet.
11
12 <method> ist eine der TLS_HASH_-Konstanten in tls.h; nicht jede
13 beschriebene Methode ist in einem gegebenen Driver vorhanden:
14
15 TLS_HASH_SHA1 (1)
16 TLS_HASH_SHA224 (2)
17 TLS_HASH_SHA256 (3)
18 TLS_HASH_SHA384 (4)
19 TLS_HASH_SHA512 (5)
20 TLS_HASH_MD5 (6)
21 TLS_HASH_RIPEMD160 (7)
22
23 Diese Funktion ist nur verfuegbar wenn der Driver mit OpenSSL
24 compiliert wurde.
25
26BEISPIELE
27 string s;
28
29 s = hash(TLS_HASH_SHA1, "Hello", 2);
30 s = hash(TLS_HASH_SHA1, ({ 'H', 'e', 'l', 'l', 'o' }) )
31
32GESCHICHTE
33 Eingefuehrt in LDMud 3.3.714
34
35SIEHE AUCH
36 crypt(E), md5(E), md5_crypt(E), sha1(E), hmac(E)