blob: 4fb2cb75027342027600422a6297690fe0ce5439 [file] [log] [blame]
Philippe Reynes3148e422019-12-18 18:25:41 +01001/* 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
13int image_aes_encrypt(struct image_cipher_info *info,
14 const unsigned char *data, int size,
15 unsigned char **cipher, int *cipher_len);
16int image_aes_add_cipher_data(struct image_cipher_info *info, void *keydest);
17#else
18int 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
25int 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