DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T g

⟦e6d526d5b⟧ TextFile

    Length: 577 (0x241)
    Types: TextFile
    Names: »genPatkey.cc«

Derivation

└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
    └─⟦cc8755de2⟧ »./libg++-1.36.1.tar.Z« 
        └─⟦23757c458⟧ 
            └─⟦this⟧ »libg++/etc/genPatkey.cc« 

TextFile

// Generates random character strings
#include <stream.h>

main (int argc, char *argv[]) 
{
  if (argc != 3) 
    {
      cout << "usage: " << argv [0] << " number-of-keys length-of-keys\n";
      return 1;
    }
  else
    {
      int Key_Number = atoi (argv [1]);     
      int Key_Length = atoi (argv [2]);

      srandom (getpid());

      for (int j = 0; j < Key_Number; j++)
        {
          for (int i = 0; i < Key_Length - (random () % 20); i++) 
            cout << char ('!' + random () % (1+'~'-'!'));
          cout << "\n";
        }

      return 0;
    }

}