diff options
| author | Stefano Babic <[email protected]> | 2020-01-20 15:35:43 +0100 |
|---|---|---|
| committer | Stefano Babic <[email protected]> | 2020-01-20 15:36:13 +0100 |
| commit | 0e78c9181c6460d10255bfb6dc6d1f2d6912717e (patch) | |
| tree | 871a723fd26e0d04328e2ca361228e7c34c627f6 /include/u-boot | |
| parent | 9c27310ac23ce1966f9629d73973c458412a0085 (diff) | |
| parent | 2d2f91a480f6849a8548414003d36fa030d434f1 (diff) | |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <[email protected]>
Diffstat (limited to 'include/u-boot')
| -rw-r--r-- | include/u-boot/aes.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/u-boot/aes.h b/include/u-boot/aes.h new file mode 100644 index 00000000000..32281041de2 --- /dev/null +++ b/include/u-boot/aes.h @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (c) 2019, Softathome + */ + +#ifndef _AES_H +#define _AES_H + +#include <errno.h> +#include <image.h> + +#if IMAGE_ENABLE_ENCRYPT +int image_aes_encrypt(struct image_cipher_info *info, + const unsigned char *data, int size, + unsigned char **cipher, int *cipher_len); +int image_aes_add_cipher_data(struct image_cipher_info *info, void *keydest); +#else +int image_aes_encrypt(struct image_cipher_info *info, + const unsigned char *data, int size, + unsigned char **cipher, int *cipher_len) +{ + return -ENXIO; +} + +int image_aes_add_cipher_data(struct image_cipher_info *info, void *keydest) +{ + return -ENXIO; +} +#endif /* IMAGE_ENABLE_ENCRYPT */ + +#if IMAGE_ENABLE_DECRYPT +int image_aes_decrypt(struct image_cipher_info *info, + const void *cipher, size_t cipher_len, + void **data, size_t *size); +#else +int image_aes_decrypt(struct image_cipher_info *info, + const void *cipher, size_t cipher_len, + void **data, size_t *size) +{ + return -ENXIO; +} +#endif /* IMAGE_ENABLE_DECRYPT */ + +#endif |
