Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Give a real usage example of using crypt

Posted on 2004-08-24
7
Medium Priority
?
260 Views
Last Modified: 2013-12-27
Can someone give an actual example of using the Solaris crypt utility on a file?
0
Comment
Question by:jbusad97
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 21

Accepted Solution

by:
tfewster earned 2000 total points
ID: 11885539
I'm not sure what you mean by a "real example";  Are you trying to figure out tthe man page?

crypt mykey   < clear.file    > encrypted.file
or
crypt   < clear.file    > encrypted.file         (and enter the key when prompted)
0
 
LVL 3

Expert Comment

by:dtkerns
ID: 11887992
also note, if you're a vi user you can use the following to edit the encrypted file:

vi -x encrypted.file

it prompts for the key just before clearing the screen and showing the contents
and of course, if the key you entered is wrong, you see junk ;)
0
 

Author Comment

by:jbusad97
ID: 11893838
For instance, if I have a file called foo.:

user1>$ ls -la
total 6
drwxr-xr-x   2 user1 staff      512 Aug 25 11:35 .
drwxr-xr-x  11 user1 staff      512 Aug 25 11:35 ..
-rw-r--r--   1 user1 staff      141 Aug 25 11:35 foo

show the steps that would be taken to encrypt this file.  Or better yet, create the file on your system, perform the steps for encryption, then cut and past your steps as your answer.  This is what was meant as a "real example".

Thanks.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 21

Expert Comment

by:tfewster
ID: 11896335
crypt mykey   < foo  > foo.encrypted; mv foo.encrypted foo
0
 
LVL 18

Expert Comment

by:liddler
ID: 12178327
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by tfewster {11885539}

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0
 

Author Comment

by:jbusad97
ID: 12216143
CRYPT AN ASCII FILE

An ascii file can be easily encrypted and
decrypted.

To encrypt simply pipe the STDOUT of
the file to "crypt" and redirect it to
a new file name. Enter a passowrd when
prompted with "Enter key".

$ cat foo | crypt > foo.e
Enter key:

To unencrypt simply pipe the STDOUT of
the encrypted file to "crpyt" and
redirect it to a new file name. Enter
a passowrd when prompted with
"Enter key".

$ cat foo.e | crypt > foo.new
Enter key:

or use vi -x to view the file
$ vi -x foo.e
Enter key:

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question