Exemplo n.º 1
0
 public Builder(SkeinParameters parameters)
 {
     global::System.Collections.IEnumerator enumerator = ((global::System.Collections.IEnumerable)parameters.parameters.get_Keys()).GetEnumerator();
     while (enumerator.MoveNext())
     {
         int num = (int)enumerator.get_Current();
         this.parameters.Add((object)num, parameters.parameters.get_Item((object)num));
     }
 }
Exemplo n.º 2
0
            public Builder(SkeinParameters parameters)
            {
                IEnumerator keys = parameters.parameters.Keys.GetEnumerator();

                while (keys.MoveNext())
                {
                    int key = (int)keys.Current;
                    this.parameters.Add(key, parameters.parameters[key]);
                }
            }
Exemplo n.º 3
0
            public Builder(SkeinParameters parameters)
            {
                IEnumerator enumerator = parameters.parameters.Keys.GetEnumerator();

                while (enumerator.MoveNext())
                {
                    int num = (int)enumerator.Current;
                    this.parameters.Add(num, parameters.parameters[num]);
                }
            }
Exemplo n.º 4
0
        /// <summary>
        /// Initialises the Skein engine with the provided parameters. See <see cref="Org.BouncyCastle.Crypto.Parameters.SkeinParameters"/> for
        /// details on the parameterisation of the Skein hash function.
        /// </summary>
        /// <param name="parameters">the parameters to apply to this engine, or <code>null</code> to use no parameters.</param>
        public void Init(SkeinParameters parameters)
        {
            this.chain = null;
            this.key = null;
            this.preMessageParameters = null;
            this.postMessageParameters = null;

            if (parameters != null)
            {
                byte[] key = parameters.GetKey();
                if (key.Length < 16)
                {
                    throw new ArgumentException("Skein key must be at least 128 bits.");
                }
                InitParams(parameters.GetParameters());
            }
            CreateInitialState();

            // Initialise message block
            UbiInit(PARAM_TYPE_MESSAGE);
        }
Exemplo n.º 5
0
		/// <summary>
		/// Optionally initialises the Skein digest with the provided parameters.
		/// </summary>
		/// See <see cref="Org.BouncyCastle.Crypto.Parameters.SkeinParameters"></see> for details on the parameterisation of the Skein hash function.
		/// <param name="parameters">the parameters to apply to this engine, or <code>null</code> to use no parameters.</param>
		public void Init(SkeinParameters parameters)
		{
			engine.Init(parameters);
		}
Exemplo n.º 6
0
			public Builder(SkeinParameters parameters)
			{
				IEnumerator keys = parameters.parameters.Keys.GetEnumerator();
				while (keys.MoveNext())
				{
					int key = (int)keys.Current;
					this.parameters.Add(key, parameters.parameters[key]);
				}
			}