Solved

Give a real usage example of using crypt

Posted on 2004-08-24
7
258 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 500 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

751 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