https://github.com/murphsicles/ripemd
Zeta crate: ripemd
https://github.com/murphsicles/ripemd
Last synced: 22 days ago
JSON representation
Zeta crate: ripemd
- Host: GitHub
- URL: https://github.com/murphsicles/ripemd
- Owner: murphsicles
- License: mit
- Created: 2026-05-16T17:39:11.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-17T15:13:37.000Z (2 months ago)
- Last Synced: 2026-05-17T17:31:27.315Z (2 months ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @crypto/ripemd
RIPEMD-160 hash function for Zeta — self-contained, no external dependencies.
## Why This Exists
RIPEMD-160 is a critical component of Bitcoin address generation. Combined with SHA256 (the Hash160 construction), it produces 20-byte hashes used in P2PKH and P2SH addresses.
This is a clean-room implementation based on the RIPEMD-160 specification by Hans Dobbertin, Antoon Bosselaers, and Bart Preneel.
## Usage
```zeta
use @crypto/ripemd::{Ripemd160, ripemd160};
// Using the function directly
let hash: [u8; 20] = ripemd160(data);
// Using the struct
let hash = Ripemd160::hash(data);
let bytes = hash.to_byte_array();
```
## API
### Functions
```zeta
pub fn ripemd160(data: &[u8]) -> [u8; 20]
```
### Types
```zeta
pub struct Ripemd160 {
fn hash(data: &[u8]) -> Self;
fn from_slice(bytes: &[u8]) -> Result;
fn to_byte_array(self) -> [u8; 20];
}
```
## Implementation Notes
- Fully self-contained — no byteorder or other dependencies
- Little-endian internal representation (per RIPEMD-160 spec)
- Big-endian output bytes
## License
MIT
For nour. For Dark Factory. For BSV.