@Override
        public String hash(final String apiKeyStr) {
            Objects.requireNonNull(apiKeyStr);
            Argon2BytesGenerator generate = new Argon2BytesGenerator();
            generate.init(argon2Parameters);
            byte[] result = new byte[HASH_LENGTH];
            generate.generateBytes(
                    apiKeyStr.trim().getBytes(StandardCharsets.UTF_8),
                    result,
                    0,
                    result.length);

            // Base58 is a bit less nasty than base64 and widely supported in other languages
            // due to use in bitcoin.
            return Base58.encode(result);
        }
Thrown when an API key is created that has the same prefix + hash as another key.
stroom-security/stroom-security-impl/src/main/java/stroom/security/impl/apikey/ApiKeyService.java