Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: about string conts (a lot of then)

  1. #1

    about string conts (a lot of then)

    sorry for the title, =P
    but im not sure about what to write there :lol:

    i have a unit with
    like 400 strings conts

    grouped in const arrays

    they are declared like

    const
    name : array[0..71] of string = (


    on the initialization i put all then in a list and do some things later,

    so my question is, there is a better way to do that?
    i would like to protect these conts from malicious users too :?
    From brazil (:

    Pascal pownz!

  2. #2

    about string conts (a lot of then)

    Your way is pretty good already; you could load your strings from a file, too.

    The only way to save your strings from curious eyes would be some sort
    of encryption or at least a camouflage (just be creative).

  3. #3

    about string conts (a lot of then)

    Quote Originally Posted by waran
    Your way is pretty good already; you could load your strings from a file, too.

    The only way to save your strings from curious eyes would be some sort
    of encryption or at least a camouflage (just be creative).
    from a encrypted file will be easy, but my app is stand alone, .exe only, so maybe a encrypted file in resource ?
    From brazil (:

    Pascal pownz!

  4. #4

    about string conts (a lot of then)

    You could create a little program where you introduce the strings, like a ListBox, and executes a encryption algorithm that generates the Pascal const declarations with the encrypted strings, then just copy paste into your code, that would make your work easier. I think it's easy to make one. If you need simple encryption code, look here:
    http://www.bsdg.org/SWAG/ENCRYPT/index.html

  5. #5

    about string conts (a lot of then)

    uhm, very interesting cronodragon

    the problem the major encryptor on this page generate codes like
    ''3@k3u41#412183\£/

    and to convert that in something that delphi recognizes...
    From brazil (:

    Pascal pownz!

  6. #6

    about string conts (a lot of then)

    maybe base64, its not encryption but the malicious user will not differ it from other binary shit in HEX viewer :?
    From brazil (:

    Pascal pownz!

  7. #7

    about string conts (a lot of then)

    You could just transform each character of the encryption output to the ASCII representation of it's hexadecimal value

  8. #8

    about string conts (a lot of then)

    Quote Originally Posted by cronodragon
    You could just transform each character of the encryption output to the ASCII representation of it's hexadecimal value
    uhm, good option, but what about the base64 (see my lastpost)
    From brazil (:

    Pascal pownz!

  9. #9

    about string conts (a lot of then)

    Quote Originally Posted by arthurprs
    Quote Originally Posted by cronodragon
    You could just transform each character of the encryption output to the ASCII representation of it's hexadecimal value
    uhm, good option, but what about the base64 (see my lastpost)
    I haven't used it, sorry. But if it works for you go ahead

  10. #10

    about string conts (a lot of then)

    i did crafted a simple byte to byte encryption
    and a tool that converts a original .pas to another .pas with encrypted strings (ASCII codes) with python (incredible 10 lines),

    thanks for the help guys
    From brazil (:

    Pascal pownz!

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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