pwencode function

Encode a password