Example #1
0
        public override DSAParameters ExportParameters(bool includePrivateParameters)
        {
            DSAParameters parameters = new DSAParameters();

            parameters.P       = _dsa.P;
            parameters.Q       = _dsa.Q;
            parameters.G       = _dsa.G;
            parameters.Y       = _dsa.Y;
            parameters.J       = _dsa.J;
            parameters.Seed    = _dsa.Seed;
            parameters.Counter = (int)_dsa.ds.counter;
            if (includePrivateParameters == true)
            {
                parameters.X = _dsa.X;
            }
            return(parameters);
        }
Example #2
0
        public override void ImportParameters(DSAParameters parameters)
        {
            _dsa.P    = parameters.P;
            _dsa.Q    = parameters.Q;
            _dsa.G    = parameters.G;
            _dsa.Y    = parameters.Y;
            _dsa.J    = parameters.J;
            _dsa.Seed = parameters.Seed;
            byte [] baCounter = BitConverter.GetBytes(parameters.Counter);
            _dsa.PgenCounter = baCounter;
            _dsa.X           = parameters.X;

            bool privateKey = false;

            if (parameters.X != null && parameters.X.Length > 0)
            {
                privateKey = true;
            }
            _dsa.BuildRawKey(privateKey);
        }
Example #3
0
 public abstract void ImportParameters(DSAParameters parameters);
Example #4
0
		public abstract void ImportParameters(DSAParameters parameters);
		public override void ImportParameters(DSAParameters parameters)
		{
			_dsa.P = parameters.P;
			_dsa.Q = parameters.Q;
			_dsa.G = parameters.G;
			_dsa.Y = parameters.Y;
			_dsa.J = parameters.J;
			_dsa.Seed = parameters.Seed;
			byte [] baCounter = BitConverter.GetBytes(parameters.Counter);
			_dsa.PgenCounter = baCounter;
			_dsa.X = parameters.X;

			bool privateKey = false;
			if(parameters.X!=null && parameters.X.Length > 0)
				privateKey = true;
			_dsa.BuildRawKey(privateKey);
		}
		public override DSAParameters ExportParameters(bool includePrivateParameters)
		{
			DSAParameters parameters = new DSAParameters();
			parameters.P = _dsa.P;
			parameters.Q = _dsa.Q;
			parameters.G = _dsa.G;
			parameters.Y = _dsa.Y;
			parameters.J = _dsa.J;
			parameters.Seed = _dsa.Seed;
			parameters.Counter = (int) _dsa.ds.counter;
			if(includePrivateParameters == true)
			{
				parameters.X = _dsa.X;
			}
			return parameters;
		}