Re: [HACKERS] Implementation of SASLprep for SCRAM-SHA-256 - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: [HACKERS] Implementation of SASLprep for SCRAM-SHA-256
Date
Msg-id 4dce3d79-7990-9a02-87f7-ab5b1b5aca81@iki.fi
Whole thread Raw
In response to Re: [HACKERS] Implementation of SASLprep for SCRAM-SHA-256  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: [HACKERS] Implementation of SASLprep for SCRAM-SHA-256  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On 04/06/2017 08:42 PM, Heikki Linnakangas wrote:
> D'oh. Here's a new version, with saslprep.h included.

And here it is for real. Sigh.

>> There is for example this portion in the new tables:
>> +static const Codepoint prohibited_output_chars[] =
>> +{
>> +   0xD800, 0xF8FF,             /* C.3, C.5 */
>>
>>    ----- Start Table C.5 -----
>>    D800-DFFF; [SURROGATE CODES]
>>    ----- End Table C.5 -----
>> This indicates a range of values. Wouldn't it be better to split this
>> table in two, one for the range of codepoints and another one with the
>> single entries?
>
> I considered that, but there are relatively few singular codepoints in
> the tables, so it wouldn't save much space. In this patch, singular
> codepoints are represented by a range like "0x3000, 0x3000".
>
>> +   0x1D173, 0x1D17A,           /* C.2.2 */
>> This is for musical symbols. It seems to me that checking for a range
>> is what is intended.
>
> Can you elaborate?

Oh, I think I understand the confusion now. All the arrays represent 
codepoint ranges, not singular codepoints. I renamed them to "*_ranges", 
to make that more clear.

- Heikki


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [HACKERS] Implementation of SASLprep for SCRAM-SHA-256
Next
From: mark
Date:
Subject: Re: [HACKERS] Postgresql10 Bug report. (pg_catalog.pg_statistic_extdoes not exist)