https://github.com/tayloraswift/swift-hash
hashes, checksums, and hextools for server applications
https://github.com/tayloraswift/swift-hash
crc crc32 hash hmac hmac-sha256 pbkdf2 pbkdf2-sha-256 server-side-swift sha2 sha256 swift
Last synced: 4 months ago
JSON representation
hashes, checksums, and hextools for server applications
- Host: GitHub
- URL: https://github.com/tayloraswift/swift-hash
- Owner: tayloraswift
- License: apache-2.0
- Created: 2022-01-26T21:26:13.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-01-15T21:35:34.000Z (9 months ago)
- Last Synced: 2025-05-23T11:38:52.666Z (5 months ago)
- Topics: crc, crc32, hash, hmac, hmac-sha256, pbkdf2, pbkdf2-sha-256, server-side-swift, sha2, sha256, swift
- Language: Swift
- Homepage: https://swiftinit.org/docs/swift-hash
- Size: 138 KB
- Stars: 24
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
***`hash`***
[](https://github.com/tayloraswift/swift-hash/actions/workflows/Tests.yml)
[](https://github.com/tayloraswift/swift-hash/actions/workflows/Documentation.yml)*`swift-hash`* is an inline-only microframework providing generic, pure-Swift implementations of various hashes, checksums, and binary utilities.
[documentation and api reference](https://swiftinit.org/docs/swift-hash)
## Requirements
The swift-hash library requires Swift 6.0 or later.
| Platform | Status |
| -------- | ------ |
| 🐧 Linux | [](https://github.com/tayloraswift/swift-hash/actions/workflows/Tests.yml) |
| 🍏 Darwin | [](https://github.com/tayloraswift/swift-hash/actions/workflows/Tests.yml) |
| 🍏 Darwin (iOS) | [](https://github.com/tayloraswift/swift-hash/actions/workflows/iOS.yml) |
| 🍏 Darwin (tvOS) | [](https://github.com/tayloraswift/swift-hash/actions/workflows/tvOS.yml) |
| 🍏 Darwin (visionOS) | [](https://github.com/tayloraswift/swift-hash/actions/workflows/visionOS.yml) |
| 🍏 Darwin (watchOS) | [](https://github.com/tayloraswift/swift-hash/actions/workflows/watchOS.yml) |[Check deployment minimums](https://swiftinit.org/docs/swift-hash#ss:platform-requirements)
## products
This package vends the following library products:
1. [`Base16`](https://swiftinit.org/docs/swift-hash/base16)
Tools for encoding to and decoding from base-16 strings.
1. [`Base64`](https://swiftinit.org/docs/swift-hash/base64)
Tools for encoding to and decoding from base-64 strings.
1. [`CRC`](https://swiftinit.org/docs/swift-hash/crc)
Implements [CRC-32](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) checksums.
1. [`MD5`](https://swiftinit.org/docs/swift-hash/md5)
Implements [MD5](https://en.wikipedia.org/wiki/MD5) hashing function.
1. [`MessageAuthentication`](Sources/MessageAuthentication)
Implements [hash-based message authentication codes](https://en.wikipedia.org/wiki/HMAC) (HMACs) through protocols that types in the other modules conform to.
1. [`SHA1`](https://swiftinit.org/docs/swift-hash/sha1)
Unimplemented: [SHA-1](https://en.wikipedia.org/wiki/SHA-1) hashing function.
1. [`SHA2`](https://swiftinit.org/docs/swift-hash/sha2)
Implements the [SHA-256](https://en.wikipedia.org/wiki/SHA-2) hashing function.
1. [`UUID`](https://swiftinit.org/docs/swift-hash/uuid)
Provides a UUID type.