Password encryption implementation