des_old2.c 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* crypto/des/des_old.c */
  2. /*
  3. * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING The
  4. * function names in here are deprecated and are only present to provide an
  5. * interface compatible with OpenSSL 0.9.6c. OpenSSL now provides functions
  6. * where "des_" has been replaced with "DES_" in the names, to make it
  7. * possible to make incompatible changes that are needed for C type security
  8. * and other stuff. Please consider starting to use the DES_ functions
  9. * rather than the des_ ones. The des_ functions will dissapear completely
  10. * before OpenSSL 1.0! WARNING WARNING WARNING WARNING WARNING WARNING
  11. * WARNING WARNING
  12. */
  13. /*
  14. * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project
  15. * 2001.
  16. */
  17. /* ====================================================================
  18. * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
  19. *
  20. * Redistribution and use in source and binary forms, with or without
  21. * modification, are permitted provided that the following conditions
  22. * are met:
  23. *
  24. * 1. Redistributions of source code must retain the above copyright
  25. * notice, this list of conditions and the following disclaimer.
  26. *
  27. * 2. Redistributions in binary form must reproduce the above copyright
  28. * notice, this list of conditions and the following disclaimer in
  29. * the documentation and/or other materials provided with the
  30. * distribution.
  31. *
  32. * 3. All advertising materials mentioning features or use of this
  33. * software must display the following acknowledgment:
  34. * "This product includes software developed by the OpenSSL Project
  35. * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
  36. *
  37. * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
  38. * endorse or promote products derived from this software without
  39. * prior written permission. For written permission, please contact
  40. * openssl-core@openssl.org.
  41. *
  42. * 5. Products derived from this software may not be called "OpenSSL"
  43. * nor may "OpenSSL" appear in their names without prior written
  44. * permission of the OpenSSL Project.
  45. *
  46. * 6. Redistributions of any form whatsoever must retain the following
  47. * acknowledgment:
  48. * "This product includes software developed by the OpenSSL Project
  49. * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
  50. *
  51. * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
  52. * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  53. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  54. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
  55. * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  56. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  57. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  58. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  59. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  60. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  61. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  62. * OF THE POSSIBILITY OF SUCH DAMAGE.
  63. * ====================================================================
  64. *
  65. * This product includes cryptographic software written by Eric Young
  66. * (eay@cryptsoft.com). This product includes software written by Tim
  67. * Hudson (tjh@cryptsoft.com).
  68. *
  69. */
  70. #undef OPENSSL_DES_LIBDES_COMPATIBILITY
  71. #include <openssl/des.h>
  72. #include <openssl/rand.h>
  73. void _ossl_096_des_random_seed(DES_cblock *key)
  74. {
  75. RAND_seed(key, sizeof(DES_cblock));
  76. }