changed password encoding method