EnDecrypt sample code