Retrieves the current AES counter value.
RFC 3686 defines the AES counter mode encryption scheme and the format of the AES counter value. The counter block must be 16 bytes long (i.e., the AES block size) and its format is defined either by the RFC 3686 "CTRBLK" specification or an application dependent format.
- Parameters
-
pBuffer | [ in ] A pointer to a buffer holding the AES counter's 16 bytes |
cBuffer | [ in ] Number of entries in the buffer pointed to by pBuffer. |
pWritten | [ out ] Optional can be NULL, returns the number of bytes written into pBuffer. This parameter cannot be NULL when pBuffer is also NULL. |
- Returns
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | Object is in an incorrect state. |
P6R::eInvalidArg | pBuffer and pWritten are both NULL, or the buffer size is zero. |
P6R::eWrongKeyClass | The class of this key is not CKC_SYMMETRIC. |
P6R::eTooSmall | The buffer pointed to by pBuffer is not large enough to hold the counter data. |