Skip to content

mollyim/argon2

 
 

Repository files navigation

Argon2 Library

Wrapper around the reference C implementation of Argon2.

Android Usage

implementation 'org.signal:argon2:13.1@aar'
Argon2 argon2 = new Argon2.Builder(Version.V13)
                          .type(Type.Argon2id)
                          .memoryCost(MemoryCost.MiB(32))
                          .parallelism(1)
                          .iterations(3)
                          .build();
                          
                          
Argon2.Result result = argon2.hash(password, salt);

byte[] hash    = result.getHash();
String hashHex = result.getHashHex();
String encoded = result.getEncoded();

iOS Usage

Add the following line to your Podfile:

pod 'Argon2', git: 'https://github.com/signalapp/Argon2.git', submodules: true
let (rawHash, encodedHash) = Argon2.hash(
    iterations: 1,
    memoryInKiB: 32 * 1024,
    threads: 1,
    password: password,
    salt: salt,
    desiredLength: 32,
    variant: .id,
    version: .v13
)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Java 48.1%
  • Swift 40.5%
  • C 6.9%
  • Ruby 3.2%
  • Makefile 1.3%