I'm writing a library that contains some hash functions.
I want one of the functions to return the hash (byte[]) and the random salt (byte[]) that was generated for use with the hash. What would be the most user friendly, and intuitive, way of doing this?
I have a C# version of this that works by returning the hash and then passing back the salt as an out parameter, which works perfectly, however Java doesn't give me the luxury of out parameters.
Any thoughts?