![]() |
|
|
![]() |
|
|
|
|
From: Jay Miller (jnmiller, cryptofreak dot org) Date: 2001.03.08 - 16.27 MST
X-Mailer: Mutt 1.2.5i
Okay, so my original "this is gonna be a piece of cake" idea didn't pan
out. The parity bit business isn't working out. Consider the first 20
bits in the thing:
1 1 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 0 0 1
Parity just doesn't seem to work on that sucker. And the 'inserting a
one or zero to break up a BRK' doesn't apply, either..
I did go ahead and write this function btoi(). Maybe you can find it
useful: it takes a string of '1' and/or '0' and turns it into an int:
int btoi(char *s, int bits) {
int i1, i2;
for (i2 = 0; bits && s && *s && strchr("01", *s); bits--) {
i1 = *s++ - '0'; i2 <<= 1; i2 |= i1; }
return i2; }
's' is the string to be converted and 'bits' is how many bits to look at
in 's'. So, btoi(our_code, 8) returns 243.
I was also thinking that any encryption would, it seems to me, have to
be applied to letters rather than bits.. so we shouldn't have to worry
about that. Right?
--
Jay Miller
ICQ: 32123421 | YM: ladenedge | http://www.cryptofreak.org
PGP: 0xedc9bb8d | 41a6428c 46abd36b 6b259b68 8a28ca4c edc9bb8c
--
This is the mod-chal mailing list. To unsubscribe, email
majordomo, cryptofreak dot org with message body 'unsubscribe mod-chal'.
Or, for more information, visit http://www.cryptofreak.org/.
This archive was generated by hypermail 2b30 : 2001.09.26 - 14.03 MDT |