blob: 745bf871dd01c7b6a87f0f03b7b59670f0f32166 [file] [log] [blame]
Zesstra715ec202025-07-09 22:18:31 +02001OBSOLETE
Zesstra5481d492021-04-08 20:07:06 +02002SYNOPSIS
3 string md5(string arg [, int iterations])
Zesstra715ec202025-07-09 22:18:31 +02004 string md5(bytes arg [, int iterations])
Zesstra5481d492021-04-08 20:07:06 +02005 string md5(int * arg [, int iterations])
6
Zesstra715ec202025-07-09 22:18:31 +02007DESCRIPTION
8 Create and return a MD5 message digest from <arg>.
9 <arg> may be a string, a byte sequence, or an array of numbers
10 (each considered to be a byte, ignoring all but the lowest 8 bits).
11 A string is converted to a UTF-8 byte sequence of which then the
12 digest will be created.
Zesstra5481d492021-04-08 20:07:06 +020013
Zesstra715ec202025-07-09 22:18:31 +020014 If <iterations> is given as a number greater than 0, it is
15 the number of iterations used in the digest calculation. If omitted,
16 the driver executes just one iteration.
Zesstra5481d492021-04-08 20:07:06 +020017
Zesstra715ec202025-07-09 22:18:31 +020018 The efun costs 5 ticks per iteration.
Zesstra5481d492021-04-08 20:07:06 +020019
Zesstra715ec202025-07-09 22:18:31 +020020EXAMPLES
Zesstra5481d492021-04-08 20:07:06 +020021 string s;
22
Zesstra715ec202025-07-09 22:18:31 +020023 s = md5("Hello");
Zesstra5481d492021-04-08 20:07:06 +020024 s = md5( ({ 'H', 'e', 'l', 'l', 'o' }) )
25 s = md5( ({ 'H', 'e', 'l', 'l', 'o' }), 2 )
26
Zesstra715ec202025-07-09 22:18:31 +020027HISTORY
28 Introduced in LDMud 3.2.9.
29 LDMud 3.2.12 added number arrays as argument, and the number of
30 interations.
31 LDMud 3.3.717 added the iteration-based evaluation cost.
32 Since LDMud 3.3.719 obsoleted by hash().
Zesstra5481d492021-04-08 20:07:06 +020033
Zesstra715ec202025-07-09 22:18:31 +020034SEE ALSO
Zesstra5481d492021-04-08 20:07:06 +020035 crypt(E), md5_crypt(E), sha1(E), hash(E), hmac(E)