We must protect ourselves
2007-01-09 19:40:44
general
I couple of books arrived from Amazon today, one is the latest edition of the Camel Book, which I've been meaning to get for ages. I've been programming in Perl for years now, but I think I'm still missing some of the fundamentals, and it's a good reference book.
The other book is Applied Cryptography by Bruce Schneier, who's web log I read. In the preface I found my new favourite quote (although I've heard it before):
“...it is insufficient to protect ourselves with laws; we need to protect ourselves with mathematics”
I also had cause to create something that could replace my email signature, can you guess what it does?
The other book is Applied Cryptography by Bruce Schneier, who's web log I read. In the preface I found my new favourite quote (although I've heard it before):
“...it is insufficient to protect ourselves with laws; we need to protect ourselves with mathematics”
I also had cause to create something that could replace my email signature, can you guess what it does?
#!/usr/bin/perl for(<>){chomp;if(length==10){chop;$o='978'.$_;for($i=0;$i<12;$i++ ){$c+=substr($o,$i, 1)*($i%2*2+1);}$o.=(10-$c)%10;print$o."\n";}}