CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Modifire help

  1. #1
    Join Date
    Feb 2012
    Posts
    4

    Exclamation Modifire help

    Can anyone tell me the Key/Modifires below I'm really new to C#

    im trying to learn what the keys and Modifires are iv tried google and such but i can never
    find anything..

    this code was given to me by my buddy i would ask him but he was shipped off about a week ago.

    Code:
    {
        using System;
        using System.IO;
    
        internal class EncryptionStandard : ITableEncryption
        {
            void ITableEncryption.Decode(ref byte[] data)
            {
                uint num = 0x816;
                for (int i = 0; i < data.Length; i++)
                {
                    byte num3 = data[i];
                    uint num4 = num;
                    byte num5 = 0;
                    num4 &= 0xff00;
                    num4 = num4 >> 8;
                    num5 = (byte) (num4 ^ num3);
                    num4 = num3;
                    num4 += num;
                    num4 &= 0xffff;
                    num4 *= 0x6081;
                    num4 &= 0xffff;
                    num4 += 0x1608;
                    num4 &= 0xffff;
                    num = num4;
                    data[i] = num5;
                }
            }
    
            void ITableEncryption.Encode(FileStream stream)
            {
                int num = stream.ReadByte();
                uint num2 = 0x816;
                while (num != -1)
                {
                    stream.Seek(-1L, SeekOrigin.Current);
                    byte num3 = (byte) (num & 0xff);
                    byte num4 = 0;
                    uint num5 = num2;
                    num5 &= 0xff00;
                    num5 = num5 >> 8;
                    num4 = (byte) (num5 ^ num3);
                    num5 = num4;
                    num5 += num2;
                    num5 &= 0xffff;
                    num5 *= 0x6081;
                    num5 &= 0xffff;
                    num5 += 0x1601;
                    num5 &= 0xffff;
                    num2 = num5;
                    stream.WriteByte(num4);
                    num = stream.ReadByte();
                }
            }
    
            string ITableEncryption.Details
            {
                get
                {
                    return "The standard encryption method.";
                }
            }
    
            string ITableEncryption.Name
            {
                get
                {
                    return "Standard";
                }
            }
        }
    }

  2. #2
    Join Date
    Feb 2012
    Posts
    4

    Re: Modifire help

    come on guys any idea I'm really in a hurry iv been stuck on this for days now

  3. #3
    Join Date
    Jan 2009
    Posts
    596

    Re: Modifire help

    Well, I'm not actually sure what your question means. Could you please explain your problem in more detail? You are more likely to get an answer if you do.
    Last edited by Peter_B; February 25th, 2012 at 10:55 AM. Reason: Typo

  4. #4
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Re: Modifire help

    You have not said what your issue is? What is the question that you want answering?
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured