Initial commit: TXW82x FPV v2.7.0.7-42229 SDK + project sources
This commit is contained in:
23
sdk/hal/sysaes.c
Normal file
23
sdk/hal/sysaes.c
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "typesdef.h"
|
||||
#include "list.h"
|
||||
#include "errno.h"
|
||||
#include "dev.h"
|
||||
#include "hal/sysaes.h"
|
||||
|
||||
int32 sysaes_encrypt(struct sysaes_dev *dev, struct sysaes_para *para)
|
||||
{
|
||||
if (dev && ((const struct aes_hal_ops *)dev->dev.ops)->encrypt) {
|
||||
return ((const struct aes_hal_ops *)dev->dev.ops)->encrypt(dev, para);
|
||||
}
|
||||
return RET_ERR;
|
||||
}
|
||||
|
||||
int32 sysaes_decrypt(struct sysaes_dev *dev, struct sysaes_para *para)
|
||||
{
|
||||
if (dev && ((const struct aes_hal_ops *)dev->dev.ops)->decrypt) {
|
||||
return ((const struct aes_hal_ops *)dev->dev.ops)->decrypt(dev, para);
|
||||
}
|
||||
return RET_ERR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user