Top Fields Constructors Methods
com.ongres.scram.common.stringprep

public sealed Enum StringPreparations

extends Enum<StringPreparations>
implements StringPreparation
Class Inheritance
All Implemented Interfaces
com.ongres.scram.common.stringprep.StringPreparation
Imports
com.ongres.saslprep.SaslPrep, com.ongres.scram.common.util.UsAsciiUtils

Field Summary

Modifier and TypeField and Description
public static final StringPreparations
NO_PREPARATION

Implementation of StringPreparation that performs no preparation.

public static final StringPreparations
SASL_PREPARATION

Implementation of StringPreparation that performs preparation.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected abstract String
public String
normalize(String
The String to prepare
value
)

Implements com.ongres.scram.common.stringprep.StringPreparation.normalize.

Normalize a UTF-8 String according to this String Preparation rules.
public static StringPreparations
public static StringPreparations[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

NO_PREPARATIONback to summary
public static final StringPreparations NO_PREPARATION

Implementation of StringPreparation that performs no preparation. Non US-ASCII characters will produce an exception. Even though the [RFC5802] is not very clear about it, this implementation will normalize non-printable US-ASCII characters similarly to what SaslPrep does (i.e., removing them).

SASL_PREPARATIONback to summary
public static final StringPreparations SASL_PREPARATION

Implementation of StringPreparation that performs preparation. Non US-ASCII characters will produce an exception. Even though the [RFC5802] is not very clear about it, this implementation will normalize as SaslPrep does.

Constructor Detail

StringPreparationsback to summary
private StringPreparations()

Method Detail

doNormalizeback to summary
protected abstract String doNormalize(String value) throws IllegalArgumentException
normalizeback to summary
public String normalize(String value) throws IllegalArgumentException

Implements com.ongres.scram.common.stringprep.StringPreparation.normalize.

Doc from com.ongres.scram.common.stringprep.StringPreparation.normalize.

Normalize a UTF-8 String according to this String Preparation rules.

Parameters
value:String

The String to prepare

Returns:String

The prepared String

Exceptions
IllegalArgumentException:
If the String to prepare is not valid.
valueOfback to summary
public static StringPreparations valueOf(String name)
valuesback to summary
public static StringPreparations[] values()