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
Filter by
Sorted by
Tagged with
0 votes
1 answer
76 views

Login Problems with PHP [duplicate]

I can't fix it yet and I don't know what's the problem is. I'm using it on xampp. I changed in my register.php the hash to sha256. Now if I'm trying to login with that's password and username which I ...
2 votes
2 answers
453 views

Payfort Signature mismatch

I have this request body to generate report: { "from_date":"2020-06-17T00:00:01+03:00", "to_date":"2020-06-18T10:59:59+03:00", "signature":"...
0 votes
1 answer
1k views

How to SHA-256 hash text in a chrome extension with SubtleCrypto

I am hashing a text field with Subtle Crypto and getting an [object ArrayBuffer]. The relevant code is here: async function asyncCall() { var enc = new TextEncoder(); // always utf-8 var enc2 = ...
1 vote
3 answers
1k views

Shopify verify webhook call in Scala

I'm implementing a simple web service for a Shopify webhook to call using Play2. I want to verify the call is from Shopify using the 'X-Shopify-Hmac-Sha256' header parameter included. The Shopify ...
1 vote
1 answer
116 views

Is it cryptographically secure to replace the numbers in a sha-256 hash with non hex alpha characters?

Fairly simple question here but wanted to make sure there isn't some aspect to this I'm not thinking of that makes this a terrible idea. Let's say I have a SHA-256 hash: ...
3 votes
1 answer
3k views

Verify EU GreenPass with openSSL

I just received my Covid Green Pass. I've started to decode it, here are the fields I get: header: a20448349a42b0c2d0728e0126 payload: ...
37 votes
6 answers
53k views

SHA-256 implementation in Python

I'm looking for a Python implementation of the SHA-256 hash function. I want to use it to get a better understanding of how the SHA-256 function works, and I think Python is the ideal language for ...
5 votes
3 answers
11k views

how to sign a token with RSA SHA-256, in python?

I am trying to encode a JWT with python, I need to encode it in base64, with i did. and then I have to sign it with a private key before sending to the server. actually I am blocked, when to sign it I ...
7 votes
5 answers
11k views

ES256 JWT Signing in PHP for Apple AppStoreConenct API Auth

I'm trying to authenticate to Apple's AppStoreConnect API with an ES256 signed JWT (per their instructions at https://developer.apple.com/documentation/appstoreconnectapi) using PHP. Sending my ...
0 votes
2 answers
101 views

Make batch omit lines from a file

I'm creating a batch fingerprinter, and I'm using a mix of SystemInfo and IpConfig to get a unique sha256 hash for a computer, the problem is i the systeminfo output there are things like boot time ...
2 votes
1 answer
503 views

Convert sha256 to smaller uint type

I'm implementing a hash table in c and I chose as key the sha256 hash of the file that I need to store. The problem is that I need to convert the key to a reusable index to insert in the hash table. I ...
3 votes
0 answers
789 views

FTX FIX protocol returns "Invalid signature" message

I have been trying to to implement a FIX Client in Go to interact with FTX. To send the initial logon message, FTX's API doc asks the client to include a signature in the message. In the return ...
0 votes
1 answer
140 views

I've had some issue testing SHA256

When using SHA256 it always returned me characters contained in the standard english alphabet(lowercase) and arabic numbers(0-9). So the character set returned was [a-z]U[0-9] The reason this confuses ...
2 votes
3 answers
2k views

how do I convert Integer to 64 bit big endian integer in python

Trying to recreate SHA256 hashing from the pseudocode on the wiki and it says to convert an integer to a 64 bit big endian integer. I can't find how to do this anywhere online and when I look up the ...
0 votes
0 answers
496 views

Nodejs and Amazon s3 invalid sha256 calculations

I have this issue with node and amazon s3 when it comes to sha256 encryption. I'm reading my files from the file system using fs.createReadStream(filename).am getting this file in chunks.Then am ...
1 vote
1 answer
671 views

How to create Hashvalue for the data file based on sha256 algorithm in AIX

The following command works for SHA1: csum -h SHA1 (FileName).txt > (FileName_chksum).txt. How to create a similar file using the SHA256 algorithm in AIX?
1 vote
1 answer
540 views

Why is my sha256 checksum incompatible with aws glacier checksum response?

I have an archive file in ubuntu server. I uploaded this file in AWS glacier using aws cli. at the finishing, AWS gave me a checksum like this: {"checksum": "...
-6 votes
2 answers
19k views

How long time would it take to decrypt a sha256 hash?

how to crack this hash if we know it have a length of 64 caracters and no upcases caracters and no special caracters only numbers and lowercase? if we could make about 1.000.000 guesses per second?
0 votes
1 answer
111 views

Zenity command to output SHA-256 hash

So I plan to use a zenity information message box to output a SHA256 within a "nemo_action". I have tried many different methods to accomplish this - none have so far been successful. Below ...
2 votes
1 answer
596 views

Computed Hash seems to be wrong with SHA256

I have the following class which computes a hash for a file that I want to send to a server. public class GetHashCode { public static string CalculateHash() { try ...
0 votes
0 answers
391 views

Encrypt / decrypt files in Python

How to encrypt and decrypt files in specified directories? I have a code for this but it only does it in local files. I mean it just dcrypts files from project's directories. I need add some specified ...
-2 votes
1 answer
220 views

Should SHA1CryptoServiceProvider and SHA256Managed return same value

I've seen questions stating the same hash is generated, but with the following code: var password = "TestPassword"; using (var hash = new SHA1CryptoServiceProvider()) { ...
1 vote
2 answers
3k views

Oauth with HMAC-SHA256 in Netsuite using PHP cURL GET

I am at my wits end... I have a working node.js implementation of this and trying to do the same in PHP I have run into a wall. I checked with hardcoded nonce and timestamp values and get the exact ...
17 votes
2 answers
76k views

Generate SHA256 in c++

I need to generate SHA256 of some data. I found this example is a very good one. Now my question is Can I generate a sha256 by using my own key. EDIT: First of all, sorry for wrong question. I don'...
0 votes
1 answer
614 views

Convert string in hash sha256

I want to convert a string in a sha256 hash using DCPCrypt. Form contains an edit to enter the string, a button to convert it and another edit to show the output sha256 hash. I have wrote this code: ...
0 votes
1 answer
2k views

SAML 2.0 Digest Value Calculation in SAML Assertion

I want to know how digestValue was calculated when we have AttributeStatement in the SAML 2 Response. I can calculate and get the same digestValue when I do not have any "saml2:AttributeStatement&...
-1 votes
2 answers
1k views

POST method does not pass the value password from the input field

Here form is submitted via POST method but password given in the input field of type=password not assigning to 'upassword' given in the userregister function.When I print the 'upassword' it gives an ...
0 votes
1 answer
204 views

Bash sha256 not matching erlang one [duplicate]

Erlang returns me a different result than the bash command when I "sha256". echo a | sha256sum, returns: 87428fc522803d31065e7bce3cf03fe475096631e5e07bbd7a0fde60c4cf25c7 - Erlang Bin = ...
1 vote
1 answer
130 views

Issue with F# SHA256Managed, output hash Removes 0's

Using F#, I'm trying to write a function to calculate the SHA256 hash of any given string. When I compare the hash values generated by my function to the one from this website (https://xorbin.com/...
0 votes
0 answers
160 views

Unsure if I correctly added my SHA256 code to GitHub correctly; Terminal gave strange readout

Today I was working on setting up my SHA256 code to GitHub, following the tutorial that I found on the Odin Project's Website and came across some strange readouts from terminal when I was trying to ...
0 votes
1 answer
286 views

SHA256 of a binary string?

I have a JSON object and I need to calculate the SHA256 hash of it. Now, I can either serialize it into a binary string or a human readable string. My question is does calculating the SHA256 hash of a ...
0 votes
1 answer
336 views

calculate merkle root from 2 transaction

I want to prove the calculation of Merkle root for bitcoin, but I can't get the same root as shown on block explorer. Data from block explorer (https://blockchair.com/bitcoin/block/80000) tx1 hash = &...
-6 votes
2 answers
33k views

Decrypt SHA256 hash to original string?

Is it possible to take an original hash value, and then decode it back to the original string? hash('sha256', $login_password_for_login) gets me a hash, as shown below, but I'd like to go from the ...
0 votes
0 answers
319 views

Encryption with an algorithm ES256 using openssl

I need to encrypt some data with an algorithm ES256(ECSDA with p-256 and SHA256) using C++ and openssllibrary. How can i do it?
1 vote
2 answers
725 views

generate a SHA256withDSA signature using Go and then verify it using Java

Go sha256 orign data then DSA sign it print sign result by hex use Java SHA256withDSA to verify first step result return false i konw sha256 then DSA is difference SHA256withDSA how can i do in Go to ...
0 votes
1 answer
484 views

sign a SHA-256 hash with DSA in Go

I want to sign a SHA-256 hash with DSA. Using Java I can write: Signature sig = Signature.getInstance("SHA256withDSA"); sig.initSign(priKey); sig.update(new byte[]{1}); byte[] sign = sig....
2 votes
1 answer
473 views

How can I generate a WM_SEC.AUTH_SIGNATURE in Ruby?

(What I'm ultimately trying to accomplish is to look up individual products on Walmart.com using product codes, so if anyone has another way of doing that, that works too) Walmart.io's Product Lookup ...
0 votes
1 answer
1k views

SHA256 encryption on a parameter in Postman

We have 3 parameters that we need to send through the API. One of them is the "apikey" which is a code already provided, the other one is "utcTimeStamp" and the last one is the &...
0 votes
1 answer
193 views

Python base64 hash with same output as C# Script

I'm working with a vendor who owns an API. In order to call the API, they require us to hash the whole body of the request and add it to a Content-Digest digest header key. Content-Digest: SHA256=<...
1 vote
1 answer
2k views

Get file hash (sha256sum) of file from multiple git commits

I want to get SHA256 of all versions of a file in a git repos. (In this case there is binary blobs in a repo, and want to find from which commit in a different repo they came from) We can use git show ...
1 vote
0 answers
383 views

Can 2 files have "same" "many" "different" types of hash?

I know that hash collision is possible with large number of files. But i want to know if 2 files can share "many , different" types of hash. I have 2 hashes SHA256 and BLAKE256 (Both will ...
0 votes
1 answer
1k views

OpenSSL: best way to sha256 hash two sha256 hashes

I have two sha256 hashes as hex strings HASH1=b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c HASH2=7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730 now I want to ...
0 votes
1 answer
71 views

Is this PHP snippet equivalent to the C# snippet?

We're given this C# snippet which generates some string to be used in a Rest API call. We have to implement it in PHP. The client also provides us with a PHP snippet, but the string returned by PHP is ...
20 votes
4 answers
13k views

Is it okay to truncate a SHA256 hash to 128 bits?

MD5 and SHA-1 hashes have weaknesses against collision attacks. SHA256 does not but it outputs 256 bits. Can I safely take the first or last 128 bits and use that as the hash? I know it will be weaker ...
1 vote
1 answer
691 views

Different hash values for identical input using different OpenSSL evp.h functions

Using the following code, why do I get different hash values? #include <iostream> #include <cstring> #include <openssl/evp.h> # define SHA256_DIGEST_LENGTH 32 using namespace ...
2 votes
1 answer
8k views

How to generate an Azure SAS token via Javascript (node.js)

I am trying to generate a valid SAS token (shared access signatures) to connect to the Azure IoT Hub, but I keep getting the error Connection refused: Not authorized when using the token. I know the ...
1 vote
0 answers
106 views

php - need help converting a python command to php code sha256

I'm using the python hashlib to get a condensed sha256 value using the following command, can someone help me out with a compatible function? import hashlib biz_number = "000-00-00000" ...
1 vote
0 answers
516 views

OpenCL SHA-256 GPU cannot compute more than 7670 hashes

I am trying to rearrange this algorithm for SHA-256 I found online for use on multiple threads, so that I can compute many hashes really fast. It is basically just to show the difference between CPU ...
1 vote
1 answer
338 views

Bitstamp Authenticated API hmac

I hope you have more luck on this than I have. As the title suggests I am trying to hit a private API endpoint on bitstamp.net. https://www.bitstamp.net/api/#api-authentication try as I might I cannot ...
0 votes
1 answer
255 views

Why does HERE oauth2 token request api return 401300 with Rails but works fine with Postman?

When calling the HERE authentication service (https://account.api.here.com/oauth2/token) from one of the controllers of the RoR APP (Rails 5.0.6/ruby 2.6.1) I get a 401: "401300 Signature ...

1
8 9
10
11 12
40