Definition at line 1047 of file saslprep.c.
1048{
1052 char *result;
1053 int result_size;
1054 int count;
1057 const unsigned char *p;
1058 unsigned char *
outp;
1060
1061
1063
1064
1065
1066
1067
1069 {
1074 }
1075
1076
1077
1078
1079
1080
1086
1090
1091 p = (
const unsigned char *)
input;
1093 {
1096 }
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108 count = 0;
1110 {
1112
1116 {
1117
1118 }
1119 else
1121 }
1124
1127
1128
1129
1130
1131
1135
1136
1137
1138
1139
1141 {
1143
1148 }
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1173 {
1175
1177 {
1179 break;
1180 }
1181 }
1182
1184 {
1187
1189 {
1191
1194 }
1195
1199 }
1200
1201
1202
1203
1204 result_size = 0;
1206 {
1207 unsigned char buf[4];
1208
1211 }
1212
1213 result =
ALLOC(result_size + 1);
1214 if (!result)
1216
1217
1218
1219
1220
1221 outp = (
unsigned char *) result;
1223 {
1226 }
1227 Assert((
char *)
outp == result + result_size);
1229
1232
1235
1241
1243
1249
1251}
#define Assert(condition)
static char32_t utf8_to_unicode(const unsigned char *c)
static char buf[DEFAULT_XLOG_SEG_SIZE]
static unsigned char * unicode_to_utf8(char32_t c, unsigned char *utf8string)
static const char32_t LCat_codepoint_ranges[]
static const char32_t prohibited_output_ranges[]
static const char32_t commonly_mapped_to_nothing_ranges[]
#define IS_CODE_IN_TABLE(code, map)
static const char32_t unassigned_codepoint_ranges[]
static const char32_t RandALCat_codepoint_ranges[]
static int pg_utf8_string_len(const char *source)
static const char32_t non_ascii_space_ranges[]
bool pg_is_ascii(const char *str)
char32_t * unicode_normalize(UnicodeNormalizationForm form, const char32_t *input)
References ALLOC, Assert, buf, commonly_mapped_to_nothing_ranges, fb(), FREE, i, input, IS_CODE_IN_TABLE, LCat_codepoint_ranges, MaxAllocSize, non_ascii_space_ranges, output, pg_is_ascii(), pg_utf8_string_len(), pg_utf_mblen, prohibited_output_ranges, RandALCat_codepoint_ranges, SASLPREP_INVALID_UTF8, SASLPREP_OOM, SASLPREP_PROHIBITED, SASLPREP_SUCCESS, STRDUP, unassigned_codepoint_ranges, UNICODE_NFKC, unicode_normalize(), unicode_to_utf8(), and utf8_to_unicode().
Referenced by pg_be_scram_build_secret(), pg_fe_scram_build_secret(), scram_init(), and scram_verify_plain_password().