Swift implementation of the ripemd160 Hashing Algorithm

ripemd160-Swift

A Swift implementation of the ripemd160 Hashing Algorithm.

Installation

Swift Package Manager

You can use Swift Package Manager and specify dependency in Package.swift by adding this:

.package(url: "https://github.com/MiclausCorp/ripemd160-Swift.git", branch: "master")

Example Usage

Hashing a string

let message = "Hello, World!"
let hash = RIPEMD160.hash(message)

print(hash) // prints raw hex bytes

Hash-Based Message Authentication Code

let key = "key"
let message = "Hello, World!"

let hmac = RIPEMD160.hmac(key: key, message: message)
print(hmac) // prints raw hex bytes

Performance

Tests provided by and run on AWS EC2 P3DN Cloud Super Workstation configured using:

  • 8x NVIDIA Tesla V100 GPU (256 GB, 960 CUDA Cores and 5.120 Tensor Cores in total);
  • 96 core Intel Xeon 8175M;
  • 768 GB RAM
  • 2 x 900 GB NVMe SSD
  • 100 Gigabit networking

License

MIT License

GitHub

View Github