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

Ruby Sha256 hash continuation

I am interested in taking an existing hash and resuming the SHA256 encryption from that point. It seems doable in C++: This is what I have tried: irb(main):007:0> sha2 = Digest::SHA2.new => #
rpthomps
  • 11
  • 4
0
votes
0 answers

hashlib sha256 is giving different hash values in Python3

I'm writing functions for the proof of work algorithm in blockchain. As per this algorithm, I have to take two pieces of data (actual data - a dictionary and a nonce value - an integer) and hash them, and then verify whether the same information…
0
votes
3 answers

How to verify integrity of files using digest in python (SHA256SUMS)

I have a set of files and a SHA256SUMS digest file that contains a sha256() hash for each of the files. What's the best way to verify the integrity of my files with python? For example, here's how I would download the Debian 10 net installer…
Michael Altfield
  • 2,083
  • 23
  • 39
0
votes
1 answer

Python and threading: Why is extracting the computation outside of the locked area speeding up the code?

I am preparing a session for my team on threading and locking in Python and I've run into a situation I don't fully understand. In the code below, I'm computing hashes of many (1000) large strings (100k+ chars) using Thread pool in Python (pool of…
Ferrard
  • 2,260
  • 3
  • 22
  • 26
0
votes
1 answer

Custom SHA256 hash calculation fails on anything but an empty String

I am trying to create my own hashing framework/library, but I've stumbled across an issue. When I calculate the SHA256 hash of an empty string, the hash is calculated successfully, but when I calculate it for anything else, it fails. Can someone…
Bram
  • 2,718
  • 1
  • 22
  • 43
0
votes
1 answer

C# PHP SHA-256 hashing returns different value, but SHA-1 & base64 not

I am making backend system for mine game (server & client). I use following code to generate first part of signature (this one is corrupted one): #example data string Url = "https://example.com/api/test/example.php"; Dictionary
0
votes
0 answers

How to insert hash value to azure sql database from azure data factory data flow

I have a sql DB which stores hash value in the column of binary data type. I use sql hashbytes of shah256 algorithm in my sql stored procedure to find hash value and store in the db. I want to replicate the same in Azure data factory. I'm seeing…
javababy
  • 17
  • 10
0
votes
1 answer

Build hmac sha256 hashing algorithm in node.js

I am using Bold Commerce Webhooks to subscribe to subscription events in my store. They give documentation about how their request signatures are generated in PHP: $now = time(); // current unix timestamp $json = json_encode($payload,…
mnearents
  • 646
  • 1
  • 6
  • 31
0
votes
1 answer

SHA256 Hashing of String **With Update** (UTF8 String)

I'm Trying to Hash a String from Console Input with Update (Similar to That in Node Crypto); I've Used this in Node JS. How can I replicate this Behavior In C# import { createHmac } from 'crypto'; Hash(password: string, update: string): string { …
ax39T-Venom
  • 32
  • 1
  • 5
0
votes
1 answer

How to get first 128 bits of sha256 as u128, without a Result?

This works, but is very convoluted: let mut hasher = Sha256::new(); hasher.update(foo); hasher.update(bar); let hash = hasher.finalize(); let hash_array: [u8; 16] = hash[0..16].try_into().expect("slice with incorrect length"); let hash128 =…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
0
votes
0 answers

Is there a Dart equivalent to PHP "Hash_init" "Hash_update" "Hash_Final" for Sha256

The object is to make pass-hash for an AES file. PHP $aes_key = str_pad($iv, self::KEY_SIZE, hex2bin("00")); for ($i = 0; $i < self::HASH_ITERATION; $i++) { $hash = hash_init("sha256"); hash_update($hash, $aes_key); hash_update($hash,…
0
votes
0 answers

WordPress and SHA256 passwords

i am testing on my wordpress installation to get wordpress using sha256 instead of md5. i found these snippets to overwrite the pluggable wordpress functions - i putted them into the functions.php of my activated theme: if( !…
0
votes
0 answers

Hmac SHA256 produces different length keys when translating from java to javascript

I am working on translating an API from Java into Javascript (nodeJs). The problem is that the signatures generated by the Java code are much shorter than the one in javascript. The results from the getSignature function have different length and as…
0
votes
1 answer

Oracle Equivalent to C# HMACSHA256

I am trying to port C# functionality to Oracle and I am having an issue with HMACSHA256: Oracle function HMACSha256(key in varchar2 default null, str in varchar2) return varchar2 is l_encryption_object cp_encrypt.encryption_object; …
baterhead
  • 23
  • 2
0
votes
1 answer

Sha256 function in PHP with init?

Are there any function in PHP where you can set init state for sha256? I would like to translate this javascript to php https://github.com/jwhitehorn/jsMiner/blob/4fcdd9042a69b309035dfe9c9ddf716119831a16/engine.js#L149-165
Codler
  • 10,951
  • 6
  • 52
  • 65