Philippe Reynes | 3148e42 | 2019-12-18 18:25:41 +0100 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (c) 2019, Softathome |
| 4 | */ |
| 5 | |
| 6 | #ifndef _AES_H |
| 7 | #define _AES_H |
| 8 | |
| 9 | #include <errno.h> |
| 10 | #include <image.h> |
| 11 | |
| 12 | #if IMAGE_ENABLE_ENCRYPT |
| 13 | int image_aes_encrypt(struct image_cipher_info *info, |
| 14 | const unsigned char *data, int size, |
| 15 | unsigned char **cipher, int *cipher_len); |
| 16 | int image_aes_add_cipher_data(struct image_cipher_info *info, void *keydest); |
| 17 | #else |
| 18 | int image_aes_encrypt(struct image_cipher_info *info, |
| 19 | const unsigned char *data, int size, |
| 20 | unsigned char **cipher, int *cipher_len) |
| 21 | { |
| 22 | return -ENXIO; |
| 23 | } |
| 24 | |
| 25 | int image_aes_add_cipher_data(struct image_cipher_info *info, void *keydest) |
| 26 | { |
| 27 | return -ENXIO; |
| 28 | } |
| 29 | #endif /* IMAGE_ENABLE_ENCRYPT */ |
| 30 | |
| 31 | #endif |