Comments (4)
In your case it's better to use Digest
trait from the digest
crate, as I don't think you want to pull the whole rust-crypto
as your dependency just for one trait. Also look into digest-buffer
too, you may find it convenient.
One thing to note: Digest
trait probably will change a bit in the future (see #14), I will publish the new version under 0.5, but I think it's better for you to know about it.
Any chance that your hash implementation could become part of this project in the future?
UPD: Ah, you want to write Dropbox Content Hasher if I am not mistaken and add Rust example to dropbox-api-content-hasher
. Am I right?
from hashes.
Yup, it's a non-standard hash just for the Dropbox API, so probably not worth including in this project :-)
I'll go ahead and use the digest
crate's trait for now. Thanks!
from hashes.
BTW you can write and publish crate dropbox-content-hasher
(or with similiar name) and use it in your example instead of publishing source codes with implementation of this hash, I think it will be more convenient for potential users. Also note that generic-array
(return type in the Digest
trait) implements LowerHex
and UpperHex
, so you can simplify conversion to hex by using standard formatting functionality.
from hashes.
The goal is to actually have this code as part of the Dropbox API SDKs. It's just that those aren't ready yet, so we decided to publish code samples for early adopters to copy/paste for now.
Thanks for the hex tip. I'll update the code.
from hashes.
Related Issues (20)
- ring affected by CVE-2022-37454? HOT 3
- Upgrade issues from sha-1 0.9.8 to sha1 0.10.x HOT 2
- [Feature Request] SHA-3 KMAC HOT 1
- Performance issue on SHA3-Keccak256 since v0.10.7 HOT 12
- comparing after dereferencing or unsafely indexing, which is faster? HOT 1
- Blake2 parameters cannot be used without a key HOT 3
- use keccak crate in k12 HOT 2
- streebog: Use const fn to generate `SHUFFLED_LIN_TABLE`
- fix(?): some `extern` functions couldn't be found HOT 2
- `sha2` fails to build in Windows on an ARM device HOT 2
- blake2: MAC variants should not be constructable with an empty key?
- sha2: Interested in a way to save/restore internal state HOT 1
- Strange quirk in SHA256 impl HOT 1
- "no such associated item" in IDE but build succeeds HOT 3
- jh: remove dependency on `ppv-lite86`
- Sha256::new() is always marked as an error in the vscode HOT 1
- can't build `[email protected]` HOT 1
- soft-sha512 code size seems unreasonably high on thumbv7em HOT 1
- Broken documentation: What on earth is "GenericArray" HOT 8
- sha256 has very wildly varying performance compared to ring between computers (same binary) HOT 2
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 hashes.