@Override
    public boolean matchesPassword(ByteSource plaintextBytes) {
        try {
            @SuppressWarnings("checkstyle:MagicNumber")
            Argon2Hash compare = generate(
                    this.getAlgorithmName(),
                    this.argonVersion,
                    plaintextBytes,
                    this.getSalt(),
                    this.getIterations(),
                    this.memoryKiB,
                    this.parallelism,
                    this.getBytes().length * 8);

            return this.equals(compare);
        } catch (IllegalArgumentException illegalArgumentException) {
            // cannot recreate hash. Do not log password.
            LOG.warn("Cannot recreate a hash using the same parameters.", illegalArgumentException);
            return false;
        }
    }
128 bits of salt is the recommended salt length, taken from draft-irtf-cfrg-argon2-13, 4.2.
crypto/support/hashes/argon2/src/main/java/org/apache/shiro/crypto/support/hashes/argon2/Argon2Hash.java