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