+- (BOOL)requiresPassword
+{
+ return ([[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"] length] > 0);
+}
+
+- (BOOL)sendPassword:(NSData *)password
+{
+ if ([password isEqualToData:[[NSUserDefaults standardUserDefaults] dataForKey:@"sharedPlayerPassword"]]) {
+ _authenticated = YES;
+ return YES;
+ } else {
+ _authenticated = NO;
+ return NO;
+ }
+}
+
+- (void)invalidate
+{
+ _valid = NO;
+}
+
+- (void)makeValid
+{
+ _valid = YES;
+}
+
+- (BOOL)isValid
+{
+ return _valid;
+}
+