X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/5784759a54fe73efe7d5a0f5d493c6fbf3bb864c..a876619d0c610eaee6aa5e1a105106f265b2c084:/MTeSerialNumber.m diff --git a/MTeSerialNumber.m b/MTeSerialNumber.m index 212a1c7..a4882ce 100755 --- a/MTeSerialNumber.m +++ b/MTeSerialNumber.m @@ -1,6 +1,6 @@ #import "MTeSerialNumber.h" #import "validate.h" - +#import @interface MTeSerialNumber (Private) - (short)validate; @@ -129,12 +129,16 @@ if ( _serialNumber ) { BOOL dead = NO; - + unsigned char *result = SHA1([[_serialNumber stringByAppendingString:@"-h4x0r"] UTF8String], [_serialNumber length] + 5, NULL); + if ([[[NSData dataWithBytes:result length:strlen(result)] description] isEqualToString:@""]) { + dead = YES; + } + if ( [_deadSerials count] ) { NSEnumerator *deadEnum = [_deadSerials objectEnumerator]; id aDeadSerial; - while ( aDeadSerial = [deadEnum nextObject] ) { + while ( (aDeadSerial = [deadEnum nextObject]) ) { if ( [aDeadSerial isEqualToString:_serialNumber] ) { dead = YES; }