Class HashingResult

java.lang.Object
page.codeberg.friedolyn.crypto.HashingResult
All Implemented Interfaces:
Copyable<HashingResult>

public class HashingResult extends Object implements Copyable<HashingResult>
The result of a hashing operation. Does not contain the input text that was hashed, but only the hash itself and the Argon2 parameters that were used to compute it.
Implementation Note:
This class is not a record, because the constructor needs to check that the provided hash is not null or empty and throw an IllegalArgumentException if that's the case. While that could be done in a record as well, we cannot add throws IllegalArgumentException to the record's constructor signature, risking that callers of the constructor will not handle the exception. JavaDoc is not a sufficient replacement here!