File: align.t

package info (click to toggle)
libdigest-md4-perl 1.9%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 248 kB
  • sloc: perl: 133; makefile: 3
file content (22 lines) | stat: -r--r--r-- 428 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
BEGIN {
	if ($ENV{PERL_CORE}) {
	        chdir 't' if -d 't';
	        @INC = '../lib';
	}
}

# Test that md4 works on unaligned memory blocks

print "1..1\n";

use strict;
use Digest::MD4 qw(md4_hex);

my $str = "\100" x 20;
substr($str, 0, 1) = "";  # chopping off first char makes the string unaligned

#use Devel::Peek; Dump($str); 

print "not " unless md4_hex($str) eq "d76cb45d0cd2b1fd04c581c641ee2201";
print "ok 1\n";