Why would my base64 encode string be out by just 2 characters



I am integrating an old intranet payroll system with the UK HMRC which requires the generation of an IRmark. This consists of taking a portion of the submission XML, applying sha1 hash and then base64 encoding. My output is out by 2 characters;



  • zUiQP1VubLslp/1dSPLZHrunyww= MY IR MARK - (length:28)

  • zUiQmFVubLslp/1dSPLZHrunyww= HMRC IR MARK - (length:28)


If the original XML is identical could the output be incorrect (as above) due to the HASH and encoding I am performing or is it 100% down to the original XML?


No comments:

Post a Comment