ellipticlicense
ellipticlicense copied to clipboard
'Licensed to' names are cut in length by 1 byte
Currently EllipticLicense generates signatures for message - 1 byte, that is, if given 'John Doe' it will generate key for 'John Do'. If fixed, it will render the generated keys incompatible with previous versions.
Possibly, will introduce a flag for this.
The bug is in:
SHA1((unsigned char *)name, strlen(name)-1, hash);
Must be:
SHA1((unsigned char *)name, strlen(name), hash);
This would also fix inability to generate keys for names of only 1 byte.
Note to self: also fix + (NSData *)el_dataWithStringNoNull:(NSString *)string;, etc.