Thank you that worked a treat and I appreciate I will definitely need to improve my best practices with this code. Just dipping my toe in at the moment.
One thing I noticed is that it seems to be padded with extra characters compared to what I think it should be in HEX and a String output. Any idea how to avoid this? Thanks again. DECODED TEXT HEX : 64617669646B656E6E65647904040404 SHOULD BE HEX : 64617669646b656e6e656479 DECODED TEXT B64 : ZGF2aWRrZW5uZWR5BAQEBA== SHOULD BE B64 : ZGF2aWRrZW5uZWR5 String :davidkennedy