Skip to content

πŸ”’ Pure Swift Argon2 hash function implementation πŸ”’

Notifications You must be signed in to change notification settings

sp4c38/PureArgon2Swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”’ PureArgon2Swift πŸ”’

A pure implementation of the Argon2 hash function algorithm in Swift.

Note: For the Blake2b parts of the algorithm a C implementation of Blake2b is used.

πŸ’‘ Implementation notes

Based on Argon2 RFC 9106: https://www.rfc-editor.org/rfc/rfc9106.pdf.
Inspired by https://github.com/bwesterb/argon2pure.

πŸ“ Executable

You can run PureArgon2Swift as executable in your terminal, by following these steps:

  1. Make sure Xcode is installed.

  2. Make sure the Command Line Utilities are installed: xcode-select --install

  3. Then run following:

git clone https://github.com/sp4c38/PureArgon2Swift.git
cd PureArgon2Swift
make
  1. Now you've got the argon2 executable file. To get the help message run ./argon2 -h

    An example for testing:
    echo -n "Password" | ./argon2 Salt1234 -p 3 -k 2048 -t 1

πŸ“š Library

You can import PureArgon2Swift in your project using the Swift Package Manager.

  • Add in Package.swift:

    Append following to your dependencies: .package(url: "https://github.com/sp4c38/PureArgon2Swift", from: "1.0.0")
    Append following to your targets dependencies: .product(name: "Argon2", package: "PureArgon2Swift")

  • Add in Xcode project:

    In the menu go to File > Add Packages... > in search bar type https://github.com/sp4c38/PureArgon2Swift > Add Package > Checkmark "Argon2" > Add Package

About

πŸ”’ Pure Swift Argon2 hash function implementation πŸ”’

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published