本文整理汇总了C#中CKA类的典型用法代码示例。如果您正苦于以下问题:C# CKA类的具体用法?C# CKA怎么用?C# CKA使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CKA类属于命名空间,在下文中一共展示了CKA类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateAttribute
/// <summary>
/// Creates attribute of given type with CKO value
/// </summary>
/// <param name="type">Attribute type</param>
/// <param name="value">Attribute value</param>
/// <returns>Attribute of given type with CKO value</returns>
public static CK_ATTRIBUTE CreateAttribute(CKA type, CKO value)
{
return CreateAttribute((uint)type, (uint)value);
}
示例2: ObjectAttribute
/// <summary>
/// Creates attribute of given type with ulong value
/// </summary>
/// <param name="type">Attribute type</param>
/// <param name="value">Attribute value</param>
public ObjectAttribute(CKA type, ulong value)
{
if (Platform.UnmanagedLongSize == 4)
{
if (Platform.StructPackingSize == 0)
_objectAttribute40 = new HighLevelAPI40.ObjectAttribute(Convert.ToUInt32(type), Convert.ToUInt32(value));
else
_objectAttribute41 = new HighLevelAPI41.ObjectAttribute(Convert.ToUInt32(type), Convert.ToUInt32(value));
}
else
{
if (Platform.StructPackingSize == 0)
_objectAttribute80 = new HighLevelAPI80.ObjectAttribute(type, value);
else
_objectAttribute81 = new HighLevelAPI81.ObjectAttribute(type, value);
}
}