public override Key Transform(string key)
        {
            using (var byteKey = base.Transform(key))
            {
                var hash  = Murmur32.ComputeHash(byteKey.Array, 0, byteKey.Length);
                var array = allocator.Take(4);
                NetworkOrderConverter.EncodeUInt32(hash, array, 0);

                return(new Key(allocator, array, 4));
            }
        }
Ejemplo n.º 2
0
        public override Key Transform(string key)
        {
            using (var tmp = base.Transform(key))
            {
                var retval = new Key(allocator, 4);
                var hash   = Murmur32.ComputeHash(tmp.Array, 0, tmp.Length);

                NetworkOrderConverter.EncodeUInt32(hash, retval.Array, 0);

                return(retval);
            }
        }