{"id":46,"date":"2014-02-28T01:56:00","date_gmt":"2014-02-28T01:56:00","guid":{"rendered":"http:\/\/www.solewing.org\/blog\/?p=46"},"modified":"2014-07-08T18:51:17","modified_gmt":"2014-07-08T18:51:17","slug":"unix-compatible-password-encryption-for-java","status":"publish","type":"post","link":"http:\/\/www.solewing.org\/blog\/2014\/02\/unix-compatible-password-encryption-for-java\/","title":{"rendered":"UNIX-compatible Password Encryption for Java"},"content":{"rendered":"<p>I&#8217;m working on a project in which there is a need to encrypt passwords in format that is compatible with the <code>crypt(3)<\/code> function from the GNU C Library.  I looked around a bit and found a couple of alternatives, but none that implemented the SHA-512 and SHA-256 variants which are now commonplace on Linux systems.<\/p>\n<p>Lacking any better alternatives, I produced my own <a href=\"https:\/\/github.com\/soulwing\/crypt4j\">Crypt4j<\/a> module which provides a <code>crypt(3)<\/code> compatible implementation in Java, by using the open-source C implementations as a reference.  <\/p>\n<p>Crypt4j is open source, and uses the ASL 2.0 license.  If you use it in your own project, I&#8217;d like to hear about it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m working on a project in which there is a need to encrypt passwords in format that is compatible with the crypt(3) function from the GNU C Library. I looked around a bit and found a couple of alternatives, but none that implemented the SHA-512 and SHA-256 variants which are now commonplace on Linux systems. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[11,10,9],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-java","tag-crypto","tag-java-2","tag-unix"],"_links":{"self":[{"href":"http:\/\/www.solewing.org\/blog\/wp-json\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.solewing.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.solewing.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.solewing.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.solewing.org\/blog\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":3,"href":"http:\/\/www.solewing.org\/blog\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":49,"href":"http:\/\/www.solewing.org\/blog\/wp-json\/wp\/v2\/posts\/46\/revisions\/49"}],"wp:attachment":[{"href":"http:\/\/www.solewing.org\/blog\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.solewing.org\/blog\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.solewing.org\/blog\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}