failed attempts to intercept copy command when the cursor is in the empty text field...
[LeanCalc.git] / help / md5
1 NAME
2     md5 - MD5 Message-Digest Algorithm
3
4 SYNOPSIS
5     md5([arg1 [, val ...]])
6
7 TYPES
8     arg1        any
9     val         any
10
11     return      HASH or number
12
13 DESCRIPTION
14     The md5() builtin implements the MD5 Message-Digest Algorithm.
15     The SHA is a 128 bit hash.
16
17     With no args, md5() returns the default initial md5 HASH state.
18
19     If arg1 is a HASH state and no other val args are given, then the
20     HASH state is finalized and the numeric value of the hash is given.
21
22     If arg1 is a HASH state and one or more val args are given,
23     then the val args are used to modify the arg1 HASH state.
24     The new arg1 HASH state is returned.
25
26     If arg1 is not a a HASH state, then the initial HASH is
27     used and modifed by arg1 and any val args supplied.  The
28     return value is the new HASH state.
29
30     The following table gives a summary of actions and return values.
31     Here, assume that 'h' is a HASH state:
32
33         md5()                   HASH    returns initial HASH state
34
35         md5(h)                  number  h is put into final form and the
36                                         numeric value of the hash state
37
38         md5(x)                  HASH    modify the initial state by hashing 'x'
39
40         md5(md5(), x)           HASH    the same as md5(x)
41
42         md5(x, y)               HASH    the same as md5(md5(x), y)
43
44         md5(h, x, y)            HASH    modify state 'h' by 'x' and then 'y'
45
46         md5(md5(h,x,y))         number  numeric value of the above call
47
48     NOTE: These functions were "derived from the RSA Data Security, Inc.
49           MD5 Message-Digest Algorithm".
50
51 EXAMPLE
52     > base(16)
53             0xa
54
55     > md5()
56             md5 hash state
57     > md5(md5())
58             0xd41d8cd98f00b204e9800998ecf8427e
59
60     > md5("x", "y", "z") == md5("xyz")
61             1
62     > md5("x", "y", "z") == md5("xy")
63             0
64
65     > md5(md5("this is", 7^19-8, "a composit", 3i+4.5, "hash"))
66             0x5a90d942335b0dbbdce38d90e7cb6dac
67
68     > x = md5(list(1,2,3), "curds and whey", 2^21701-1, pi())
69     > x
70             md5 hash state
71     > md5(x)
72             0x88790b3ea9eb0128134c103ac9b683ed
73
74     > y = md5()
75     > y = md5(y, list(1,2,3), "curds and whey")
76     > y = md5(y, 2^21701-1)
77     > y = md5(y, pi())
78     > y
79             md5 hash state
80     > md5(y)
81             0x88790b3ea9eb0128134c103ac9b683ed
82
83 LIMITS
84     none
85
86 LINK LIBRARY
87     HASH* hash_init(int, HASH*);
88     void hash_free(HASH*);
89     HASH* hash_copy(HASH*);
90     int hash_cmp(HASH*, HASH*);
91     void hash_print(HASH*);
92     ZVALUE hash_final(HASH*);
93     HASH* hash_long(int, long, HASH*);
94     HASH* hash_zvalue(int, ZVALUE, HASH*);
95     HASH* hash_number(int, void*, HASH*);
96     HASH* hash_complex(int, void*, HASH*);
97     HASH* hash_str(int, char*, HASH*);
98     HASH* hash_usb8(int, USB8*, int, HASH*);
99     HASH* hash_value(int, void*, HASH*);
100
101 SEE ALSO
102     ishash, sha, sha1
103