Questions tagged [sha256]

sha256 stands for Secure Hash Algorithm-256. It is a hash function computed with 32-bit words. It was designed by the US National Security Agency (NSA). It is used to authenticate Debian GNU/Linux software packages, in the DKIM message signing standard and many other applications.

sha256 stands for Secure Hash Algorithm-256. It is a hash functions computed with 32-bit words. It is one of the function in SHA-2 library. SHA-2 is a set of cryptographic hash functions (SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256) published in 2001 by the NIST as a U.S. Federal Information Processing Standard (FIPS).

It was designed by US National Security Agency (NSA). It is used to authenticate Debian GNU/Linux software packages, in the DKIM message signing standard and many other applications.

1952 questions
346
votes
8 answers

Generating a SHA-256 hash from the Linux command line

I know the string "foobar" generates the SHA-256 hash c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2 using http://hash.online-convert.com/sha256-generator However the command line shell: hendry@x201 ~$ echo foobar |…
hendry
  • 9,725
  • 18
  • 81
  • 139
310
votes
5 answers

How long is the SHA256 hash?

I'm going to run SHA256 on a password + salt, but I don't know how long to make my VARCHAR when setting up the MySQL database. What is a good length?
Tony Stark
  • 24,588
  • 41
  • 96
  • 113
297
votes
18 answers

How to hash some String with SHA-256 in Java?

How can I hash some String with SHA-256 in Java?
Ivana
  • 2,981
  • 2
  • 15
  • 4
175
votes
9 answers

Hashing a string with SHA256

I try to hash a string using SHA256, I'm using the following code: using System; using System.Security.Cryptography; using System.Text; public class Hash { public static string getHashSha256(string text) { byte[] bytes =…
Nattfrosten
  • 1,999
  • 4
  • 16
  • 21
168
votes
10 answers

Are there any SHA-256 javascript implementations that are generally considered trustworthy?

I am writing a login for a forum, and need to hash the password client side in javascript before sending it on to the server. I'm having trouble figuring out which SHA-256 implementation I can actually trust. I was expecting there to be some kind of…
jono
  • 1,782
  • 2
  • 13
  • 6
159
votes
5 answers

Mismatch Detected for 'RuntimeLibrary'

I downloaded and extracted Crypto++ in C:\cryptopp. I used Visual Studio Express 2012 to build all the projects inside (as instructed in readme), and everything was built successfully. Then I made a test project in some other folder and added…
Momonga
  • 1,843
  • 2
  • 15
  • 13
136
votes
11 answers

SHA1 vs md5 vs SHA256: which to use for a PHP login?

I'm making a php login, and I'm trying to decide whether to use SHA1 or Md5, or SHA256 which I read about in another stackoverflow article. Are any of them more secure than others? For SHA1/256, do I still use a salt? Also, is this a secure way to…
Tony Stark
  • 24,588
  • 41
  • 96
  • 113
120
votes
9 answers

Hash String via SHA-256 in Java

By looking around here as well as the internet in general, I have found Bouncy Castle. I want to use Bouncy Castle (or some other freely available utility) to generate a SHA-256 Hash of a String in Java. Looking at their documentation I can't seem…
knpwrs
  • 15,691
  • 12
  • 62
  • 103
119
votes
13 answers

SHA256 in swift

I want to use sha256 in my project, but I had some troubles rewriting objC code to swift code. Help me please. I used this answer: How can I compute a SHA-2 (ideally SHA 256 or SHA 512) hash in iOS? Here's my code var hash :…
Yury Alexandrov
  • 2,368
  • 5
  • 17
  • 17
111
votes
7 answers

SHA-256 or MD5 for file integrity

I know that SHA-256 is favored over MD5 for security, etc., but, if I am to use a method to only check file integrity (that is, nothing to do with password encryption, etc.), is there any advantage of using SHA-256? Since MD5 is 128-bit and SHA-256…
Dave
  • 8,163
  • 11
  • 67
  • 103
94
votes
1 answer

What's the difference between a Docker image's Image ID and its Digest?

This has been surprisingly confusing for me. I thought Docker's Image ID is its SHA256 hash. However, apparently the result from docker image ls --digests (listed under the column header DIGEST) is different from the IMAGE ID of that image. For…
xji
  • 7,341
  • 4
  • 40
  • 61
74
votes
8 answers

Generate sha256 with OpenSSL and C++

I'm looking to create a hash with sha256 using openssl and C++. I know there's a similar post at Generate SHA hash in C++ using OpenSSL library, but I'm looking to specifically create sha256. UPDATE: Seems to be a problem with the include paths. It…
stan
  • 4,885
  • 5
  • 49
  • 72
68
votes
5 answers

Obtain SHA-256 string of a string

I have some string and I want to hash it with the SHA-256 hash function using C#. I want something like this: string hashString = sha256_hash("samplestring"); Is there something built into the framework to do this?
Dariush Jafari
  • 5,223
  • 7
  • 42
  • 71
59
votes
6 answers

How can I compute a SHA-2 (ideally SHA 256 or SHA 512) hash in iOS?

The Security services API doesn't appear to allow me to compute a hash directly. There are plenty of public domain and liberally licensed versions available, but I'd rather use a system library implementation if possible. The data is accessible via…
James
  • 24,676
  • 13
  • 84
  • 130
59
votes
6 answers

Calculating a SHA hash with a string + secret key in python

Amazon Product API now requires a signature with every request which I'm trying to generate ushing Python. The step I get hung up on is this one: "Calculate an RFC 2104-compliant HMAC with the SHA256 hash algorithm using the string above with our…
mymmaster
  • 826
  • 1
  • 9
  • 17
1
2 3
99 100