update encode/decode to use password & cipher ID