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
0
votes
1 answer

How can I place a pkcs signature using a RSA key in a transaction on a Block to put into Blockchain?

I'm currently working on a very simple project of a blockchain, mostly to understand the concept better by implementing it. I am using python do develop it so to implement a signature I used this function def sign(self): key =…
Gonçalo Correia
  • 1,595
  • 1
  • 10
  • 14
0
votes
0 answers

I need help understanding how the input for a SHA-256 function is generated for the following equation? (Equation and C code are in the body)

I have the following equation: c = SHA-256(Q, K(i,0), K(i,1), ..., K(i,k-1), h(i,0), h(i,2), …, h(i,k-1)) mod q and the input values: k1 =…
Bittu
  • 79
  • 1
  • 8
0
votes
1 answer

is there a function to convert sha-1 into sha256

is there a way to convert sha-1 to sha256 for a file. suppose SHA-1 of a files is a14bab81de06e9b590f6cfcd400f90fb5b667eff Func(a14bab81de06e9b590f6cfcd400f90fb5b667eff) = SHA-256 Here I don't have the original file, else Get-FileHash in powershell…
0
votes
1 answer

HMAC SHA256 calculation on large file (using system call)

I have the below code to generate a SHA256 HMAC hash: HMAC(EVP_sha256(), key, key_len, (const unsigned char *)data, strlen(data), digest, &digest_len); I would however like to generate HMAC SHA256 hash of a file. Please note the file is a big file…
0
votes
0 answers

How do I verify that the correct file was downloaded in C#?

How do I make sure that the downloaded file myfileLocal.wav matches myfileInServer.wav? using System.Net; WebClient webClient = new WebClient(); webClient.DownloadFile("http://example.net/myfileInServer.wav", @"c:\myfileLocal.wav"); Would it be a…
lakersfan
  • 71
  • 5
0
votes
1 answer

Calculate different hashes of stream in parallel

I want to calculate few different hashes of a file in parallel in order to increase the performance of my application. I have the following code: Dim lThreads As List(Of Thread) = New List(Of Thread)() For i = 0 To algorithms.Count - 1 Dim…
0
votes
1 answer

Problem with receive the same sha256 from float value in Java as in php

I have a problem with create the same hash (SHA256) in Java as in PHP. This PHP function
0
votes
0 answers

Data signed in C#, verifies in C# but not in Java

I have signed data that I would like to verify in C# as well as Java. While it verifies fine in C#, it fails in Java (no exception, but the verification function returns false. C# code: using System; using System.Security.Cryptography; namespace…
Night94
  • 965
  • 8
  • 11
0
votes
2 answers

Invalid start byte when using decode()

As a project, I have been experimenting with encoding, decoding, and hashing; I have been getting this common error every time, I test this program. The error is UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf2 in position 0: invalid…
M S
  • 15
  • 3
0
votes
1 answer

Is it normal that my mining function is looping indefinitely?

So i am trying to implement a cryptocurrency for a school project but i am stuck at the block validation part, the mining. I used this code i found online and i adapted it to my project: void Block::MineBlock(int nDifficulty) { std::string…
Anda
  • 670
  • 7
  • 7
0
votes
1 answer

Checking string hash type

I am trying to write code which validate if given string is hash in one from following types: md4, sha1, sha256. My functions right now looks like: def hash_is_md5(_hash) -> bool: search = re.compile(r"([a-fA-F\d]{32})").search return not…
user11979210
0
votes
1 answer

Connect to OKEX private api using cURL?

I am trying to check my Perpetual Swap contracts on Okex Exchange, from the terminal. I am using openssl to make the HMAC SHA256 signature. But so far I am only getting a "code":405," error, and the docs are not very…
nagualcode
  • 47
  • 6
0
votes
2 answers

How can I convert this HashSHA256(("").Encode("utf-8")).HexDigest() to C#?

The next pseudo code is got from the AWS documentation (section: Task 1, step 7): payload_hash = HashSHA256(("").Encode("utf-8")).HexDigest() It is used to calculate a payload of the GET-request. For convenience, this pseudo code can be rewritten…
user3856437
  • 2,071
  • 4
  • 22
  • 27
0
votes
1 answer

nodejs: Iterating through directory and capturing SHA256 value for each file

Goal: Iterate through all files in X directory and getting the SHA256 value for each file. The code below seems to almost work; it captures the SHA256 value for ONE file but failed at the next iteration. I've done some googling but due to my limited…
KhzEn
  • 1
  • 3
0
votes
1 answer

How to create SHA256 Passwords in PHP in this format?

What is this password format? From my research it looks like a 64 length 150000 itteration pbkdf2 sha256 encrypted key If i needed to write something in PHP to create users how would I go about doing so? …
Henry Aspden
  • 1,863
  • 3
  • 23
  • 45