securityanddataprivacytools/securitytools/openssllib/import/inc/openssl/des.h
author Santosh V Patil <santosh.v.patil@nokia.com>
Mon, 19 Apr 2010 11:11:16 +0530
branchRCL_1
changeset 46 de7f90723dab
permissions -rw-r--r--
Fix for Bug 2442 - Symbian^2 package build failure.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
46
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     1
/* crypto/des/des.h */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     2
/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     3
 * All rights reserved.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     4
 *
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     5
 * This package is an SSL implementation written
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     6
 * by Eric Young (eay@cryptsoft.com).
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     7
 * The implementation was written so as to conform with Netscapes SSL.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     8
 * 
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
     9
 * This library is free for commercial and non-commercial use as long as
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    10
 * the following conditions are aheared to.  The following conditions
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    11
 * apply to all code found in this distribution, be it the RC4, RSA,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    12
 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    13
 * included with this distribution is covered by the same copyright terms
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    14
 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    15
 * 
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    16
 * Copyright remains Eric Young's, and as such any Copyright notices in
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    17
 * the code are not to be removed.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    18
 * If this package is used in a product, Eric Young should be given attribution
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    19
 * as the author of the parts of the library used.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    20
 * This can be in the form of a textual message at program startup or
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    21
 * in documentation (online or textual) provided with the package.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    22
 * 
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    23
 * Redistribution and use in source and binary forms, with or without
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    24
 * modification, are permitted provided that the following conditions
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    25
 * are met:
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    26
 * 1. Redistributions of source code must retain the copyright
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    27
 *    notice, this list of conditions and the following disclaimer.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    28
 * 2. Redistributions in binary form must reproduce the above copyright
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    29
 *    notice, this list of conditions and the following disclaimer in the
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    30
 *    documentation and/or other materials provided with the distribution.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    31
 * 3. All advertising materials mentioning features or use of this software
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    32
 *    must display the following acknowledgement:
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    33
 *    "This product includes cryptographic software written by
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    34
 *     Eric Young (eay@cryptsoft.com)"
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    35
 *    The word 'cryptographic' can be left out if the rouines from the library
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    36
 *    being used are not cryptographic related :-).
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    37
 * 4. If you include any Windows specific code (or a derivative thereof) from 
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    38
 *    the apps directory (application code) you must include an acknowledgement:
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    39
 *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    40
 * 
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    41
 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    42
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    43
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    44
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    45
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    46
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    47
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    48
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    49
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    50
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    51
 * SUCH DAMAGE.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    52
 * 
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    53
 * The licence and distribution terms for any publically available version or
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    54
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    55
 * copied and put under another distribution licence
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    56
 * [including the GNU Public Licence.]
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    57
 */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    58
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    59
#ifndef HEADER_NEW_DES_H
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    60
#define HEADER_NEW_DES_H
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    61
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    62
#ifdef OPENSSL_NO_DES
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    63
#error DES is disabled.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    64
#endif
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    65
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    66
#include <openssl/opensslconf.h> /* DES_LONG */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    67
#include <openssl/e_os2.h>	/* OPENSSL_EXTERN */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    68
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    69
#ifdef OPENSSL_BUILD_SHLIBCRYPTO
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    70
# undef OPENSSL_EXTERN
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    71
# define OPENSSL_EXTERN OPENSSL_EXPORT
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    72
#endif
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    73
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    74
#ifdef  __cplusplus
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    75
extern "C" {
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    76
#endif
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    77
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    78
typedef unsigned char DES_cblock[8];
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    79
typedef /* const */ unsigned char const_DES_cblock[8];
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    80
/* With "const", gcc 2.8.1 on Solaris thinks that DES_cblock *
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    81
 * and const_DES_cblock * are incompatible pointer types. */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    82
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    83
typedef struct DES_ks
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    84
    {
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    85
    union
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    86
	{
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    87
	DES_cblock cblock;
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    88
	/* make sure things are correct size on machines with
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    89
	 * 8 byte longs */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    90
	DES_LONG deslong[2];
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    91
	} ks[16];
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    92
    } DES_key_schedule;
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    93
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    94
#ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    95
# ifndef OPENSSL_ENABLE_OLD_DES_SUPPORT
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    96
#  define OPENSSL_ENABLE_OLD_DES_SUPPORT
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    97
# endif
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    98
#endif
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
    99
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   100
#ifdef OPENSSL_ENABLE_OLD_DES_SUPPORT
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   101
# include <openssl/des_old.h>
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   102
#endif
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   103
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   104
#define DES_KEY_SZ 	(sizeof(DES_cblock))
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   105
#define DES_SCHEDULE_SZ (sizeof(DES_key_schedule))
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   106
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   107
#define DES_ENCRYPT	1
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   108
#define DES_DECRYPT	0
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   109
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   110
#define DES_CBC_MODE	0
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   111
#define DES_PCBC_MODE	1
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   112
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   113
#define DES_ecb2_encrypt(i,o,k1,k2,e) \
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   114
	DES_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e))
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   115
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   116
#define DES_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   117
	DES_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e))
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   118
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   119
#define DES_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   120
	DES_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e))
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   121
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   122
#define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   123
	DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   124
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   125
OPENSSL_DECLARE_GLOBAL(int,DES_check_key);	/* defaults to false */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   126
#define DES_check_key OPENSSL_GLOBAL_REF(DES_check_key)
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   127
OPENSSL_DECLARE_GLOBAL(int,DES_rw_mode);	/* defaults to DES_PCBC_MODE */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   128
#define DES_rw_mode OPENSSL_GLOBAL_REF(DES_rw_mode)
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   129
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   130
const char *DES_options(void);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   131
void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   132
		      DES_key_schedule *ks1,DES_key_schedule *ks2,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   133
		      DES_key_schedule *ks3, int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   134
