This is encryptHSpassword.c in view mode; [Download] [Up]
//
// encryptHSpassword.c -- use this to encrypt a password to put into a
// GameInfo object. Just replace the #define to the desired
// password, recompile, and run. Someday I'll put a real interface
// on this; at least it works.
#import <objc/Object.h>
#import <daymisckit/DAYString.h>
#define GK_HS_PASSWORD "NONE"
void main()
{
id aString = [[DAYString alloc] initString:GK_HS_PASSWORD];
id encr = [aString encrypt:[[DAYString alloc] initString:"GK"]]; // "GK" is the salt
printf("Encrypted string is: \"%s\"\n", [encr stringValue]);
exit(0);
}
// compile with:
// cc -ObjC encryptHSpassword.c -ldaymisckit -lNeXT_s -o encryptHSpassword
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.