45 |
(* *) |
(* *) |
46 |
(*************************************************************************) |
(*************************************************************************) |
47 |
|
|
48 |
let int64_3 = Int64.of_int 3 |
let int64_3 = 3L |
49 |
let int64_ffffffff = Int64.of_string "0xffffffff" |
let int64_ffffffff = 0xffffffffL |
50 |
let default_bandwidth = 0x68 |
let default_bandwidth = 0x68 |
51 |
|
|
52 |
external fst_hash_checksum : string -> int = "fst_hash_checksum_ml" |
external fst_hash_checksum : string -> int = "fst_hash_checksum_ml" |
1005 |
let shared_size, pos = get_dynint m pos in |
let shared_size, pos = get_dynint m pos in |
1006 |
let shared_tags, pos = get_tags m pos in |
let shared_tags, pos = get_tags m pos in |
1007 |
|
|
1008 |
let computed_checksum = Int64.of_int |
let computed_checksum = |
1009 |
(fst_hash_checksum shared_hash) in |
Int64.of_int (fst_hash_checksum shared_hash) in |
1010 |
if computed_checksum <> shared_checksum then begin |
if computed_checksum <> shared_checksum then begin |
1011 |
lprintf "Bad COMPUTED checksum for hash\n"; |
lprintf "Bad COMPUTED checksum for hash\n"; |
1012 |
end; |
end; |
1073 |
let result_checksum, pos = get_dynint m (pos+20) in |
let result_checksum, pos = get_dynint m (pos+20) in |
1074 |
let result_size, pos = get_dynint m pos in |
let result_size, pos = get_dynint m pos in |
1075 |
|
|
1076 |
let computed_checksum = Int64.of_int |
let computed_checksum = |
1077 |
(fst_hash_checksum result_hash) in |
Int64.of_int (fst_hash_checksum result_hash) in |
1078 |
if computed_checksum <> result_checksum then begin |
if computed_checksum <> result_checksum then begin |
1079 |
lprintf "Bad COMPUTED checksum for hash\n"; |
lprintf "Bad COMPUTED checksum for hash\n"; |
1080 |
end; |
end; |
1257 |
let shared_size, pos = get_dynint m pos in |
let shared_size, pos = get_dynint m pos in |
1258 |
let shared_tags, pos = get_tags m pos in |
let shared_tags, pos = get_tags m pos in |
1259 |
|
|
1260 |
let computed_checksum = Int64.of_int |
let computed_checksum = |
1261 |
(fst_hash_checksum shared_hash) in |
Int64.of_int (fst_hash_checksum shared_hash) in |
1262 |
if computed_checksum <> shared_checksum then begin |
if computed_checksum <> shared_checksum then begin |
1263 |
lprintf "Bad COMPUTED checksum for hash\n"; |
lprintf "Bad COMPUTED checksum for hash\n"; |
1264 |
end; |
end; |
1892 |
let check_primitives () = |
let check_primitives () = |
1893 |
(try |
(try |
1894 |
let cipher = create_cipher () in |
let cipher = create_cipher () in |
1895 |
set_cipher cipher (Int32.of_int 123456789) 0x29; |
set_cipher cipher 123456789l 0x29; |
1896 |
init_cipher cipher; |
init_cipher cipher; |
1897 |
let s = String.create 12 in |
let s = String.create 12 in |
1898 |
cipher_packet_set cipher s 0; |
cipher_packet_set cipher s 0; |