Swiftpack.co - Alja7dali/swift-sha1 as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Alja7dali.
Alja7dali/swift-sha1 1.0.0
A sha1 implementation in swift
⭐️ 0
🕓 3 years ago
.package(url: "https://github.com/Alja7dali/swift-sha1.git", from: "1.0.0")
This is an implementation of SHA1 hash algorithm.

Example:

import SHA1

/// Hash to SHA1
/// 1. convert string to bytes (utf8 format)
let bytes = "Hello, World!".makeBytes()
/// 2. hash bytes using sha1 digesting algorithm
let hashedBytes = SHA1.hash(bytes)
/// 3. converting bytes back to string
let hashedString = try String(hashedBytes) // "0a0a9f2a6772942557ab5355d76af442f8f65e01"

Importing SHA1:

To include SHA1 in your project, you need to add the following to the dependencies attribute defined in your Package.swift file.

dependencies: [
  .package(url: "https://github.com/alja7dali/swift-sha1.git", from: "1.0.0")
]

GitHub

link
Stars: 0
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1.0.0
3 years ago

👋 hello, sha1!

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics