当前位置: 首页>>代码示例>>C#>>正文


C# ObjectHandle类代码示例

本文整理汇总了C#中ObjectHandle的典型用法代码示例。如果您正苦于以下问题:C# ObjectHandle类的具体用法?C# ObjectHandle怎么用?C# ObjectHandle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ObjectHandle类属于命名空间,在下文中一共展示了ObjectHandle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EntityEquipmentSensorCBRNAP2Ce

 public EntityEquipmentSensorCBRNAP2Ce(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = transactionHandle;
 }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:7,代码来源:EntityEquipment.Sensor.CBRN.AP2Ce.cs

示例2: EntityEquipment

 public EntityEquipment(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = TransactionHandle.None;
 }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:7,代码来源:EntityEquipment.cs

示例3: CkKipParams

        /// <summary>
        /// Initializes a new instance of the CkKipParams class.
        /// </summary>
        /// <param name='mechanism'>Underlying cryptographic mechanism (CKM)</param>
        /// <param name='key'>Handle to a key that will contribute to the entropy of the derived key (CKM_KIP_DERIVE) or will be used in the MAC operation (CKM_KIP_MAC)</param>
        /// <param name='seed'>Input seed</param>
        public CkKipParams(ulong? mechanism, ObjectHandle key, byte[] seed)
        {
            _lowLevelStruct.Mechanism = IntPtr.Zero;
            _lowLevelStruct.Key = 0;
            _lowLevelStruct.Seed = IntPtr.Zero;
            _lowLevelStruct.SeedLen = 0;

            if (mechanism != null)
            {
                byte[] bytes = ConvertUtils.ULongToBytes(mechanism.Value);
                _lowLevelStruct.Mechanism = UnmanagedMemory.Allocate(bytes.Length);
                UnmanagedMemory.Write(_lowLevelStruct.Mechanism, bytes);
            }

            if (key == null)
                throw new ArgumentNullException("key");
            
            _lowLevelStruct.Key = key.ObjectId;

            if (seed != null)
            {
                _lowLevelStruct.Seed = UnmanagedMemory.Allocate(seed.Length);
                UnmanagedMemory.Write(_lowLevelStruct.Seed, seed);
                _lowLevelStruct.SeedLen = Convert.ToUInt64(seed.Length);
            }
        }
开发者ID:Pkcs11Interop,项目名称:Pkcs11Interop,代码行数:32,代码来源:CkKipParams.cs

示例4: WISEObject

 public WISEObject(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = transactionHandle;
 }
开发者ID:Durlek,项目名称:SAAB-CM,代码行数:7,代码来源:WISEObject.cs

示例5: EntityGroundVehicle

 public EntityGroundVehicle(INETWISEDriverSink2 WISE, DatabaseHandle databaseHandle, ObjectHandle objectHandle, TransactionHandle transactionHandle)
 {
     this.WISE = WISE;
     this.Database = databaseHandle;
     this.Object = objectHandle;
     this.Transaction = transactionHandle;
 }
开发者ID:GULPF,项目名称:SAAB-CM,代码行数:7,代码来源:Entity.GroundVehicle.cs

