Copies this object, creating a new object for the copy

Namespace:  Cryptware.NCryptoki
Assembly:  NCryptoki (in NCryptoki.dll)

Syntax

Visual Basic (Declaration)
Public Function Copy ( _
	attList As CryptokiCollection _
) As CryptokiObject
C#
public CryptokiObject Copy(
	CryptokiCollection attList
)
Visual C++
public:
virtual CryptokiObject^ Copy(
	CryptokiCollection^ attList
) sealed
JavaScript
function copy(attList);

Parameters

attList
Type: Cryptware.NCryptoki..::..CryptokiCollection
Attributes to add the copied object

Return Value

the object copied

Implements

ICryptokiObject..::..Copy(CryptokiCollection)

Remarks

The template may specify new values for any attributes of the object that can ordinarily be modified (e.g., in the course of copying a secret key, a key’s CKA_EXTRACTABLE attribute may be changed from CK_TRUE to CK_FALSE, but not the other way around. If this change is made, the new key’s CKA_NEVER_EXTRACTABLE attribute will have the value CK_FALSE. Similarly, the template may specify that the new key’s CKA_SENSITIVE attribute be CK_TRUE; the new key will have the same value for its CKA_ALWAYS_SENSITIVE attribute as the original key). It may also specify new values of the CKA_TOKEN and CKA_PRIVATE attributes (e.g., to copy a session object to a token object). If the template specifies a value of an attribute which is incompatible with other existing attributes of the object, the call fails with the return code CKR_TEMPLATE_INCONSISTENT.
If a call to CopyObject cannot support the precise template supplied to it, it will fail and return without creating any object. Only session objects can be created during a read-only session. Only public objects can be created unless the normal user is logged in.

Exceptions

ExceptionCondition
Cryptware.NCryptoki..::..CryptokiExceptionCryptokiException if a native error occurs

See Also