MD5Crypt Algorithm

I work with Windows-based Subversion and would like to write a lightweight utility in .NET for working with the Apache password file. I understand that it uses a function called MD5Crypt, but I cannot find a description of the algorithm, except that at some point it uses MD5 to create a hash.

Can someone describe the MD5Crypt algorithm and password string format?

+3
source share
4 answers

An exact textual description of the cryptography algorithm, updated for use with sha256 and sha512, is available at http://www.akkadia.org/drepper/SHA-crypt.txt

It includes contrasts with the MD5 algorithm, so it should give you what you are looking for.

+4
source
+3

MD5Crypt unix. freebsd .

:

  • -
    • ,

:

  • , "jeff" , "jeff" .
  • .
  • , -, , , , "jeff" .

, "salt" .

  • .
  • , "zuzu", "rjrj".
  • "jeffzuzu" "jeffrjrj" .
  • .
  • , .

.net, :

System.Security.Cryptography.MD5CryptoServiceProvider md5 = new
System.Security.Cryptography.MD5CryptoServiceProvider();

string hash =BitConverter.ToString((md5.ComputeHash(
System.Text.ASCIIEncoding.Default.GetBytes(stringtohash) ) ));

!

+2

... , 1000 . , base64 , .

, glibc cygwin.

Apache, Apache implementation crypt-md5.

The original algorithm (I think) in C can be found here . It differs from the above implementation only in a different magic number.

+2
source

Source: https://habr.com/ru/post/1696502/


All Articles