Files

40 lines
1.0 KiB
C

/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
*/
#ifndef __KEY_STORE_H__
#define __KEY_STORE_H__
/**
* @brief This function init the key store.
* @return
* #0 if OK. \n
* #others if FAIL. \n
*/
int32_t aml_key_store_init(void);
/**
* @brief This function read the unify key.
* @param[in] buf: The buffer of key.
* @param[in] len: The buffer len of key.
* @param[out] actual_length: The real length of the data readed.
* @return
* #0 if OK. \n
* #others if FAIL. \n
*/
int32_t aml_key_read(uint8_t *buf, uint32_t len, uint32_t *actual_length);
/**
* @brief This function write the unify key.
* @param[in] buf: The buffer of key.
* @param[in] len: The buffer len of key.
* @param[out] actual_length: The real length of the write data.
* @return
* #0 if OK. \n
* #others if FAIL. \n
*/
int32_t aml_key_write(uint8_t *buf, uint32_t len, uint32_t *actual_length);
#endif