bigloo.foreign.bgl_password C# (CSharp) Method

bgl_password() public static method

public static bgl_password ( byte prompt ) : byte[]
prompt byte
return byte[]
        public static byte[] bgl_password( byte[] prompt )
        {
            int len = 80;
            byte[] chars = new byte[ len ];
            int i = 0;
            Console.Error.Write( prompt );
            ConsoleKeyInfo key = Console.ReadKey( true );
            while( key.KeyChar != '\r' ) {
               if( i == len ) {
              byte[] nchars = new byte[ len * 2 ];

              for( i = 0; i < len; i++ ) {
             nchars[ i ] = chars[ i ];
              }

              chars = nchars;
              len *= 2;
               }
               chars[ i++ ] = (byte)key.KeyChar;
               key = Console.ReadKey( true );
            }
            return chars;
        }
foreign