Spring Password Encoder Argon2

Hi I just went into the spring argon2 password encoder and I saw this:
public String encode(CharSequence rawPassword) {
        byte[] salt = this.saltGenerator.generateKey();
        byte[] hash = new byte[this.hashLength];
        Argon2Parameters params = (new Argon2Parameters.Builder(2)).withSalt(salt).withParallelism(this.parallelism).withMemoryAsKB(this.memory).withIterations(this.iterations).build();
        Argon2BytesGenerator generator = new Argon2BytesGenerator();
        generator.init(params);
        generator.generateBytes(rawPassword.toString().toCharArray(), hash);
        return Argon2EncodingUtils.encode(hash, params);
    }

spring encode my password with all the params to decode it, so should I rewrite my own password encoder or anything like this?
Was this page helpful?