Page 2 of 2 FirstFirst 12
Results 41 to 56 of 56

Thread: [RESOLVED] How to Write an encripted Text File???

  1. #41
    Fanatic Member FireXtol's Avatar
    Join Date
    Apr 2010
    Posts
    874

    Re: How to Write an encripted Text File???

    vb Code:
    1. Public Sub Command1_Click()
    2. InitLUT 'this must be called before the cipher sub/function
    3.  
    4. Dim bAry() as Byte
    5. Call FXInCipher(Form1.Text2.Text, bAry)
    6. Open "c:\program files\visual director 2010\program\usernames\" & Form1.Text1.Text & ".pas" For Binary As #1
    7.     Put 1, 1, bAry
    8. Close #1
    9.  
    10. End Sub

    Conversely:

    vb Code:
    1. Public Sub Command1_Click()
    2. InitLUT 'this must be called before the cipher sub/function
    3.  
    4. Dim bAry() as Byte
    5. Open "c:\program files\visual director 2010\program\usernames\" & Form1.Text1.Text & ".pas" For Binary As #1
    6.     reDim bAry(lof(1)-1)
    7.     Get 1, 1, bAry
    8. Close #1
    9. msgbox FXDeCipher(bAry)
    10. End Sub

  2. #42

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: How to Write an encripted Text File???

    Thanks!!
    I will try what you had posted!!
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  3. #43

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: How to Write an encripted Text File???

    Right now: It saves the binary text file.

    Problem: The file's contents can't be loaded in TextBox, named: Text3.Text. User inputs the samething in Text2, then it will Command1.Enabled = True. If not, then the Command Button is never .Enabled = True.

    eg:
    Code:
    If Form1.Text3.Text = Form1.Text2.Text Then
          Form1.Command1.Enabled = True
    Else
          Form1.Command1.Enabled = False
    End If
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  4. #44
    Fanatic Member FireXtol's Avatar
    Join Date
    Apr 2010
    Posts
    874

    Re: How to Write an encripted Text File???

    You have to decrypt the content of the file before assigning the contents of a file to a textbox.

    vb Code:
    1. Public Sub Command1_Click()
    2. InitLUT 'this must be called before the cipher sub/function
    3.  
    4. Dim bAry() as Byte
    5. Open "c:\program files\visual director 2010\program\usernames\" & Form1.Text1.Text & ".pas" For Binary As #1
    6.     reDim bAry(lof(1)-1)
    7.     Get 1, 1, bAry
    8. Close #1
    9. Form1.Text3.Text = FXDeCipher(bAry) 'like this
    10. End Sub

  5. #45

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: How to Write an encripted Text File???

    Thanks I will try that!!
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  6. #46
    Member
    Join Date
    May 2010
    Posts
    35

    Re: [RESOLVED] How to Write an encripted Text File???

    This is how i solved it:

    First I googled a hashing algorithm (I found one which is one way hashing algorithm)

    Then I created a username and password, and stored the raw username and the hashed password and an access number (will tell you how i calculated this number)

    When you login just hash the password and compare the username and hashed passwords combination. if they match resolve the access number.

    The access number was calculated in the following way (this can be done in various ways but its the most foolproof idea i had)

    I made a string with all alphabet both caps, lower case and numbers. Then I go through the username letter by letter and search for it in that alphanumeric string, adding the position in the string it is found to a variable. When all username is added up i add 4 for admin rights, 8 for level 1, 16 for level 2 and so on and so forth. to find access level when you login just perform the strign search of the username and subtract the number read from the file to the total added. if it's 4 give him admin rights, 8 levle 1 etc etc

    this way even if they try to hash a password or leave it empty or something they still have to crack the "encryption" behind the access number...

  7. #47

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: [RESOLVED] How to Write an encripted Text File???

    Well it serves, my purpose for encription. I am quite sure that it is over 9-Bit of encription ciypher code strength.
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  8. #48
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [RESOLVED] How to Write an encripted Text File???

    Quote Originally Posted by ThEiMp View Post
    Well it serves, my purpose for encription. I am quite sure that it is over 9-Bit of encription ciypher code strength.
    Don't take this the wrong way, I do it myself at times but...

    ... it is considerd the height of arrogance and foolishness to write your own encryption code. It is just too easy to make a mess of or produce something very weak or flawed.


    And using Asc/Chr$ here you've deisgned in a "Unicode bug" that will bite you sooner or later.

  9. #49

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: [RESOLVED] How to Write an encripted Text File???

    What are you talking about. Where is the bug in the source code. That has been posted???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  10. #50
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [RESOLVED] How to Write an encripted Text File???

    The "bug" is that if you encrypt this way on a UK English machine, send the encryted text to say a Saudi Arabic machine, and decrypt it with your code... it will get mangled.

    Just how badly depends on how many characters in the plaintext were outside the range 0 to 127 and how many within that range are mapped differently using the two codepages.

  11. #51

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: [RESOLVED] How to Write an encripted Text File???

    Well this is meant for plain Western English typed machines. I am going to write an add on to work with changing text formats, also for .Text .Caption and so on. But I am trying to work with it for now. But will come up with a good multi-langague written file format. Even, for things like .Text and .Captions as well. Will me multi-langague. But that will have to be written into the program. As for now, that supports my rerquirements for the file formats.
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  12. #52
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [RESOLVED] How to Write an encripted Text File???


  13. #53
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [RESOLVED] How to Write an encripted Text File???

    Here's a funny one too:

    ASP and encryption
    What do I recommend? As both a security and VBScript expert, let me make this extremely clear:

    UNDER NO CIRCUMSTANCES SHOULD YOU EVER IMPLEMENT YOUR OWN ENCRYPTION ALGORITHM. NEVER NEVER NEVER.
    I assume you know who Eric Lippert is. You can blame him for little things like the FSO, major parts of the VBScript and JScript engines, VSTO, parts of C#, etc.

  14. #54
    Hyperactive Member
    Join Date
    Jul 2009
    Posts
    489

    Re: [RESOLVED] How to Write an encripted Text File???

    Quote Originally Posted by dilettante View Post
    The "bug" is that if you encrypt this way on a UK English machine, send the encryted text to say a Saudi Arabic machine, and decrypt it with your code... it will get mangled.

    Just how badly depends on how many characters in the plaintext were outside the range 0 to 127 and how many within that range are mapped differently using the two codepages.
    that's surprising, in other basic i work (bcx) the asc and chr are only type cast,
    they don't use any table to make the replacement.
    only type cast,
    for example:
    the asc input is a string, and the output is integer/byte
    chr input is integer/byte and the output is string

    are you saying, in vb these functions use a table to make the converting ?
    do they use api for that ?

  15. #55

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: [RESOLVED] How to Write an encripted Text File???

    Not sure, I didn't write it???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  16. #56
    Hyperactive Member
    Join Date
    Jul 2009
    Posts
    489

    Re: [RESOLVED] How to Write an encripted Text File???

    i'm sorry, i referred to dilettante

Page 2 of 2 FirstFirst 12

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