jbusad97
asked on
Give a real usage example of using crypt
Can someone give an actual example of using the Solaris crypt utility on a file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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.
crypt mykey < foo > foo.encrypted; mv foo.encrypted foo
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
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
ASKER
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:
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:
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 ;)