title: Crypt type identification /etc/shadow
body: <p>I know that the password field in /etc/shadow is prefixed with ${number}$ if it is not simply DES encrypted. What I am not able to find is a table that correlates the type of encryption to a given number.</p>
  
  <p>For instance, $1$ would indicate MD5. Its the rest that escape me (i.e. SHA1, SHA256, Twofish, Blowfish, etc)</p>
  
  <p>I've gone through the source to <code>passwd</code> and <code>chpasswd</code> as well as glib, but I'm not finding what I'm looking for.</p>
  
  <p>Would someone mind sharing a link to a web page, or even a clue as to where In glib I might find such a table? I need to progmatically update passwords from within a program without using system() or exec*() calls. I'd like to write original code because I want to keep a uniform 3 clause BSD license and full copyright over my code.</p>
  
  <p>Forgive me if this is a duplicate. I found lots of questions regarding how to parse /etc/shadow, but none that specifically ask how to identify the encryption type of the second field.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>For reference, <a href="http://people.redhat.com/drepper/SHA-crypt.txt" rel="nofollow noreferrer">here is the announcement</a> from the discussion group that moved forward implementing SHA (over DES) with support for BSD Blowfish.</p>