mrtg
+ Reply to Thread
Results 1 to 9 of 9

Thread: How to encrypt string in c#...

Hybrid View

  1. #1
    svr2112 Guest

    How to encrypt string in c#...

    You can use following code for encryption

    private string encryptString(string strToEncrypt)
    {
    System.Text.UTF8Encoding ue = new System.Text.UTF8Encoding();
    byte[] bytes = ue.GetBytes(strToEncrypt);

    // encrypt bytes
    System.Security.Cryptography.MD5CryptoR*0; der md5 = new System.Security.Cryptography.MD5CryptoSeR*0; der();
    byte[] hashBytes = md5.ComputeHash(bytes);

    // Convert the encrypted bytes back to a string (base *6)
    string hashString = "";

    for(int i=0;i
    {
    hashString += Convert.ToString(hashBytes[i],*6).PadLefR*0;
    }

    return hashString.PadLeft(*2,'0');
    }

    _____________
    Last edited by DougN; 06-09-2015 at 05:10 PM.

  2. #2
    Join Date
    Oct 2010
    Posts
    3
    if u dont want the user to be able to see the querystring, just use action=POST instead of get in ur form tag (by default action=GET). this would hide the querystring from the user. or you could write functions in js to encrypt and decrypt the request url. (use any of the encryption algos.) but i'd still s***est using post action
    ............................................................
    Last edited by DougN; 06-09-2015 at 05:10 PM.

  3. #3
    Join Date
    May 2012
    Posts
    1
    i like this forum very much because i have get a lot of required data from this forum.
    now i want to buy some net tools will provide me some tools or guide me about that???
    thanks..

  4. #4
    Join Date
    Jun 2012
    Posts
    1

    # How to encrypt string in c

    You can use following code for encryption

    private string encryptString(string strToEncrypt)
    {
    System.Text.UTF8Encoding ue = new System.Text.UTF8Encoding();
    byte[] bytes = ue.GetBytes(strToEncrypt);





    thanks
    Last edited by DougN; 06-09-2015 at 05:10 PM.

  5. #5
    Join Date
    Nov 2013
    Posts
    6
    thanks for sharing and i am good with getting those all and by the way have got a fair clue towards the proper implementation of the same method
    www.healthisgod.com/tevida-testosterone-booster

  6. #6
    Join Date
    Sep 2014
    Posts
    16
    You can use following code for encryption

    private string encryptString(string strToEncrypt)
    {
    System.Text.UTF8Encoding ue = new System.Text.UTF8Encoding();
    byte[] bytes = ue.GetBytes(strToEncrypt);

    // encrypt bytes
    System.Security.Cryptography.MD5Crypto... der md5 = new System.Security.Cryptography.MD5CryptoSe... der();
    byte[] hashBytes = md5.ComputeHash(bytes);

    // Convert the encrypted bytes back to a string (base *6)
    string hashString = "";

    for(int i=0;i
    {
    hashString += Convert.ToString(hashBytes[i],*6).PadLef...
    }

    return hashString.PadLeft(*2,'0');
    }

+ Reply to Thread

Similar Threads

  1. how to encrypt private photos?
    By meiling277869 in forum Security & Encryption
    Replies: 5
    Last Post: 12-14-2009, 03:02 AM
  2. My Encrypt program help
    By Moonbat in forum Security & Encryption
    Replies: 8
    Last Post: 09-23-2006, 01:27 PM

Posting Permissions

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