Category: Code

Cocoa Blocks Pitfall

Just because it bit me again for a millionth time:

int a = 0;
void(^block)(void) = ^{ printf("%d", a); };
a = 1;

outputs 0, because the value of a is copied to the block when it is declared.

View full article »

AquaticPrime and python/PyCrypto

Alright, another post for the same topic: How to generate AquaticPrime licenses in python with PyCrypto (also for the Google App Engine in my case). This took me quite a long time (8h), because debugging crypto is very complicated (the wrong result is returned, so what now?). I actually had to learn how to encrypt using RSA (quite simple actually).
View full article »

AquaticPrime and Java Servlets


Maybe somebody is interested in this code. It’s relatively easy to create AquaticPrime license keys in Java once you know how. I used it last year on Google App Engine to generate my licenses for a promotion.

View full article »