des_old2.c revision 109998
1109998Smarkm/* crypto/des/des_old.c -*- mode:C; c-file-style: "eay" -*- */
2109998Smarkm
3109998Smarkm/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
4109998Smarkm *
5109998Smarkm * The function names in here are deprecated and are only present to
6109998Smarkm * provide an interface compatible with OpenSSL 0.9.6c.  OpenSSL now
7109998Smarkm * provides functions where "des_" has been replaced with "DES_" in
8109998Smarkm * the names, to make it possible to make incompatible changes that
9109998Smarkm * are needed for C type security and other stuff.
10109998Smarkm *
11109998Smarkm * Please consider starting to use the DES_ functions rather than the
12109998Smarkm * des_ ones.  The des_ functions will dissapear completely before
13109998Smarkm * OpenSSL 1.0!
14109998Smarkm *
15109998Smarkm * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
16109998Smarkm */
17109998Smarkm
18109998Smarkm/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
19109998Smarkm * project 2001.
20109998Smarkm */
21109998Smarkm/* ====================================================================
22109998Smarkm * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
23109998Smarkm *
24109998Smarkm * Redistribution and use in source and binary forms, with or without
25109998Smarkm * modification, are permitted provided that the following conditions
26109998Smarkm * are met:
27109998Smarkm *
28109998Smarkm * 1. Redistributions of source code must retain the above copyright
29109998Smarkm *    notice, this list of conditions and the following disclaimer.
30109998Smarkm *
31109998Smarkm * 2. Redistributions in binary form must reproduce the above copyright
32109998Smarkm *    notice, this list of conditions and the following disclaimer in
33109998Smarkm *    the documentation and/or other materials provided with the
34109998Smarkm *    distribution.
35109998Smarkm *
36109998Smarkm * 3. All advertising materials mentioning features or use of this
37109998Smarkm *    software must display the following acknowledgment:
38109998Smarkm *    "This product includes software developed by the OpenSSL Project
39109998Smarkm *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
40109998Smarkm *
41109998Smarkm * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
42109998Smarkm *    endorse or promote products derived from this software without
43109998Smarkm *    prior written permission. For written permission, please contact
44109998Smarkm *    openssl-core@openssl.org.
45109998Smarkm *
46109998Smarkm * 5. Products derived from this software may not be called "OpenSSL"
47109998Smarkm *    nor may "OpenSSL" appear in their names without prior written
48109998Smarkm *    permission of the OpenSSL Project.
49109998Smarkm *
50109998Smarkm * 6. Redistributions of any form whatsoever must retain the following
51109998Smarkm *    acknowledgment:
52109998Smarkm *    "This product includes software developed by the OpenSSL Project
53109998Smarkm *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
54109998Smarkm *
55109998Smarkm * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
56109998Smarkm * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
57109998Smarkm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
58109998Smarkm * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
59109998Smarkm * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
60109998Smarkm * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
61109998Smarkm * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
62109998Smarkm * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
63109998Smarkm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
64109998Smarkm * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
65109998Smarkm * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
66109998Smarkm * OF THE POSSIBILITY OF SUCH DAMAGE.
67109998Smarkm * ====================================================================
68109998Smarkm *
69109998Smarkm * This product includes cryptographic software written by Eric Young
70109998Smarkm * (eay@cryptsoft.com).  This product includes software written by Tim
71109998Smarkm * Hudson (tjh@cryptsoft.com).
72109998Smarkm *
73109998Smarkm */
74109998Smarkm
75109998Smarkm#undef OPENSSL_DES_LIBDES_COMPATIBILITY
76109998Smarkm#include <openssl/des.h>
77109998Smarkm#include <openssl/rand.h>
78109998Smarkm
79109998Smarkmvoid _ossl_096_des_random_seed(DES_cblock *key)
80109998Smarkm	{
81109998Smarkm	RAND_seed(key, sizeof(DES_cblock));
82109998Smarkm	}
83