#include <stdio.h>

void main()
{
  char passwd[256];

  printf( "Enter password: " );
  fflush( stdout );
  gets( passwd );

  for( long crc(0), i(0); passwd[i]; crc = (crc << 1) ^ passwd[i++] );

  crc &= 0x7fffffff;

  printf( "Crypted: %ld", crc );
}