Hash() public method

public Hash ( uint nonce ) : bool
nonce uint
return bool
示例#1
0
        public static bool TestStandard()
        {
            Work work = new Work();
            Array.Copy(sData, work.data, 32);
            Array.Copy(sTarget, work.target, 8);

            Scrypt scrypt = new Scrypt(work);
            bool result = scrypt.Hash(sNOnce);

            return result;
        }
        public static bool TestStandard()
        {
            Work work = new Work();

            Array.Copy(sData, work.data, 32);
            Array.Copy(sTarget, work.target, 8);

            Scrypt scrypt = new Scrypt(work);
            bool   result = scrypt.Hash(sNOnce);


            return(result);
        }
        void ScryptHashes()
        {
            ulong  end        = mHashStart + mHashCount;
            Scrypt scryptData = new Scrypt(mWork);

            for (ulong i = mHashStart; i < end; i++)
            {
                mHashesDone++;
                bool success = scryptData.Hash((uint)i);
                if (success)
                {
                    mSolution      = (uint)i;
                    mSolutionFound = true;
                    break;
                }
            }
        }
示例#4
0
 void ScryptHashes()
 {
     ulong end = mHashStart + mHashCount;
     Scrypt scryptData = new Scrypt(mWork);
     for( ulong i = mHashStart; i < end; i++ )
     {
         mHashesDone++;
         bool success = scryptData.Hash((uint)i);
         if( success )
         {
             mSolution = (uint)i;
             mSolutionFound = true;
             break;
         }
     }
 }