Back to home page

Enduro/X

 
 

    


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