hash encode/decode and encryp