示例6: CkCmsSigParams

        /// <summary>
        /// Initializes a new instance of the CkCmsSigParams class.
        /// </summary>
        /// <param name='certificateHandle'>Object handle for a certificate associated with the signing key</param>
        /// <param name='signingMechanism'>Mechanism to use when signing a constructed CMS SignedAttributes value</param>
        /// <param name='digestMechanism'>Mechanism to use when digesting the data</param>
        /// <param name='contentType'>String indicating complete MIME Content-type of message to be signed or null if the message is a MIME object</param>
        /// <param name='requestedAttributes'>DER-encoded list of CMS Attributes the caller requests to be included in the signed attributes</param>
        /// <param name='requiredAttributes'>DER-encoded list of CMS Attributes (with accompanying values) required to be included in the resulting signed attributes</param>
        public CkCmsSigParams(ObjectHandle certificateHandle, ulong? signingMechanism, ulong? digestMechanism, string contentType, byte[] requestedAttributes, byte[] requiredAttributes)
        {
            _lowLevelStruct.CertificateHandle = CK.CK_INVALID_HANDLE;
            _lowLevelStruct.SigningMechanism = IntPtr.Zero;
            _lowLevelStruct.DigestMechanism = IntPtr.Zero;
            _lowLevelStruct.ContentType = IntPtr.Zero;
            _lowLevelStruct.RequestedAttributes = IntPtr.Zero;
            _lowLevelStruct.RequestedAttributesLen = 0;
            _lowLevelStruct.RequiredAttributes = IntPtr.Zero;
            _lowLevelStruct.RequiredAttributesLen = 0;

            if (certificateHandle == null)
                throw new ArgumentNullException("certificateHandle");

            _lowLevelStruct.CertificateHandle = certificateHandle.ObjectId;

            if (signingMechanism != null)
            {
                byte[] bytes = ConvertUtils.ULongToBytes(signingMechanism.Value);
                _lowLevelStruct.SigningMechanism = UnmanagedMemory.Allocate(bytes.Length);
                UnmanagedMemory.Write(_lowLevelStruct.SigningMechanism, bytes);
            }

            if (digestMechanism != null)
            {
                byte[] bytes = ConvertUtils.ULongToBytes(digestMechanism.Value);
                _lowLevelStruct.DigestMechanism = UnmanagedMemory.Allocate(bytes.Length);
                UnmanagedMemory.Write(_lowLevelStruct.DigestMechanism, bytes);
            }

            if (contentType != null)
            {
                byte[] bytes = ConvertUtils.Utf8StringToBytes(contentType);
                Array.Resize(ref bytes, bytes.Length + 1);
                bytes[bytes.Length - 1] = 0;
                
                _lowLevelStruct.ContentType = UnmanagedMemory.Allocate(bytes.Length);
                UnmanagedMemory.Write(_lowLevelStruct.ContentType, bytes);
            }

            if (requestedAttributes != null)
            {
                _lowLevelStruct.RequestedAttributes = UnmanagedMemory.Allocate(requestedAttributes.Length);
                UnmanagedMemory.Write(_lowLevelStruct.RequestedAttributes, requestedAttributes);
                _lowLevelStruct.RequestedAttributesLen = Convert.ToUInt64(requestedAttributes.Length);
            }

            if (requiredAttributes != null)
            {
                _lowLevelStruct.RequiredAttributes = UnmanagedMemory.Allocate(requiredAttributes.Length);
                UnmanagedMemory.Write(_lowLevelStruct.RequiredAttributes, requiredAttributes);
                _lowLevelStruct.RequiredAttributesLen = Convert.ToUInt64(requiredAttributes.Length);
            }
        }
开发者ID:Pkcs11Interop,项目名称:Pkcs11Interop,代码行数:63,代码来源:CkCmsSigParams.cs

示例7: CreateObject

 public WISEObject CreateObject(SensorTypes sensorType, ObjectHandle hObject)
 {
     switch (sensorType)
     {
         case SensorTypes.lcd:   return new EntityEquipmentSensorCBRNLCD(_sink, _hDatabase, hObject);
         case SensorTypes.ap2ce: return new EntityEquipmentSensorCBRNAP2Ce(_sink, _hDatabase, hObject);
         case SensorTypes.raid:  return new EntityEquipmentSensorCBRNRAID(_sink, _hDatabase, hObject);
         case SensorTypes.i28:   return new EntityEquipmentSensorCBRNI28(_sink, _hDatabase, hObject);
         case SensorTypes.i27:   return new EntityEquipmentSensorCBRNI27(_sink, _hDatabase, hObject);
     }
     throw new NotImplementedException();
 }
开发者ID:Durlek,项目名称:SAAB-CM,代码行数:12,代码来源:WISEObjectFactory.cs

