+ //Set the server password
+ const char *instring = [[sender stringValue] UTF8String];
+ const char *password = "password";
+ unsigned char result;
+ NSData *hashedPass, *passwordStringHash;
+ SHA1(instring, strlen(instring), &result);
+ hashedPass = [NSData dataWithBytes:&result length:strlen(&result)];
+ SHA1(password, strlen(password), &result);
+ passwordStringHash = [NSData dataWithBytes:&result length:strlen(&result)];
+ if (![hashedPass isEqualToData:passwordStringHash]) {
+ [df setObject:hashedPass forKey:@"sharedPlayerPassword"];
+ }