Hex Artifact Content
Not logged in

Artifact 1b518e963c8fac8de6934464ab244ab558fb32a5:


0000: 2f 2f 20 43 6f 70 79 72 69 67 68 74 20 32 30 31  // Copyright 201
0010: 34 20 54 68 65 20 52 75 73 74 20 50 72 6f 6a 65  4 The Rust Proje
0020: 63 74 20 44 65 76 65 6c 6f 70 65 72 73 2e 20 53  ct Developers. S
0030: 65 65 20 74 68 65 20 43 4f 50 59 52 49 47 48 54  ee the COPYRIGHT
0040: 0a 2f 2f 20 66 69 6c 65 20 61 74 20 74 68 65 20  .// file at the 
0050: 74 6f 70 2d 6c 65 76 65 6c 20 64 69 72 65 63 74  top-level direct
0060: 6f 72 79 20 6f 66 20 74 68 69 73 20 64 69 73 74  ory of this dist
0070: 72 69 62 75 74 69 6f 6e 20 61 6e 64 20 61 74 0a  ribution and at.
0080: 2f 2f 20 68 74 74 70 3a 2f 2f 72 75 73 74 2d 6c  // http://rust-l
0090: 61 6e 67 2e 6f 72 67 2f 43 4f 50 59 52 49 47 48  ang.org/COPYRIGH
00a0: 54 2e 0a 2f 2f 0a 2f 2f 20 4c 69 63 65 6e 73 65  T..//.// License
00b0: 64 20 75 6e 64 65 72 20 74 68 65 20 41 70 61 63  d under the Apac
00c0: 68 65 20 4c 69 63 65 6e 73 65 2c 20 56 65 72 73  he License, Vers
00d0: 69 6f 6e 20 32 2e 30 20 3c 4c 49 43 45 4e 53 45  ion 2.0 <LICENSE
00e0: 2d 41 50 41 43 48 45 20 6f 72 0a 2f 2f 20 68 74  -APACHE or.// ht
00f0: 74 70 3a 2f 2f 77 77 77 2e 61 70 61 63 68 65 2e  tp://www.apache.
0100: 6f 72 67 2f 6c 69 63 65 6e 73 65 73 2f 4c 49 43  org/licenses/LIC
0110: 45 4e 53 45 2d 32 2e 30 3e 20 6f 72 20 74 68 65  ENSE-2.0> or the
0120: 20 4d 49 54 20 6c 69 63 65 6e 73 65 0a 2f 2f 20   MIT license.// 
0130: 3c 4c 49 43 45 4e 53 45 2d 4d 49 54 20 6f 72 20  <LICENSE-MIT or 
0140: 68 74 74 70 3a 2f 2f 6f 70 65 6e 73 6f 75 72 63  http://opensourc
0150: 65 2e 6f 72 67 2f 6c 69 63 65 6e 73 65 73 2f 4d  e.org/licenses/M
0160: 49 54 3e 2c 20 61 74 20 79 6f 75 72 0a 2f 2f 20  IT>, at your.// 
0170: 6f 70 74 69 6f 6e 2e 20 54 68 69 73 20 66 69 6c  option. This fil
0180: 65 20 6d 61 79 20 6e 6f 74 20 62 65 20 63 6f 70  e may not be cop
0190: 69 65 64 2c 20 6d 6f 64 69 66 69 65 64 2c 20 6f  ied, modified, o
01a0: 72 20 64 69 73 74 72 69 62 75 74 65 64 0a 2f 2f  r distributed.//
01b0: 20 65 78 63 65 70 74 20 61 63 63 6f 72 64 69 6e   except accordin
01c0: 67 20 74 6f 20 74 68 6f 73 65 20 74 65 72 6d 73  g to those terms
01d0: 2e 0a 0a 23 21 5b 61 6c 6c 6f 77 28 64 65 70 72  ...#![allow(depr
01e0: 65 63 61 74 65 64 29 5d 0a 0a 75 73 65 20 63 6f  ecated)]..use co
01f0: 72 65 3a 3a 68 61 73 68 3a 3a 7b 48 61 73 68 2c  re::hash::{Hash,
0200: 20 48 61 73 68 65 72 7d 3b 0a 75 73 65 20 63 6f   Hasher};.use co
0210: 72 65 3a 3a 68 61 73 68 3a 3a 7b 53 69 70 48 61  re::hash::{SipHa
0220: 73 68 65 72 2c 20 53 69 70 48 61 73 68 65 72 31  sher, SipHasher1
0230: 33 2c 20 53 69 70 48 61 73 68 65 72 32 34 7d 3b  3, SipHasher24};
0240: 0a 75 73 65 20 63 6f 72 65 3a 3a 7b 73 6c 69 63  .use core::{slic
0250: 65 2c 20 6d 65 6d 7d 3b 0a 0a 2f 2f 20 48 61 73  e, mem};..// Has
0260: 68 20 6a 75 73 74 20 74 68 65 20 62 79 74 65 73  h just the bytes
0270: 20 6f 66 20 74 68 65 20 73 6c 69 63 65 2c 20 77   of the slice, w
0280: 69 74 68 6f 75 74 20 6c 65 6e 67 74 68 20 70 72  ithout length pr
0290: 65 66 69 78 0a 73 74 72 75 63 74 20 42 79 74 65  efix.struct Byte
02a0: 73 3c 27 61 3e 28 26 27 61 20 5b 75 38 5d 29 3b  s<'a>(&'a [u8]);
02b0: 0a 0a 69 6d 70 6c 3c 27 61 3e 20 48 61 73 68 20  ..impl<'a> Hash 
02c0: 66 6f 72 20 42 79 74 65 73 3c 27 61 3e 20 7b 0a  for Bytes<'a> {.
02d0: 20 20 20 20 23 5b 61 6c 6c 6f 77 28 75 6e 75 73      #[allow(unus
02e0: 65 64 5f 6d 75 73 74 5f 75 73 65 29 5d 0a 20 20  ed_must_use)].  
02f0: 20 20 66 6e 20 68 61 73 68 3c 48 3a 20 48 61 73    fn hash<H: Has
0300: 68 65 72 3e 28 26 73 65 6c 66 2c 20 73 74 61 74  her>(&self, stat
0310: 65 3a 20 26 6d 75 74 20 48 29 20 7b 0a 20 20 20  e: &mut H) {.   
0320: 20 20 20 20 20 6c 65 74 20 42 79 74 65 73 28 76       let Bytes(v
0330: 29 20 3d 20 2a 73 65 6c 66 3b 0a 20 20 20 20 20  ) = *self;.     
0340: 20 20 20 73 74 61 74 65 2e 77 72 69 74 65 28 76     state.write(v
0350: 29 3b 0a 20 20 20 20 7d 0a 7d 0a 0a 6d 61 63 72  );.    }.}..macr
0360: 6f 5f 72 75 6c 65 73 21 20 75 38 74 6f 36 34 5f  o_rules! u8to64_
0370: 6c 65 20 7b 0a 20 20 20 20 28 24 62 75 66 3a 65  le {.    ($buf:e
0380: 78 70 72 2c 20 24 69 3a 65 78 70 72 29 20 3d 3e  xpr, $i:expr) =>
0390: 0a 20 20 20 20 28 24 62 75 66 5b 30 2b 24 69 5d  .    ($buf[0+$i]
03a0: 20 61 73 20 75 36 34 20 7c 0a 20 20 20 20 20 28   as u64 |.     (
03b0: 24 62 75 66 5b 31 2b 24 69 5d 20 61 73 20 75 36  $buf[1+$i] as u6
03c0: 34 29 20 3c 3c 20 38 20 7c 0a 20 20 20 20 20 28  4) << 8 |.     (
03d0: 24 62 75 66 5b 32 2b 24 69 5d 20 61 73 20 75 36  $buf[2+$i] as u6
03e0: 34 29 20 3c 3c 20 31 36 20 7c 0a 20 20 20 20 20  4) << 16 |.     
03f0: 28 24 62 75 66 5b 33 2b 24 69 5d 20 61 73 20 75  ($buf[3+$i] as u
0400: 36 34 29 20 3c 3c 20 32 34 20 7c 0a 20 20 20 20  64) << 24 |.    
0410: 20 28 24 62 75 66 5b 34 2b 24 69 5d 20 61 73 20   ($buf[4+$i] as 
0420: 75 36 34 29 20 3c 3c 20 33 32 20 7c 0a 20 20 20  u64) << 32 |.   
0430: 20 20 28 24 62 75 66 5b 35 2b 24 69 5d 20 61 73    ($buf[5+$i] as
0440: 20 75 36 34 29 20 3c 3c 20 34 30 20 7c 0a 20 20   u64) << 40 |.  
0450: 20 20 20 28 24 62 75 66 5b 36 2b 24 69 5d 20 61     ($buf[6+$i] a
0460: 73 20 75 36 34 29 20 3c 3c 20 34 38 20 7c 0a 20  s u64) << 48 |. 
0470: 20 20 20 20 28 24 62 75 66 5b 37 2b 24 69 5d 20      ($buf[7+$i] 
0480: 61 73 20 75 36 34 29 20 3c 3c 20 35 36 29 3b 0a  as u64) << 56);.
0490: 20 20 20 20 28 24 62 75 66 3a 65 78 70 72 2c 20      ($buf:expr, 
04a0: 24 69 3a 65 78 70 72 2c 20 24 6c 65 6e 3a 65 78  $i:expr, $len:ex
04b0: 70 72 29 20 3d 3e 0a 20 20 20 20 28 7b 0a 20 20  pr) =>.    ({.  
04c0: 20 20 20 20 20 20 6c 65 74 20 6d 75 74 20 74 20        let mut t 
04d0: 3d 20 30 3b 0a 20 20 20 20 20 20 20 20 6c 65 74  = 0;.        let
04e0: 20 6d 75 74 20 6f 75 74 20 3d 20 30 3b 0a 20 20   mut out = 0;.  
04f0: 20 20 20 20 20 20 77 68 69 6c 65 20 74 20 3c 20        while t < 
0500: 24 6c 65 6e 20 7b 0a 20 20 20 20 20 20 20 20 20  $len {.         
0510: 20 20 20 6f 75 74 20 7c 3d 20 28 24 62 75 66 5b     out |= ($buf[
0520: 74 2b 24 69 5d 20 61 73 20 75 36 34 29 20 3c 3c  t+$i] as u64) <<
0530: 20 74 2a 38 3b 0a 20 20 20 20 20 20 20 20 20 20   t*8;.          
0540: 20 20 74 20 2b 3d 20 31 3b 0a 20 20 20 20 20 20    t += 1;.      
0550: 20 20 7d 0a 20 20 20 20 20 20 20 20 6f 75 74 0a    }.        out.
0560: 20 20 20 20 7d 29 3b 0a 7d 0a 0a 66 6e 20 68 61      });.}..fn ha
0570: 73 68 5f 77 69 74 68 3c 48 3a 20 48 61 73 68 65  sh_with<H: Hashe
0580: 72 2c 20 54 3a 20 48 61 73 68 3e 28 6d 75 74 20  r, T: Hash>(mut 
0590: 73 74 3a 20 48 2c 20 78 3a 20 26 54 29 20 2d 3e  st: H, x: &T) ->
05a0: 20 75 36 34 20 7b 0a 20 20 20 20 78 2e 68 61 73   u64 {.    x.has
05b0: 68 28 26 6d 75 74 20 73 74 29 3b 0a 20 20 20 20  h(&mut st);.    
05c0: 73 74 2e 66 69 6e 69 73 68 28 29 0a 7d 0a 0a 66  st.finish().}..f
05d0: 6e 20 68 61 73 68 3c 54 3a 20 48 61 73 68 3e 28  n hash<T: Hash>(
05e0: 78 3a 20 26 54 29 20 2d 3e 20 75 36 34 20 7b 0a  x: &T) -> u64 {.
05f0: 20 20 20 20 68 61 73 68 5f 77 69 74 68 28 53 69      hash_with(Si
0600: 70 48 61 73 68 65 72 3a 3a 6e 65 77 28 29 2c 20  pHasher::new(), 
0610: 78 29 0a 7d 0a 0a 23 5b 74 65 73 74 5d 0a 23 5b  x).}..#[test].#[
0620: 61 6c 6c 6f 77 28 75 6e 75 73 65 64 5f 6d 75 73  allow(unused_mus
0630: 74 5f 75 73 65 29 5d 0a 66 6e 20 74 65 73 74 5f  t_use)].fn test_
0640: 73 69 70 68 61 73 68 5f 31 5f 33 28 29 20 7b 0a  siphash_1_3() {.
0650: 20 20 20 20 6c 65 74 20 76 65 63 73 20 3a 20 5b      let vecs : [
0660: 5b 75 38 3b 20 38 5d 3b 20 36 34 5d 20 3d 20 5b  [u8; 8]; 64] = [
0670: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 64 63 2c  .        [ 0xdc,
0680: 20 30 78 63 34 2c 20 30 78 30 66 2c 20 30 78 30   0xc4, 0x0f, 0x0
0690: 35 2c 20 30 78 35 38 2c 20 30 78 30 31 2c 20 30  5, 0x58, 0x01, 0
06a0: 78 61 63 2c 20 30 78 61 62 20 5d 2c 0a 20 20 20  xac, 0xab ],.   
06b0: 20 20 20 20 20 5b 20 30 78 39 33 2c 20 30 78 63       [ 0x93, 0xc
06c0: 61 2c 20 30 78 35 37 2c 20 30 78 37 64 2c 20 30  a, 0x57, 0x7d, 0
06d0: 78 66 33 2c 20 30 78 39 62 2c 20 30 78 66 34 2c  xf3, 0x9b, 0xf4,
06e0: 20 30 78 63 39 20 5d 2c 0a 20 20 20 20 20 20 20   0xc9 ],.       
06f0: 20 5b 20 30 78 34 64 2c 20 30 78 64 34 2c 20 30   [ 0x4d, 0xd4, 0
0700: 78 63 37 2c 20 30 78 34 64 2c 20 30 78 30 32 2c  xc7, 0x4d, 0x02,
0710: 20 30 78 39 62 2c 20 30 78 63 62 2c 20 30 78 38   0x9b, 0xcb, 0x8
0720: 32 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  2 ],.        [ 0
0730: 78 66 62 2c 20 30 78 66 37 2c 20 30 78 64 64 2c  xfb, 0xf7, 0xdd,
0740: 20 30 78 65 37 2c 20 30 78 62 38 2c 20 30 78 30   0xe7, 0xb8, 0x0
0750: 61 2c 20 30 78 66 38 2c 20 30 78 38 62 20 5d 2c  a, 0xf8, 0x8b ],
0760: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 32 38 2c  .        [ 0x28,
0770: 20 30 78 38 33 2c 20 30 78 64 33 2c 20 30 78 38   0x83, 0xd3, 0x8
0780: 38 2c 20 30 78 36 30 2c 20 30 78 35 37 2c 20 30  8, 0x60, 0x57, 0
0790: 78 37 35 2c 20 30 78 63 66 20 5d 2c 0a 20 20 20  x75, 0xcf ],.   
07a0: 20 20 20 20 20 5b 20 30 78 36 37 2c 20 30 78 33       [ 0x67, 0x3
07b0: 62 2c 20 30 78 35 33 2c 20 30 78 34 39 2c 20 30  b, 0x53, 0x49, 0
07c0: 78 32 66 2c 20 30 78 64 35 2c 20 30 78 66 39 2c  x2f, 0xd5, 0xf9,
07d0: 20 30 78 64 65 20 5d 2c 0a 20 20 20 20 20 20 20   0xde ],.       
07e0: 20 5b 20 30 78 61 37 2c 20 30 78 32 32 2c 20 30   [ 0xa7, 0x22, 0
07f0: 78 39 66 2c 20 30 78 63 35 2c 20 30 78 35 30 2c  x9f, 0xc5, 0x50,
0800: 20 30 78 32 62 2c 20 30 78 30 64 2c 20 30 78 63   0x2b, 0x0d, 0xc
0810: 35 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  5 ],.        [ 0
0820: 78 34 30 2c 20 30 78 31 31 2c 20 30 78 62 31 2c  x40, 0x11, 0xb1,
0830: 20 30 78 39 62 2c 20 30 78 39 38 2c 20 30 78 37   0x9b, 0x98, 0x7
0840: 64 2c 20 30 78 39 32 2c 20 30 78 64 33 20 5d 2c  d, 0x92, 0xd3 ],
0850: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 38 65 2c  .        [ 0x8e,
0860: 20 30 78 39 61 2c 20 30 78 32 39 2c 20 30 78 38   0x9a, 0x29, 0x8
0870: 64 2c 20 30 78 31 31 2c 20 30 78 39 35 2c 20 30  d, 0x11, 0x95, 0
0880: 78 39 30 2c 20 30 78 33 36 20 5d 2c 0a 20 20 20  x90, 0x36 ],.   
0890: 20 20 20 20 20 5b 20 30 78 65 34 2c 20 30 78 33       [ 0xe4, 0x3
08a0: 64 2c 20 30 78 30 36 2c 20 30 78 36 63 2c 20 30  d, 0x06, 0x6c, 0
08b0: 78 62 33 2c 20 30 78 38 65 2c 20 30 78 61 34 2c  xb3, 0x8e, 0xa4,
08c0: 20 30 78 32 35 20 5d 2c 0a 20 20 20 20 20 20 20   0x25 ],.       
08d0: 20 5b 20 30 78 37 66 2c 20 30 78 30 39 2c 20 30   [ 0x7f, 0x09, 0
08e0: 78 66 66 2c 20 30 78 39 32 2c 20 30 78 65 65 2c  xff, 0x92, 0xee,
08f0: 20 30 78 38 35 2c 20 30 78 64 65 2c 20 30 78 37   0x85, 0xde, 0x7
0900: 39 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  9 ],.        [ 0
0910: 78 35 32 2c 20 30 78 63 33 2c 20 30 78 34 64 2c  x52, 0xc3, 0x4d,
0920: 20 30 78 66 39 2c 20 30 78 63 31 2c 20 30 78 31   0xf9, 0xc1, 0x1
0930: 38 2c 20 30 78 63 31 2c 20 30 78 37 30 20 5d 2c  8, 0xc1, 0x70 ],
0940: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 61 32 2c  .        [ 0xa2,
0950: 20 30 78 64 39 2c 20 30 78 62 34 2c 20 30 78 35   0xd9, 0xb4, 0x5
0960: 37 2c 20 30 78 62 31 2c 20 30 78 38 34 2c 20 30  7, 0xb1, 0x84, 0
0970: 78 61 33 2c 20 30 78 37 38 20 5d 2c 0a 20 20 20  xa3, 0x78 ],.   
0980: 20 20 20 20 20 5b 20 30 78 61 37 2c 20 30 78 66       [ 0xa7, 0xf
0990: 66 2c 20 30 78 32 39 2c 20 30 78 31 32 2c 20 30  f, 0x29, 0x12, 0
09a0: 78 30 63 2c 20 30 78 37 36 2c 20 30 78 36 66 2c  x0c, 0x76, 0x6f,
09b0: 20 30 78 33 30 20 5d 2c 0a 20 20 20 20 20 20 20   0x30 ],.       
09c0: 20 5b 20 30 78 33 34 2c 20 30 78 35 64 2c 20 30   [ 0x34, 0x5d, 0
09d0: 78 66 39 2c 20 30 78 63 30 2c 20 30 78 31 31 2c  xf9, 0xc0, 0x11,
09e0: 20 30 78 61 31 2c 20 30 78 35 61 2c 20 30 78 36   0xa1, 0x5a, 0x6
09f0: 30 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  0 ],.        [ 0
0a00: 78 35 36 2c 20 30 78 39 39 2c 20 30 78 35 31 2c  x56, 0x99, 0x51,
0a10: 20 30 78 32 61 2c 20 30 78 36 64 2c 20 30 78 64   0x2a, 0x6d, 0xd
0a20: 38 2c 20 30 78 32 30 2c 20 30 78 64 33 20 5d 2c  8, 0x20, 0xd3 ],
0a30: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 36 36 2c  .        [ 0x66,
0a40: 20 30 78 38 62 2c 20 30 78 39 30 2c 20 30 78 37   0x8b, 0x90, 0x7
0a50: 64 2c 20 30 78 31 61 2c 20 30 78 64 64 2c 20 30  d, 0x1a, 0xdd, 0
0a60: 78 34 66 2c 20 30 78 63 63 20 5d 2c 0a 20 20 20  x4f, 0xcc ],.   
0a70: 20 20 20 20 20 5b 20 30 78 30 63 2c 20 30 78 64       [ 0x0c, 0xd
0a80: 38 2c 20 30 78 64 62 2c 20 30 78 36 33 2c 20 30  8, 0xdb, 0x63, 0
0a90: 78 39 30 2c 20 30 78 36 38 2c 20 30 78 66 32 2c  x90, 0x68, 0xf2,
0aa0: 20 30 78 39 63 20 5d 2c 0a 20 20 20 20 20 20 20   0x9c ],.       
0ab0: 20 5b 20 30 78 33 65 2c 20 30 78 65 36 2c 20 30   [ 0x3e, 0xe6, 0
0ac0: 78 37 33 2c 20 30 78 62 34 2c 20 30 78 39 63 2c  x73, 0xb4, 0x9c,
0ad0: 20 30 78 33 38 2c 20 30 78 66 63 2c 20 30 78 38   0x38, 0xfc, 0x8
0ae0: 66 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  f ],.        [ 0
0af0: 78 31 63 2c 20 30 78 37 64 2c 20 30 78 32 39 2c  x1c, 0x7d, 0x29,
0b00: 20 30 78 38 64 2c 20 30 78 65 35 2c 20 30 78 39   0x8d, 0xe5, 0x9
0b10: 64 2c 20 30 78 31 66 2c 20 30 78 66 32 20 5d 2c  d, 0x1f, 0xf2 ],
0b20: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 34 30 2c  .        [ 0x40,
0b30: 20 30 78 65 30 2c 20 30 78 63 63 2c 20 30 78 61   0xe0, 0xcc, 0xa
0b40: 36 2c 20 30 78 34 36 2c 20 30 78 32 66 2c 20 30  6, 0x46, 0x2f, 0
0b50: 78 64 63 2c 20 30 78 63 30 20 5d 2c 0a 20 20 20  xdc, 0xc0 ],.   
0b60: 20 20 20 20 20 5b 20 30 78 34 34 2c 20 30 78 66       [ 0x44, 0xf
0b70: 38 2c 20 30 78 34 35 2c 20 30 78 32 62 2c 20 30  8, 0x45, 0x2b, 0
0b80: 78 66 65 2c 20 30 78 61 62 2c 20 30 78 39 32 2c  xfe, 0xab, 0x92,
0b90: 20 30 78 62 39 20 5d 2c 0a 20 20 20 20 20 20 20   0xb9 ],.       
0ba0: 20 5b 20 30 78 32 65 2c 20 30 78 38 37 2c 20 30   [ 0x2e, 0x87, 0
0bb0: 78 32 30 2c 20 30 78 61 33 2c 20 30 78 39 62 2c  x20, 0xa3, 0x9b,
0bc0: 20 30 78 37 62 2c 20 30 78 66 65 2c 20 30 78 37   0x7b, 0xfe, 0x7
0bd0: 66 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  f ],.        [ 0
0be0: 78 32 33 2c 20 30 78 63 31 2c 20 30 78 65 36 2c  x23, 0xc1, 0xe6,
0bf0: 20 30 78 64 61 2c 20 30 78 37 66 2c 20 30 78 30   0xda, 0x7f, 0x0
0c00: 65 2c 20 30 78 35 61 2c 20 30 78 35 32 20 5d 2c  e, 0x5a, 0x52 ],
0c10: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 38 63 2c  .        [ 0x8c,
0c20: 20 30 78 39 63 2c 20 30 78 33 34 2c 20 30 78 36   0x9c, 0x34, 0x6
0c30: 37 2c 20 30 78 62 32 2c 20 30 78 61 65 2c 20 30  7, 0xb2, 0xae, 0
0c40: 78 36 34 2c 20 30 78 66 34 20 5d 2c 0a 20 20 20  x64, 0xf4 ],.   
0c50: 20 20 20 20 20 5b 20 30 78 37 39 2c 20 30 78 30       [ 0x79, 0x0
0c60: 39 2c 20 30 78 35 62 2c 20 30 78 37 30 2c 20 30  9, 0x5b, 0x70, 0
0c70: 78 32 38 2c 20 30 78 35 39 2c 20 30 78 63 64 2c  x28, 0x59, 0xcd,
0c80: 20 30 78 34 35 20 5d 2c 0a 20 20 20 20 20 20 20   0x45 ],.       
0c90: 20 5b 20 30 78 61 35 2c 20 30 78 31 33 2c 20 30   [ 0xa5, 0x13, 0
0ca0: 78 39 39 2c 20 30 78 63 61 2c 20 30 78 65 33 2c  x99, 0xca, 0xe3,
0cb0: 20 30 78 33 35 2c 20 30 78 33 65 2c 20 30 78 33   0x35, 0x3e, 0x3
0cc0: 61 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  a ],.        [ 0
0cd0: 78 33 35 2c 20 30 78 33 62 2c 20 30 78 64 65 2c  x35, 0x3b, 0xde,
0ce0: 20 30 78 34 61 2c 20 30 78 34 65 2c 20 30 78 63   0x4a, 0x4e, 0xc
0cf0: 37 2c 20 30 78 31 64 2c 20 30 78 61 39 20 5d 2c  7, 0x1d, 0xa9 ],
0d00: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 30 64 2c  .        [ 0x0d,
0d10: 20 30 78 64 30 2c 20 30 78 36 63 2c 20 30 78 65   0xd0, 0x6c, 0xe
0d20: 66 2c 20 30 78 30 32 2c 20 30 78 65 64 2c 20 30  f, 0x02, 0xed, 0
0d30: 78 30 62 2c 20 30 78 66 62 20 5d 2c 0a 20 20 20  x0b, 0xfb ],.   
0d40: 20 20 20 20 20 5b 20 30 78 66 34 2c 20 30 78 65       [ 0xf4, 0xe
0d50: 31 2c 20 30 78 62 31 2c 20 30 78 34 61 2c 20 30  1, 0xb1, 0x4a, 0
0d60: 78 62 34 2c 20 30 78 33 63 2c 20 30 78 64 39 2c  xb4, 0x3c, 0xd9,
0d70: 20 30 78 38 38 20 5d 2c 0a 20 20 20 20 20 20 20   0x88 ],.       
0d80: 20 5b 20 30 78 36 33 2c 20 30 78 65 36 2c 20 30   [ 0x63, 0xe6, 0
0d90: 78 63 35 2c 20 30 78 34 33 2c 20 30 78 64 36 2c  xc5, 0x43, 0xd6,
0da0: 20 30 78 31 31 2c 20 30 78 30 66 2c 20 30 78 35   0x11, 0x0f, 0x5
0db0: 34 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  4 ],.        [ 0
0dc0: 78 62 63 2c 20 30 78 64 31 2c 20 30 78 32 31 2c  xbc, 0xd1, 0x21,
0dd0: 20 30 78 38 63 2c 20 30 78 31 66 2c 20 30 78 64   0x8c, 0x1f, 0xd
0de0: 64 2c 20 30 78 37 30 2c 20 30 78 32 33 20 5d 2c  d, 0x70, 0x23 ],
0df0: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 30 64 2c  .        [ 0x0d,
0e00: 20 30 78 62 36 2c 20 30 78 61 37 2c 20 30 78 31   0xb6, 0xa7, 0x1
0e10: 36 2c 20 30 78 36 63 2c 20 30 78 37 62 2c 20 30  6, 0x6c, 0x7b, 0
0e20: 78 31 35 2c 20 30 78 38 31 20 5d 2c 0a 20 20 20  x15, 0x81 ],.   
0e30: 20 20 20 20 20 5b 20 30 78 62 66 2c 20 30 78 66       [ 0xbf, 0xf
0e40: 39 2c 20 30 78 38 66 2c 20 30 78 37 61 2c 20 30  9, 0x8f, 0x7a, 0
0e50: 78 65 35 2c 20 30 78 62 39 2c 20 30 78 35 34 2c  xe5, 0xb9, 0x54,
0e60: 20 30 78 34 64 20 5d 2c 0a 20 20 20 20 20 20 20   0x4d ],.       
0e70: 20 5b 20 30 78 33 65 2c 20 30 78 37 35 2c 20 30   [ 0x3e, 0x75, 0
0e80: 78 32 61 2c 20 30 78 31 66 2c 20 30 78 37 38 2c  x2a, 0x1f, 0x78,
0e90: 20 30 78 31 32 2c 20 30 78 39 66 2c 20 30 78 37   0x12, 0x9f, 0x7
0ea0: 35 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  5 ],.        [ 0
0eb0: 78 39 31 2c 20 30 78 36 62 2c 20 30 78 31 38 2c  x91, 0x6b, 0x18,
0ec0: 20 30 78 62 66 2c 20 30 78 62 65 2c 20 30 78 61   0xbf, 0xbe, 0xa
0ed0: 33 2c 20 30 78 61 31 2c 20 30 78 63 65 20 5d 2c  3, 0xa1, 0xce ],
0ee0: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 30 36 2c  .        [ 0x06,
0ef0: 20 30 78 36 32 2c 20 30 78 61 32 2c 20 30 78 61   0x62, 0xa2, 0xa
0f00: 64 2c 20 30 78 64 33 2c 20 30 78 30 38 2c 20 30  d, 0xd3, 0x08, 0
0f10: 78 66 35 2c 20 30 78 32 63 20 5d 2c 0a 20 20 20  xf5, 0x2c ],.   
0f20: 20 20 20 20 20 5b 20 30 78 35 37 2c 20 30 78 33       [ 0x57, 0x3
0f30: 30 2c 20 30 78 63 33 2c 20 30 78 61 33 2c 20 30  0, 0xc3, 0xa3, 0
0f40: 78 32 64 2c 20 30 78 31 63 2c 20 30 78 31 30 2c  x2d, 0x1c, 0x10,
0f50: 20 30 78 62 36 20 5d 2c 0a 20 20 20 20 20 20 20   0xb6 ],.       
0f60: 20 5b 20 30 78 61 31 2c 20 30 78 33 36 2c 20 30   [ 0xa1, 0x36, 0
0f70: 78 33 61 2c 20 30 78 61 65 2c 20 30 78 39 36 2c  x3a, 0xae, 0x96,
0f80: 20 30 78 37 34 2c 20 30 78 66 34 2c 20 30 78 62   0x74, 0xf4, 0xb
0f90: 33 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  3 ],.        [ 0
0fa0: 78 39 32 2c 20 30 78 38 33 2c 20 30 78 31 30 2c  x92, 0x83, 0x10,
0fb0: 20 30 78 37 62 2c 20 30 78 35 34 2c 20 30 78 35   0x7b, 0x54, 0x5
0fc0: 37 2c 20 30 78 36 62 2c 20 30 78 36 32 20 5d 2c  7, 0x6b, 0x62 ],
0fd0: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 33 31 2c  .        [ 0x31,
0fe0: 20 30 78 31 35 2c 20 30 78 65 34 2c 20 30 78 39   0x15, 0xe4, 0x9
0ff0: 39 2c 20 30 78 33 32 2c 20 30 78 33 36 2c 20 30  9, 0x32, 0x36, 0
1000: 78 64 32 2c 20 30 78 63 31 20 5d 2c 0a 20 20 20  xd2, 0xc1 ],.   
1010: 20 20 20 20 20 5b 20 30 78 34 34 2c 20 30 78 64       [ 0x44, 0xd
1020: 39 2c 20 30 78 31 61 2c 20 30 78 33 66 2c 20 30  9, 0x1a, 0x3f, 0
1030: 78 39 32 2c 20 30 78 63 31 2c 20 30 78 37 63 2c  x92, 0xc1, 0x7c,
1040: 20 30 78 36 36 20 5d 2c 0a 20 20 20 20 20 20 20   0x66 ],.       
1050: 20 5b 20 30 78 32 35 2c 20 30 78 38 38 2c 20 30   [ 0x25, 0x88, 0
1060: 78 31 33 2c 20 30 78 63 38 2c 20 30 78 66 65 2c  x13, 0xc8, 0xfe,
1070: 20 30 78 34 66 2c 20 30 78 37 30 2c 20 30 78 36   0x4f, 0x70, 0x6
1080: 35 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  5 ],.        [ 0
1090: 78 61 36 2c 20 30 78 34 39 2c 20 30 78 38 39 2c  xa6, 0x49, 0x89,
10a0: 20 30 78 63 32 2c 20 30 78 64 31 2c 20 30 78 38   0xc2, 0xd1, 0x8
10b0: 30 2c 20 30 78 66 32 2c 20 30 78 32 34 20 5d 2c  0, 0xf2, 0x24 ],
10c0: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 36 62 2c  .        [ 0x6b,
10d0: 20 30 78 38 37 2c 20 30 78 66 38 2c 20 30 78 66   0x87, 0xf8, 0xf
10e0: 61 2c 20 30 78 65 64 2c 20 30 78 31 63 2c 20 30  a, 0xed, 0x1c, 0
10f0: 78 63 61 2c 20 30 78 63 32 20 5d 2c 0a 20 20 20  xca, 0xc2 ],.   
1100: 20 20 20 20 20 5b 20 30 78 39 36 2c 20 30 78 32       [ 0x96, 0x2
1110: 31 2c 20 30 78 30 34 2c 20 30 78 39 66 2c 20 30  1, 0x04, 0x9f, 0
1120: 78 66 63 2c 20 30 78 34 62 2c 20 30 78 31 36 2c  xfc, 0x4b, 0x16,
1130: 20 30 78 63 32 20 5d 2c 0a 20 20 20 20 20 20 20   0xc2 ],.       
1140: 20 5b 20 30 78 32 33 2c 20 30 78 64 36 2c 20 30   [ 0x23, 0xd6, 0
1150: 78 62 31 2c 20 30 78 36 38 2c 20 30 78 39 33 2c  xb1, 0x68, 0x93,
1160: 20 30 78 39 63 2c 20 30 78 36 65 2c 20 30 78 61   0x9c, 0x6e, 0xa
1170: 31 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  1 ],.        [ 0
1180: 78 66 64 2c 20 30 78 31 34 2c 20 30 78 35 31 2c  xfd, 0x14, 0x51,
1190: 20 30 78 38 62 2c 20 30 78 39 63 2c 20 30 78 31   0x8b, 0x9c, 0x1
11a0: 36 2c 20 30 78 66 62 2c 20 30 78 34 39 20 5d 2c  6, 0xfb, 0x49 ],
11b0: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 34 36 2c  .        [ 0x46,
11c0: 20 30 78 34 63 2c 20 30 78 30 37 2c 20 30 78 64   0x4c, 0x07, 0xd
11d0: 66 2c 20 30 78 66 38 2c 20 30 78 34 33 2c 20 30  f, 0xf8, 0x43, 0
11e0: 78 33 31 2c 20 30 78 39 66 20 5d 2c 0a 20 20 20  x31, 0x9f ],.   
11f0: 20 20 20 20 20 5b 20 30 78 62 33 2c 20 30 78 38       [ 0xb3, 0x8
1200: 36 2c 20 30 78 63 63 2c 20 30 78 31 32 2c 20 30  6, 0xcc, 0x12, 0
1210: 78 32 34 2c 20 30 78 61 66 2c 20 30 78 66 64 2c  x24, 0xaf, 0xfd,
1220: 20 30 78 63 36 20 5d 2c 0a 20 20 20 20 20 20 20   0xc6 ],.       
1230: 20 5b 20 30 78 38 66 2c 20 30 78 30 39 2c 20 30   [ 0x8f, 0x09, 0
1240: 78 35 32 2c 20 30 78 30 61 2c 20 30 78 64 31 2c  x52, 0x0a, 0xd1,
1250: 20 30 78 34 39 2c 20 30 78 61 66 2c 20 30 78 37   0x49, 0xaf, 0x7
1260: 65 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  e ],.        [ 0
1270: 78 39 61 2c 20 30 78 32 66 2c 20 30 78 32 39 2c  x9a, 0x2f, 0x29,
1280: 20 30 78 39 64 2c 20 30 78 35 35 2c 20 30 78 31   0x9d, 0x55, 0x1
1290: 33 2c 20 30 78 66 33 2c 20 30 78 31 63 20 5d 2c  3, 0xf3, 0x1c ],
12a0: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 31 32 2c  .        [ 0x12,
12b0: 20 30 78 31 66 2c 20 30 78 66 34 2c 20 30 78 61   0x1f, 0xf4, 0xa
12c0: 32 2c 20 30 78 64 64 2c 20 30 78 33 30 2c 20 30  2, 0xdd, 0x30, 0
12d0: 78 34 61 2c 20 30 78 63 34 20 5d 2c 0a 20 20 20  x4a, 0xc4 ],.   
12e0: 20 20 20 20 20 5b 20 30 78 64 30 2c 20 30 78 31       [ 0xd0, 0x1
12f0: 65 2c 20 30 78 61 37 2c 20 30 78 34 33 2c 20 30  e, 0xa7, 0x43, 0
1300: 78 38 39 2c 20 30 78 65 39 2c 20 30 78 66 61 2c  x89, 0xe9, 0xfa,
1310: 20 30 78 33 36 20 5d 2c 0a 20 20 20 20 20 20 20   0x36 ],.       
1320: 20 5b 20 30 78 65 36 2c 20 30 78 62 63 2c 20 30   [ 0xe6, 0xbc, 0
1330: 78 66 30 2c 20 30 78 37 33 2c 20 30 78 34 63 2c  xf0, 0x73, 0x4c,
1340: 20 30 78 62 33 2c 20 30 78 38 66 2c 20 30 78 33   0xb3, 0x8f, 0x3
1350: 31 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  1 ],.        [ 0
1360: 78 38 30 2c 20 30 78 65 39 2c 20 30 78 61 37 2c  x80, 0xe9, 0xa7,
1370: 20 30 78 37 30 2c 20 30 78 33 36 2c 20 30 78 62   0x70, 0x36, 0xb
1380: 66 2c 20 30 78 37 61 2c 20 30 78 61 32 20 5d 2c  f, 0x7a, 0xa2 ],
1390: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 37 35 2c  .        [ 0x75,
13a0: 20 30 78 36 64 2c 20 30 78 33 63 2c 20 30 78 32   0x6d, 0x3c, 0x2
13b0: 34 2c 20 30 78 64 62 2c 20 30 78 63 30 2c 20 30  4, 0xdb, 0xc0, 0
13c0: 78 62 63 2c 20 30 78 62 34 20 5d 2c 0a 20 20 20  xbc, 0xb4 ],.   
13d0: 20 20 20 20 20 5b 20 30 78 31 33 2c 20 30 78 31       [ 0x13, 0x1
13e0: 35 2c 20 30 78 62 37 2c 20 30 78 66 64 2c 20 30  5, 0xb7, 0xfd, 0
13f0: 78 35 32 2c 20 30 78 64 38 2c 20 30 78 66 38 2c  x52, 0xd8, 0xf8,
1400: 20 30 78 32 33 20 5d 2c 0a 20 20 20 20 20 20 20   0x23 ],.       
1410: 20 5b 20 30 78 30 38 2c 20 30 78 38 61 2c 20 30   [ 0x08, 0x8a, 0
1420: 78 37 64 2c 20 30 78 61 36 2c 20 30 78 34 64 2c  x7d, 0xa6, 0x4d,
1430: 20 30 78 35 66 2c 20 30 78 30 33 2c 20 30 78 38   0x5f, 0x03, 0x8
1440: 66 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  f ],.        [ 0
1450: 78 34 38 2c 20 30 78 66 31 2c 20 30 78 65 38 2c  x48, 0xf1, 0xe8,
1460: 20 30 78 62 37 2c 20 30 78 65 35 2c 20 30 78 64   0xb7, 0xe5, 0xd
1470: 30 2c 20 30 78 39 63 2c 20 30 78 64 38 20 5d 2c  0, 0x9c, 0xd8 ],
1480: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 65 65 2c  .        [ 0xee,
1490: 20 30 78 34 34 2c 20 30 78 61 36 2c 20 30 78 66   0x44, 0xa6, 0xf
14a0: 37 2c 20 30 78 62 63 2c 20 30 78 65 36 2c 20 30  7, 0xbc, 0xe6, 0
14b0: 78 66 34 2c 20 30 78 66 36 20 5d 2c 0a 20 20 20  xf4, 0xf6 ],.   
14c0: 20 20 20 20 20 5b 20 30 78 66 32 2c 20 30 78 33       [ 0xf2, 0x3
14d0: 37 2c 20 30 78 31 38 2c 20 30 78 30 66 2c 20 30  7, 0x18, 0x0f, 0
14e0: 78 64 38 2c 20 30 78 39 61 2c 20 30 78 63 35 2c  xd8, 0x9a, 0xc5,
14f0: 20 30 78 61 65 20 5d 2c 0a 20 20 20 20 20 20 20   0xae ],.       
1500: 20 5b 20 30 78 65 30 2c 20 30 78 39 34 2c 20 30   [ 0xe0, 0x94, 0
1510: 78 36 36 2c 20 30 78 34 62 2c 20 30 78 31 35 2c  x66, 0x4b, 0x15,
1520: 20 30 78 66 36 2c 20 30 78 62 32 2c 20 30 78 63   0xf6, 0xb2, 0xc
1530: 33 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  3 ],.        [ 0
1540: 78 61 38 2c 20 30 78 62 33 2c 20 30 78 62 62 2c  xa8, 0xb3, 0xbb,
1550: 20 30 78 62 37 2c 20 30 78 36 32 2c 20 30 78 39   0xb7, 0x62, 0x9
1560: 30 2c 20 30 78 31 39 2c 20 30 78 39 64 20 5d 0a  0, 0x19, 0x9d ].
1570: 20 20 20 20 5d 3b 0a 0a 20 20 20 20 6c 65 74 20      ];..    let 
1580: 6b 30 20 3d 20 30 78 5f 30 37 5f 30 36 5f 30 35  k0 = 0x_07_06_05
1590: 5f 30 34 5f 30 33 5f 30 32 5f 30 31 5f 30 30 3b  _04_03_02_01_00;
15a0: 0a 20 20 20 20 6c 65 74 20 6b 31 20 3d 20 30 78  .    let k1 = 0x
15b0: 5f 30 66 5f 30 65 5f 30 64 5f 30 63 5f 30 62 5f  _0f_0e_0d_0c_0b_
15c0: 30 61 5f 30 39 5f 30 38 3b 0a 20 20 20 20 6c 65  0a_09_08;.    le
15d0: 74 20 6d 75 74 20 62 75 66 20 3d 20 56 65 63 3a  t mut buf = Vec:
15e0: 3a 6e 65 77 28 29 3b 0a 20 20 20 20 6c 65 74 20  :new();.    let 
15f0: 6d 75 74 20 74 20 3d 20 30 3b 0a 20 20 20 20 6c  mut t = 0;.    l
1600: 65 74 20 6d 75 74 20 73 74 61 74 65 5f 69 6e 63  et mut state_inc
1610: 20 3d 20 53 69 70 48 61 73 68 65 72 31 33 3a 3a   = SipHasher13::
1620: 6e 65 77 5f 77 69 74 68 5f 6b 65 79 73 28 6b 30  new_with_keys(k0
1630: 2c 20 6b 31 29 3b 0a 0a 20 20 20 20 77 68 69 6c  , k1);..    whil
1640: 65 20 74 20 3c 20 36 34 20 7b 0a 20 20 20 20 20  e t < 64 {.     
1650: 20 20 20 6c 65 74 20 76 65 63 20 3d 20 75 38 74     let vec = u8t
1660: 6f 36 34 5f 6c 65 21 28 76 65 63 73 5b 74 5d 2c  o64_le!(vecs[t],
1670: 20 30 29 3b 0a 20 20 20 20 20 20 20 20 6c 65 74   0);.        let
1680: 20 6f 75 74 20 3d 20 68 61 73 68 5f 77 69 74 68   out = hash_with
1690: 28 53 69 70 48 61 73 68 65 72 31 33 3a 3a 6e 65  (SipHasher13::ne
16a0: 77 5f 77 69 74 68 5f 6b 65 79 73 28 6b 30 2c 20  w_with_keys(k0, 
16b0: 6b 31 29 2c 20 26 42 79 74 65 73 28 26 62 75 66  k1), &Bytes(&buf
16c0: 29 29 3b 0a 20 20 20 20 20 20 20 20 61 73 73 65  ));.        asse
16d0: 72 74 5f 65 71 21 28 76 65 63 2c 20 6f 75 74 29  rt_eq!(vec, out)
16e0: 3b 0a 0a 20 20 20 20 20 20 20 20 6c 65 74 20 66  ;..        let f
16f0: 75 6c 6c 20 3d 20 68 61 73 68 5f 77 69 74 68 28  ull = hash_with(
1700: 53 69 70 48 61 73 68 65 72 31 33 3a 3a 6e 65 77  SipHasher13::new
1710: 5f 77 69 74 68 5f 6b 65 79 73 28 6b 30 2c 20 6b  _with_keys(k0, k
1720: 31 29 2c 20 26 42 79 74 65 73 28 26 62 75 66 29  1), &Bytes(&buf)
1730: 29 3b 0a 20 20 20 20 20 20 20 20 6c 65 74 20 69  );.        let i
1740: 20 3d 20 73 74 61 74 65 5f 69 6e 63 2e 66 69 6e   = state_inc.fin
1750: 69 73 68 28 29 3b 0a 0a 20 20 20 20 20 20 20 20  ish();..        
1760: 61 73 73 65 72 74 5f 65 71 21 28 66 75 6c 6c 2c  assert_eq!(full,
1770: 20 69 29 3b 0a 20 20 20 20 20 20 20 20 61 73 73   i);.        ass
1780: 65 72 74 5f 65 71 21 28 66 75 6c 6c 2c 20 76 65  ert_eq!(full, ve
1790: 63 29 3b 0a 0a 20 20 20 20 20 20 20 20 62 75 66  c);..        buf
17a0: 2e 70 75 73 68 28 74 20 61 73 20 75 38 29 3b 0a  .push(t as u8);.
17b0: 20 20 20 20 20 20 20 20 48 61 73 68 65 72 3a 3a          Hasher::
17c0: 77 72 69 74 65 28 26 6d 75 74 20 73 74 61 74 65  write(&mut state
17d0: 5f 69 6e 63 2c 20 26 5b 74 20 61 73 20 75 38 5d  _inc, &[t as u8]
17e0: 29 3b 0a 0a 20 20 20 20 20 20 20 20 74 20 2b 3d  );..        t +=
17f0: 20 31 3b 0a 20 20 20 20 7d 0a 7d 0a 0a 23 5b 74   1;.    }.}..#[t
1800: 65 73 74 5d 0a 23 5b 61 6c 6c 6f 77 28 75 6e 75  est].#[allow(unu
1810: 73 65 64 5f 6d 75 73 74 5f 75 73 65 29 5d 0a 66  sed_must_use)].f
1820: 6e 20 74 65 73 74 5f 73 69 70 68 61 73 68 5f 32  n test_siphash_2
1830: 5f 34 28 29 20 7b 0a 20 20 20 20 6c 65 74 20 76  _4() {.    let v
1840: 65 63 73 20 3a 20 5b 5b 75 38 3b 20 38 5d 3b 20  ecs : [[u8; 8]; 
1850: 36 34 5d 20 3d 20 5b 0a 20 20 20 20 20 20 20 20  64] = [.        
1860: 5b 20 30 78 33 31 2c 20 30 78 30 65 2c 20 30 78  [ 0x31, 0x0e, 0x
1870: 30 65 2c 20 30 78 64 64 2c 20 30 78 34 37 2c 20  0e, 0xdd, 0x47, 
1880: 30 78 64 62 2c 20 30 78 36 66 2c 20 30 78 37 32  0xdb, 0x6f, 0x72
1890: 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  , ],.        [ 0
18a0: 78 66 64 2c 20 30 78 36 37 2c 20 30 78 64 63 2c  xfd, 0x67, 0xdc,
18b0: 20 30 78 39 33 2c 20 30 78 63 35 2c 20 30 78 33   0x93, 0xc5, 0x3
18c0: 39 2c 20 30 78 66 38 2c 20 30 78 37 34 2c 20 5d  9, 0xf8, 0x74, ]
18d0: 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78 35 61  ,.        [ 0x5a
18e0: 2c 20 30 78 34 66 2c 20 30 78 61 39 2c 20 30 78  , 0x4f, 0xa9, 0x
18f0: 64 39 2c 20 30 78 30 39 2c 20 30 78 38 30 2c 20  d9, 0x09, 0x80, 
1900: 30 78 36 63 2c 20 30 78 30 64 2c 20 5d 2c 0a 20  0x6c, 0x0d, ],. 
1910: 20 20 20 20 20 20 20 5b 20 30 78 32 64 2c 20 30         [ 0x2d, 0
1920: 78 37 65 2c 20 30 78 66 62 2c 20 30 78 64 37 2c  x7e, 0xfb, 0xd7,
1930: 20 30 78 39 36 2c 20 30 78 36 36 2c 20 30 78 36   0x96, 0x66, 0x6
1940: 37 2c 20 30 78 38 35 2c 20 5d 2c 0a 20 20 20 20  7, 0x85, ],.    
1950: 20 20 20 20 5b 20 30 78 62 37 2c 20 30 78 38 37      [ 0xb7, 0x87
1960: 2c 20 30 78 37 31 2c 20 30 78 32 37 2c 20 30 78  , 0x71, 0x27, 0x
1970: 65 30 2c 20 30 78 39 34 2c 20 30 78 32 37 2c 20  e0, 0x94, 0x27, 
1980: 30 78 63 66 2c 20 5d 2c 0a 20 20 20 20 20 20 20  0xcf, ],.       
1990: 20 5b 20 30 78 38 64 2c 20 30 78 61 36 2c 20 30   [ 0x8d, 0xa6, 0
19a0: 78 39 39 2c 20 30 78 63 64 2c 20 30 78 36 34 2c  x99, 0xcd, 0x64,
19b0: 20 30 78 35 35 2c 20 30 78 37 36 2c 20 30 78 31   0x55, 0x76, 0x1
19c0: 38 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20  8, ],.        [ 
19d0: 30 78 63 65 2c 20 30 78 65 33 2c 20 30 78 66 65  0xce, 0xe3, 0xfe
19e0: 2c 20 30 78 35 38 2c 20 30 78 36 65 2c 20 30 78  , 0x58, 0x6e, 0x
19f0: 34 36 2c 20 30 78 63 39 2c 20 30 78 63 62 2c 20  46, 0xc9, 0xcb, 
1a00: 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78 33  ],.        [ 0x3
1a10: 37 2c 20 30 78 64 31 2c 20 30 78 30 31 2c 20 30  7, 0xd1, 0x01, 0
1a20: 78 38 62 2c 20 30 78 66 35 2c 20 30 78 30 30 2c  x8b, 0xf5, 0x00,
1a30: 20 30 78 30 32 2c 20 30 78 61 62 2c 20 5d 2c 0a   0x02, 0xab, ],.
1a40: 20 20 20 20 20 20 20 20 5b 20 30 78 36 32 2c 20          [ 0x62, 
1a50: 30 78 32 34 2c 20 30 78 39 33 2c 20 30 78 39 61  0x24, 0x93, 0x9a
1a60: 2c 20 30 78 37 39 2c 20 30 78 66 35 2c 20 30 78  , 0x79, 0xf5, 0x
1a70: 66 35 2c 20 30 78 39 33 2c 20 5d 2c 0a 20 20 20  f5, 0x93, ],.   
1a80: 20 20 20 20 20 5b 20 30 78 62 30 2c 20 30 78 65       [ 0xb0, 0xe
1a90: 34 2c 20 30 78 61 39 2c 20 30 78 30 62 2c 20 30  4, 0xa9, 0x0b, 0
1aa0: 78 64 66 2c 20 30 78 38 32 2c 20 30 78 30 30 2c  xdf, 0x82, 0x00,
1ab0: 20 30 78 39 65 2c 20 5d 2c 0a 20 20 20 20 20 20   0x9e, ],.      
1ac0: 20 20 5b 20 30 78 66 33 2c 20 30 78 62 39 2c 20    [ 0xf3, 0xb9, 
1ad0: 30 78 64 64 2c 20 30 78 39 34 2c 20 30 78 63 35  0xdd, 0x94, 0xc5
1ae0: 2c 20 30 78 62 62 2c 20 30 78 35 64 2c 20 30 78  , 0xbb, 0x5d, 0x
1af0: 37 61 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b  7a, ],.        [
1b00: 20 30 78 61 37 2c 20 30 78 61 64 2c 20 30 78 36   0xa7, 0xad, 0x6
1b10: 62 2c 20 30 78 32 32 2c 20 30 78 34 36 2c 20 30  b, 0x22, 0x46, 0
1b20: 78 32 66 2c 20 30 78 62 33 2c 20 30 78 66 34 2c  x2f, 0xb3, 0xf4,
1b30: 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78   ],.        [ 0x
1b40: 66 62 2c 20 30 78 65 35 2c 20 30 78 30 65 2c 20  fb, 0xe5, 0x0e, 
1b50: 30 78 38 36 2c 20 30 78 62 63 2c 20 30 78 38 66  0x86, 0xbc, 0x8f
1b60: 2c 20 30 78 31 65 2c 20 30 78 37 35 2c 20 5d 2c  , 0x1e, 0x75, ],
1b70: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 39 30 2c  .        [ 0x90,
1b80: 20 30 78 33 64 2c 20 30 78 38 34 2c 20 30 78 63   0x3d, 0x84, 0xc
1b90: 30 2c 20 30 78 32 37 2c 20 30 78 35 36 2c 20 30  0, 0x27, 0x56, 0
1ba0: 78 65 61 2c 20 30 78 31 34 2c 20 5d 2c 0a 20 20  xea, 0x14, ],.  
1bb0: 20 20 20 20 20 20 5b 20 30 78 65 65 2c 20 30 78        [ 0xee, 0x
1bc0: 66 32 2c 20 30 78 37 61 2c 20 30 78 38 65 2c 20  f2, 0x7a, 0x8e, 
1bd0: 30 78 39 30 2c 20 30 78 63 61 2c 20 30 78 32 33  0x90, 0xca, 0x23
1be0: 2c 20 30 78 66 37 2c 20 5d 2c 0a 20 20 20 20 20  , 0xf7, ],.     
1bf0: 20 20 20 5b 20 30 78 65 35 2c 20 30 78 34 35 2c     [ 0xe5, 0x45,
1c00: 20 30 78 62 65 2c 20 30 78 34 39 2c 20 30 78 36   0xbe, 0x49, 0x6
1c10: 31 2c 20 30 78 63 61 2c 20 30 78 32 39 2c 20 30  1, 0xca, 0x29, 0
1c20: 78 61 31 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20  xa1, ],.        
1c30: 5b 20 30 78 64 62 2c 20 30 78 39 62 2c 20 30 78  [ 0xdb, 0x9b, 0x
1c40: 63 32 2c 20 30 78 35 37 2c 20 30 78 37 66 2c 20  c2, 0x57, 0x7f, 
1c50: 30 78 63 63 2c 20 30 78 32 61 2c 20 30 78 33 66  0xcc, 0x2a, 0x3f
1c60: 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  , ],.        [ 0
1c70: 78 39 34 2c 20 30 78 34 37 2c 20 30 78 62 65 2c  x94, 0x47, 0xbe,
1c80: 20 30 78 32 63 2c 20 30 78 66 35 2c 20 30 78 65   0x2c, 0xf5, 0xe
1c90: 39 2c 20 30 78 39 61 2c 20 30 78 36 39 2c 20 5d  9, 0x9a, 0x69, ]
1ca0: 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78 39 63  ,.        [ 0x9c
1cb0: 2c 20 30 78 64 33 2c 20 30 78 38 64 2c 20 30 78  , 0xd3, 0x8d, 0x
1cc0: 39 36 2c 20 30 78 66 30 2c 20 30 78 62 33 2c 20  96, 0xf0, 0xb3, 
1cd0: 30 78 63 31 2c 20 30 78 34 62 2c 20 5d 2c 0a 20  0xc1, 0x4b, ],. 
1ce0: 20 20 20 20 20 20 20 5b 20 30 78 62 64 2c 20 30         [ 0xbd, 0
1cf0: 78 36 31 2c 20 30 78 37 39 2c 20 30 78 61 37 2c  x61, 0x79, 0xa7,
1d00: 20 30 78 31 64 2c 20 30 78 63 39 2c 20 30 78 36   0x1d, 0xc9, 0x6
1d10: 64 2c 20 30 78 62 62 2c 20 5d 2c 0a 20 20 20 20  d, 0xbb, ],.    
1d20: 20 20 20 20 5b 20 30 78 39 38 2c 20 30 78 65 65      [ 0x98, 0xee
1d30: 2c 20 30 78 61 32 2c 20 30 78 31 61 2c 20 30 78  , 0xa2, 0x1a, 0x
1d40: 66 32 2c 20 30 78 35 63 2c 20 30 78 64 36 2c 20  f2, 0x5c, 0xd6, 
1d50: 30 78 62 65 2c 20 5d 2c 0a 20 20 20 20 20 20 20  0xbe, ],.       
1d60: 20 5b 20 30 78 63 37 2c 20 30 78 36 37 2c 20 30   [ 0xc7, 0x67, 0
1d70: 78 33 62 2c 20 30 78 32 65 2c 20 30 78 62 30 2c  x3b, 0x2e, 0xb0,
1d80: 20 30 78 63 62 2c 20 30 78 66 32 2c 20 30 78 64   0xcb, 0xf2, 0xd
1d90: 30 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20  0, ],.        [ 
1da0: 30 78 38 38 2c 20 30 78 33 65 2c 20 30 78 61 33  0x88, 0x3e, 0xa3
1db0: 2c 20 30 78 65 33 2c 20 30 78 39 35 2c 20 30 78  , 0xe3, 0x95, 0x
1dc0: 36 37 2c 20 30 78 35 33 2c 20 30 78 39 33 2c 20  67, 0x53, 0x93, 
1dd0: 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78 63  ],.        [ 0xc
1de0: 38 2c 20 30 78 63 65 2c 20 30 78 35 63 2c 20 30  8, 0xce, 0x5c, 0
1df0: 78 63 64 2c 20 30 78 38 63 2c 20 30 78 30 33 2c  xcd, 0x8c, 0x03,
1e00: 20 30 78 30 63 2c 20 30 78 61 38 2c 20 5d 2c 0a   0x0c, 0xa8, ],.
1e10: 20 20 20 20 20 20 20 20 5b 20 30 78 39 34 2c 20          [ 0x94, 
1e20: 30 78 61 66 2c 20 30 78 34 39 2c 20 30 78 66 36  0xaf, 0x49, 0xf6
1e30: 2c 20 30 78 63 36 2c 20 30 78 35 30 2c 20 30 78  , 0xc6, 0x50, 0x
1e40: 61 64 2c 20 30 78 62 38 2c 20 5d 2c 0a 20 20 20  ad, 0xb8, ],.   
1e50: 20 20 20 20 20 5b 20 30 78 65 61 2c 20 30 78 62       [ 0xea, 0xb
1e60: 38 2c 20 30 78 38 35 2c 20 30 78 38 61 2c 20 30  8, 0x85, 0x8a, 0
1e70: 78 64 65 2c 20 30 78 39 32 2c 20 30 78 65 31 2c  xde, 0x92, 0xe1,
1e80: 20 30 78 62 63 2c 20 5d 2c 0a 20 20 20 20 20 20   0xbc, ],.      
1e90: 20 20 5b 20 30 78 66 33 2c 20 30 78 31 35 2c 20    [ 0xf3, 0x15, 
1ea0: 30 78 62 62 2c 20 30 78 35 62 2c 20 30 78 62 38  0xbb, 0x5b, 0xb8
1eb0: 2c 20 30 78 33 35 2c 20 30 78 64 38 2c 20 30 78  , 0x35, 0xd8, 0x
1ec0: 31 37 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b  17, ],.        [
1ed0: 20 30 78 61 64 2c 20 30 78 63 66 2c 20 30 78 36   0xad, 0xcf, 0x6
1ee0: 62 2c 20 30 78 30 37 2c 20 30 78 36 33 2c 20 30  b, 0x07, 0x63, 0
1ef0: 78 36 31 2c 20 30 78 32 65 2c 20 30 78 32 66 2c  x61, 0x2e, 0x2f,
1f00: 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78   ],.        [ 0x
1f10: 61 35 2c 20 30 78 63 39 2c 20 30 78 31 64 2c 20  a5, 0xc9, 0x1d, 
1f20: 30 78 61 37 2c 20 30 78 61 63 2c 20 30 78 61 61  0xa7, 0xac, 0xaa
1f30: 2c 20 30 78 34 64 2c 20 30 78 64 65 2c 20 5d 2c  , 0x4d, 0xde, ],
1f40: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 37 31 2c  .        [ 0x71,
1f50: 20 30 78 36 35 2c 20 30 78 39 35 2c 20 30 78 38   0x65, 0x95, 0x8
1f60: 37 2c 20 30 78 36 36 2c 20 30 78 35 30 2c 20 30  7, 0x66, 0x50, 0
1f70: 78 61 32 2c 20 30 78 61 36 2c 20 5d 2c 0a 20 20  xa2, 0xa6, ],.  
1f80: 20 20 20 20 20 20 5b 20 30 78 32 38 2c 20 30 78        [ 0x28, 0x
1f90: 65 66 2c 20 30 78 34 39 2c 20 30 78 35 63 2c 20  ef, 0x49, 0x5c, 
1fa0: 30 78 35 33 2c 20 30 78 61 33 2c 20 30 78 38 37  0x53, 0xa3, 0x87
1fb0: 2c 20 30 78 61 64 2c 20 5d 2c 0a 20 20 20 20 20  , 0xad, ],.     
1fc0: 20 20 20 5b 20 30 78 34 32 2c 20 30 78 63 33 2c     [ 0x42, 0xc3,
1fd0: 20 30 78 34 31 2c 20 30 78 64 38 2c 20 30 78 66   0x41, 0xd8, 0xf
1fe0: 61 2c 20 30 78 39 32 2c 20 30 78 64 38 2c 20 30  a, 0x92, 0xd8, 0
1ff0: 78 33 32 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20  x32, ],.        
2000: 5b 20 30 78 63 65 2c 20 30 78 37 63 2c 20 30 78  [ 0xce, 0x7c, 0x
2010: 66 32 2c 20 30 78 37 32 2c 20 30 78 32 66 2c 20  f2, 0x72, 0x2f, 
2020: 30 78 35 31 2c 20 30 78 32 37 2c 20 30 78 37 31  0x51, 0x27, 0x71
2030: 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  , ],.        [ 0
2040: 78 65 33 2c 20 30 78 37 38 2c 20 30 78 35 39 2c  xe3, 0x78, 0x59,
2050: 20 30 78 66 39 2c 20 30 78 34 36 2c 20 30 78 32   0xf9, 0x46, 0x2
2060: 33 2c 20 30 78 66 33 2c 20 30 78 61 37 2c 20 5d  3, 0xf3, 0xa7, ]
2070: 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78 33 38  ,.        [ 0x38
2080: 2c 20 30 78 31 32 2c 20 30 78 30 35 2c 20 30 78  , 0x12, 0x05, 0x
2090: 62 62 2c 20 30 78 31 61 2c 20 30 78 62 30 2c 20  bb, 0x1a, 0xb0, 
20a0: 30 78 65 30 2c 20 30 78 31 32 2c 20 5d 2c 0a 20  0xe0, 0x12, ],. 
20b0: 20 20 20 20 20 20 20 5b 20 30 78 61 65 2c 20 30         [ 0xae, 0
20c0: 78 39 37 2c 20 30 78 61 31 2c 20 30 78 30 66 2c  x97, 0xa1, 0x0f,
20d0: 20 30 78 64 34 2c 20 30 78 33 34 2c 20 30 78 65   0xd4, 0x34, 0xe
20e0: 30 2c 20 30 78 31 35 2c 20 5d 2c 0a 20 20 20 20  0, 0x15, ],.    
20f0: 20 20 20 20 5b 20 30 78 62 34 2c 20 30 78 61 33      [ 0xb4, 0xa3
2100: 2c 20 30 78 31 35 2c 20 30 78 30 38 2c 20 30 78  , 0x15, 0x08, 0x
2110: 62 65 2c 20 30 78 66 66 2c 20 30 78 34 64 2c 20  be, 0xff, 0x4d, 
2120: 30 78 33 31 2c 20 5d 2c 0a 20 20 20 20 20 20 20  0x31, ],.       
2130: 20 5b 20 30 78 38 31 2c 20 30 78 33 39 2c 20 30   [ 0x81, 0x39, 0
2140: 78 36 32 2c 20 30 78 32 39 2c 20 30 78 66 30 2c  x62, 0x29, 0xf0,
2150: 20 30 78 39 30 2c 20 30 78 37 39 2c 20 30 78 30   0x90, 0x79, 0x0
2160: 32 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20  2, ],.        [ 
2170: 30 78 34 64 2c 20 30 78 30 63 2c 20 30 78 66 34  0x4d, 0x0c, 0xf4
2180: 2c 20 30 78 39 65 2c 20 30 78 65 35 2c 20 30 78  , 0x9e, 0xe5, 0x
2190: 64 34 2c 20 30 78 64 63 2c 20 30 78 63 61 2c 20  d4, 0xdc, 0xca, 
21a0: 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78 35  ],.        [ 0x5
21b0: 63 2c 20 30 78 37 33 2c 20 30 78 33 33 2c 20 30  c, 0x73, 0x33, 0
21c0: 78 36 61 2c 20 30 78 37 36 2c 20 30 78 64 38 2c  x6a, 0x76, 0xd8,
21d0: 20 30 78 62 66 2c 20 30 78 39 61 2c 20 5d 2c 0a   0xbf, 0x9a, ],.
21e0: 20 20 20 20 20 20 20 20 5b 20 30 78 64 30 2c 20          [ 0xd0, 
21f0: 30 78 61 37 2c 20 30 78 30 34 2c 20 30 78 35 33  0xa7, 0x04, 0x53
2200: 2c 20 30 78 36 62 2c 20 30 78 61 39 2c 20 30 78  , 0x6b, 0xa9, 0x
2210: 33 65 2c 20 30 78 30 65 2c 20 5d 2c 0a 20 20 20  3e, 0x0e, ],.   
2220: 20 20 20 20 20 5b 20 30 78 39 32 2c 20 30 78 35       [ 0x92, 0x5
2230: 39 2c 20 30 78 35 38 2c 20 30 78 66 63 2c 20 30  9, 0x58, 0xfc, 0
2240: 78 64 36 2c 20 30 78 34 32 2c 20 30 78 30 63 2c  xd6, 0x42, 0x0c,
2250: 20 30 78 61 64 2c 20 5d 2c 0a 20 20 20 20 20 20   0xad, ],.      
2260: 20 20 5b 20 30 78 61 39 2c 20 30 78 31 35 2c 20    [ 0xa9, 0x15, 
2270: 30 78 63 32 2c 20 30 78 39 62 2c 20 30 78 63 38  0xc2, 0x9b, 0xc8
2280: 2c 20 30 78 30 36 2c 20 30 78 37 33 2c 20 30 78  , 0x06, 0x73, 0x
2290: 31 38 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b  18, ],.        [
22a0: 20 30 78 39 35 2c 20 30 78 32 62 2c 20 30 78 37   0x95, 0x2b, 0x7
22b0: 39 2c 20 30 78 66 33 2c 20 30 78 62 63 2c 20 30  9, 0xf3, 0xbc, 0
22c0: 78 30 61 2c 20 30 78 61 36 2c 20 30 78 64 34 2c  x0a, 0xa6, 0xd4,
22d0: 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78   ],.        [ 0x
22e0: 66 32 2c 20 30 78 31 64 2c 20 30 78 66 32 2c 20  f2, 0x1d, 0xf2, 
22f0: 30 78 65 34 2c 20 30 78 31 64 2c 20 30 78 34 35  0xe4, 0x1d, 0x45
2300: 2c 20 30 78 33 35 2c 20 30 78 66 39 2c 20 5d 2c  , 0x35, 0xf9, ],
2310: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 38 37 2c  .        [ 0x87,
2320: 20 30 78 35 37 2c 20 30 78 37 35 2c 20 30 78 31   0x57, 0x75, 0x1
2330: 39 2c 20 30 78 30 34 2c 20 30 78 38 66 2c 20 30  9, 0x04, 0x8f, 0
2340: 78 35 33 2c 20 30 78 61 39 2c 20 5d 2c 0a 20 20  x53, 0xa9, ],.  
2350: 20 20 20 20 20 20 5b 20 30 78 31 30 2c 20 30 78        [ 0x10, 0x
2360: 61 35 2c 20 30 78 36 63 2c 20 30 78 66 35 2c 20  a5, 0x6c, 0xf5, 
2370: 30 78 64 66 2c 20 30 78 63 64 2c 20 30 78 39 61  0xdf, 0xcd, 0x9a
2380: 2c 20 30 78 64 62 2c 20 5d 2c 0a 20 20 20 20 20  , 0xdb, ],.     
2390: 20 20 20 5b 20 30 78 65 62 2c 20 30 78 37 35 2c     [ 0xeb, 0x75,
23a0: 20 30 78 30 39 2c 20 30 78 35 63 2c 20 30 78 63   0x09, 0x5c, 0xc
23b0: 64 2c 20 30 78 39 38 2c 20 30 78 36 63 2c 20 30  d, 0x98, 0x6c, 0
23c0: 78 64 30 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20  xd0, ],.        
23d0: 5b 20 30 78 35 31 2c 20 30 78 61 39 2c 20 30 78  [ 0x51, 0xa9, 0x
23e0: 63 62 2c 20 30 78 39 65 2c 20 30 78 63 62 2c 20  cb, 0x9e, 0xcb, 
23f0: 30 78 61 33 2c 20 30 78 31 32 2c 20 30 78 65 36  0xa3, 0x12, 0xe6
2400: 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30  , ],.        [ 0
2410: 78 39 36 2c 20 30 78 61 66 2c 20 30 78 61 64 2c  x96, 0xaf, 0xad,
2420: 20 30 78 66 63 2c 20 30 78 32 63 2c 20 30 78 65   0xfc, 0x2c, 0xe
2430: 36 2c 20 30 78 36 36 2c 20 30 78 63 37 2c 20 5d  6, 0x66, 0xc7, ]
2440: 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78 37 32  ,.        [ 0x72
2450: 2c 20 30 78 66 65 2c 20 30 78 35 32 2c 20 30 78  , 0xfe, 0x52, 0x
2460: 39 37 2c 20 30 78 35 61 2c 20 30 78 34 33 2c 20  97, 0x5a, 0x43, 
2470: 30 78 36 34 2c 20 30 78 65 65 2c 20 5d 2c 0a 20  0x64, 0xee, ],. 
2480: 20 20 20 20 20 20 20 5b 20 30 78 35 61 2c 20 30         [ 0x5a, 0
2490: 78 31 36 2c 20 30 78 34 35 2c 20 30 78 62 32 2c  x16, 0x45, 0xb2,
24a0: 20 30 78 37 36 2c 20 30 78 64 35 2c 20 30 78 39   0x76, 0xd5, 0x9
24b0: 32 2c 20 30 78 61 31 2c 20 5d 2c 0a 20 20 20 20  2, 0xa1, ],.    
24c0: 20 20 20 20 5b 20 30 78 62 32 2c 20 30 78 37 34      [ 0xb2, 0x74
24d0: 2c 20 30 78 63 62 2c 20 30 78 38 65 2c 20 30 78  , 0xcb, 0x8e, 0x
24e0: 62 66 2c 20 30 78 38 37 2c 20 30 78 38 37 2c 20  bf, 0x87, 0x87, 
24f0: 30 78 30 61 2c 20 5d 2c 0a 20 20 20 20 20 20 20  0x0a, ],.       
2500: 20 5b 20 30 78 36 66 2c 20 30 78 39 62 2c 20 30   [ 0x6f, 0x9b, 0
2510: 78 62 34 2c 20 30 78 32 30 2c 20 30 78 33 64 2c  xb4, 0x20, 0x3d,
2520: 20 30 78 65 37 2c 20 30 78 62 33 2c 20 30 78 38   0xe7, 0xb3, 0x8
2530: 31 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20  1, ],.        [ 
2540: 30 78 65 61 2c 20 30 78 65 63 2c 20 30 78 62 32  0xea, 0xec, 0xb2
2550: 2c 20 30 78 61 33 2c 20 30 78 30 62 2c 20 30 78  , 0xa3, 0x0b, 0x
2560: 32 32 2c 20 30 78 61 38 2c 20 30 78 37 66 2c 20  22, 0xa8, 0x7f, 
2570: 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78 39  ],.        [ 0x9
2580: 39 2c 20 30 78 32 34 2c 20 30 78 61 34 2c 20 30  9, 0x24, 0xa4, 0
2590: 78 33 63 2c 20 30 78 63 31 2c 20 30 78 33 31 2c  x3c, 0xc1, 0x31,
25a0: 20 30 78 35 37 2c 20 30 78 32 34 2c 20 5d 2c 0a   0x57, 0x24, ],.
25b0: 20 20 20 20 20 20 20 20 5b 20 30 78 62 64 2c 20          [ 0xbd, 
25c0: 30 78 38 33 2c 20 30 78 38 64 2c 20 30 78 33 61  0x83, 0x8d, 0x3a
25d0: 2c 20 30 78 61 66 2c 20 30 78 62 66 2c 20 30 78  , 0xaf, 0xbf, 0x
25e0: 38 64 2c 20 30 78 62 37 2c 20 5d 2c 0a 20 20 20  8d, 0xb7, ],.   
25f0: 20 20 20 20 20 5b 20 30 78 30 62 2c 20 30 78 31       [ 0x0b, 0x1
2600: 61 2c 20 30 78 32 61 2c 20 30 78 33 32 2c 20 30  a, 0x2a, 0x32, 0
2610: 78 36 35 2c 20 30 78 64 35 2c 20 30 78 31 61 2c  x65, 0xd5, 0x1a,
2620: 20 30 78 65 61 2c 20 5d 2c 0a 20 20 20 20 20 20   0xea, ],.      
2630: 20 20 5b 20 30 78 31 33 2c 20 30 78 35 30 2c 20    [ 0x13, 0x50, 
2640: 30 78 37 39 2c 20 30 78 61 33 2c 20 30 78 32 33  0x79, 0xa3, 0x23
2650: 2c 20 30 78 31 63 2c 20 30 78 65 36 2c 20 30 78  , 0x1c, 0xe6, 0x
2660: 36 30 2c 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b  60, ],.        [
2670: 20 30 78 39 33 2c 20 30 78 32 62 2c 20 30 78 32   0x93, 0x2b, 0x2
2680: 38 2c 20 30 78 34 36 2c 20 30 78 65 34 2c 20 30  8, 0x46, 0xe4, 0
2690: 78 64 37 2c 20 30 78 30 36 2c 20 30 78 36 36 2c  xd7, 0x06, 0x66,
26a0: 20 5d 2c 0a 20 20 20 20 20 20 20 20 5b 20 30 78   ],.        [ 0x
26b0: 65 31 2c 20 30 78 39 31 2c 20 30 78 35 66 2c 20  e1, 0x91, 0x5f, 
26c0: 30 78 35 63 2c 20 30 78 62 31 2c 20 30 78 65 63  0x5c, 0xb1, 0xec
26d0: 2c 20 30 78 61 34 2c 20 30 78 36 63 2c 20 5d 2c  , 0xa4, 0x6c, ],
26e0: 0a 20 20 20 20 20 20 20 20 5b 20 30 78 66 33 2c  .        [ 0xf3,
26f0: 20 30 78 32 35 2c 20 30 78 39 36 2c 20 30 78 35   0x25, 0x96, 0x5
2700: 63 2c 20 30 78 61 31 2c 20 30 78 36 64 2c 20 30  c, 0xa1, 0x6d, 0
2710: 78 36 32 2c 20 30 78 39 66 2c 20 5d 2c 0a 20 20  x62, 0x9f, ],.  
2720: 20 20 20 20 20 20 5b 20 30 78 35 37 2c 20 30 78        [ 0x57, 0x
2730: 35 66 2c 20 30 78 66 32 2c 20 30 78 38 65 2c 20  5f, 0xf2, 0x8e, 
2740: 30 78 36 30 2c 20 30 78 33 38 2c 20 30 78 31 62  0x60, 0x38, 0x1b
2750: 2c 20 30 78 65 35 2c 20 5d 2c 0a 20 20 20 20 20  , 0xe5, ],.     
2760: 20 20 20 5b 20 30 78 37 32 2c 20 30 78 34 35 2c     [ 0x72, 0x45,
2770: 20 30 78 30 36 2c 20 30 78 65 62 2c 20 30 78 34   0x06, 0xeb, 0x4
2780: 63 2c 20 30 78 33 32 2c 20 30 78 38 61 2c 20 30  c, 0x32, 0x8a, 0
2790: 78 39 35 2c 20 5d 0a 20 20 20 20 5d 3b 0a 0a 20  x95, ].    ];.. 
27a0: 20 20 20 6c 65 74 20 6b 30 20 3d 20 30 78 5f 30     let k0 = 0x_0
27b0: 37 5f 30 36 5f 30 35 5f 30 34 5f 30 33 5f 30 32  7_06_05_04_03_02
27c0: 5f 30 31 5f 30 30 3b 0a 20 20 20 20 6c 65 74 20  _01_00;.    let 
27d0: 6b 31 20 3d 20 30 78 5f 30 66 5f 30 65 5f 30 64  k1 = 0x_0f_0e_0d
27e0: 5f 30 63 5f 30 62 5f 30 61 5f 30 39 5f 30 38 3b  _0c_0b_0a_09_08;
27f0: 0a 20 20 20 20 6c 65 74 20 6d 75 74 20 62 75 66  .    let mut buf
2800: 20 3d 20 56 65 63 3a 3a 6e 65 77 28 29 3b 0a 20   = Vec::new();. 
2810: 20 20 20 6c 65 74 20 6d 75 74 20 74 20 3d 20 30     let mut t = 0
2820: 3b 0a 20 20 20 20 6c 65 74 20 6d 75 74 20 73 74  ;.    let mut st
2830: 61 74 65 5f 69 6e 63 20 3d 20 53 69 70 48 61 73  ate_inc = SipHas
2840: 68 65 72 32 34 3a 3a 6e 65 77 5f 77 69 74 68 5f  her24::new_with_
2850: 6b 65 79 73 28 6b 30 2c 20 6b 31 29 3b 0a 0a 20  keys(k0, k1);.. 
2860: 20 20 20 77 68 69 6c 65 20 74 20 3c 20 36 34 20     while t < 64 
2870: 7b 0a 20 20 20 20 20 20 20 20 6c 65 74 20 76 65  {.        let ve
2880: 63 20 3d 20 75 38 74 6f 36 34 5f 6c 65 21 28 76  c = u8to64_le!(v
2890: 65 63 73 5b 74 5d 2c 20 30 29 3b 0a 20 20 20 20  ecs[t], 0);.    
28a0: 20 20 20 20 6c 65 74 20 6f 75 74 20 3d 20 68 61      let out = ha
28b0: 73 68 5f 77 69 74 68 28 53 69 70 48 61 73 68 65  sh_with(SipHashe
28c0: 72 32 34 3a 3a 6e 65 77 5f 77 69 74 68 5f 6b 65  r24::new_with_ke
28d0: 79 73 28 6b 30 2c 20 6b 31 29 2c 20 26 42 79 74  ys(k0, k1), &Byt
28e0: 65 73 28 26 62 75 66 29 29 3b 0a 20 20 20 20 20  es(&buf));.     
28f0: 20 20 20 61 73 73 65 72 74 5f 65 71 21 28 76 65     assert_eq!(ve
2900: 63 2c 20 6f 75 74 29 3b 0a 0a 20 20 20 20 20 20  c, out);..      
2910: 20 20 6c 65 74 20 66 75 6c 6c 20 3d 20 68 61 73    let full = has
2920: 68 5f 77 69 74 68 28 53 69 70 48 61 73 68 65 72  h_with(SipHasher
2930: 32 34 3a 3a 6e 65 77 5f 77 69 74 68 5f 6b 65 79  24::new_with_key
2940: 73 28 6b 30 2c 20 6b 31 29 2c 20 26 42 79 74 65  s(k0, k1), &Byte
2950: 73 28 26 62 75 66 29 29 3b 0a 20 20 20 20 20 20  s(&buf));.      
2960: 20 20 6c 65 74 20 69 20 3d 20 73 74 61 74 65 5f    let i = state_
2970: 69 6e 63 2e 66 69 6e 69 73 68 28 29 3b 0a 0a 20  inc.finish();.. 
2980: 20 20 20 20 20 20 20 61 73 73 65 72 74 5f 65 71         assert_eq
2990: 21 28 66 75 6c 6c 2c 20 69 29 3b 0a 20 20 20 20  !(full, i);.    
29a0: 20 20 20 20 61 73 73 65 72 74 5f 65 71 21 28 66      assert_eq!(f
29b0: 75 6c 6c 2c 20 76 65 63 29 3b 0a 0a 20 20 20 20  ull, vec);..    
29c0: 20 20 20 20 62 75 66 2e 70 75 73 68 28 74 20 61      buf.push(t a
29d0: 73 20 75 38 29 3b 0a 20 20 20 20 20 20 20 20 48  s u8);.        H
29e0: 61 73 68 65 72 3a 3a 77 72 69 74 65 28 26 6d 75  asher::write(&mu
29f0: 74 20 73 74 61 74 65 5f 69 6e 63 2c 20 26 5b 74  t state_inc, &[t
2a00: 20 61 73 20 75 38 5d 29 3b 0a 0a 20 20 20 20 20   as u8]);..     
2a10: 20 20 20 74 20 2b 3d 20 31 3b 0a 20 20 20 20 7d     t += 1;.    }
2a20: 0a 7d 0a 23 5b 74 65 73 74 5d 20 23 5b 63 66 67  .}.#[test] #[cfg
2a30: 28 74 61 72 67 65 74 5f 61 72 63 68 20 3d 20 22  (target_arch = "
2a40: 61 72 6d 22 29 5d 0a 66 6e 20 74 65 73 74 5f 68  arm")].fn test_h
2a50: 61 73 68 5f 75 73 69 7a 65 28 29 20 7b 0a 20 20  ash_usize() {.  
2a60: 20 20 6c 65 74 20 76 61 6c 20 3d 20 30 78 64 65    let val = 0xde
2a70: 61 64 62 65 65 66 5f 64 65 61 64 62 65 65 66 5f  adbeef_deadbeef_
2a80: 75 36 34 3b 0a 20 20 20 20 61 73 73 65 72 74 21  u64;.    assert!
2a90: 28 68 61 73 68 28 26 28 76 61 6c 20 61 73 20 75  (hash(&(val as u
2aa0: 36 34 29 29 20 21 3d 20 68 61 73 68 28 26 28 76  64)) != hash(&(v
2ab0: 61 6c 20 61 73 20 75 73 69 7a 65 29 29 29 3b 0a  al as usize)));.
2ac0: 20 20 20 20 61 73 73 65 72 74 5f 65 71 21 28 68      assert_eq!(h
2ad0: 61 73 68 28 26 28 76 61 6c 20 61 73 20 75 33 32  ash(&(val as u32
2ae0: 29 29 2c 20 68 61 73 68 28 26 28 76 61 6c 20 61  )), hash(&(val a
2af0: 73 20 75 73 69 7a 65 29 29 29 3b 0a 7d 0a 23 5b  s usize)));.}.#[
2b00: 74 65 73 74 5d 20 23 5b 63 66 67 28 74 61 72 67  test] #[cfg(targ
2b10: 65 74 5f 61 72 63 68 20 3d 20 22 78 38 36 5f 36  et_arch = "x86_6
2b20: 34 22 29 5d 0a 66 6e 20 74 65 73 74 5f 68 61 73  4")].fn test_has
2b30: 68 5f 75 73 69 7a 65 28 29 20 7b 0a 20 20 20 20  h_usize() {.    
2b40: 6c 65 74 20 76 61 6c 20 3d 20 30 78 64 65 61 64  let val = 0xdead
2b50: 62 65 65 66 5f 64 65 61 64 62 65 65 66 5f 75 36  beef_deadbeef_u6
2b60: 34 3b 0a 20 20 20 20 61 73 73 65 72 74 5f 65 71  4;.    assert_eq
2b70: 21 28 68 61 73 68 28 26 28 76 61 6c 20 61 73 20  !(hash(&(val as 
2b80: 75 36 34 29 29 2c 20 68 61 73 68 28 26 28 76 61  u64)), hash(&(va
2b90: 6c 20 61 73 20 75 73 69 7a 65 29 29 29 3b 0a 20  l as usize)));. 
2ba0: 20 20 20 61 73 73 65 72 74 21 28 68 61 73 68 28     assert!(hash(
2bb0: 26 28 76 61 6c 20 61 73 20 75 33 32 29 29 20 21  &(val as u32)) !
2bc0: 3d 20 68 61 73 68 28 26 28 76 61 6c 20 61 73 20  = hash(&(val as 
2bd0: 75 73 69 7a 65 29 29 29 3b 0a 7d 0a 23 5b 74 65  usize)));.}.#[te
2be0: 73 74 5d 20 23 5b 63 66 67 28 74 61 72 67 65 74  st] #[cfg(target
2bf0: 5f 61 72 63 68 20 3d 20 22 78 38 36 22 29 5d 0a  _arch = "x86")].
2c00: 66 6e 20 74 65 73 74 5f 68 61 73 68 5f 75 73 69  fn test_hash_usi
2c10: 7a 65 28 29 20 7b 0a 20 20 20 20 6c 65 74 20 76  ze() {.    let v
2c20: 61 6c 20 3d 20 30 78 64 65 61 64 62 65 65 66 5f  al = 0xdeadbeef_
2c30: 64 65 61 64 62 65 65 66 5f 75 36 34 3b 0a 20 20  deadbeef_u64;.  
2c40: 20 20 61 73 73 65 72 74 21 28 68 61 73 68 28 26    assert!(hash(&
2c50: 28 76 61 6c 20 61 73 20 75 36 34 29 29 20 21 3d  (val as u64)) !=
2c60: 20 68 61 73 68 28 26 28 76 61 6c 20 61 73 20 75   hash(&(val as u
2c70: 73 69 7a 65 29 29 29 3b 0a 20 20 20 20 61 73 73  size)));.    ass
2c80: 65 72 74 5f 65 71 21 28 68 61 73 68 28 26 28 76  ert_eq!(hash(&(v
2c90: 61 6c 20 61 73 20 75 33 32 29 29 2c 20 68 61 73  al as u32)), has
2ca0: 68 28 26 28 76 61 6c 20 61 73 20 75 73 69 7a 65  h(&(val as usize
2cb0: 29 29 29 3b 0a 7d 0a 0a 23 5b 74 65 73 74 5d 0a  )));.}..#[test].
2cc0: 66 6e 20 74 65 73 74 5f 68 61 73 68 5f 69 64 65  fn test_hash_ide
2cd0: 6d 70 6f 74 65 6e 74 28 29 20 7b 0a 20 20 20 20  mpotent() {.    
2ce0: 6c 65 74 20 76 61 6c 36 34 20 3d 20 30 78 64 65  let val64 = 0xde
2cf0: 61 64 62 65 65 66 5f 64 65 61 64 62 65 65 66 5f  adbeef_deadbeef_
2d00: 75 36 34 3b 0a 20 20 20 20 61 73 73 65 72 74 5f  u64;.    assert_
2d10: 65 71 21 28 68 61 73 68 28 26 76 61 6c 36 34 29  eq!(hash(&val64)
2d20: 2c 20 68 61 73 68 28 26 76 61 6c 36 34 29 29 3b  , hash(&val64));
2d30: 0a 20 20 20 20 6c 65 74 20 76 61 6c 33 32 20 3d  .    let val32 =
2d40: 20 30 78 64 65 61 64 62 65 65 66 5f 75 33 32 3b   0xdeadbeef_u32;
2d50: 0a 20 20 20 20 61 73 73 65 72 74 5f 65 71 21 28  .    assert_eq!(
2d60: 68 61 73 68 28 26 76 61 6c 33 32 29 2c 20 68 61  hash(&val32), ha
2d70: 73 68 28 26 76 61 6c 33 32 29 29 3b 0a 7d 0a 0a  sh(&val32));.}..
2d80: 23 5b 74 65 73 74 5d 0a 66 6e 20 74 65 73 74 5f  #[test].fn test_
2d90: 68 61 73 68 5f 6e 6f 5f 62 79 74 65 73 5f 64 72  hash_no_bytes_dr
2da0: 6f 70 70 65 64 5f 36 34 28 29 20 7b 0a 20 20 20  opped_64() {.   
2db0: 20 6c 65 74 20 76 61 6c 20 3d 20 30 78 64 65 61   let val = 0xdea
2dc0: 64 62 65 65 66 5f 64 65 61 64 62 65 65 66 5f 75  dbeef_deadbeef_u
2dd0: 36 34 3b 0a 0a 20 20 20 20 61 73 73 65 72 74 21  64;..    assert!
2de0: 28 68 61 73 68 28 26 76 61 6c 29 20 21 3d 20 68  (hash(&val) != h
2df0: 61 73 68 28 26 7a 65 72 6f 5f 62 79 74 65 28 76  ash(&zero_byte(v
2e00: 61 6c 2c 20 30 29 29 29 3b 0a 20 20 20 20 61 73  al, 0)));.    as
2e10: 73 65 72 74 21 28 68 61 73 68 28 26 76 61 6c 29  sert!(hash(&val)
2e20: 20 21 3d 20 68 61 73 68 28 26 7a 65 72 6f 5f 62   != hash(&zero_b
2e30: 79 74 65 28 76 61 6c 2c 20 31 29 29 29 3b 0a 20  yte(val, 1)));. 
2e40: 20 20 20 61 73 73 65 72 74 21 28 68 61 73 68 28     assert!(hash(
2e50: 26 76 61 6c 29 20 21 3d 20 68 61 73 68 28 26 7a  &val) != hash(&z
2e60: 65 72 6f 5f 62 79 74 65 28 76 61 6c 2c 20 32 29  ero_byte(val, 2)
2e70: 29 29 3b 0a 20 20 20 20 61 73 73 65 72 74 21 28  ));.    assert!(
2e80: 68 61 73 68 28 26 76 61 6c 29 20 21 3d 20 68 61  hash(&val) != ha
2e90: 73 68 28 26 7a 65 72 6f 5f 62 79 74 65 28 76 61  sh(&zero_byte(va
2ea0: 6c 2c 20 33 29 29 29 3b 0a 20 20 20 20 61 73 73  l, 3)));.    ass
2eb0: 65 72 74 21 28 68 61 73 68 28 26 76 61 6c 29 20  ert!(hash(&val) 
2ec0: 21 3d 20 68 61 73 68 28 26 7a 65 72 6f 5f 62 79  != hash(&zero_by
2ed0: 74 65 28 76 61 6c 2c 20 34 29 29 29 3b 0a 20 20  te(val, 4)));.  
2ee0: 20 20 61 73 73 65 72 74 21 28 68 61 73 68 28 26    assert!(hash(&
2ef0: 76 61 6c 29 20 21 3d 20 68 61 73 68 28 26 7a 65  val) != hash(&ze
2f00: 72 6f 5f 62 79 74 65 28 76 61 6c 2c 20 35 29 29  ro_byte(val, 5))
2f10: 29 3b 0a 20 20 20 20 61 73 73 65 72 74 21 28 68  );.    assert!(h
2f20: 61 73 68 28 26 76 61 6c 29 20 21 3d 20 68 61 73  ash(&val) != has
2f30: 68 28 26 7a 65 72 6f 5f 62 79 74 65 28 76 61 6c  h(&zero_byte(val
2f40: 2c 20 36 29 29 29 3b 0a 20 20 20 20 61 73 73 65  , 6)));.    asse
2f50: 72 74 21 28 68 61 73 68 28 26 76 61 6c 29 20 21  rt!(hash(&val) !
2f60: 3d 20 68 61 73 68 28 26 7a 65 72 6f 5f 62 79 74  = hash(&zero_byt
2f70: 65 28 76 61 6c 2c 20 37 29 29 29 3b 0a 0a 20 20  e(val, 7)));..  
2f80: 20 20 66 6e 20 7a 65 72 6f 5f 62 79 74 65 28 76    fn zero_byte(v
2f90: 61 6c 3a 20 75 36 34 2c 20 62 79 74 65 3a 20 75  al: u64, byte: u
2fa0: 73 69 7a 65 29 20 2d 3e 20 75 36 34 20 7b 0a 20  size) -> u64 {. 
2fb0: 20 20 20 20 20 20 20 61 73 73 65 72 74 21 28 62         assert!(b
2fc0: 79 74 65 20 3c 20 38 29 3b 0a 20 20 20 20 20 20  yte < 8);.      
2fd0: 20 20 76 61 6c 20 26 20 21 28 30 78 66 66 20 3c    val & !(0xff <
2fe0: 3c 20 28 62 79 74 65 20 2a 20 38 29 29 0a 20 20  < (byte * 8)).  
2ff0: 20 20 7d 0a 7d 0a 0a 23 5b 74 65 73 74 5d 0a 66    }.}..#[test].f
3000: 6e 20 74 65 73 74 5f 68 61 73 68 5f 6e 6f 5f 62  n test_hash_no_b
3010: 79 74 65 73 5f 64 72 6f 70 70 65 64 5f 33 32 28  ytes_dropped_32(
3020: 29 20 7b 0a 20 20 20 20 6c 65 74 20 76 61 6c 20  ) {.    let val 
3030: 3d 20 30 78 64 65 61 64 62 65 65 66 5f 75 33 32  = 0xdeadbeef_u32
3040: 3b 0a 0a 20 20 20 20 61 73 73 65 72 74 21 28 68  ;..    assert!(h
3050: 61 73 68 28 26 76 61 6c 29 20 21 3d 20 68 61 73  ash(&val) != has
3060: 68 28 26 7a 65 72 6f 5f 62 79 74 65 28 76 61 6c  h(&zero_byte(val
3070: 2c 20 30 29 29 29 3b 0a 20 20 20 20 61 73 73 65  , 0)));.    asse
3080: 72 74 21 28 68 61 73 68 28 26 76 61 6c 29 20 21  rt!(hash(&val) !
3090: 3d 20 68 61 73 68 28 26 7a 65 72 6f 5f 62 79 74  = hash(&zero_byt
30a0: 65 28 76 61 6c 2c 20 31 29 29 29 3b 0a 20 20 20  e(val, 1)));.   
30b0: 20 61 73 73 65 72 74 21 28 68 61 73 68 28 26 76   assert!(hash(&v
30c0: 61 6c 29 20 21 3d 20 68 61 73 68 28 26 7a 65 72  al) != hash(&zer
30d0: 6f 5f 62 79 74 65 28 76 61 6c 2c 20 32 29 29 29  o_byte(val, 2)))
30e0: 3b 0a 20 20 20 20 61 73 73 65 72 74 21 28 68 61  ;.    assert!(ha
30f0: 73 68 28 26 76 61 6c 29 20 21 3d 20 68 61 73 68  sh(&val) != hash
3100: 28 26 7a 65 72 6f 5f 62 79 74 65 28 76 61 6c 2c  (&zero_byte(val,
3110: 20 33 29 29 29 3b 0a 0a 20 20 20 20 66 6e 20 7a   3)));..    fn z
3120: 65 72 6f 5f 62 79 74 65 28 76 61 6c 3a 20 75 33  ero_byte(val: u3
3130: 32 2c 20 62 79 74 65 3a 20 75 73 69 7a 65 29 20  2, byte: usize) 
3140: 2d 3e 20 75 33 32 20 7b 0a 20 20 20 20 20 20 20  -> u32 {.       
3150: 20 61 73 73 65 72 74 21 28 62 79 74 65 20 3c 20   assert!(byte < 
3160: 34 29 3b 0a 20 20 20 20 20 20 20 20 76 61 6c 20  4);.        val 
3170: 26 20 21 28 30 78 66 66 20 3c 3c 20 28 62 79 74  & !(0xff << (byt
3180: 65 20 2a 20 38 29 29 0a 20 20 20 20 7d 0a 7d 0a  e * 8)).    }.}.
3190: 0a 23 5b 74 65 73 74 5d 0a 66 6e 20 74 65 73 74  .#[test].fn test
31a0: 5f 68 61 73 68 5f 6e 6f 5f 63 6f 6e 63 61 74 5f  _hash_no_concat_
31b0: 61 6c 69 61 73 28 29 20 7b 0a 20 20 20 20 6c 65  alias() {.    le
31c0: 74 20 73 20 3d 20 28 22 61 61 22 2c 20 22 62 62  t s = ("aa", "bb
31d0: 22 29 3b 0a 20 20 20 20 6c 65 74 20 74 20 3d 20  ");.    let t = 
31e0: 28 22 61 61 62 62 22 2c 20 22 22 29 3b 0a 20 20  ("aabb", "");.  
31f0: 20 20 6c 65 74 20 75 20 3d 20 28 22 61 22 2c 20    let u = ("a", 
3200: 22 61 62 62 22 29 3b 0a 0a 20 20 20 20 61 73 73  "abb");..    ass
3210: 65 72 74 21 28 73 20 21 3d 20 74 20 26 26 20 74  ert!(s != t && t
3220: 20 21 3d 20 75 29 3b 0a 20 20 20 20 61 73 73 65   != u);.    asse
3230: 72 74 21 28 68 61 73 68 28 26 73 29 20 21 3d 20  rt!(hash(&s) != 
3240: 68 61 73 68 28 26 74 29 20 26 26 20 68 61 73 68  hash(&t) && hash
3250: 28 26 73 29 20 21 3d 20 68 61 73 68 28 26 75 29  (&s) != hash(&u)
3260: 29 3b 0a 0a 20 20 20 20 6c 65 74 20 75 20 3d 20  );..    let u = 
3270: 5b 31 2c 20 30 2c 20 30 2c 20 30 5d 3b 0a 20 20  [1, 0, 0, 0];.  
3280: 20 20 6c 65 74 20 76 20 3d 20 28 26 75 5b 2e 2e    let v = (&u[..
3290: 31 5d 2c 20 26 75 5b 31 2e 2e 33 5d 2c 20 26 75  1], &u[1..3], &u
32a0: 5b 33 2e 2e 5d 29 3b 0a 20 20 20 20 6c 65 74 20  [3..]);.    let 
32b0: 77 20 3d 20 28 26 75 5b 2e 2e 5d 2c 20 26 75 5b  w = (&u[..], &u[
32c0: 34 2e 2e 34 5d 2c 20 26 75 5b 34 2e 2e 34 5d 29  4..4], &u[4..4])
32d0: 3b 0a 0a 20 20 20 20 61 73 73 65 72 74 21 28 76  ;..    assert!(v
32e0: 20 21 3d 20 77 29 3b 0a 20 20 20 20 61 73 73 65   != w);.    asse
32f0: 72 74 21 28 68 61 73 68 28 26 76 29 20 21 3d 20  rt!(hash(&v) != 
3300: 68 61 73 68 28 26 77 29 29 3b 0a 7d 0a 0a 23 5b  hash(&w));.}..#[
3310: 74 65 73 74 5d 0a 66 6e 20 74 65 73 74 5f 77 72  test].fn test_wr
3320: 69 74 65 5f 73 68 6f 72 74 5f 77 6f 72 6b 73 28  ite_short_works(
3330: 29 20 7b 0a 20 20 20 20 6c 65 74 20 74 65 73 74  ) {.    let test
3340: 5f 75 73 69 7a 65 20 3d 20 30 78 64 30 63 30 62  _usize = 0xd0c0b
3350: 30 61 30 75 73 69 7a 65 3b 0a 20 20 20 20 6c 65  0a0usize;.    le
3360: 74 20 6d 75 74 20 68 31 20 3d 20 53 69 70 48 61  t mut h1 = SipHa
3370: 73 68 65 72 32 34 3a 3a 6e 65 77 28 29 3b 0a 20  sher24::new();. 
3380: 20 20 20 68 31 2e 77 72 69 74 65 5f 75 73 69 7a     h1.write_usiz
3390: 65 28 74 65 73 74 5f 75 73 69 7a 65 29 3b 0a 20  e(test_usize);. 
33a0: 20 20 20 68 31 2e 77 72 69 74 65 28 62 22 62 79     h1.write(b"by
33b0: 74 65 73 22 29 3b 0a 20 20 20 20 68 31 2e 77 72  tes");.    h1.wr
33c0: 69 74 65 28 62 22 73 74 72 69 6e 67 22 29 3b 0a  ite(b"string");.
33d0: 20 20 20 20 68 31 2e 77 72 69 74 65 5f 75 38 28      h1.write_u8(
33e0: 30 78 46 46 75 38 29 3b 0a 20 20 20 20 68 31 2e  0xFFu8);.    h1.
33f0: 77 72 69 74 65 5f 75 38 28 30 78 30 31 75 38 29  write_u8(0x01u8)
3400: 3b 0a 20 20 20 20 6c 65 74 20 6d 75 74 20 68 32  ;.    let mut h2
3410: 20 3d 20 53 69 70 48 61 73 68 65 72 32 34 3a 3a   = SipHasher24::
3420: 6e 65 77 28 29 3b 0a 20 20 20 20 68 32 2e 77 72  new();.    h2.wr
3430: 69 74 65 28 75 6e 73 61 66 65 20 7b 0a 20 20 20  ite(unsafe {.   
3440: 20 20 20 20 20 73 6c 69 63 65 3a 3a 66 72 6f 6d       slice::from
3450: 5f 72 61 77 5f 70 61 72 74 73 28 26 74 65 73 74  _raw_parts(&test
3460: 5f 75 73 69 7a 65 20 61 73 20 2a 63 6f 6e 73 74  _usize as *const
3470: 20 5f 20 61 73 20 2a 63 6f 6e 73 74 20 75 38 2c   _ as *const u8,
3480: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
3490: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d                 m
34a0: 65 6d 3a 3a 73 69 7a 65 5f 6f 66 3a 3a 3c 75 73  em::size_of::<us
34b0: 69 7a 65 3e 28 29 29 0a 20 20 20 20 7d 29 3b 0a  ize>()).    });.
34c0: 20 20 20 20 68 32 2e 77 72 69 74 65 28 62 22 62      h2.write(b"b
34d0: 79 74 65 73 22 29 3b 0a 20 20 20 20 68 32 2e 77  ytes");.    h2.w
34e0: 72 69 74 65 28 62 22 73 74 72 69 6e 67 22 29 3b  rite(b"string");
34f0: 0a 20 20 20 20 68 32 2e 77 72 69 74 65 28 26 5b  .    h2.write(&[
3500: 30 78 46 46 75 38 2c 20 30 78 30 31 75 38 5d 29  0xFFu8, 0x01u8])
3510: 3b 0a 20 20 20 20 61 73 73 65 72 74 5f 65 71 21  ;.    assert_eq!
3520: 28 68 31 2e 66 69 6e 69 73 68 28 29 2c 20 68 32  (h1.finish(), h2
3530: 2e 66 69 6e 69 73 68 28 29 29 3b 0a 7d 0a        .finish());.}.