示例8: CkX942MqvDeriveParams

 /// <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)
 {
     _lowLevelStruct.Kdf = 0;
     _lowLevelStruct.OtherInfoLen = 0;
     _lowLevelStruct.OtherInfo = IntPtr.Zero;
     _lowLevelStruct.PublicDataLen = 0;
     _lowLevelStruct.PublicData = IntPtr.Zero;
     _lowLevelStruct.PrivateDataLen = 0;
     _lowLevelStruct.PrivateData = 0;
     _lowLevelStruct.PublicDataLen2 = 0;
     _lowLevelStruct.PublicData2 = IntPtr.Zero;
     _lowLevelStruct.PublicKey = 0;
     
     _lowLevelStruct.Kdf = kdf;
     
     if (otherInfo != null)
     {
         _lowLevelStruct.OtherInfo = UnmanagedMemory.Allocate(otherInfo.Length);
         UnmanagedMemory.Write(_lowLevelStruct.OtherInfo, otherInfo);
         _lowLevelStruct.OtherInfoLen = Convert.ToUInt64(otherInfo.Length);
     }
     
     if (publicData != null)
     {
         _lowLevelStruct.PublicData = UnmanagedMemory.Allocate(publicData.Length);
         UnmanagedMemory.Write(_lowLevelStruct.PublicData, publicData);
         _lowLevelStruct.PublicDataLen = Convert.ToUInt64(publicData.Length);
     }
     
     _lowLevelStruct.PrivateDataLen = privateDataLen;
     
     if (privateData == null)
         throw new ArgumentNullException("privateData");
     
     _lowLevelStruct.PrivateData = privateData.ObjectId;
     
     if (publicData2 != null)
     {
         _lowLevelStruct.PublicData2 = UnmanagedMemory.Allocate(publicData2.Length);
         UnmanagedMemory.Write(_lowLevelStruct.PublicData2, publicData2);
         _lowLevelStruct.PublicDataLen2 = Convert.ToUInt64(publicData2.Length);
     }
     
     if (publicKey == null)
         throw new ArgumentNullException("publicKey");
     
     _lowLevelStruct.PublicKey = publicKey.ObjectId;
 }
开发者ID:Pkcs11Interop,项目名称:Pkcs11Interop,代码行数:58,代码来源:CkX942MqvDeriveParams.cs

示例9: CkEcmqvDeriveParams

        /// <summary>
        /// Initializes a new instance of the CkEcmqvDeriveParams class.
        /// </summary>>
        /// <param name='kdf'>Key derivation function used on the shared secret value (CKD)</param>
        /// <param name='sharedData'>Some data shared between the two parties</param>
        /// <param name='publicData'>Other party's first EC public key value</param>
        /// <param name='privateDataLen'>The length in bytes of the second EC private key</param>
        /// <param name='privateData'>Key handle for second EC private key value</param>
        /// <param name='publicData2'>Other party's second EC public key value</param>
        /// <param name='publicKey'>Handle to the first party's ephemeral public key</param>
        public CkEcmqvDeriveParams(uint kdf, byte[] sharedData, byte[] publicData, uint privateDataLen, ObjectHandle privateData, byte[] publicData2, ObjectHandle publicKey)
        {
            _lowLevelStruct.Kdf = 0;
            _lowLevelStruct.SharedDataLen = 0;
            _lowLevelStruct.SharedData = IntPtr.Zero;
            _lowLevelStruct.PublicDataLen = 0;
            _lowLevelStruct.PublicData = IntPtr.Zero;
            _lowLevelStruct.PrivateDataLen = 0;
            _lowLevelStruct.PrivateData = 0;
            _lowLevelStruct.PublicDataLen2 = 0;
            _lowLevelStruct.PublicData2 = IntPtr.Zero;
            _lowLevelStruct.PublicKey = 0;

            _lowLevelStruct.Kdf = kdf;
            
            if (sharedData != null)
            {
                _lowLevelStruct.SharedData = UnmanagedMemory.Allocate(sharedData.Length);
                UnmanagedMemory.Write(_lowLevelStruct.SharedData, sharedData);
                _lowLevelStruct.SharedDataLen = Convert.ToUInt32(sharedData.Length);
            }
            
            if (publicData != null)
            {
                _lowLevelStruct.PublicData = UnmanagedMemory.Allocate(publicData.Length);
                UnmanagedMemory.Write(_lowLevelStruct.PublicData, publicData);
                _lowLevelStruct.PublicDataLen = Convert.ToUInt32(publicData.Length);
            }
            
            _lowLevelStruct.PrivateDataLen = privateDataLen;
            
            if (privateData == null)
                throw new ArgumentNullException("privateData");
            
            _lowLevelStruct.PrivateData = privateData.ObjectId;
            
            if (publicData2 != null)
            {
                _lowLevelStruct.PublicData2 = UnmanagedMemory.Allocate(publicData2.Length);
                UnmanagedMemory.Write(_lowLevelStruct.PublicData2, publicData2);
                _lowLevelStruct.PublicDataLen2 = Convert.ToUInt32(publicData2.Length);
            }

            if (publicKey == null)
                throw new ArgumentNullException("publicKey");
            
            _lowLevelStruct.PublicKey = publicKey.ObjectId;
        }
