Beispiel #1
0
 public SkeinEngine(int blockSizeBits, int outputSizeBits)
 {
     //IL_0027: Unknown result type (might be due to invalid IL or missing references)
     if (outputSizeBits % 8 != 0)
     {
         throw new ArgumentException(string.Concat((object)"Output size must be a multiple of 8 bits. :", (object)outputSizeBits));
     }
     outputSizeBytes = outputSizeBits / 8;
     threefish       = new ThreefishEngine(blockSizeBits);
     ubi             = new UBI(this, threefish.GetBlockSize());
 }
Beispiel #2
0
        /// <summary>
        /// Constructs a Skein digest with an internal state size and output size.
        /// </summary>
        /// <param name="blockSizeBits">the internal state size in bits - one of <see cref="SKEIN_256"/> <see cref="SKEIN_512"/> or
        ///                       <see cref="SKEIN_1024"/>.</param>
        /// <param name="outputSizeBits">the output/digest size to produce in bits, which must be an integral number of
        ///                      bytes.</param>
        public SkeinEngine(int blockSizeBits, int outputSizeBits)
        {
            if (outputSizeBits % 8 != 0)
            {
                throw new ArgumentException("Output size must be a multiple of 8 bits. :" + outputSizeBits);
            }
            // TODO: Prevent digest sizes > block size?
            this.outputSizeBytes = outputSizeBits / 8;

            this.threefish = new ThreefishEngine(blockSizeBits);
            this.ubi       = new UBI(this, threefish.GetBlockSize());
        }