/*
 * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
 *
 * Author:     Iceyer <me@iceyer.net>
 *
 * Maintainer: Iceyer <me@iceyer.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _DEEPIN_LICENSE_CBC_AES_CRYPT_H_
#define _DEEPIN_LICENSE_CBC_AES_CRYPT_H_

#ifdef __cplusplus
extern "C" {
#endif

extern int license_aes_encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *ciphertext);
extern int license_aes_decrypt(unsigned char *ciphertext, int ciphertext_len, unsigned char *plaintext);

extern int aes_encrypt(unsigned char *plaintext, int plaintext_len, unsigned char *key,
                       unsigned char *iv, unsigned char *ciphertext);
extern int aes_decrypt(unsigned char *ciphertext, int ciphertext_len, unsigned char *key,
                       unsigned char *iv, unsigned char *plaintext);

#ifdef __cplusplus
}
#endif

#endif //_DEEPIN_LICENSE_CBC_AES_CRYPT_H_
