Package net.shibboleth.shared.security
Record Class RandomIdentifierParameterSpec
java.lang.Object
java.lang.Record
net.shibboleth.shared.security.RandomIdentifierParameterSpec
- Record Components:
source- random generator (this MUST be thread-safe), defaults to standard JavaSecureRandomidentifierSize- size of identifiers to generate, defaults to 16identifierEncoder- an encoder to apply to the random data, defaults toHex
- All Implemented Interfaces:
IdentifierGenerationStrategy.ParameterSpec
public record RandomIdentifierParameterSpec(@Nullable RandomGenerator source, @Nullable Integer identifierSize, @Nullable org.apache.commons.codec.BinaryEncoder identifierEncoder)
extends Record
implements IdentifierGenerationStrategy.ParameterSpec
Captures the supported parameters for the
IdentifierGenerationStrategy.ProviderType.RANDOM
and IdentifierGenerationStrategy.ProviderType.SECURE strategy types.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.commons.codec.BinaryEncoderThe field for theidentifierEncoderrecord component.private final IntegerThe field for theidentifierSizerecord component.private final RandomGeneratorThe field for thesourcerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRandomIdentifierParameterSpec(RandomGenerator source, Integer identifierSize, org.apache.commons.codec.BinaryEncoder identifierEncoder) Creates an instance of aRandomIdentifierParameterSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.apache.commons.codec.BinaryEncoderReturns the value of theidentifierEncoderrecord component.Returns the value of theidentifierSizerecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
source
The field for thesourcerecord component. -
identifierSize
The field for theidentifierSizerecord component. -
identifierEncoder
@Nullable private final org.apache.commons.codec.BinaryEncoder identifierEncoderThe field for theidentifierEncoderrecord component.
-
-
Constructor Details
-
RandomIdentifierParameterSpec
public RandomIdentifierParameterSpec(@Nullable @ParameterName(name="source") RandomGenerator source, @Nullable @NonNegative @ParameterName(name="identifierSize") Integer identifierSize, @Nullable @ParameterName(name="identifierEncoder") org.apache.commons.codec.BinaryEncoder identifierEncoder) Creates an instance of aRandomIdentifierParameterSpecrecord class.- Parameters:
source- the value for thesourcerecord componentidentifierSize- the value for theidentifierSizerecord componentidentifierEncoder- the value for theidentifierEncoderrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
identifierSize
Returns the value of theidentifierSizerecord component.- Returns:
- the value of the
identifierSizerecord component
-
identifierEncoder
@Nullable public org.apache.commons.codec.BinaryEncoder identifierEncoder()Returns the value of theidentifierEncoderrecord component.- Returns:
- the value of the
identifierEncoderrecord component
-