-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs: Prohibit IDs consisting of all zero bytes
Container and object IDs are SHA-256 checksums of their contents. It is almost impossible to find data that corresponds to a zero identifier. Setting 32 zeros rather indicates a client error. Reserving a zero value will also make application development easier: corresponding type will have a reserved invalid value within itself. Even if the unimaginable and some structure will actually have a zero hash - so be it, the problem is negligible for the final benefit. Note that zero `OwnerID` is already invalid at least due to the non-zero prefix. Therefore does not need clarification. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
- Loading branch information
1 parent
62e4ae0
commit 20a2515
Showing
2 changed files
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters