SHA-256-Base 64 Encryption


 
Thread Tools Search this Thread
Operating Systems AIX SHA-256-Base 64 Encryption
# 1  
Old 10-05-2015
Question SHA-256-Base 64 Encryption

Hello Guys,

I was trying to have an SHA256 encryption which further be encrypted into base 64 using AIX unix command shasum -a 256.

What I found in this is my output is different than a website: "online-convert[dot]com"

Actually conversion from website is exactly matching my requirements but same when I am trying to achieve using AIX Unix commands unable to get matching result.

Can anyone help to resolve this.
# 2  
Old 10-05-2015
Moderator's Comments:
Mod Comment Posting "Does not work" without explanation does not help you or anyone. If a command does not work for you, please show the exact circumstances you used it, and the exact error or malfunction you received. Do not paraphrase errors, or post the text as links, images, or attachments if you can avoid it: Paste the exact message, in code tags, like [code] text [/code] or by selecting the text and using the https://www.unix.com/images/editor/code.png button.

Thank you.

The UNIX and Linux Forums


I suspect, but can't prove, that the ones you're hashing (not encrypting -- it's not reversible) in UNIX have linefeeds and the ones from the website do not.

There is zero point obfuscating a sha hash, don't bother. You could try salting it instead.
# 3  
Old 10-05-2015
Thanks Corona,

I was getting the output but not exactly matching.

I tried with "echo -n "foobar" | shasum -a 256" Command.

the Output HEX was not matching with the HEX in online website.

My ultimate goal is to achieve the exact output is in the Online converting website.

Sorry for less details but I cannot provide all tried versions. For test you can try encryption on "Foobar" keyword.
# 4  
Old 10-05-2015
I repeat, this is not encryption. You can't turn it back.

I also repeat, your shell command puts a newline on the end of the input, while the web command does not. (It's also putting -n in the string!)

Try:
Code:
printf "%s" "string" | shasum -a 256

This will avoid adding a newline to the end of the string.
# 5  
Old 10-06-2015
If you'd like to receive help, first of all you have to write what you expect to see. Then what you did and which output you got. Otherwise it is like reading the tea leaves.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need assistance with an IF statement to compare a list of SHA keys between two repositories.

Hello. My first time here. What I am trying to do is this. FileA is located on a web server FileB is located on local storage Both files contain a large list of information of not only SHA keys but versions, and other information. I need a statement that can compare between FileA... (5 Replies)
Discussion started by: Query
5 Replies

2. UNIX and Linux Applications

How to make ldappasswd use {SHA} instead of {SSHA} for users passwords in openldap?

Is it possible to use {SHA} with ldappasswd? I didn't find responsible option in manual page and doc (1 Reply)
Discussion started by: urello
1 Replies

3. Cybersecurity

File encryption tools with MAC address as an encryption key

Hi all, I'm looking for secure file encryption tools that use MAC address as encryption key. FYI, I'm using Red Hat Enterprise Linux OS. For example: when A wants to send file to B A will encrypt the file with B's computer MAC/IP address as an encryption key This file can only be decrypted... (2 Replies)
Discussion started by: sergionicosta
2 Replies

4. Red Hat

CentOS 6.1 base install (like FreeBSD base install)?

Hello, What is the simplest way to install CentOS 6.1 with console base-system only using official LiveDVD image on VirtualBox machine? I'd like to get simplest console with network support like FreeBSD base installation. Then, install services which I need. The installer jest extracts the... (2 Replies)
Discussion started by: newbie_develope
2 Replies

5. Linux

[Errno 256] No more mirrors to try.

Dear all, CentOS 6 After executing "yum update -y" command I am facing this error. Please help me out. thanks in advance. Full error & error code is given as follow: ... (7 Replies)
Discussion started by: saqlain.bashir
7 Replies

6. Linux

Convert MD5 password to SHA-512?

Hi, Is it possible to convert MD5 passwords to SHA-512? I'm about to migrate an old slackware server to Debian, then I noticed that they don't use same encryption method. I'm aware that I can change the encryption method in Debian to MD5, but as far as I understand SHA-512 is more secure,... (2 Replies)
Discussion started by: urandom
2 Replies

7. Programming

pgrep returns 256

Hi Everyone, I have a strange behaviour In my c program i use this line: int retval = system("pgrep encoder"); while i expect retval to contain 0,1,2,3 i get 256. did i do something wrong? thanks, Alex (2 Replies)
Discussion started by: alex889
2 Replies

8. UNIX for Dummies Questions & Answers

File encryption/Key encryption ????

My dilemma, I need to send, deemed confidential, information via e-mail (SMTP). This information is sitting as a file on AIX. Typically I can send this data as a e-mail attachment via what we term a "mail filter" using telnet. I now would like to somehow encrypt the data and send it to a e-mail... (1 Reply)
Discussion started by: hugow
1 Replies
Login or Register to Ask a Question