Class SaslPrep
java.lang.Object
org.apache.pdfbox.pdmodel.encryption.SaslPrep
Copied from https://github.com/tombentley/saslprep/blob/master/src/main/java/SaslPrep.java on
30.5.2019, commit 2e30daa.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanasciiControl(char ch) Return true if the givenchis an ASCII control character as defined by RFC 3454, Appendix C.2.1.private static booleanchangeDisplayProperties(int codepoint) Return true if the givencodepointis change display properties or deprecated characters as defined by RFC 3454, Appendix C.8.private static booleaninappropriateForCanonical(int codepoint) Return true if the givencodepointis inappropriate for canonical representation characters as defined by RFC 3454, Appendix C.7.private static booleaninappropriateForPlainText(int codepoint) Return true if the givencodepointis inappropriate for plain text characters as defined by RFC 3454, Appendix C.6.private static booleanmappedToNothing(char ch) Return true if the givenchis a "commonly mapped to nothing" character as defined by RFC 3454, Appendix B.1.private static booleannonAsciiControl(int codepoint) Return true if the givenchis a non-ASCII control character as defined by RFC 3454, Appendix C.2.2.private static booleannonAsciiSpace(char ch) Return true if the givenchis a non-ASCII space character as defined by RFC 3454, Appendix C.1.2.private static booleannonCharacterCodePoint(int codepoint) Return true if the givencodepointis a non-character code point as defined by RFC 3454, Appendix C.4.private static booleanprivateUse(int codepoint) Return true if the givencodepointis a private use character as defined by RFC 3454, Appendix C.3.(package private) static booleanprohibited(int codepoint) Return true if the givencodepointis a prohibited character as defined by RFC 4013, Section 2.3.private static String(package private) static StringsaslPrepQuery(String str) Return theSASLPrep-canonicalised version of the givenstrfor use as a query string.(package private) static StringsaslPrepStored(String str) Return theSASLPrep-canonicalised version of the givenprivate static booleansurrogateCodePoint(int codepoint) Return true if the givencodepointis a surrogate code point as defined by RFC 3454, Appendix C.5.private static booleantagging(int codepoint) Return true if the givencodepointis a tagging character as defined by RFC 3454, Appendix C.9.
-
Constructor Details
-
SaslPrep
private SaslPrep()
-
-
Method Details
-
saslPrepQuery
Return theSASLPrep-canonicalised version of the givenstrfor use as a query string. This implements theSASLPrepalgorithm defined in RFC 4013.- Parameters:
str- The string to canonicalise.- Returns:
- The canonicalised string.
- Throws:
IllegalArgumentException- if the string contained prohibited codepoints, or broke the requirements for bidirectional character handling.- See Also:
-
- RFC 3454, Section 7 for discussion of what a query string is.
-
saslPrepStored
Return theSASLPrep-canonicalised version of the given -
saslPrep
-
prohibited
static boolean prohibited(int codepoint) Return true if the givencodepointis a prohibited character as defined by RFC 4013, Section 2.3. -
tagging
private static boolean tagging(int codepoint) Return true if the givencodepointis a tagging character as defined by RFC 3454, Appendix C.9. -
changeDisplayProperties
private static boolean changeDisplayProperties(int codepoint) Return true if the givencodepointis change display properties or deprecated characters as defined by RFC 3454, Appendix C.8. -
inappropriateForCanonical
private static boolean inappropriateForCanonical(int codepoint) Return true if the givencodepointis inappropriate for canonical representation characters as defined by RFC 3454, Appendix C.7. -
inappropriateForPlainText
private static boolean inappropriateForPlainText(int codepoint) Return true if the givencodepointis inappropriate for plain text characters as defined by RFC 3454, Appendix C.6. -
surrogateCodePoint
private static boolean surrogateCodePoint(int codepoint) Return true if the givencodepointis a surrogate code point as defined by RFC 3454, Appendix C.5. -
nonCharacterCodePoint
private static boolean nonCharacterCodePoint(int codepoint) Return true if the givencodepointis a non-character code point as defined by RFC 3454, Appendix C.4. -
privateUse
private static boolean privateUse(int codepoint) Return true if the givencodepointis a private use character as defined by RFC 3454, Appendix C.3. -
nonAsciiControl
private static boolean nonAsciiControl(int codepoint) Return true if the givenchis a non-ASCII control character as defined by RFC 3454, Appendix C.2.2. -
asciiControl
private static boolean asciiControl(char ch) Return true if the givenchis an ASCII control character as defined by RFC 3454, Appendix C.2.1. -
nonAsciiSpace
private static boolean nonAsciiSpace(char ch) Return true if the givenchis a non-ASCII space character as defined by RFC 3454, Appendix C.1.2. -
mappedToNothing
private static boolean mappedToNothing(char ch) Return true if the givenchis a "commonly mapped to nothing" character as defined by RFC 3454, Appendix B.1.
-