Back to home page

Enduro/X

 
 

    


0001 /**
0002  * @brief Cryptography related
0003  *
0004  * @file excrypto.h
0005  */
0006 /* -----------------------------------------------------------------------------
0007  * Enduro/X Middleware Platform for Distributed Transaction Processing
0008  * Copyright (C) 2009-2016, ATR Baltic, Ltd. All Rights Reserved.
0009  * Copyright (C) 2017-2018, Mavimax, Ltd. All Rights Reserved.
0010  * This software is released under one of the following licenses:
0011  * GPL or Mavimax's license for commercial use.
0012  * -----------------------------------------------------------------------------
0013  * GPL license:
0014  * 
0015  * This program is free software; you can redistribute it and/or modify it under
0016  * the terms of the GNU General Public License as published by the Free Software
0017  * Foundation; either version 3 of the License, or (at your option) any later
0018  * version.
0019  *
0020  * This program is distributed in the hope that it will be useful, but WITHOUT ANY
0021  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
0022  * PARTICULAR PURPOSE. See the GNU General Public License for more details.
0023  *
0024  * You should have received a copy of the GNU General Public License along with
0025  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
0026  * Place, Suite 330, Boston, MA 02111-1307 USA
0027  *
0028  * -----------------------------------------------------------------------------
0029  * A commercial use license is available from Mavimax, Ltd
0030  * contact@mavimax.com
0031  * -----------------------------------------------------------------------------
0032  */
0033 #ifndef EXCRYPTO_H
0034 #define EXCRYPTO_H
0035 
0036 #ifdef  __cplusplus
0037 extern "C" {
0038 #endif
0039 /*---------------------------Includes-----------------------------------*/
0040 #include <ndrx_config.h>
0041 /*---------------------------Externs------------------------------------*/
0042 /*---------------------------Macros-------------------------------------*/
0043 #define NDRX_ENCKEY_BUFSZ       21 /* string with EOS */
0044 #define NDRX_ENC_BLOCK_SIZE     16
0045 /*---------------------------Enums--------------------------------------*/
0046 /*---------------------------Typedefs-----------------------------------*/
0047 /*---------------------------Globals------------------------------------*/
0048 /*---------------------------Statics------------------------------------*/
0049 /*---------------------------Prototypes---------------------------------*/
0050 
0051 extern NDRX_API int ndrx_crypto_getkey_std(char *key_out, int key_out_bufsz);
0052 extern NDRX_API int ndrx_crypto_enc(char *input, long ilen, char *output, long *olen);
0053 extern NDRX_API int ndrx_crypto_dec_int(char *input, long ilen, char *output, long *olen);
0054 extern NDRX_API int ndrx_crypto_dec(char *input, long ilen, char *output, long *olen);
0055 extern NDRX_API int ndrx_crypto_enc_string(char *input, char *output, long olen);
0056 extern NDRX_API int ndrx_crypto_dec_string(char *input, char *output, long olen);
0057 
0058     
0059 #ifdef  __cplusplus
0060 }
0061 #endif
0062 
0063 #endif  /* EXCRYPTO_H */
0064