ports/devel/tcl-trf/files/patch-crypt
Mikhail Teterin daa8cb06f0 From the software's self-description:
Trf is a TCL extension library. It extends the language
	at the C-level with so-called ``transformer''-procedures.
	The package is able to intercept all read/write operations
	on designated channels, thus giving it the ability to
	transform the buffer contents as desired. This allows
	things like transparent encryption, compression, charset
	recoding, etc. Build upon this framework (and as proof of
	concept) a collection of tcl-level commands was implemented,
	most of them related to cryptography.

WWW: http://www.oche.de/~akupries/soft/trf/
2002-02-15 07:34:07 +00:00

25 lines
604 B
Text

--- generic/crypt.c Sat Nov 18 17:42:31 2000
+++ generic/crypt.c Fri Feb 8 11:59:47 2002
@@ -112,4 +112,6 @@
*/
+char *crypt_md5(const char *pw, const char *salt); /* Live in -lscrypt */
+
static int
TrfMd5CryptObjCmd (notUsed, interp, objc, objv)
@@ -128,8 +130,4 @@
Tcl_Obj* res;
- if (TrfLoadMD5 (interp) != TCL_OK) {
- return TCL_ERROR;
- }
-
if (objc != 3) {
Tcl_AppendResult (interp,
@@ -159,5 +157,5 @@
TrfLock;
- res = Tcl_NewStringObj ((char*) md5f.crypt (passwd, salt_b) + 3, -1);
+ res = Tcl_NewStringObj (crypt_md5(passwd, salt_b) + 3, -1);
TrfUnlock;