title: XMPP SASL SCRAM-SHA1 Authentication
body: <p>Recently, I was able to get MD5 authentication working for XMPP streams in Swift IOS following the instructions on the following two websites (I used the CC-MD5 function of Apple's CommonCrypto C library for the actual hashing):</p>
  <p><a href="http://wiki.xmpp.org/web/SASLandDIGEST-MD5" rel="nofollow noreferrer">http://wiki.xmpp.org/web/SASLandDIGEST-MD5</a></p>
  <p><a href="http://www.deusty.com/2007/09/example-please.html" rel="nofollow noreferrer">http://www.deusty.com/2007/09/example-please.html</a></p>
  <p>I'm searching for a similar explanation for how to get other hashed SASL authentication schemes working, especially SCRAM-SHA1. I have found the official <a href="https://www.rfc-editor.org/rfc/rfc5802" rel="nofollow noreferrer">RFC5802</a> document but I'm having a lot of trouble understanding it (it is not specific to XMPP either). I would appreciate a simpler explanation or some simple readable code (C, PHP, C++, Javascript, Java) specific to XMPP authentication that doesn't use libraries for anything other than the actual hashing.</p>
  <p>I'm interested in understanding the process and am not looking to use the ios XMPP-Framework. Any help would be appreciated.</p>