Example #1
0
 /// <summary>
 /// Initializes a new instance of the CkX942MqvDeriveParams class.
 /// </summary>>
 /// <param name='kdf'>Key derivation function used on the shared secret value (CKD)</param>
 /// <param name='otherInfo'>Some data shared between the two parties</param>
 /// <param name='publicData'>Other party's first X9.42 Diffie-Hellman public key value</param>
 /// <param name='privateDataLen'>The length in bytes of the second X9.42 Diffie-Hellman private key</param>
 /// <param name='privateData'>Key handle for second X9.42 Diffie-Hellman private key value</param>
 /// <param name='publicData2'>Other party's second X9.42 Diffie-Hellman public key value</param>
 /// <param name='publicKey'>Handle to the first party's ephemeral public key</param>
 public CkX942MqvDeriveParams(ulong kdf, byte[] otherInfo, byte[] publicData, ulong privateDataLen, ObjectHandle privateData, byte[] publicData2, ObjectHandle publicKey)
 {
     if (Platform.UnmanagedLongSize == 4)
     {
         if (Platform.StructPackingSize == 0)
         {
             _params40 = new HighLevelAPI40.MechanismParams.CkX942MqvDeriveParams(Convert.ToUInt32(kdf), otherInfo, publicData, Convert.ToUInt32(privateDataLen), privateData.ObjectHandle40, publicData2, publicKey.ObjectHandle40);
         }
         else
         {
             _params41 = new HighLevelAPI41.MechanismParams.CkX942MqvDeriveParams(Convert.ToUInt32(kdf), otherInfo, publicData, Convert.ToUInt32(privateDataLen), privateData.ObjectHandle41, publicData2, publicKey.ObjectHandle41);
         }
     }
     else
     {
         if (Platform.StructPackingSize == 0)
         {
             _params80 = new HighLevelAPI80.MechanismParams.CkX942MqvDeriveParams(kdf, otherInfo, publicData, privateDataLen, privateData.ObjectHandle80, publicData2, publicKey.ObjectHandle80);
         }
         else
         {
             _params81 = new HighLevelAPI81.MechanismParams.CkX942MqvDeriveParams(kdf, otherInfo, publicData, privateDataLen, privateData.ObjectHandle81, publicData2, publicKey.ObjectHandle81);
         }
     }
 }
 /// <summary>
 /// Initializes a new instance of the CkX942MqvDeriveParams class.
 /// </summary>>
 /// <param name='kdf'>Key derivation function used on the shared secret value (CKD)</param>
 /// <param name='otherInfo'>Some data shared between the two parties</param>
 /// <param name='publicData'>Other party's first X9.42 Diffie-Hellman public key value</param>
 /// <param name='privateDataLen'>The length in bytes of the second X9.42 Diffie-Hellman private key</param>
 /// <param name='privateData'>Key handle for second X9.42 Diffie-Hellman private key value</param>
 /// <param name='publicData2'>Other party's second X9.42 Diffie-Hellman public key value</param>
 /// <param name='publicKey'>Handle to the first party's ephemeral public key</param>
 public CkX942MqvDeriveParams(ulong kdf, byte[] otherInfo, byte[] publicData, ulong privateDataLen, ObjectHandle privateData, byte[] publicData2, ObjectHandle publicKey)
 {
     if (Platform.UnmanagedLongSize == 4)
     {
         if (Platform.StructPackingSize == 0)
             _params40 = new HighLevelAPI40.MechanismParams.CkX942MqvDeriveParams(Convert.ToUInt32(kdf), otherInfo, publicData, Convert.ToUInt32(privateDataLen), privateData.ObjectHandle40, publicData2, publicKey.ObjectHandle40);
         else
             _params41 = new HighLevelAPI41.MechanismParams.CkX942MqvDeriveParams(Convert.ToUInt32(kdf), otherInfo, publicData, Convert.ToUInt32(privateDataLen), privateData.ObjectHandle41, publicData2, publicKey.ObjectHandle41);
     }
     else
     {
         if (Platform.StructPackingSize == 0)
             _params80 = new HighLevelAPI80.MechanismParams.CkX942MqvDeriveParams(kdf, otherInfo, publicData, privateDataLen, privateData.ObjectHandle80, publicData2, publicKey.ObjectHandle80);
         else
             _params81 = new HighLevelAPI81.MechanismParams.CkX942MqvDeriveParams(kdf, otherInfo, publicData, privateDataLen, privateData.ObjectHandle81, publicData2, publicKey.ObjectHandle81);
     }
 }
Example #3
0
        /// <summary>
        /// Disposes object
        /// </summary>
        /// <param name="disposing">Flag indicating whether managed resources should be disposed</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!this._disposed)
            {
                if (disposing)
                {
                    // Dispose managed objects
                    if (_params40 != null)
                    {
                        _params40.Dispose();
                        _params40 = null;
                    }

                    if (_params41 != null)
                    {
                        _params41.Dispose();
                        _params41 = null;
                    }

                    if (_params80 != null)
                    {
                        _params80.Dispose();
                        _params80 = null;
                    }

                    if (_params81 != null)
                    {
                        _params81.Dispose();
                        _params81 = null;
                    }
                }

                // Dispose unmanaged objects

                _disposed = true;
            }
        }
        /// <summary>
        /// Disposes object
        /// </summary>
        /// <param name="disposing">Flag indicating whether managed resources should be disposed</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!this._disposed)
            {
                if (disposing)
                {
                    // Dispose managed objects
                    if (_params40 != null)
                    {
                        _params40.Dispose();
                        _params40 = null;
                    }

                    if (_params41 != null)
                    {
                        _params41.Dispose();
                        _params41 = null;
                    }

                    if (_params80 != null)
                    {
                        _params80.Dispose();
                        _params80 = null;
                    }

                    if (_params81 != null)
                    {
                        _params81.Dispose();
                        _params81 = null;
                    }
                }
                
                // Dispose unmanaged objects
                
                _disposed = true;
            }
        }