コード例 #1
0
void TEE_DigestUpdate(TEE_OperationHandle operation,
		      void *chunk, size_t chunkSize)
{
	TEE_Result res;

	if (operation == TEE_HANDLE_NULL || chunk == NULL)
		TEE_Panic(0);
	if (operation->info.operationClass != TEE_OPERATION_DIGEST)
		TEE_Panic(0);
	res = utee_hash_update(operation->state, chunk, chunkSize);
	if (res != TEE_SUCCESS)
		TEE_Panic(res);
}
コード例 #2
0
void TEE_DigestUpdate(TEE_OperationHandle operation,
		      void *chunk, uint32_t chunkSize)
{
	TEE_Result res = TEE_ERROR_GENERIC;

	if (operation == TEE_HANDLE_NULL ||
	    operation->info.operationClass != TEE_OPERATION_DIGEST)
		TEE_Panic(0);

	operation->operationState = TEE_OPERATION_STATE_ACTIVE;

	res = utee_hash_update(operation->state, chunk, chunkSize);
	if (res != TEE_SUCCESS)
		TEE_Panic(res);
}
コード例 #3
0
void TEE_MACUpdate(TEE_OperationHandle op, const void *chunk, size_t chunkSize)
{
	TEE_Result res;

	if (op == TEE_HANDLE_NULL || (chunk == NULL && chunkSize != 0))
		TEE_Panic(0);
	if (op->info.operationClass != TEE_OPERATION_MAC)
		TEE_Panic(0);
	if ((op->info.handleState & TEE_HANDLE_FLAG_INITIALIZED) == 0)
		TEE_Panic(0);

	res = utee_hash_update(op->state, chunk, chunkSize);
	if (res != TEE_SUCCESS)
		TEE_Panic(res);
}