Exemple #1
0
        internal void HashCoreImpl(byte[] rgb, int ib, int cb)
        {
            if (rgb == null)
            {
                throw new ArgumentNullException("rgb");
            }
            if (ib < 0 || ib > rgb.Length - cb)
            {
                throw new ArgumentOutOfRangeException("ib");
            }
            if (cb < 0 || cb > rgb.Length)
            {
                throw new ArgumentOutOfRangeException("cb");
            }

            // Tell the base class that resetting the key is no longer allowed
            State = 1;

            byte[] data = new byte[cb];
            Buffer.BlockCopy(rgb, ib, data, 0, data.Length);
            BCryptNative.HashData(m_hash, data);
        }