Example #1
0
        /// <summary>
        /// Creates a new instance of JH hasher configured for the result bit length specified
        /// </summary>
        /// <param name="bitLen">Bits for result: 224, 256, 384 or 512</param>
        /// <returns>Hasher instance</returns>
        public static JH Create(int bitLen)
        {
            if ((bitLen != 224) && (bitLen != 256) && (bitLen != 384) && (bitLen != 512))
            {
                throw new ArgumentException();
            }

            var result = new JH();

            result.Config(bitLen);
            return(result);
        }