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

identity: add implementation of ChainID #486

Merged
merged 2 commits into from
Jan 17, 2017

Commits on Jan 11, 2017

  1. identity: add implementation of ChainID

    The specification defines an algorithm to calculate a `ChainID`, which
    can be used to identify the result of subsequent applications of layers.
    Because this algorithm is subtle and only needs to implemented in a
    single place, we provide a reference implementation.
    
    For convenience, we provide functions that calculate all the chain ids
    and just the top-level one. It is is integrated with the
    distribution/digest type for safety and convenience.
    
    As part of this, the `identity` package has been introduced. For
    consuming code, a few helpers have been provide to ease transition as
    the name of the upstream package has not yet been finalized. Users of
    this package should employ `FromBytes`, `FromString` and `FromReader`
    where appropriate, which should ease the transition if these packages
    change.
    
    Tests are formulated based on pre-calculation of chain identifiers to
    ensure correctness.
    
    Signed-off-by: Stephen J Day <[email protected]>
    stevvooe committed Jan 11, 2017
    Configuration menu
    Copy the full SHA
    0b11c28 View commit details
    Browse the repository at this point in the history
  2. vendor: add go-digest to dependencies

    Signed-off-by: Stephen J Day <[email protected]>
    stevvooe committed Jan 11, 2017
    Configuration menu
    Copy the full SHA
    05bcdc7 View commit details
    Browse the repository at this point in the history