Ecrypt

Go back to top

ECRYPT


FUNCTION

ECrypt writes an encrypted version of a file using a key word that you choose. Run ECrypt a second time with the same keyword to restore the encrypted output file to its original state.


DESCRIPTION

This program scrambles a text file using a keyword supplied by the user. To do this, the keyword is converted to upper case, and each character in every input line is transformed using a character in the key word. The scrambled (encrypted) file can be made readable again (decrypted) by using ECrypt on the file with the same keyword.


AUTHOR

This GCG program was modified by Jaakko Hattula (Tampere University of Technology, Finland) and Peter Rice (E-mail: pmr@sanger.ac.uk Post: Informatics Division, The Sanger Centre, Hinxton Hall, Cambridge, CB10 1RQ, UK).

All EGCG programs are supported by the EGCG Support Team, who can be contacted by E-mail (egcg@embnet.org).


EXAMPLE

Here is a session using ECrypt to encrypt the sequence file gamma.seq using the keyword 'secretive'.

  
  
  % ecrypt
  
    ECRYPT what input file ?  gamma.seq
  
    What encryption key ?  secretive
  
    What output file (* gamma.cpt *) ?
  
  %
  


OUTPUT

Now the contents of gamma.cpt is unreadable. The file can be unencrypted (made readable) by simply using ECrypt on the file again with the same keyword.

  
  
  % ecrypt
  
    ECRYPT what input file ? gamma.cpt
  
    What encryption key ?  secretive
  
    What output file (* gamma.txt *) ?  gamma.seq
  
  $
  
  
Now gamma.seq is readable again.


RELATED PROGRAMS

Replace, CompressText, OneCase, ShiftOver, DeTab, ChopUp, Crypt, Count, FileCheck, LPrint, ListFile, and GetText are the GCG file support programs. (See the File Utilities chapter of the Program Manual for a description of these programs.)


RESTRICTIONS

You should have very valuable data backed up. Do not rely on the output of ECrypt for archiving data. You can use the UNIX % diff command or FileCheck to check the integrity of unencrypted files. FileCheck calculates a checksum for a text file. This checksum is the same for identical files. The encrypted output file from ECrypt contains many non-printing characters, so do not try to print it or type it on your screen.


COMMAND-LINE SUMMARY

All parameters for this program may be put on the command line. Use the option -CHEck to see the summary below and to have a chance to add things to the command line before the program executes. In the summary below, the capitalized letters in the qualifier names are the letters that you must type in order to use the parameter. Square brackets ([ and ]) enclose qualifiers or parameter values that are optional. For more information, see "Using Program Parameters" in Chapter 3, Basic Concepts: Using Programs in the GCG User's Guide.

  
  
  Minimum Syntax: % ecrypt [-INfile=]gamma.seq  -KEY=secretive -Default
  
  Prompted Parameters:
  
  [-OUTfile=]gamma.cpt        Output file
  


LOCAL DATA FILES

None.


OPTIONAL PARAMETERS

None.

Printed: April 22, 1996 15:52 (1162)