开发者ID:Gianluigi,项目名称:Pkcs11Interop,代码行数:58,代码来源:CkEcmqvDeriveParams.cs

示例10: CkX942Dh2DeriveParams

 /// <summary>
 /// Initializes a new instance of the CkX942Dh2DeriveParams 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>
 public CkX942Dh2DeriveParams(ulong kdf, byte[] otherInfo, byte[] publicData, ulong privateDataLen, ObjectHandle privateData, byte[] publicData2)
 {
     if (Platform.UnmanagedLongSize == 4)
     {
         if (Platform.StructPackingSize == 0)
             _params40 = new HighLevelAPI40.MechanismParams.CkX942Dh2DeriveParams(Convert.ToUInt32(kdf), otherInfo, publicData, Convert.ToUInt32(privateDataLen), privateData.ObjectHandle40, publicData2);
         else
             _params41 = new HighLevelAPI41.MechanismParams.CkX942Dh2DeriveParams(Convert.ToUInt32(kdf), otherInfo, publicData, Convert.ToUInt32(privateDataLen), privateData.ObjectHandle41, publicData2);
     }
     else
     {
         if (Platform.StructPackingSize == 0)
             _params80 = new HighLevelAPI80.MechanismParams.CkX942Dh2DeriveParams(kdf, otherInfo, publicData, privateDataLen, privateData.ObjectHandle80, publicData2);
         else
             _params81 = new HighLevelAPI81.MechanismParams.CkX942Dh2DeriveParams(kdf, otherInfo, publicData, privateDataLen, privateData.ObjectHandle81, publicData2);
     }
 }
开发者ID:Gianluigi,项目名称:Pkcs11Interop,代码行数:26,代码来源:CkX942Dh2DeriveParams.cs

示例11: CkEcmqvDeriveParams

 /// <summary>
 /// Initializes a new instance of the CkEcmqvDeriveParams class.
 /// </summary>>
 /// <param name='kdf'>Key derivation function used on the shared secret value (CKD)</param>
 /// <param name='sharedData'>Some data shared between the two parties</param>
 /// <param name='publicData'>Other party's first EC public key value</param>
 /// <param name='privateDataLen'>The length in bytes of the second EC private key</param>
 /// <param name='privateData'>Key handle for second EC private key value</param>
 /// <param name='publicData2'>Other party's second EC public key value</param>
 /// <param name='publicKey'>Handle to the first party's ephemeral public key</param>
 public CkEcmqvDeriveParams(ulong kdf, byte[] sharedData, byte[] publicData, ulong privateDataLen, ObjectHandle privateData, byte[] publicData2, ObjectHandle publicKey)
 {
     if (Platform.UnmanagedLongSize == 4)
     {
         if (Platform.StructPackingSize == 0)
             _params40 = new HighLevelAPI40.MechanismParams.CkEcmqvDeriveParams(Convert.ToUInt32(kdf), sharedData, publicData, Convert.ToUInt32(privateDataLen), privateData.ObjectHandle40, publicData2, publicKey.ObjectHandle40);
         else
             _params41 = new HighLevelAPI41.MechanismParams.CkEcmqvDeriveParams(Convert.ToUInt32(kdf), sharedData, publicData, Convert.ToUInt32(privateDataLen), privateData.ObjectHandle41, publicData2, publicKey.ObjectHandle41);
     }
     else
     {
         if (Platform.StructPackingSize == 0)
             _params80 = new HighLevelAPI80.MechanismParams.CkEcmqvDeriveParams(kdf, sharedData, publicData, privateDataLen, privateData.ObjectHandle80, publicData2, publicKey.ObjectHandle80);
         else
             _params81 = new HighLevelAPI81.MechanismParams.CkEcmqvDeriveParams(kdf, sharedData, publicData, privateDataLen, privateData.ObjectHandle81, publicData2, publicKey.ObjectHandle81);
     }
 }
开发者ID:Pkcs11Interop,项目名称:Pkcs11Interop,代码行数:27,代码来源:CkEcmqvDeriveParams.cs

