Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 1 | OBSOLETE |
Zesstra | 5481d49 | 2021-04-08 20:07:06 +0200 | [diff] [blame] | 2 | SYNOPSIS |
| 3 | string md5(string arg [, int iterations]) |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 4 | string md5(bytes arg [, int iterations]) |
Zesstra | 5481d49 | 2021-04-08 20:07:06 +0200 | [diff] [blame] | 5 | string md5(int * arg [, int iterations]) |
| 6 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 7 | DESCRIPTION |
| 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. |
Zesstra | 5481d49 | 2021-04-08 20:07:06 +0200 | [diff] [blame] | 13 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 14 | 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. |
Zesstra | 5481d49 | 2021-04-08 20:07:06 +0200 | [diff] [blame] | 17 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 18 | The efun costs 5 ticks per iteration. |
Zesstra | 5481d49 | 2021-04-08 20:07:06 +0200 | [diff] [blame] | 19 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 20 | EXAMPLES |
Zesstra | 5481d49 | 2021-04-08 20:07:06 +0200 | [diff] [blame] | 21 | string s; |
| 22 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 23 | s = md5("Hello"); |
Zesstra | 5481d49 | 2021-04-08 20:07:06 +0200 | [diff] [blame] | 24 | s = md5( ({ 'H', 'e', 'l', 'l', 'o' }) ) |
| 25 | s = md5( ({ 'H', 'e', 'l', 'l', 'o' }), 2 ) |
| 26 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 27 | HISTORY |
| 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(). |
Zesstra | 5481d49 | 2021-04-08 20:07:06 +0200 | [diff] [blame] | 33 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 34 | SEE ALSO |
Zesstra | 5481d49 | 2021-04-08 20:07:06 +0200 | [diff] [blame] | 35 | crypt(E), md5_crypt(E), sha1(E), hash(E), hmac(E) |