30 #if !UCONFIG_NO_NORMALIZATION
205 USPOOF_ALL_CHECKS = 0x7f
281 const char *confusablesWholeScript,
int32_t confusablesWholeScriptLen,
564 const char *text,
int32_t length,
678 const char *s1,
int32_t length1,
679 const char *s2,
int32_t length2,
793 char *dest,
int32_t destCapacity,
void uspoof_close(USpoofChecker *sc)
Close a Spoof Checker, freeing any memory that was being held by its implementation.
#define U_CAPI
This is used to declare a function as a public ICU C API.
Check an identifier for the presence of invisble characters, such as zero-width spaces, or character sequences that are likely not to display, such as multiple occurences of the same non-spacing mark.
Check that an identifer contains only characters from a single script (plus chars from the common and...
int32_t uspoof_checkUTF8(const USpoofChecker *sc, const char *text, int32_t length, int32_t *position, UErrorCode *status)
Check the specified string for possible security issues.
void uspoof_setChecks(USpoofChecker *sc, int32_t checks, UErrorCode *status)
Specify the set of checks that will be performed by the check functions of this Spoof Checker...
USpoofChecker * uspoof_clone(const USpoofChecker *sc, UErrorCode *status)
Clone a Spoof Checker.
A mutable set of Unicode characters and multicharacter strings.
int32_t uspoof_getSkeleton(const USpoofChecker *sc, uint32_t type, const UChar *s, int32_t length, UChar *dest, int32_t destCapacity, UErrorCode *status)
Get the "skeleton" for an identifier string.
Check that an identifier contains only characters from a specified set of acceptable characters...
U_CAPI USpoofChecker * uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActualLength, UErrorCode *pErrorCode)
Open a Spoof checker from its serialized from, stored in 32-bit-aligned memory.
USpoofChecks
Enum for the kinds of checks that USpoofChecker can perform.
USpoofChecker * uspoof_open(UErrorCode *status)
Create a Unicode Spoof Checker, configured to perform all checks except for USPOOF_LOCALE_LIMIT and U...
int32_t uspoof_areConfusableUTF8(const USpoofChecker *sc, const char *s1, int32_t length1, const char *s2, int32_t length2, UErrorCode *status)
Check the whether two specified strings are visually confusable.
void uspoof_setAllowedLocales(USpoofChecker *sc, const char *localesList, UErrorCode *status)
Limit characters that are acceptable in identifiers being checked to those normally used with the lan...
int32_t uspoof_getChecks(const USpoofChecker *sc, UErrorCode *status)
Get the set of checks that this Spoof Checker has been configured to perform.
unsigned int uint32_t
Define 64 bit limits.
int32_t uspoof_areConfusable(const USpoofChecker *sc, const UChar *s1, int32_t length1, const UChar *s2, int32_t length2, UErrorCode *status)
Check the whether two specified strings are visually confusable.
Any Case Modifier for confusable identifier tests.
#define U_NAMESPACE_QUALIFIER
This is used to qualify that a function or class is part of the public ICU C++ API namespace...
Whole script confusable test.
U_CAPI int32_t uspoof_serialize(USpoofChecker *sc, void *data, int32_t capacity, UErrorCode *status)
Serialize the data for a spoof detector into a chunk of memory.
U_CAPI USpoofChecker * uspoof_openFromSource(const char *confusables, int32_t confusablesLen, const char *confusablesWholeScript, int32_t confusablesWholeScriptLen, int32_t *errType, UParseError *pe, UErrorCode *status)
Open a Spoof Checker from the source form of the spoof data.
#define U_NAMESPACE_USE
This is used to specify that the rest of the code uses the public ICU C++ API namespace.
void uspoof_setAllowedChars(USpoofChecker *sc, const USet *chars, UErrorCode *status)
Limit the acceptable characters to those specified by a Unicode Set.
const USet * uspoof_getAllowedChars(const USpoofChecker *sc, UErrorCode *status)
Get a USet for the characters permitted in an identifier.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
struct USpoofChecker USpoofChecker
typedef for C of USpoofChecker
Single script confusable test.
uint16_t UChar
Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned.
int32_t uspoof_getSkeletonUTF8(const USpoofChecker *sc, uint32_t type, const char *s, int32_t length, char *dest, int32_t destCapacity, UErrorCode *status)
Get the "skeleton" for an identifier string.
C API: Parse Error Information.
const char * uspoof_getAllowedLocales(USpoofChecker *sc, UErrorCode *status)
Get a list of locales for the scripts that are acceptable in strings to be checked.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Mixed script confusable test.
int32_t uspoof_check(const USpoofChecker *sc, const UChar *text, int32_t length, int32_t *position, UErrorCode *status)
Check the specified string for possible security issues.
A UParseError struct is used to returned detailed information about parsing errors.
Basic definitions for ICU, for both C and C++ APIs.
#define U_DRAFT
This is used to declare a function as a draft public ICU C API.
signed int int32_t
Define 64 bit limits.