[FL-1906] Documentation: add Doxyfile, prepare sources for doxygen. (#741)

* Documentation: add Doxyfile, prepare sources for doxygen.

* Update ReadMe and remove obsolete CLA

* Add contribution guide

* Contributing: update text

* Correct spelling
This commit is contained in:
あく
2021-10-03 13:36:05 +03:00
committed by GitHub
parent 1208a5077f
commit 89a6c09a7a
66 changed files with 4846 additions and 1224 deletions

View File

@@ -1,3 +1,7 @@
/**
* @file furi-hal-crypto.h
* Cryptography HAL API
*/
#pragma once
#include <stdbool.h>
@@ -24,43 +28,54 @@ typedef struct {
uint8_t* data;
} FuriHalCryptoKey;
/** Initialize cryptography layer
* This includes AES engines, PKA and RNG
/** Initialize cryptography layer This includes AES engines, PKA and RNG
*/
void furi_hal_crypto_init();
/** Store key in crypto storage
* @param key - FuriHalCryptoKey to store. Only Master, Simple or Encrypted
* @param slot - pinter to int where store slot number will be saved
* @return true on success
*
* @param key FuriHalCryptoKey to store. Only Master, Simple or
* Encrypted
* @param slot pinter to int where store slot number will be saved
*
* @return true on success
*/
bool furi_hal_crypto_store_add_key(FuriHalCryptoKey* key, uint8_t* slot);
/** Init AES engine and load key from crypto store
* @param slot - store slot number
* @return true on success
*
* @param slot store slot number
* @param[in] iv pointer to 16 bytes Initialization Vector data
*
* @return true on success
*/
bool furi_hal_crypto_store_load_key(uint8_t slot, const uint8_t* iv);
/** Unload key engine and deinit AES engine
* @param slot - store slot number
* @return true on success
*
* @param slot store slot number
*
* @return true on success
*/
bool furi_hal_crypto_store_unload_key(uint8_t slot);
/** Encrypt data
* @param input - pointer to input data
* @param output - pointer to output data
* @param size - input/output buffer size in bytes
* @return true on success
*
* @param input pointer to input data
* @param output pointer to output data
* @param size input/output buffer size in bytes
*
* @return true on success
*/
bool furi_hal_crypto_encrypt(const uint8_t *input, uint8_t *output, size_t size);
/** Decrypt data
* @param input - pointer to input data
* @param output - pointer to output data
* @param size - input/output buffer size in bytes
* @return true on success
*
* @param input pointer to input data
* @param output pointer to output data
* @param size input/output buffer size in bytes
*
* @return true on success
*/
bool furi_hal_crypto_decrypt(const uint8_t *input, uint8_t *output, size_t size);