示例12: CkKipParams

        /// <summary>
        /// Initializes a new instance of the CkKipParams class.
        /// </summary>
        /// <param name='mechanism'>Underlying cryptographic mechanism (CKM)</param>
        /// <param name='key'>Handle to a key that will contribute to the entropy of the derived key (CKM_KIP_DERIVE) or will be used in the MAC operation (CKM_KIP_MAC)</param>
        /// <param name='seed'>Input seed</param>
        public CkKipParams(ulong? mechanism, ObjectHandle key, byte[] seed)
        {
            if (Platform.UnmanagedLongSize == 4)
            {
                uint? uintMechanism = (mechanism == null) ? null : (uint?)Convert.ToUInt32(mechanism.Value);

                if (Platform.StructPackingSize == 0)
                    _params40 = new HighLevelAPI40.MechanismParams.CkKipParams(uintMechanism, key.ObjectHandle40, seed);
                else
                    _params41 = new HighLevelAPI41.MechanismParams.CkKipParams(uintMechanism, key.ObjectHandle41, seed);
            }
            else
            {
                if (Platform.StructPackingSize == 0)
                    _params80 = new HighLevelAPI80.MechanismParams.CkKipParams(mechanism, key.ObjectHandle80, seed);
                else
                    _params81 = new HighLevelAPI81.MechanismParams.CkKipParams(mechanism, key.ObjectHandle81, seed);
            }
        }
开发者ID:Pkcs11Interop,项目名称:Pkcs11Interop,代码行数:25,代码来源:CkKipParams.cs

示例13: CkCmsSigParams

        /// <summary>
        /// Initializes a new instance of the CkCmsSigParams class.
        /// </summary>
        /// <param name='certificateHandle'>Object handle for a certificate associated with the signing key</param>
        /// <param name='signingMechanism'>Mechanism to use when signing a constructed CMS SignedAttributes value</param>
        /// <param name='digestMechanism'>Mechanism to use when digesting the data</param>
        /// <param name='contentType'>String indicating complete MIME Content-type of message to be signed or null if the message is a MIME object</param>
        /// <param name='requestedAttributes'>DER-encoded list of CMS Attributes the caller requests to be included in the signed attributes</param>
        /// <param name='requiredAttributes'>DER-encoded list of CMS Attributes (with accompanying values) required to be included in the resulting signed attributes</param>
        public CkCmsSigParams(ObjectHandle certificateHandle, ulong? signingMechanism, ulong? digestMechanism, string contentType, byte[] requestedAttributes, byte[] requiredAttributes)
        {
            if (Platform.UnmanagedLongSize == 4)
            {
                uint? uintSigningMechanism = (signingMechanism == null) ? null : (uint?)Convert.ToUInt32(signingMechanism.Value);
                uint? uintDigestMechanism = (digestMechanism == null) ? null : (uint?)Convert.ToUInt32(digestMechanism.Value);

                if (Platform.StructPackingSize == 0)
                    _params40 = new HighLevelAPI40.MechanismParams.CkCmsSigParams(certificateHandle.ObjectHandle40, uintSigningMechanism, uintDigestMechanism, contentType, requestedAttributes, requiredAttributes);
                else
                    _params41 = new HighLevelAPI41.MechanismParams.CkCmsSigParams(certificateHandle.ObjectHandle41, uintSigningMechanism, uintDigestMechanism, contentType, requestedAttributes, requiredAttributes);
            }
            else
            {
                if (Platform.StructPackingSize == 0)
                    _params80 = new HighLevelAPI80.MechanismParams.CkCmsSigParams(certificateHandle.ObjectHandle80, signingMechanism, digestMechanism, contentType, requestedAttributes, requiredAttributes);
                else
                    _params81 = new HighLevelAPI81.MechanismParams.CkCmsSigParams(certificateHandle.ObjectHandle81, signingMechanism, digestMechanism, contentType, requestedAttributes, requiredAttributes);
            }
        }
开发者ID:Pkcs11Interop,项目名称:Pkcs11Interop,代码行数:29,代码来源:CkCmsSigParams.cs

示例14: add

 public static extern void add(ListHandle listHandle, ObjectHandle objectHandle, out NativeException ex);
开发者ID:realm,项目名称:realm-dotnet,代码行数:1,代码来源:ListHandle.cs

示例15: move

 public static extern IntPtr move(ListHandle listHandle, ObjectHandle objectHandle, IntPtr targetIndex, out NativeException ex);
开发者ID:realm,项目名称:realm-dotnet,代码行数:1,代码来源:ListHandle.cs


注:本文中的ObjectHandle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。