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

Hash value from C function

I have a problem and hope you can help me. I have a function written in C that returns hash a value. My headache is when I execute the program from another tool it takes a lot of time to run, probably because inside my function I run a command…
Wesley Romero
  • 51
  • 1
  • 7
0
votes
1 answer

Issue regarding Hmac SHA256 in different programming languages

I am facing an issue while trying to integrate HMACSHA256 (hashing) in different programmng languages. I have tried to implement the standard algorith with standard predefined methods in Java and C# and I am getting different results in different…
Chetan chadha
  • 558
  • 1
  • 4
  • 19
0
votes
1 answer

SHA256 is not generating right hash in php

Following is the procedure for generating a sha256 based hashed. Generated Hash The hash query string parameter is to be followed by the generated hash for that specific request. To generate the hash: Take the body of the HTTP POST request Add the…
Agile
  • 1
  • 2
0
votes
0 answers

How unique is sha256? Good enough to generate more unique results than 64 characters long unique number auto-incrementing primary index id in a db?

I would like to hash a numeric string because I do not want people to know the exact number for various security and other reasons. How about doing it so? $number = X; // get my number from wherever $secret = mt_rand(); // or…
lion
  • 97
  • 2
  • 13
0
votes
0 answers

Blockchain Beginner: How do I validate my SHA-256 hash submission, by converting it to a blockchain.info address?

I really need help here ... I know this is simple ... but if someone could explain this like they are talking to a ten year old I'd appreciate it I converted a JPEG to SHA-256 I submitted that SHA-256 hash to the blockchain using origin stamp…
0
votes
0 answers

Changing internal state of hash in Python

In a C program, I can change the internal state of the SHA256 algo as follows: SHA256_CTX c; SHA256_Init(&c); for (i =0; i<64; i++) SHA256_Update(&c, "$", 1); # 0x44332211 is just for example c.h[0] = htole32(0x44332211); c.h[1] =…
Jake
  • 16,329
  • 50
  • 126
  • 202
0
votes
0 answers

Few strings are failed to encrypt using AES256 in Java

This specific case is coming whenever i tried to encrypt single char strings in application. When i tried to encrypt the same string with main method then i was able to encrypt it. But when i run with the application then this specific issue is…
Sumanth Varada
  • 1,122
  • 1
  • 16
  • 17
0
votes
1 answer

How to resolve "ValueError: I/O operation on closed file" when output results to file?

I have a piece of code that converting email addresses to HASH using SHA256 algorithm. When running the code, the expected results are presented, but when i'm trying to output the results - i'm getting an error : ValueError: I/O operation on closed…
Yos
  • 3
  • 1
0
votes
1 answer

Is md5's padding the same that sh256?

I am trying to code in C both algorithms md5 and sha256 using the multiple documentations I found on the internet. My md5 seems to work fine, but not my sha256. Here is what I am trying to figure out, Is the padding step exactly the same for both…
0
votes
0 answers

ruby and javascript hmac signatures do not match giving same values

i am trying to conect my backend in ruby on rails with and end point and it asks for hmac signature of every request. they gave me an .html with some javascript that returns in the explorer console their value of hmac given a key and a payload, but…
0
votes
0 answers

How to Add Custom authentication in feathersjs authentication with SHA256 for Password

I notice that Feathersjs authentication using bcrypt for password. This is the code in hooks.js const { authenticate } = require('@feathersjs/authentication').hooks; const { hashPassword, protect } =…
Jond
  • 57
  • 1
  • 11
0
votes
0 answers

Validate a SHA256 (python generated) in C

I'm trying to validate a hash generated by python using the passlib (https://passlib.readthedocs.io/en/stable/lib/passlib.hash.sha256_crypt.html) in C code using openssl/sha.h. For the password "senhateste" the python passlib has generated the…
0
votes
0 answers

What data is used in the following tr34 asn.1 message for the generation of the signature?

I'm trying to validate the signature at the bottom of this message. I have the public key, but I don't know what part of the data is used. -----BEGIN TR34_Sample_UBT_KDH PEM…
0
votes
1 answer

What data is used to calculate the sha256 messagedigest of this asn.1 message?

Given the following asn.1 message, how is the sha256 message digest, "8798168E6F7F3118EDE8522B6336DFB56CFDF95DB7063CB7230EF00B4D666D1A", calculated? I realize it is a 32 byte hash of some data. What specific data is used to calculate the hash? This…
0
votes
1 answer

How to SHA256 hash a text file in chunks with openssl/sha.h

I'm trying to hash a file on my system and the hash in my C++ code is the correct length but it's a different hash that what I get when I $ echo -n file.txt | sha256sum I've tried to implement a mixture of what I've seen so far on stackoverflow and…
Bobby Strickland
  • 175
  • 4
  • 14