1*10023SGordon.Ross@Sun.COM /* 2*10023SGordon.Ross@Sun.COM * Copyright (c) 2000-2001 Boris Popov 3*10023SGordon.Ross@Sun.COM * All rights reserved. 4*10023SGordon.Ross@Sun.COM * 5*10023SGordon.Ross@Sun.COM * Redistribution and use in source and binary forms, with or without 6*10023SGordon.Ross@Sun.COM * modification, are permitted provided that the following conditions 7*10023SGordon.Ross@Sun.COM * are met: 8*10023SGordon.Ross@Sun.COM * 1. Redistributions of source code must retain the above copyright 9*10023SGordon.Ross@Sun.COM * notice, this list of conditions and the following disclaimer. 10*10023SGordon.Ross@Sun.COM * 2. Redistributions in binary form must reproduce the above copyright 11*10023SGordon.Ross@Sun.COM * notice, this list of conditions and the following disclaimer in the 12*10023SGordon.Ross@Sun.COM * documentation and/or other materials provided with the distribution. 13*10023SGordon.Ross@Sun.COM * 3. All advertising materials mentioning features or use of this software 14*10023SGordon.Ross@Sun.COM * must display the following acknowledgement: 15*10023SGordon.Ross@Sun.COM * This product includes software developed by Boris Popov. 16*10023SGordon.Ross@Sun.COM * 4. Neither the name of the author nor the names of any co-contributors 17*10023SGordon.Ross@Sun.COM * may be used to endorse or promote products derived from this software 18*10023SGordon.Ross@Sun.COM * without specific prior written permission. 19*10023SGordon.Ross@Sun.COM * 20*10023SGordon.Ross@Sun.COM * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 21*10023SGordon.Ross@Sun.COM * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22*10023SGordon.Ross@Sun.COM * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23*10023SGordon.Ross@Sun.COM * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 24*10023SGordon.Ross@Sun.COM * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25*10023SGordon.Ross@Sun.COM * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26*10023SGordon.Ross@Sun.COM * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27*10023SGordon.Ross@Sun.COM * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28*10023SGordon.Ross@Sun.COM * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29*10023SGordon.Ross@Sun.COM * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30*10023SGordon.Ross@Sun.COM * SUCH DAMAGE. 31*10023SGordon.Ross@Sun.COM */ 32*10023SGordon.Ross@Sun.COM 33*10023SGordon.Ross@Sun.COM /* 34*10023SGordon.Ross@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 35*10023SGordon.Ross@Sun.COM * Use is subject to license terms. 36*10023SGordon.Ross@Sun.COM */ 37*10023SGordon.Ross@Sun.COM 38*10023SGordon.Ross@Sun.COM /* 39*10023SGordon.Ross@Sun.COM * Various crypto stuff. 40*10023SGordon.Ross@Sun.COM * from the driver: smb_crypt.c 41*10023SGordon.Ross@Sun.COM */ 42*10023SGordon.Ross@Sun.COM 43*10023SGordon.Ross@Sun.COM int 44*10023SGordon.Ross@Sun.COM smb_encrypt_DES(uchar_t *Result, int ResultLen, 45*10023SGordon.Ross@Sun.COM const uchar_t *Key, int KeyLen, 46*10023SGordon.Ross@Sun.COM const uchar_t *Data, int DataLen); 47*10023SGordon.Ross@Sun.COM 48*10023SGordon.Ross@Sun.COM int 49*10023SGordon.Ross@Sun.COM smb_get_urandom(void *data, size_t dlen); 50