test password encoding