microsoft / microsoft/cask

encodedKey indexing out of sync in docs/CaskSecret.md

Open
#72 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6
Forks
6
Avg merge
8d 10h
Merged PRs (30d)
4

Description

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":

https://github.com/microsoft/cask/blob/6f4c27277bdbe447929dba1a7f009bdddc0e9c0e/docs/CaskSecret.md?plain=1#L84-L91

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).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open docs/CaskSecret.md around lines 84–91 and compare the encodedKey table with the corrected ending supplied in the issue. Update the indexes, closing bracket, and range notation so the final character is encodedKey[63] and the total is 64 characters. Done means the URL-safe Base64 example's table is internally consistent.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.