Results 1 to 7 of 7

Thread: Simple Encryption

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    135

    Simple Encryption

    Is it possible to encrypt certain string and it output 10 character?.

    any idea?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Simple Encryption

    The length of the encrypted data would depend on the length of the original data. Hashing can and does output specific length regardless of the input, but hashing is one-way, so you cannot get the original data back again.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    135

    Re: Simple Encryption

    Quote Originally Posted by jmcilhinney View Post
    The length of the encrypted data would depend on the length of the original data. Hashing can and does output specific length regardless of the input, but hashing is one-way, so you cannot get the original data back again.
    Hi jm,
    can you give me sample code of how hashing works that can output specific length regardless of the input..

    thank you.

  4. #4
    Member
    Join Date
    Dec 2007
    Posts
    32

    Re: Simple Encryption

    This might be helpful for ya:
    http://support.microsoft.com/kb/301053

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    135

    Re: Simple Encryption

    Hello,

    Since hashing is one way..i rather go for two way...how can i encrypt my 10 character string..and it output also 10 character string.?...i think this is possible as jm said at post #2..the length of the encrypted data depend on length of the original data..

    any can show me sample on how to do this..?..

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Simple Encryption

    I didn't mean that the output would be the same length as the input. Maybe it will and maybe it won't, but varying the input length will definitely vary the output length. Can you maybe give us the full story here, like how you actually intend to use this data?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    135

    Re: Simple Encryption

    sorry jm im misunderstand you.

    actually,our server will initiate the string encryption and the encrypted string will be send to our client through text message and that encrypted string will be inputted to their client system.and it agreed that 10 character string will be good enough..so that client will not type very long string.

    by this requirements,i would like to make an encryption algorithm that will take 10 character string and output also exactly 10 character string.

    code to encrypt: 0531000002

    053 - client code
    100000 - is the amount
    2 - count

    the encrypted string will be decrypted in the client system and extract the decrypted code to read the client code ,amount and count..

    BTW,mysql server will do the encryption through script.and decrypted by the client system using vb.net

    hope this is possible.

    thank you.

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