title: Generating crypt() sha512 hashes in Go
body: <p>I am working on my authorization module in GoLang. Before we used PHP5 with the crypt function. The hash was generated like SHA-512:</p>
  
  <pre><code>$6$rounds=5000$usesomesillystri$D4IrlXatmP7rx3P3InaxBeoomnAihCKRVQP22JZ6EY47Wc6BkroIuUUBOov1i.S5KPgErtP/EN5mcO.ChWQW21
  </code></pre>
  
  <p>And stored like that in the database. But now I need make it work also in GoLang. I have searched on Google and tried different things, such as:</p>
  
  <pre><code>t512 := sha512_crypt.Crypt("rasmuslerdorf", "$6$usesomesillystringforsalt$")
  fmt.Printf("hash: %v\n", t512)
  </code></pre>
  
  <p>But all generate different things. Who can help us further?</p>
  
  <p>We want validate and create hashes like the php version.</p>
  
  <p>Thanks in advance.</p>