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
28
votes
5 answers

How to use SHA256-HMAC in python code?

I am taking message and key from this URL import hmac import hashlib import base64 my =…
Venkatesh Panabaka
  • 2,064
  • 4
  • 19
  • 27
28
votes
7 answers

signtool failing to dual sign SHA2 and SHA1 with timestamps

We need to dual sign our binaries with SHA1 and SHA2 using signtool.exe, our certificate supports 256-bit SHA2. Using the Windows 8 SDK's signtool: e.g.: signtool.exe sign /as /fd sha256 /t http://timestamp.verisign.com/scripts/timstamp.dll /f…
JosephA
  • 1,187
  • 3
  • 13
  • 27
27
votes
1 answer

Is there an equivalent of PHP's hash_hmac in Python/Django?

I want to forward my visitors to a 3rd party paysite. This 3rd party will process their payment and POST to me a 64 character token generated from a unique order number and shared password using PHP's hash_hmac using the sha256 algorithm, like…
kshen
  • 525
  • 2
  • 9
  • 17
27
votes
4 answers

How can I decrypt a HMAC?

I can make an HMAC using the following: var encrypt = crypto.createHmac("SHA256", secret).update(string).digest('base64'); I am trying to decrypt an encoded HMAC with the secret: var decrypt = crypto.createDecipher("SHA256",…
ThomasReggi
  • 55,053
  • 85
  • 237
  • 424
26
votes
3 answers

(bitcoin) Calculate hash from getwork function - how to do it?

when I call getwork on my bitcoind server, I get the following: ./bitcoind getwork { "midstate" : "695d56ae173bbd0fd5f51d8f7753438b940b7cdd61eb62039036acd1af5e51e3", "data" :…
Anon21
  • 2,961
  • 6
  • 37
  • 46
26
votes
6 answers

Get a file SHA256 Hash code and Checksum

Previously I asked a question about combining SHA1+MD5 but after that I understand calculating SHA1 and then MD5 of a lagrge file is not that faster than SHA256. In my case a 4.6 GB file takes about 10 mins with the default implementation SHA256…
Mohammad Sina Karvandi
  • 1,064
  • 3
  • 25
  • 44
25
votes
1 answer

What does SHA256 hexadecimal string look like?

I have been looking all over google to find what the hex output of a SHA256 hash looks like. But I just can't seem to find it. So what does a SHA256 hash look like when it's converted to hexadecimal?
Simon Verbeke
  • 2,905
  • 8
  • 36
  • 55
25
votes
3 answers

Generating a SHA256 hash with Crypto++, using a string as input and output?

I need an example of how to use Crypto++ to generate a SHA256 hash from a std::string and output a std::string. I can't seem to figure it out. Everything I've tried gives me invalid output. Here's the new code after interjay's answer: string…
Doug
  • 935
  • 2
  • 10
  • 15
24
votes
4 answers

Is any substring of a hash (md5, sha1) more "random" than another?

Here's 3 example md5 hashes $ md5 -s "1" && md5 -s "2" && md5 -s "3" MD5 ("1") = c4ca4238a0b923820dcc509a6f75849b MD5 ("2") = c81e728d9d4c2f636f067f89cc14862c MD5 ("3") = eccbc87e4b5ce2fe28308fd9f2a7baf3 Say I wanted to take 8 characters from any…
maček
  • 76,434
  • 37
  • 167
  • 198
24
votes
6 answers

PHP salt and hash SHA256 for login password

I've made encrypting of the password in my register script and they are stored in the database, and I have to use them to login, so I would want to use the unencrypted ones to login. I've read some of the threads in here but nothing is helping me.…
slavacademy
  • 676
  • 1
  • 9
  • 22
24
votes
3 answers

SHA 256 pseuedocode?

I've been trying to work out how SHA-256 works. One thing I've been doing for other algorithms is I've worked out a sort of step by step pseudocode function for the algorithm. I've tried to do the same for SHA256 but thus far I'm having quite a bit…
codelion
  • 319
  • 1
  • 2
  • 11
23
votes
2 answers

sha256 function in SQL Server

Is there a built-in sha256 function in SQL Server? I can't find a sha256 T-SQL function source code either. Anyone who has an alternative?
setzamora
  • 3,560
  • 6
  • 34
  • 48
21
votes
1 answer

How does one generate an HMAC string in Elixir?

I'm attempting to write an Amazon Product Advertising API client in Elixir. The developer guide describes the process for signing an API request in which the an HMAC-SHA26 hash must be created using the request and the "Secret Access Key." This is…
Zach Garwood
  • 312
  • 1
  • 2
  • 9
21
votes
4 answers

Is SHA-256 Case Insensitive?

I'm running a service that is using SHA-256 on two sides of the application - one is a server-side PHP implementation and the other is a client-side iOS implementation. The result of using the algorithm on both sides is the same alphanumeric string,…
paradox870
  • 2,152
  • 4
  • 20
  • 30
20
votes
4 answers

Undefined function sha256()

I have this php code: $password = sha256($_POST['password']); but when I run this code it says: Fatal error: Call to undefined function sha256() in .... on line ...ix it as What is wrong with this code and what must I do to fix this as I know…
H Bellamy
  • 22,405
  • 23
  • 76
  • 114