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

Add way to create new version that changes the digest algorithm #11

Closed
zimeon opened this issue Mar 27, 2020 · 3 comments
Closed

Add way to create new version that changes the digest algorithm #11

zimeon opened this issue Mar 27, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@zimeon
Copy link
Owner

zimeon commented Mar 27, 2020

In order to be able to write up an implementation note describing how the creation of a new version may be used to update the digestAlgorithm (OCFL/spec#430) it would be helpful to have code that implements it...

@zimeon zimeon self-assigned this Mar 27, 2020
@zimeon zimeon added the enhancement New feature or request label Mar 27, 2020
@zimeon
Copy link
Owner Author

zimeon commented Mar 27, 2020

Useful test sequence:

rm -rf tmp/spec-ex-min-change-hash

./ocfl-object.py --create --srcdir fixtures/1.0/content/spec-ex-minimal/v1 --objdir tmp/spec-ex-min-change-hash --id ark:arf/change/me/1 --digest sha256 --created 2020-03-26T20:33:00 --message "sha256 for EVER"  --name "Secret Agent" --address secret@example.org

./ocfl-object.py --show --objdir tmp/spec-ex-min-change-hash

./ocfl-object.py --validate --objdir tmp/spec-ex-min-change-hash

./ocfl-object.py --update --objdir tmp/spec-ex-min-change-hash --digest sha512 --created 2020-03-26T21:00:00 --message "Update sha256 to sha512, no content change" --name "Special Agent" --address "special@example.org"

./ocfl-object.py --show --objdir tmp/spec-ex-min-change-hash

./ocfl-object.py --validate --objdir tmp/spec-ex-min-change-hash

@zimeon
Copy link
Owner Author

zimeon commented Mar 27, 2020

Used to create examples for implementation notes:

rm -rf tmp/spec-ex-min-change-hash
./ocfl-object.py --create --srcdir fixtures/1.0/content/spec-ex-minimal/v1 --objdir tmp/spec-ex-min-change-hash --id http://example.org/digest_update_example --digest sha256-spec-ex --created 2020-01-01T01:01:01 --message "sha256 forever"  --name "Secret Agent" --address secret@example.org
./ocfl-validate.py --lax-digests --no-check-digests tmp/spec-ex-min-change-hash
./ocfl-object.py --update --objdir tmp/spec-ex-min-change-hash --digest sha512-spec-ex --created 2020-03-26T21:00:00 --message "Update sha256 to sha512, no content change" --name "Special Agent" --address "special@example.org" --lax-digests

@zimeon
Copy link
Owner Author

zimeon commented Apr 20, 2020

Working fine and example created by this method was merged into the implementation notes (#12)

@zimeon zimeon closed this as completed Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant