protected final void checkValid() {
        checkValidAlgorithm();

        checkValidSalt();
    }
Constructs an {@link AbstractCryptHash} using the algorithm name, hashed data and salt parameters.

<p>Other required parameters must be stored by the implementation.</p>

@param algorithmName internal algorithm name, e.g. {@code 2y} for bcrypt and {@code argon2id} for argon2.
@param hashedData    the hashed data as a byte array. Does not include the salt or other parameters.
@param salt          the salt which was used when generating the hash.
@throws IllegalArgumentException if the salt is not the same size as {@link #getSaltLength()}.
crypto/hash/src/main/java/org/apache/shiro/crypto/hash/AbstractCryptHash.java