Set output buffer len variable if padding removed.
added getpass implementation for non windows

modifies terminal attributes to emulate _getch
don't require ushort to be present
fixed initialization of structure