Results 1 to 5 of 5

Thread: [RESOLVED] Coding codes and decoding

  1. #1

    Thread Starter
    Addicted Member ajames's Avatar
    Join Date
    Mar 2005
    Location
    Wales, UK
    Posts
    178

    Resolved [RESOLVED] Coding codes and decoding

    I am making an encryption program with vb6 How would I turn each letter of a message into an ASCII equivalent?
    The codes I have tried just turn one letter into ASCII.

    Once this has been done, the program will multiply all of the ASCII numbers by a user specified amount.

    If the message is recived, and the other user knew what to divide the number by, how would I break the code up back into a message?

  2. #2
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Coding codes and decoding

    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  3. #3

    Thread Starter
    Addicted Member ajames's Avatar
    Join Date
    Mar 2005
    Location
    Wales, UK
    Posts
    178

    Re: Coding codes and decoding

    I cant figure out how to make it encode the text or decode it
    Last edited by ajames; Sep 4th, 2005 at 06:02 AM. Reason: misspell

  4. #4
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Coding codes and decoding

    Quote Originally Posted by ajames
    I cant figure out how to make it encode the text or decode it
    It's easy.
    You just pass the text you want to encrypt to Encrypt function with some key.
    When you want to get teh original text back again, just pass the Encrypted text to Decrypt function with the same key with which it was encrypted.
    e.g.
    VB Code:
    1. Private Sub Command1_Click()
    2.     Dim EncryptedText$, DecryptedText$
    3.     EncryptedText = Encrypt("Hello this is a test", "ajames")
    4.     MsgBox EncryptedText
    5.     DecryptedText = Decrypt(EncryptedText, "ajames")
    6.     MsgBox DecryptedText
    7. End Sub

    Pradeep
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  5. #5

    Thread Starter
    Addicted Member ajames's Avatar
    Join Date
    Mar 2005
    Location
    Wales, UK
    Posts
    178

    Re: Coding codes and decoding

    Thanks!
    Last edited by ajames; Sep 4th, 2005 at 09:19 AM.

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