feat:aes-cfb encrypt and decrypt

Signed-off-by: weiqian <weiqian22@huawei.com>
This commit is contained in:
weiqian 2023-11-05 21:45:31 +08:00
parent 5780b0d32e
commit 97c7151619
3 changed files with 16 additions and 1 deletions

View File

@ -39,7 +39,7 @@ typedef struct {
} AesCipherKey;
typedef struct {
uint8_t *key;
const uint8_t *key;
uint32_t len;
} EncryptKey;
@ -60,6 +60,9 @@ int32_t SoftBusGenerateHmacHash(
int32_t SoftbusAesCfbRootEncrypt(const AesInputData *inData, const EncryptKey *randomKey, EncryptKey *rootKey,
int32_t encMode, AesOutputData *outData);
int32_t SoftbusAesCfbEncrypt(
const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData);
int32_t SoftbusAesGcmEncrypt(
const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData);

View File

@ -28,6 +28,12 @@ int32_t SoftbusAesCfbRootEncrypt(const AesInputData *inData, const EncryptKey *r
return SOFTBUS_NOT_IMPLEMENT;
}
int32_t SoftbusAesCfbEncrypt(
const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData)
{
return SOFTBUS_NOT_IMPLEMENT;
}
int32_t SoftbusAesGcmEncrypt(
const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData)
{

View File

@ -433,4 +433,10 @@ int32_t SoftbusAesGcmEncrypt(
outData->data = encryptData;
outData->len = encryptDataLen;
return SOFTBUS_OK;
}
int32_t SoftbusAesCfbEncrypt(
const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData)
{
return SOFTBUS_NOT_IMPLEMENT;
}