DES_LONG DES_cbc_cksum(const unsigned char *input,DES_cblock *output,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   135
		       long length,DES_key_schedule *schedule,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   136
		       const_DES_cblock *ivec);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   137
/* DES_cbc_encrypt does not update the IV!  Use DES_ncbc_encrypt instead. */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   138
void DES_cbc_encrypt(const unsigned char *input,unsigned char *output,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   139
		     long length,DES_key_schedule *schedule,DES_cblock *ivec,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   140
		     int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   141
void DES_ncbc_encrypt(const unsigned char *input,unsigned char *output,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   142
		      long length,DES_key_schedule *schedule,DES_cblock *ivec,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   143
		      int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   144
void DES_xcbc_encrypt(const unsigned char *input,unsigned char *output,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   145
		      long length,DES_key_schedule *schedule,DES_cblock *ivec,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   146
		      const_DES_cblock *inw,const_DES_cblock *outw,int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   147
void DES_cfb_encrypt(const unsigned char *in,unsigned char *out,int numbits,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   148
		     long length,DES_key_schedule *schedule,DES_cblock *ivec,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   149
		     int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   150
void DES_ecb_encrypt(const_DES_cblock *input,DES_cblock *output,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   151
		     DES_key_schedule *ks,int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   152
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   153
/* 	This is the DES encryption function that gets called by just about
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   154
	every other DES routine in the library.  You should not use this
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   155
	function except to implement 'modes' of DES.  I say this because the
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   156
	functions that call this routine do the conversion from 'char *' to
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   157
	long, and this needs to be done to make sure 'non-aligned' memory
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   158
	access do not occur.  The characters are loaded 'little endian'.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   159
	Data is a pointer to 2 unsigned long's and ks is the
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   160
	DES_key_schedule to use.  enc, is non zero specifies encryption,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   161
	zero if decryption. */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   162
void DES_encrypt1(DES_LONG *data,DES_key_schedule *ks, int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   163
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   164
/* 	This functions is the same as DES_encrypt1() except that the DES
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   165
	initial permutation (IP) and final permutation (FP) have been left
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   166
	out.  As for DES_encrypt1(), you should not use this function.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   167
	It is used by the routines in the library that implement triple DES.
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   168
	IP() DES_encrypt2() DES_encrypt2() DES_encrypt2() FP() is the same
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   169
	as DES_encrypt1() DES_encrypt1() DES_encrypt1() except faster :-). */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   170
void DES_encrypt2(DES_LONG *data,DES_key_schedule *ks, int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   171
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   172
void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   173
		  DES_key_schedule *ks2, DES_key_schedule *ks3);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   174
void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   175
		  DES_key_schedule *ks2, DES_key_schedule *ks3);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   176
void DES_ede3_cbc_encrypt(const unsigned char *input,unsigned char *output, 
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   177
			  long length,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   178
			  DES_key_schedule *ks1,DES_key_schedule *ks2,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   179
			  DES_key_schedule *ks3,DES_cblock *ivec,int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   180
void DES_ede3_cbcm_encrypt(const unsigned char *in,unsigned char *out,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   181
			   long length,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   182
			   DES_key_schedule *ks1,DES_key_schedule *ks2,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   183
			   DES_key_schedule *ks3,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   184
			   DES_cblock *ivec1,DES_cblock *ivec2,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   185
			   int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   186
void DES_ede3_cfb64_encrypt(const unsigned char *in,unsigned char *out,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   187
			    long length,DES_key_schedule *ks1,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   188
			    DES_key_schedule *ks2,DES_key_schedule *ks3,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   189
			    DES_cblock *ivec,int *num,int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   190
void DES_ede3_ofb64_encrypt(const unsigned char *in,unsigned char *out,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   191
			    long length,DES_key_schedule *ks1,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   192
			    DES_key_schedule *ks2,DES_key_schedule *ks3,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   193
			    DES_cblock *ivec,int *num);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   194
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   195
void DES_xwhite_in2out(const_DES_cblock *DES_key,const_DES_cblock *in_white,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   196
		       DES_cblock *out_white);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   197
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   198
int DES_enc_read(int fd,void *buf,int len,DES_key_schedule *sched,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   199
		 DES_cblock *iv);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   200
int DES_enc_write(int fd,const void *buf,int len,DES_key_schedule *sched,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   201
		  DES_cblock *iv);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   202
char *DES_fcrypt(const char *buf,const char *salt, char *ret);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   203
char *DES_crypt(const char *buf,const char *salt);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   204
void DES_ofb_encrypt(const unsigned char *in,unsigned char *out,int numbits,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   205
		     long length,DES_key_schedule *schedule,DES_cblock *ivec);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   206
void DES_pcbc_encrypt(const unsigned char *input,unsigned char *output,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   207
		      long length,DES_key_schedule *schedule,DES_cblock *ivec,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   208
		      int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   209
DES_LONG DES_quad_cksum(const unsigned char *input,DES_cblock output[],
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   210
			long length,int out_count,DES_cblock *seed);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   211
int DES_random_key(DES_cblock *ret);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   212
void DES_set_odd_parity(DES_cblock *key);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   213
int DES_check_key_parity(const_DES_cblock *key);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   214
int DES_is_weak_key(const_DES_cblock *key);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   215
/* DES_set_key (= set_key = DES_key_sched = key_sched) calls
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   216
 * DES_set_key_checked if global variable DES_check_key is set,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   217
 * DES_set_key_unchecked otherwise. */
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   218
int DES_set_key(const_DES_cblock *key,DES_key_schedule *schedule);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   219
int DES_key_sched(const_DES_cblock *key,DES_key_schedule *schedule);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   220
int DES_set_key_checked(const_DES_cblock *key,DES_key_schedule *schedule);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   221
void DES_set_key_unchecked(const_DES_cblock *key,DES_key_schedule *schedule);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   222
void DES_string_to_key(const char *str,DES_cblock *key);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   223
void DES_string_to_2keys(const char *str,DES_cblock *key1,DES_cblock *key2);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   224
void DES_cfb64_encrypt(const unsigned char *in,unsigned char *out,long length,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   225
		       DES_key_schedule *schedule,DES_cblock *ivec,int *num,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   226
		       int enc);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   227
void DES_ofb64_encrypt(const unsigned char *in,unsigned char *out,long length,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   228
		       DES_key_schedule *schedule,DES_cblock *ivec,int *num);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   229
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   230
int DES_read_password(DES_cblock *key, const char *prompt, int verify);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   231
int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2, const char *prompt,
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   232
	int verify);
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   233
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   234
#define DES_fixup_key_parity DES_set_odd_parity
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   235
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   236
#ifdef  __cplusplus
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   237
}
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   238
#endif
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   239
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   240
#endif
de7f90723dab Fix for Bug 2442 - Symbian^2 package build failure.
Santosh V Patil <santosh.v.patil@nokia.com>
parents:
diff changeset
   241