In https://github.com/microsoft/cask/blob/main/docs/CaskSecret.md#url-safe-base64-encoded-rendering-example-for-256-bit-key-no-optional-data, the indexing of encodedKey goes out of sync after <12-bits-reserved> "AA":
|
|encodedKey[52..56]|'TEST'| Provider fixed signature. |
|
|encodedKey[56..58] | 'AA' | Reserved encoded zero characters. |
|
|encodedKey[59]|'A'...'_'| Time-of-allocation year, 'A' (2025) to '_' (2088)| |
|
|encodedKey[60|'A'...'L'| Time-of-allocation month, 'A' (January) to 'L' (December)| |
|
|encodedKey[61]|'A'...'Z'\|'a'..'e'| Time-of-allocation day, 'A' (0) to 'e' (31)| |
|
|encodedKey[62]|'A'...'X'| Time-of-allocation hour, 'A' (hour 0 or midnight) to 'X' (hour 23). |
|
|encodedKey[63]|'A'...'7'| Time-of-allocation minute, 'A' (0) to '7' (59). |
|
|encodedKey[64]|'A'...'7'| Time-of-allocation second, 'A' (0) to '7' (59). |
It shows the time-of-allocation second at encodedKey[64], but that should instead be at encodedKey[63] so that the size of the whole thing is 64 characters and it evenly translates to 64/4*3 = 48 bytes.
Also, there is a closing bracket missing, and the 'a'..'e' range should use ... rather than .. because it's meant to include 'e'.
The table should end like this:
| String Range |
Text Value |
Description |
| … |
… |
… |
| encodedKey[52..56] |
'TEST' |
Provider fixed signature. |
| encodedKey[56..58] |
'AA' |
Reserved encoded zero characters. |
| encodedKey[58] |
'A'...'_' |
Time-of-allocation year, 'A' (2025) to '_' (2088) |
| encodedKey[59] |
'A'...'L' |
Time-of-allocation month, 'A' (January) to 'L' (December) |
| encodedKey[60] |
'A'...'Z'|'a'...'e' |
Time-of-allocation day, 'A' (0) to 'e' (31) |
| encodedKey[61] |
'A'...'X' |
Time-of-allocation hour, 'A' (hour 0 or midnight) to 'X' (hour 23). |
| encodedKey[62] |
'A'...'7' |
Time-of-allocation minute, 'A' (0) to '7' (59). |
| encodedKey[63] |
'A'...'7' |
Time-of-allocation second, 'A' (0) to '7' (59). |
In https://github.com/microsoft/cask/blob/main/docs/CaskSecret.md#url-safe-base64-encoded-rendering-example-for-256-bit-key-no-optional-data, the indexing of
encodedKeygoes out of sync after <12-bits-reserved> "AA":cask/docs/CaskSecret.md
Lines 84 to 91 in 6f4c272
It shows the time-of-allocation second at
encodedKey[64], but that should instead be atencodedKey[63]so that the size of the whole thing is 64 characters and it evenly translates to 64/4*3 = 48 bytes.Also, there is a closing bracket missing, and the
'a'..'e'range should use...rather than..because it's meant to include'e'.The table should end like this: