SMS4SetKey
SMS4SetKey
Resets the SMS4 secret key in the initialized
IppsSMS4Spec
context.Syntax
IppStatus ippsSMS4SetKey(const Ipp8u*
pKey
, int
keyLen
, IppsSMS4Spec*
pCtx
);
Include Files
ippcp.h
Parameters
- pKey
- Pointer to the SMS4 key.
- keyLen
- Length of the secret key.
- pCtx
- Pointer to the initializedIppsSMS4Speccontext.
Description
This function resets the SMS4 secret key in the initialized
IppsSMS4Spec
context with the user-supplied secret key.If the
pKey
pointer is NULL
, the function resets the context with the zero key, which can help you to clean up the actual secret before releasing the context.Return Values
- ippStsNoErr
- Indicates no error. Any other value indicates an error or warning.
- ippStsNullPtrErr
- Indicates an error condition if thepCtxpointer isNULL.
- ippStsLengthErr
- Returns an error condition ifkeyLenis not equal to 16.
- ippStsContextMatchErr
- Indicates an error condition if the context parameter does not match the operation.