unleashed-firmware/applications/plugins/totp/services/crypto/crypto.h

16 lines
527 B
C
Raw Normal View History

#pragma once
#include "../../types/plugin_state.h"
uint8_t* totp_crypto_encrypt(
const uint8_t* plain_data,
2022-11-10 05:32:21 +00:00
const size_t plain_data_length,
const uint8_t* iv,
2022-11-10 05:32:21 +00:00
size_t* encrypted_data_length);
uint8_t* totp_crypto_decrypt(
const uint8_t* encrypted_data,
2022-11-10 05:32:21 +00:00
const size_t encrypted_data_length,
const uint8_t* iv,
2022-11-10 05:32:21 +00:00
size_t* decrypted_data_length);
void totp_crypto_seed_iv(PluginState* plugin_state, const uint8_t* pin, uint8_t pin_length);
bool totp_crypto_verify_key(const PluginState* plugin_state);