Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify Differences From Base64 Encoding #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Core/Consent String Specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ The following details provide information on creating, storing, and managing a G
<li><b>Concatenate all sections.</b> Concatenate the encoded GPP header as the first item to the encoded versions of the discrete sections using “~” (tilde) as the delimiter. See examples of GPP strings below.</li>
</ol>

Note that neither the header nor the recommended encoding mechanism for a discrete section utilizes base64 encoding but rather a modified version of it.
Note that the header and the recommended encoding algorithm for discrete sections utilize a modified version of base64 url safe encoding which omits byte alignment. This modification adapts base64 byte encoding to GPP bit encoding. For example, the GPP header `DBABM` decodes to the 30 bit sequence `000011000001000000000001001100` but cannot be decoded with the standard base64 algorithm.

#### Table from RFC 4648
#### Base 64 URL Encoding Table from RFC 4648
<div>
<table>
<tbody>
Expand Down Expand Up @@ -333,7 +333,7 @@ Note that neither the header nor the recommended encoding mechanism for a discre
<td>45</td>
<td>t</td>
<td>62</td>
<td>+</td>
<td>-</td>
</tr>
<tr>
<td>12</td>
Expand All @@ -343,7 +343,7 @@ Note that neither the header nor the recommended encoding mechanism for a discre
<td>46</td>
<td>u</td>
<td>63</td>
<td>/</td>
<td>_</td>
</tr>
<tr>
<td>13</td>
Expand All @@ -362,8 +362,8 @@ Note that neither the header nor the recommended encoding mechanism for a discre
<td>f</td>
<td>48</td>
<td>w</td>
<td>(pad)</td>
<td>=</td>
<td></td>
<td></td>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPP encoding does not use padding characters. Omitted from the table.

</tr>
<tr>
<td>15</td>
Expand Down