1 use Test::More tests => 2;
4 # Can't assume too much about the string returned by crypt(),
5 # and about how many bytes of the encrypted (really, hashed)
8 # HISTORICALLY the results started with the first two bytes of the salt,
9 # followed by 11 bytes from the set [./0-9A-Za-z], and only the first
10 # eight characters mattered, but those are probably no more safe
11 # bets, given alternative encryption/hashing schemes like MD5,
12 # C2 (or higher) security schemes, and non-UNIX platforms.
15 skip "crypt unimplemented", 2, unless $Config{d_crypt};
17 ok(substr(crypt("ab", "cd"), 2) ne substr(crypt("ab", "ce"), 2), "salt");
19 ok(crypt("HI", "HO") eq crypt(v4040.4041, "HO"), "Unicode");