Exemple #1
0
        public virtual void Init(IDerivationParameters param)
        {
            if (!(param is KdfParameters))
            {
                throw new ArgumentException("KDF parameters required for ConcatenationKdfGenerator");
            }

            KdfParameters p = (KdfParameters)param;

            mShared    = p.GetSharedSecret();
            mOtherInfo = p.GetIV();
        }
        public void Init(IDerivationParameters parameters)
        {
            KdfParameters p = parameters as KdfParameters;

            if (p == null)
            {
                throw new ArgumentException("Must be KdfParameters.");
            }

            shared    = p.GetSharedSecret();
            otherInfo = p.GetIV();
        }
Exemple #3
0
        public void Init(
            IDerivationParameters param)
        {
            if (param is KdfParameters)
            {
                KdfParameters p = (KdfParameters)param;

                shared    = p.GetSharedSecret();
                otherInfo = p.GetIV();
            }
            else
            {
                throw new ArgumentException("KDF parameters required for KDF2Generator");
            }
        }
Exemple #4
0
 public virtual void Init(IDerivationParameters parameters)
 {
     if (parameters is KdfParameters)
     {
         KdfParameters kdfParameters = (KdfParameters)parameters;
         this.shared = kdfParameters.GetSharedSecret();
         this.iv     = kdfParameters.GetIV();
         return;
     }
     if (parameters is Iso18033KdfParameters)
     {
         Iso18033KdfParameters iso18033KdfParameters = (Iso18033KdfParameters)parameters;
         this.shared = iso18033KdfParameters.GetSeed();
         this.iv     = null;
         return;
     }
     throw new ArgumentException("KDF parameters required for KDF Generator");
 }
 public virtual void Init(IDerivationParameters parameters)
 {
     //IL_0050: Unknown result type (might be due to invalid IL or missing references)
     if (parameters is KdfParameters)
     {
         KdfParameters kdfParameters = (KdfParameters)parameters;
         shared = kdfParameters.GetSharedSecret();
         iv     = kdfParameters.GetIV();
         return;
     }
     if (parameters is Iso18033KdfParameters)
     {
         Iso18033KdfParameters iso18033KdfParameters = (Iso18033KdfParameters)parameters;
         shared = iso18033KdfParameters.GetSeed();
         iv     = null;
         return;
     }
     throw new ArgumentException("KDF parameters required for KDF Generator");
 }
        public virtual void Init(IDerivationParameters parameters)
        {
            if (parameters is KdfParameters)
            {
                KdfParameters p = (KdfParameters)parameters;

                shared = p.GetSharedSecret();
                iv     = p.GetIV();
            }
            else if (parameters is Iso18033KdfParameters)
            {
                Iso18033KdfParameters p = (Iso18033KdfParameters)parameters;

                shared = p.GetSeed();
                iv     = null;
            }
            else
            {
                throw new ArgumentException("KDF parameters required for KDF Generator");
            }
        }