Registry / utility / entropy

entropy

JSON →
library0.4.3rscratesunverified

Calculates the Shannon entropy of arrays of bytes and strings, useful for randomness analysis.

# Cargo.toml [dependencies] entropy = "0.4.3"
INSTALL
IMPORT
SIG · ENTROPY
E
entropy
utilityrustv0.4.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

shannon_entropy
use entropy::shannon_entropy;

Calculates Shannon entropy of a byte slice.

use entropy::shannon_entropy; fn main() { let data = b"hello world"; let entropy = shannon_entropy(data); println!("Entropy: {}", entropy); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.4.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
entropy — cargo add entropy · libregistry