Click here to Skip to main content
15,499,967 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Thought of the Day Pin
DRHuff5-May-19 8:32
MemberDRHuff5-May-19 8:32 
GeneralFriday Afternoon Puzzle Pin
harold aptroot3-May-19 1:47
Memberharold aptroot3-May-19 1:47 
GeneralRe: Friday Afternoon Puzzle Pin
Rob Philpott3-May-19 2:10
MemberRob Philpott3-May-19 2:10 
GeneralRe: Friday Afternoon Puzzle Pin
OriginalGriff3-May-19 2:17
mveOriginalGriff3-May-19 2:17 
GeneralRe: Friday Afternoon Puzzle Pin
Rob Philpott3-May-19 2:23
MemberRob Philpott3-May-19 2:23 
GeneralRe: Friday Afternoon Puzzle Pin
OriginalGriff3-May-19 2:33
mveOriginalGriff3-May-19 2:33 
GeneralRe: Friday Afternoon Puzzle Pin
harold aptroot3-May-19 2:19
Memberharold aptroot3-May-19 2:19 
GeneralRe: Friday Afternoon Puzzle Pin
Rob Philpott3-May-19 2:41
MemberRob Philpott3-May-19 2:41 
Run out of time! Think I'm close though, code below suggests what I was up to....
private static void Main(string[] args)
{
    //byte[] seek =  { 0xc5, 0x83, 0xc2, 0x8f, 0x2a, 0xaf, 0x42, 0x25 };
    byte[] seek = { 0x25, 0x42, 0xaf, 0x2a, 0x8f, 0xc2, 0x83, 0xc5 };

    byte[] message = new byte[8];

    for (int index = 0; index < 8; index++)
    {
        for (int c = 32; c < 127; c++)
        {
            message[index] = (byte)c;
            var test = BitConverter.GetBytes((encode(message)));

            if (test[7-index] == seek[7- index])
            {
                Console.WriteLine(Encoding.ASCII.GetString(message));
                Console.ReadLine();
            }
        }
    }

}

static ulong encode(string msg)
{
    ulong msg_bits = BitConverter.ToUInt64(Encoding.ASCII.GetBytes(msg), 0);
    return msg_bits ^ (msg_bits >> 3) ^ (msg_bits >> 13) ^ (msg_bits >> 47);
}

static ulong encode(byte[] msg)
{
    ulong msg_bits = BitConverter.ToUInt64(msg, 0);
    return msg_bits ^ (msg_bits >> 3) ^ (msg_bits >> 13) ^ (msg_bits >> 47);
}
Regards,
Rob Philpott.

GeneralRe: Friday Afternoon Puzzle Pin
harold aptroot3-May-19 2:55
Memberharold aptroot3-May-19 2:55 
GeneralRe: Friday Afternoon Puzzle Pin
Michael Martin3-May-19 2:59
professionalMichael Martin3-May-19 2:59 
GeneralRe: Friday Afternoon Puzzle Pin
PIEBALDconsult3-May-19 4:07
professionalPIEBALDconsult3-May-19 4:07 
GeneralRe: Friday Afternoon Puzzle Pin
Richard Deeming3-May-19 4:32
mveRichard Deeming3-May-19 4:32 
GeneralRe: Friday Afternoon Puzzle Pin
OriginalGriff3-May-19 5:11
mveOriginalGriff3-May-19 5:11 
GeneralRe: Friday Afternoon Puzzle [spoilers] Pin
harold aptroot3-May-19 8:22
Memberharold aptroot3-May-19 8:22 
GeneralI win! Pin
CPallini4-May-19 12:29
mveCPallini4-May-19 12:29 
GeneralThe Misinformation Age Pin
Randor 3-May-19 0:05
professional Randor 3-May-19 0:05 
GeneralRe: The Misinformation Age Pin
Christian Graus3-May-19 0:10
mveChristian Graus3-May-19 0:10 
QuestionRe: The Misinformation Age Pin
Randor 3-May-19 0:19
professional Randor 3-May-19 0:19 
AnswerRe: The Misinformation Age Pin
Christian Graus3-May-19 0:21
mveChristian Graus3-May-19 0:21 
GeneralRe: The Misinformation Age Pin
Randor 3-May-19 0:30
professional Randor 3-May-19 0:30 
GeneralRe: The Misinformation Age Pin
Christian Graus3-May-19 0:33
mveChristian Graus3-May-19 0:33 
GeneralRe: The Misinformation Age Pin
RJOberg3-May-19 3:53
professionalRJOberg3-May-19 3:53 
GeneralRe: The Misinformation Age Pin
den2k883-May-19 0:31
professionalden2k883-May-19 0:31 
GeneralRe: The Misinformation Age Pin
Christian Graus3-May-19 0:32
mveChristian Graus3-May-19 0:32 
GeneralRe: The Misinformation Age Pin
den2k883-May-19 0:37
professionalden2k883-May-19 0:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

How would you describe your current job?
Fighting dragons everyday or clicking the same boxes on the same forms, day after day?
  Results   13 votes