Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 262
  • Last Modified:

Give a real usage example of using crypt

Can someone give an actual example of using the Solaris crypt utility on a file?
0
jbusad97
Asked:
jbusad97
1 Solution
 
tfewsterCommented:
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
 
dtkernsCommented:
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
 
jbusad97Author Commented:
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 Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
tfewsterCommented:
crypt mykey   < foo  > foo.encrypted; mv foo.encrypted foo
0
 
liddlerCommented:
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
 
jbusad97Author Commented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now