﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Avish commented on Must resist... decoding</title><description>I *was* writing them to a file (piping not shown in original code). Gimme a little credit here :)
  
  
Also, if they are Hebrew characters, they're all the same single Hebrew character. The only Hebrew character I can think of that can come in so many repetitions is "ח", and I doubt you use that expression. 
</description><link>http://ayende.com/2901/must-resist-decoding#comment19</link><guid>http://ayende.com/2901/must-resist-decoding#comment19</guid><pubDate>Sat, 27 Oct 2007 22:57:01 GMT</pubDate></item><item><title>Ayende Rahien commented on Must resist... decoding</title><description>Avish, you cannot print Hebrew characters to the console.
  
Write them to a file, it should come up okay.
</description><link>http://ayende.com/2901/must-resist-decoding#comment18</link><guid>http://ayende.com/2901/must-resist-decoding#comment18</guid><pubDate>Sat, 27 Oct 2007 18:26:33 GMT</pubDate></item><item><title>Avish commented on Must resist... decoding</title><description>I still think this will get you signed/unsigned problems. Anyway, the only non-ascii character in your code is the repeated 1111111111111101 which doesn't translate to a hebrew character. I'm getting this:
  
"why ?? ???? ?? ??????" (the questionmarks are unidentified unicode characters) 
  
  
My secret algorithm is this:
  
  
for line in System.IO.File.OpenText(argv[0]): 
  
	for word in /\s/.Split(line):
  
		System.Console.Write(cast(char, Convert.ToInt32(word, 2)))
  
</description><link>http://ayende.com/2901/must-resist-decoding#comment17</link><guid>http://ayende.com/2901/must-resist-decoding#comment17</guid><pubDate>Sat, 27 Oct 2007 18:05:14 GMT</pubDate></item><item><title>Ayende Rahien commented on Must resist... decoding</title><description>You are correct, except that Convert.ToString() will take care of it.
  
</description><link>http://ayende.com/2901/must-resist-decoding#comment16</link><guid>http://ayende.com/2901/must-resist-decoding#comment16</guid><pubDate>Sat, 27 Oct 2007 16:56:29 GMT</pubDate></item><item><title>Avish commented on Must resist... decoding</title><description>@Ayende: your "secret algorithm" has a bug, which makes decoding less than intuitive. You should've cast your chars to short rather than in, since the native encoding is UTF16. 
  
  
Now repeat after me as I repeat after you: System.Text.Encoding.UTF8.GetBytes().
  
</description><link>http://ayende.com/2901/must-resist-decoding#comment15</link><guid>http://ayende.com/2901/must-resist-decoding#comment15</guid><pubDate>Sat, 27 Oct 2007 16:40:11 GMT</pubDate></item><item><title>Ayende Rahien commented on Must resist... decoding</title><description>Bil,
  
you realize that you should have put spaces there, right? You had me re-write my decoding code.
  
And yes, as a matter of fact, I would. Do you do dry cleaning as well?
</description><link>http://ayende.com/2901/must-resist-decoding#comment14</link><guid>http://ayende.com/2901/must-resist-decoding#comment14</guid><pubDate>Fri, 26 Oct 2007 18:15:17 GMT</pubDate></item><item><title>Bil Simser commented on Must resist... decoding</title><description>0100111101101000001000000111001101110101011100100110010100101100001000000111100101101111011101010010011101110010011001010010000001100111011011110110100101101110011001110010000001110100011011110010000001101101011000010110101101100101001000000110110101100101001000000111011101110010011010010111010001100101001000000110001101101111011001000110010100100000011010010110111000100000011011110111001001100100011001010111001000100000011101000110111100100000011100100110010101100001011001000010000001100001011011100110010000100000011101110111001001101001011101000110010100100000011000010010000001100011011011110110110101101101011001010110111001110100001000000110111101101110001000000111100101101111011101010111001000100000011100000110111101110011011101000010111000100000010001000110111100100000011110010110111101110101001000000111011101100001011011100111010000100000011011010110010100100000011101000110111100100000011001000110111100100000011110010110111101110101011100100010000001101100011000010111010101101110011001000111001001111001001000000111010001101111011011110010000001110111011010000110100101101100011001010010000001001001001001110110110100100000011000010111010000100000011010010111010000111111
</description><link>http://ayende.com/2901/must-resist-decoding#comment13</link><guid>http://ayende.com/2901/must-resist-decoding#comment13</guid><pubDate>Fri, 26 Oct 2007 18:09:57 GMT</pubDate></item><item><title>Josehr commented on Must resist... decoding</title><description>Hebrew has the longest bytes I ever seen 1111111111111101 LOL
</description><link>http://ayende.com/2901/must-resist-decoding#comment12</link><guid>http://ayende.com/2901/must-resist-decoding#comment12</guid><pubDate>Fri, 26 Oct 2007 14:30:01 GMT</pubDate></item><item><title>Ayende Rahien commented on Must resist... decoding</title><description>Here is my secret algorithm:
  
cy = "string to code"
  
for c in cy:
  
    System.Console.Write( System.Convert.ToString( cast(int, c), 2) +' ' )    
</description><link>http://ayende.com/2901/must-resist-decoding#comment11</link><guid>http://ayende.com/2901/must-resist-decoding#comment11</guid><pubDate>Fri, 26 Oct 2007 13:01:01 GMT</pubDate></item><item><title>Avish commented on Must resist... decoding</title><description>I think you did something wrong there... 
  
  
Also, I searched endlessly for the simplest way to parse a binary number.  You'd think it'd be somewhere in Byte.Parse or Int32.Parse, but no... of course it's in Convert.ToByte(string, int). Go figure.
</description><link>http://ayende.com/2901/must-resist-decoding#comment10</link><guid>http://ayende.com/2901/must-resist-decoding#comment10</guid><pubDate>Fri, 26 Oct 2007 12:37:25 GMT</pubDate></item><item><title>Dmitriy Nagirnyak commented on Must resist... decoding</title><description>If I could only read Hebrew :) Maybe I'll meet a guy these days and he will translate me :)
  
