/*
 * app_cipher.h
 */

#ifndef _TZ_ICCC_APP_CIPHER_H_
#define _TZ_ICCC_APP_CIPHER_H_

#include "icccOperations_v4.h"

#define TZ_API_OK 0
#define TZ_API_ERROR 1

#define SIGN_ATTR_COUNT 3
#define SHA256_DIGEST_LENGTH 32
#define TEE_MAX_KEY_SIZE 256
#define MAX_SIGNATURE_SIZE 256

uint32_t Iccc_digest_SHA256(
    uint8_t* messageData,
    uint32_t messageLen,
    uint8_t* digest,
    uint32_t* pDigestLen
);

uint32_t Iccc_sign_CKM_SHA256_RSA_PKCS_PSS(
    uint8_t* keyMod,
    uint32_t keyModLen,
    uint8_t* keyPubExp,
    uint32_t keyPubExpLen,
    uint8_t* keyPriExp,
    uint32_t keyPriExpLen,
    uint8_t* messageData,
    uint32_t messageLen,
    uint8_t* signature,
    uint32_t* pSigLen
);

#endif // _TZ_ICCC_APP_CIPHER_H_
