Friday, 9 March 2007

All in the "swizzle"

Just incase I lose it.. and as some proof I was on the track with it.. this is the foundation of a new tree theory I am working on.


char *rotKeys(char *key)
{
int x,y;
char *ret = (char *)calloc(8, 1);

for(x=0;x<=7;x++,key++)
{
for(y=0;y<=7;y++)
{
ret[y]|=(!!(*key&(1<<y)))<<x;
}
}
return ret;
}

No comments: