Comments (4)
from crypto-algorithms.
So you're implying that SHA256 yields a 64 byte hash? As far as I know, the hash is indeed 32 bytes. From the name "SHA256" it's visible that the hash is 256 bits long and that unsigned chars are used as bytes (8 bits), we can calculate that the hash is 256/8 (32) bytes long.
Maybe you're referring to the size of bytes if the hash is converted to a hexadecimal string and as one hexadecimal character represents 4 bits but takes 8 bits of space, the resulting "block" would be two times larger. This implementation does not store hashes as hexadecimal strings.
from crypto-algorithms.
@sijanec
Thanks for your reply. However, According to the SHA standard, the output value size and the block size might be different. For example, according to https://en.wikipedia.org/wiki/Secure_Hash_Algorithms, SHA-224 and SHA-256's output size is 28 and 32 respectively, but both of the block size are 64 bytes(512-bit).
Any comments?
/Sgetz
from crypto-algorithms.
@sijanec
Never mind. The library is very good and I appreciate your release. Moreover, It would not confuse anyone if you replace SHA256_BLOCK_SIZE
with SHA256_OUTPUT_SIZE
.
Just my 2 cents.:smile:
/Sgetz
from crypto-algorithms.
Related Issues (17)
- Implementation error in the ARCFOUR cipher
- about license HOT 2
- Typedefs on Windows HOT 1
- Licence missing HOT 5
- Sha256 calculates wrong hashes on 16 bit target HOT 3
- des.c compile error
- Incorrect reference hash for "aaaaaaaaaa" HOT 2
- Support AES256/CBC/PKCS7Padding ?
- file md5 error
- sha256.c Warning C4244'=': conversion from 'unsigned __int64' to 'BYTE', possible loss of data
- One of the comments in blowfish.c may be wrong
- Signed overflow undefined behavior in md5.c
- Context doesn't get cleaned up after being used
- There is no 32-bit WORD. That's called a DWORD HOT 2
- Base64_test fails HOT 3
- Aes.h missing aes_decrypt_cbc?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crypto-algorithms.