Results 1 to 10 of 10

Thread: String compression/encryption

  1. #1

    Thread Starter
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    String compression/encryption

    Howdy all,

    I'm working on trying to encrypt a string. Most of the examples I've seen and things I've attempted, end up making the result of the encrypted string, alot bigger in size than the original string. Example:
    Trying to encrypt the string "hello world" would end up being something like "hdu87327634husdfsd7823434" which is obviously longer than the original.

    Anyone know some algorithms to lower the sie of the string but still encrypt it (and be able to decrypt it)?

    Thanks in advance,

    [edit]
    Also, these strings are going to be saved to a file, so if that helps anyone

    Phreak
    Last edited by «°°phReAk°°»; Aug 25th, 2004 at 10:28 PM.

    Visual Studio 6, Visual Studio.NET 2005, MASM

  2. #2
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803
    I have 2 encryption algoriths that i posted in the Code Bank, none of them make the string bigger...

  3. #3

    Thread Starter
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    They are very nice CVMichael. I will use the "highencryption" post as a base for my own.

    Ta

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  4. #4
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    Please note such encryptions aren't as strong and are easier to find out how they work. Even I might be able to break them, even though such thing isn't what I'm good at

  5. #5

    Thread Starter
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    hehe. I'm really getting annoyed with this. Even ZLib is annoying me.

    What I'm doing is creating a scripting language (which I've always been interested in doing, I haven't made one as good as this one yet). I want to compress and encrypt the scripts (in an IDE I've created) so that the Engine can Decrypt and Decompress them (and then execute them). Obviously I need something fast. All I really need is something which makes the original file size (the Unicode text) into a smaller file. Binary, anything, I don't mind. Just something that is un-readable when opened in Notepad (or any other text editor).

    Pwease hewp!

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  6. #6
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    In that case the way you're doing it is good enough

  7. #7

    Thread Starter
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    I still need other options though. The things I'm trying either:

    a) Don't work
    b) Won't work because I can't get them too
    c) Don't reduce the size of the file
    d) Increase the size of the file.



    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  8. #8
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803
    Originally posted by «°°phReAk°°»
    hehe. I'm really getting annoyed with this. Even ZLib is annoying me.
    What's anoying about ZLIB ? I find it VERY easy to use...

  9. #9
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    Have you read about data compression? Like, how LZ77 works for example? It might help a great bit to actually understand how compression works. Encryption is a little bit simpler than compression (to code - I have coded encryption and decryption, but I've done only decompression as I couldn't get myself to study compression well enough, atleast for the format I should have coded).

    AllTheWeb and Google are your friends when looking for info

  10. #10
    Hyperactive Member Vishalgiri's Avatar
    Join Date
    Oct 2003
    Location
    India
    Posts
    345
    Well answer could be in HOw ZLib works!
    Regards,
    Vishalgiri Goswami
    Gujarat, ( INDIA ).
    ---------------------

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