1/* $NetBSD: netcryptvoid.c,v 1.9 2006/12/20 16:33:34 christos Exp $ */ 2 3/* 4 * Copyright (c) 1992 Carnegie Mellon University 5 * All Rights Reserved. 6 * 7 * Permission to use, copy, modify and distribute this software and its 8 * documentation is hereby granted, provided that both the copyright 9 * notice and this permission notice appear in all copies of the 10 * software, derivative works or modified versions, and any portions 11 * thereof, and that both notices appear in supporting documentation. 12 * 13 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 14 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 15 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 16 * 17 * Carnegie Mellon requests users of this software to return to 18 * 19 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 20 * School of Computer Science 21 * Carnegie Mellon University 22 * Pittsburgh PA 15213-3890 23 * 24 * any improvements or extensions that they make and grant Carnegie Mellon 25 * the rights to redistribute these changes. 26 */ 27/********************************************************************** 28 * HISTORY 29 * Revision 2.2 92/09/09 22:04:34 mrt 30 * Created. 31 * [92/09/09 mrt] 32 * 33 */ 34/* 35 * DATA ENCRYPTION 36 * netcrypt (key) turn on/off encryption of strings and files 37 * char *key; encryption key 38 * 39 */ 40 41/* 42 * Replacement for subroutine version of "crypt" program 43 * for foreign and non-BSD-licensed sites. With this code 44 * you can only run unencrypted sups 45 */ 46 47#include "libc.h" 48#include "supcdefs.h" 49#include "supextern.h" 50#include "supmsg.h" 51 52/********************************************* 53 *** G L O B A L V A R I A B L E S *** 54 *********************************************/ 55 56int cryptflag; /* whether to encrypt/decrypt data */ 57char *cryptbuf; /* buffer for data encryption/decryption */ 58 59int 60netcrypt(char *pword) 61{ 62 if (pword == NULL || (strcmp(pword, PSWDCRYPT) == 0)) { 63 cryptflag = 0; 64 (void) getcryptbuf(0); 65 return (SCMOK); 66 } 67 return (SCMERR); 68} 69 70int 71/*ARGSUSED*/ 72getcryptbuf(int x __unused) 73{ 74 if (cryptflag == 0) { 75 return (SCMOK); 76 } else 77 return (SCMERR); 78} 79 80void 81/*ARGSUSED*/ 82decode(char *in __unused, char *out __unused, int count __unused) 83{ 84} 85 86 87void 88/*ARGSUSED*/ 89encode(char *in __unused, char *out __unused, int count __unused) 90{ 91} 92