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

Update implementation to latest documented format #27

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nguerrera
Copy link
Contributor

@nguerrera nguerrera commented Jan 16, 2025

  • Add raw C3ID of primary key to hashes.
  • Add all four bytes of CRC32.
  • Add CASK version number.
  • Add CASK kind (key or hash + size).
  • Add day and hour to timestamp.
  • Use current time in hash timestamp, and make 'CompareHash' handle that.
  • Remove 'allocatorCode' and 'secretEntropyInBytes'.
  • Move magic numbers to constants/properties.
  • Remove 'ThreeByteSequence' from tests. We don't actually need this helper with the way the format finally landed.

This does not include HMACSHA384 support that is implied by the latest docs. That will be added separately and will likely involve some API refactoring.

* Add raw C3ID of primary key to hashes
* Add all four bytes of CRC32
* Add CASK version number
* Add CASK kind (key or hash + size)
* Add day and hour to timestamp
* Remove allocatorCode and secretEntropyInBytes
* Move magic numbers to constants/properties
* Remove ThreeByteSequence from tests. We don't actually need this helper with the way the format finally landed.

This does not include HMACSHA384 support that is implied by the latest docs. That will be added separately and will likely involve some API refactoring.
docs/PrimaryKey.md Outdated Show resolved Hide resolved
docs/PrimaryKey.md Outdated Show resolved Hide resolved
src/Cask/Cask.cs Outdated Show resolved Hide resolved
@nguerrera nguerrera force-pushed the format-update branch 2 times, most recently from 2a417d0 to fc85984 Compare January 17, 2025 19:36
@nguerrera nguerrera marked this pull request as ready for review January 17, 2025 19:44
@nguerrera nguerrera requested a review from rwoll as a code owner January 17, 2025 19:44
@nguerrera nguerrera requested a review from suvamM as a code owner January 17, 2025 19:44
@nguerrera
Copy link
Contributor Author

@michaelcfanning All feedback addressed. Please take another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants