LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-04-2013, 01:57 PM   #1
anuRV
LQ Newbie
 
Registered: Jul 2013
Posts: 7

Rep: Reputation: Disabled
using SHA1 on terminal


Hi,

I am trying to use SHA1 on the terminal in my macbook. Do I need any prerequisites?

sha1::sha1 "test string"
-bash: sha1::sha1: command not found

Any help or information on SHA1 and its usage would be appreciated.

Thanks in advance
ANRV
 
Old 10-04-2013, 03:12 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,103
Blog Entries: 6

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
md5sum filename
sha1sum filename
 
Old 10-16-2013, 04:16 PM   #3
anuRV
LQ Newbie
 
Registered: Jul 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hi again!

I now encode a file as below:
openssl sha1 -hex myFile.txt
SHA1(myFile.txt)= 951d2dd9ee6eda62be4eaba4101edc3174723e21

openssl sha1 -hex "mystring"
mystring: No such file or directory

Can anyone help me figure out how to encode the contents of the file rather than the file name?
Or how to encode a string?

Thanks in advance.
 
Old 10-17-2013, 02:50 PM   #4
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,103
Blog Entries: 6

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
sha1 gives you the checksum of a file or string. You can then compare that to a known unchanged file to see if the file has the same checksum, (It is the exact same unaltered file) It is possible to enc with openssl.

http://www.bresink.com/osx/sha1.html
http://support.apple.com/kb/HT1652
http://en.wikipedia.org/wiki/SHA-1
http://www.madboa.com/geek/openssl/#encrypt-simple
http://www.madboa.com/geek/openssl/#encrypt-base64
http://www.madboa.com/geek/openssl/#key
http://www.madboa.com/geek/openssl/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SHA1 driver mushki5 Programming 2 01-30-2012 09:43 PM
Help with MD5 and SHA1 signatures DeepSeaNautilus Linux - Security 6 08-11-2008 09:51 PM
checking sha1 file trueromance Fedora - Installation 3 12-25-2005 11:17 AM
Spamassassin Digest::SHA1 twantrd Linux - Software 0 02-06-2005 07:00 PM
Getting SHA1... Red Guy Linux - Software 0 07-22-2003 10:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration