static uint32_t convertToMode(SECCRYPTOMGRCORE_OPERATION_MODE operationMode)
{
    TEEC_OperationMode TEEC_Variable;
    switch (operationMode)
    {
        case SECCRYPTOMGRCORE_OPMODE_ENCRYPT:
            TEEC_Variable = TEEC_MODE_ENCRYPT;
            break;
        case SECCRYPTOMGRCORE_OPMODE_DECRYPT:
            TEEC_Variable = TEEC_MODE_DECRYPT;
            break;
        case SECCRYPTOMGRCORE_OPMODE_SIGN:
            TEEC_Variable = TEEC_MODE_SIGN;
            break;
        case SECCRYPTOMGRCORE_OPMODE_VERIFY:
            TEEC_Variable = TEEC_MODE_VERIFY;
            break;
        default:
            TEEC_Variable = TEEC_MODE_INVALID;
	    break;
    }
    return TEEC_Variable;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: