public BlockTransformer_8Bit(BuzHashConfig config) : this()
            {
                _rtab           = config.Rtab;
                _shiftDirection = config.ShiftDirection;

                _hashValue = (byte)config.Seed;
            }
Example #2
0
            public BlockTransformer_64Bit(IBuzHashConfig config)
                : this()
            {
                _rtab           = config.Rtab;
                _shiftDirection = config.ShiftDirection;

                _hashValue = (UInt64)config.Seed;
            }
Example #3
0
        private static UInt64 CShift(UInt64 n, int shiftCount, CircularShiftDirection shiftDirection)
        {
            if (shiftDirection == CircularShiftDirection.Right)
            {
                return(RotateRight(n, shiftCount));
            }

            return(RotateLeft(n, shiftCount));
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultBuzHash"/> class.
        /// </summary>
        /// <remarks>
        /// Defaults <see cref="BuzHashBase.InitVal" /> to 0x3CD05367FD0337D3.
        /// </remarks>
        /// <inheritdoc cref="BuzHashBase(IReadOnlyList{UInt64}, CircularShiftDirection, UInt64, int)" />
#else
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultBuzHash"/> class.
        /// </summary>
        /// <remarks>
        /// Defaults <see cref="BuzHashBase.InitVal" /> to 0x3CD05367FD0337D3.
        /// </remarks>
        /// <inheritdoc cref="BuzHashBase(IList{UInt64}, CircularShiftDirection, UInt64, int)" />
#endif
        public DefaultBuzHash(CircularShiftDirection shiftDirection, int hashSize)
            : base(_Rtab, shiftDirection, 0x3CD05367FD0337D3, hashSize)
        {

        }
        /// <param name="shiftDirection">The shift direction.</param>
        /// <remarks>
        /// Defaults <see cref="BuzHashBase.InitVal" /> to 0x3CD05367FD0337D3.
        /// <inheritdoc cref="BuzHashBase(IReadOnlyList{UInt64}, CircularShiftDirection, UInt64)" />
        /// </remarks>
        /// <inheritdoc cref="BuzHashBase(IReadOnlyList{UInt64}, CircularShiftDirection, UInt64)" />
#else
        /// <param name="shiftDirection">The shift direction.</param>
        /// <remarks>
        /// Defaults <see cref="BuzHashBase.InitVal" /> to 0x3CD05367FD0337D3.
        /// <inheritdoc cref="BuzHashBase(IList{UInt64}, CircularShiftDirection, UInt64)" />
        /// </remarks>
        /// <inheritdoc cref="BuzHashBase(IList{UInt64}, CircularShiftDirection, UInt64)" />
#endif
        public DefaultBuzHash(CircularShiftDirection shiftDirection)
            : base(_Rtab, shiftDirection, 0x3CD05367FD0337D3)
        {

        }
Example #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultBuzHash"/> class.
        /// </summary>
        /// <remarks>
        /// Defaults <see cref="BuzHashBase.InitVal" /> to 0x3CD05367FD0337D3.
        /// </remarks>
        /// <inheritdoc cref="BuzHashBase(IReadOnlyList{UInt64}, CircularShiftDirection, UInt64, int)" />
#else
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultBuzHash"/> class.
        /// </summary>
        /// <remarks>
        /// Defaults <see cref="BuzHashBase.InitVal" /> to 0x3CD05367FD0337D3.
        /// </remarks>
        /// <inheritdoc cref="BuzHashBase(IList{UInt64}, CircularShiftDirection, UInt64, int)" />
#endif
        public DefaultBuzHash(CircularShiftDirection shiftDirection, int hashSize)
            : base(_Rtab, shiftDirection, 0x3CD05367FD0337D3, hashSize)
        {
        }
Example #7
0
        /// <param name="shiftDirection">The shift direction.</param>
        /// <remarks>
        /// Defaults <see cref="BuzHashBase.InitVal" /> to 0x3CD05367FD0337D3.
        /// <inheritdoc cref="BuzHashBase(IReadOnlyList{UInt64}, CircularShiftDirection, UInt64)" />
        /// </remarks>
        /// <inheritdoc cref="BuzHashBase(IReadOnlyList{UInt64}, CircularShiftDirection, UInt64)" />
#else
        /// <param name="shiftDirection">The shift direction.</param>
        /// <remarks>
        /// Defaults <see cref="BuzHashBase.InitVal" /> to 0x3CD05367FD0337D3.
        /// <inheritdoc cref="BuzHashBase(IList{UInt64}, CircularShiftDirection, UInt64)" />
        /// </remarks>
        /// <inheritdoc cref="BuzHashBase(IList{UInt64}, CircularShiftDirection, UInt64)" />
#endif
        public DefaultBuzHash(CircularShiftDirection shiftDirection)
            : base(_Rtab, shiftDirection, 0x3CD05367FD0337D3)
        {
        }