Decode strings in more secure manner