Now you used some kind of Unicode (probably variable-length UTF-8?). It's still possible to have it in a single byte: http://en.wikipedia.org/wiki/Windows-1255
  
  
Now decoding can be a bit more complicated if you'll chose a "secret" encoding :)
</description><link>http://ayende.com/2901/must-resist-decoding#comment9</link><guid>http://ayende.com/2901/must-resist-decoding#comment9</guid><pubDate>Fri, 26 Oct 2007 12:23:00 GMT</pubDate></item><item><title>Ayende Rahien commented on Must resist... decoding</title><description>Hm, I just  tested it with Hebrew, this is the output.
  
  
1110111 1101000 1111001 100000 1111111111111101 1111111111111101 100000 1111111111111101 1111111111111101 1111111111111101 1111111111111101 100000 1111111111111101 1111111111111101 100000 1111111111111101 1111111111111101 1111111111111101 1111111111111101 1111111111111101 111111
  
</description><link>http://ayende.com/2901/must-resist-decoding#comment8</link><guid>http://ayende.com/2901/must-resist-decoding#comment8</guid><pubDate>Fri, 26 Oct 2007 11:23:35 GMT</pubDate></item><item><title>Dmitriy Nagirnyak commented on Must resist... decoding</title><description>I don't think there's something to do with Unicode. Eighth bit just represents Extended ASCII: http://en.wikipedia.org/wiki/Extended_ASCII
  
Unicode in most cases would take more than one byte and it would not be so easy to decrypt it here :)
  
But there's something to do that we all are talking in English :)
</description><link>http://ayende.com/2901/must-resist-decoding#comment7</link><guid>http://ayende.com/2901/must-resist-decoding#comment7</guid><pubDate>Fri, 26 Oct 2007 11:18:39 GMT</pubDate></item><item><title>Ayende Rahien commented on Must resist... decoding</title><description>Dmitriy,
  
That is because we are using unicode, but talking in English.
</description><link>http://ayende.com/2901/must-resist-decoding#comment6</link><guid>http://ayende.com/2901/must-resist-decoding#comment6</guid><pubDate>Fri, 26 Oct 2007 10:29:26 GMT</pubDate></item><item><title>Ayende Rahien commented on Must resist... decoding</title><description>Russel, LOL.
</description><link>http://ayende.com/2901/must-resist-decoding#comment5</link><guid>http://ayende.com/2901/must-resist-decoding#comment5</guid><pubDate>Fri, 26 Oct 2007 10:28:06 GMT</pubDate></item><item><title>Russell Ball commented on Must resist... decoding</title><description>1000010 1100101 1100011 1100001 1110101 1110011 1100101 100000 1100010 1101001 1101110 1100001 1110010 1111001 100000 1101001 1110011 100000 1110100 1101000 1100101 100000 1101110 1100101 1110111 100000 1010010 1110101 1100010 1111001 101110 100000 1010010 1110101 1100010 1111001 100000 1110111 1100001 1110011 100000 1110011 1101111 100000 1010011 1100101 1110000 1110100 1100101 1101101 1100010 1100101 1110010 100000 110010 110000 110000 111000
</description><link>http://ayende.com/2901/must-resist-decoding#comment4</link><guid>http://ayende.com/2901/must-resist-decoding#comment4</guid><pubDate>Fri, 26 Oct 2007 05:45:32 GMT</pubDate></item><item><title>Dmitriy Nagirnyak commented on Must resist... decoding</title><description>I noticed the Rob's message contains only first part of ASCII table characters. Thus every byte always has 0 bit at position 8.
  
  
..and it seems Ayende noticed it too here... :) and his message contains 7 bits per character (not 8).
  
  
  
Who wants an answer - it's here (com on... decode it yourself... it's fun...):
  
http://dnagir.blogspot.com/2007/10/matrix-can-you-read-it.html
  
  
Cheers.
</description><link>http://ayende.com/2901/must-resist-decoding#comment3</link><guid>http://ayende.com/2901/must-resist-decoding#comment3</guid><pubDate>Fri, 26 Oct 2007 02:35:35 GMT</pubDate></item><item><title>Stuart Carnie commented on Must resist... decoding</title><description>...no I couldn't either...
  
  
StringBuilder sb = new StringBuilder();
  
foreach (string line in File.ReadAllLines(@"C:\temp\poem.txt"))
  
  sb.Append( (char) Convert.ToByte(line, 2));
  
Console.Out.WriteLine("{0}", sb);
  
  
"There's no earthly way of knowing..."
</description><link>http://ayende.com/2901/must-resist-decoding#comment2</link><guid>http://ayende.com/2901/must-resist-decoding#comment2</guid><pubDate>Fri, 26 Oct 2007 00:24:23 GMT</pubDate></item><item><title>Mark Hildreth commented on Must resist... decoding</title><description>No, I couldn't resist the urge... but it did give me an opportunity to give my python scripting a quick refresher course.
</description><link>http://ayende.com/2901/must-resist-decoding#comment1</link><guid>http://ayende.com/2901/must-resist-decoding#comment1</guid><pubDate>Fri, 26 Oct 2007 00:09:06 GMT</pubDate></item></channel></rss>