Comments (6)
My personal preference would be as follows:
use octavo::digest::Sha1;
use octavo::digest::sha2::Sha512;
use octavo::digest::sha3::Sha256;
This fits my expectations as a user: I've never heard of the the SHA3 versions referred to as - e.g. sha3512. SHA1 is its own algorithm, whereas SHA2/3 are families of algorithms. And it's still easy to use both in the same program:
use octavo::digest::{sha2, sha3};
let digest1 = sha2::Sha512::default();
let digest2 = sha3::Sha512::default();
from octavo.
Me too, but as SHA-3 is fairly new I do not hear much about it. SHA-2 functions are commonly refereed as SHA-XXX
not SHA2-XXX
and only tool that support SHA-3 under that name (that I know) is rhash
which refers to it as SHA3-XXX
.
To make it more weird and complicated SHA-1 and SHA-2 was described in the same document FIPS 180-4 and SHA-2 hash family was refereed as SHA-XXX
there, this make impression that SHA-1 and SHA-2 (namely SHA-XXX) are related and SHA-3 is whole new hash function family.
EDIT:
Also NIST on their page refers to SHA-2 family as SHA-XXX and to SHA-3 as SHA3-XXX
from octavo.
@Dr-Emann suggestion looks good to me, when in doubt naming should be obvious even if we need one more level for the namespace.
from octavo.
@arthurprs it also seems right to me, but I don't know if Sha1
should be reexported. It could be both, but I am still not sure.
from octavo.
This also leave us with whole MD family. It should be moved into one module named octavo::digest::md
or should be left as is?
from octavo.
FIxed by #53
from octavo.
Related Issues (20)
- Improve english in the README. HOT 1
- error[E0658]: use of unstable library feature 'wrapping_int_impl' (see issue #32463)
- AES HOT 1
- Typo in docs HOT 1
- Octavo is not available on crates.io HOT 1
- Stream{Encrypt,Decrypt} traits not public HOT 1
- ChaCha20 only encrypts partial content, when invoked repeatedly HOT 1
- Constant Time Story HOT 1
- Make OpenSSL optional dependency HOT 1
- Implement SHA-512/224 and SHA-512/256 functions
- Implement SHAKE128 and SHAKE256 functions HOT 1
- Implement Poly1305 MAC
- Implement Diffie-Hellman key exchange algorithm HOT 1
- Implement elliptic curves basics for ECDH and ECDSA
- Copy, Clone not implemented for digests HOT 3
- Make digest pass tests for vectors from NIST for longer messages HOT 1
- Order of tests running
- Automatic code review
- WHIRPOOL returns invalid data HOT 1
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 octavo.