Adding few additional adjustments on the code in order to sign the information correctly and be sure that it works using SalesForce SAML validator.