get md5

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • erdem

    #1

    get md5

    hi,
    i have 2 different applications. (1 is WEb application (asp.net), other
    is windows forms app.)

    Web application saves user information (username, pass) to database for
    a while, using HashPasswordFor StoringInConfig File method (using MD5).

    i want to use this same information in windows forms app. so that users
    can log in with their current user/pass.
    But i cant use HashPasswordFor StoringInConfig File method to get hash of
    password.

    i tried

    System.Security .Cryptography.M D5CryptoService Provider oMD5Hasher
    = new System.Security .Cryptography.M D5CryptoService Provider();
    System.Text.Enc oding enc= System.Text.Enc oding.ASCII;
    string hashedpass =
    BitConverter.To String(oMD5Hash er.ComputeHash( enc.GetBytes(tx tPass.Text)));

    but this does not get same hash for same password string.

    How can i get md5 hash of file so that produced hash will be same as
    HashPasswordFor StoringInConfig File method from windows forms without
    using HashPasswordFor StoringInConfig File method.


    Regards

    Erdem
  • erdem

    #2
    Re: get md5

    erdem wrote:[color=blue]
    > hi,
    > i have 2 different applications. (1 is WEb application (asp.net), other
    > is windows forms app.)
    >
    > Web application saves user information (username, pass) to database for
    > a while, using HashPasswordFor StoringInConfig File method (using MD5).
    >
    > i want to use this same information in windows forms app. so that users
    > can log in with their current user/pass.
    > But i cant use HashPasswordFor StoringInConfig File method to get hash of
    > password.
    >
    > i tried
    >
    > System.Security .Cryptography.M D5CryptoService Provider oMD5Hasher
    > = new
    > System.Security .Cryptography.M D5CryptoService Provider();
    > System.Text.Enc oding enc= System.Text.Enc oding.ASCII;
    > string hashedpass =
    > BitConverter.To String(oMD5Hash er.ComputeHash( enc.GetBytes(tx tPass.Text)));
    >
    > but this does not get same hash for same password string.
    >
    > How can i get md5 hash of file so that produced hash will be same as
    > HashPasswordFor StoringInConfig File method from windows forms without
    > using HashPasswordFor StoringInConfig File method.
    >
    >
    > Regards
    >
    > Erdem[/color]
    My mistake

    Web app was using SHA1 encryption
    sorry

    Erdem

    Comment

    Working...