APUE Learning Example Source Code
guowenxue
2018-12-20 ca59c35811fe08198c555fa71200a8520fc11601
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/********************************************************************************
 *      Copyright:  (C) 2018 LingYun IoT System Studio
 *                  All rights reserved.
 *
 *       Filename:  crypto.h
 *    Description:  This head file is LingYun crypto library head file
 *
 *        Version:  1.0.0(2018年12月20日)
 *         Author:  Guo Wenxue <guowenxue@gmail.com>
 *      ChangeLog:  1, Release initial version on "2018年12月20日 12时32分09秒"
 *                 
 ********************************************************************************/
 
#ifndef  _CRYPTO_H_
#define  _CRYPTO_H_
 
/* Description: This function used to encrypto message in $plaintext, and put ciphertext into $ciphertext 
 * Return value:  0: Success <0: Failure
 */
extern int encrypt(char *plaintext, char *ciphertext, int size);
 
/* Description: This function used to decrypto message in $ciphertext, and put plaintext into $plaintext 
 * Return value:  0: Success <0: Failure
 */
extern int decrypt(char *ciphertext, char *plaintext, int size);
 
#endif   /* ----- #ifndef _CRYPTO_H_  ----- */