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 "Sign and verify a message with HMAC digest" example #314

Merged
merged 1 commit into from Oct 7, 2017

Conversation

Projects
None yet
2 participants
@Yarn
Copy link

Yarn commented Oct 4, 2017

fixes #289

@budziq budziq added claimed and removed claimed labels Oct 4, 2017

@budziq

This comment has been minimized.

Copy link
Collaborator

budziq commented Oct 4, 2017

Hi @Yarn, Your PR has merge conflicts with master. Could you squash and rebase it against master?

@Yarn Yarn force-pushed the Yarn:master branch 2 times, most recently from a225106 to 3d23e03 Oct 4, 2017

@Yarn

This comment has been minimized.

Copy link
Author

Yarn commented Oct 4, 2017

I have communed with the elder gods and achieved an A E S T H E T I C git history.

@budziq
Copy link
Collaborator

budziq left a comment

The PR looks almost perfect @Yarn.
Just some minor suggestions below.

<a name="ex-hmac"></a>
## Sign and verify a message with HMAC digest

[![ring-badge]][ring] [![data-encoding-badge]][data-encoding] [![cat-cryptography-badge]][cat-cryptography]

This comment has been minimized.

@budziq

budziq Oct 4, 2017

Collaborator

data-encoding crate is not used in this example

extern crate ring;
#
# #[macro_use]
# extern crate error_chain;

This comment has been minimized.

@budziq

budziq Oct 4, 2017

Collaborator

for the sake of consistency with other examples i would suggest to put error_chain as the first extern crate without newlines below

Ok(())
}

This comment has been minimized.

@budziq

budziq Oct 4, 2017

Collaborator

lets add the # here to avoid trailing newline when example is collapsed.


[![ring-badge]][ring] [![data-encoding-badge]][data-encoding] [![cat-cryptography-badge]][cat-cryptography]

Creates a [`hmac::Signature`] of a string then verifies the signiture is correct.

This comment has been minimized.

@budziq

budziq Oct 4, 2017

Collaborator

I would suggest adding other hyperlinked identifiers to the description for the benefit of the reader.

@Yarn Yarn force-pushed the Yarn:master branch from 3d23e03 to 03776ce Oct 6, 2017

@Yarn

This comment has been minimized.

Copy link
Author

Yarn commented Oct 6, 2017

made the suggested changes

@budziq budziq merged commit 525c3b6 into rust-lang-nursery:master Oct 7, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@budziq

This comment has been minimized.

Copy link
Collaborator

budziq commented Oct 7, 2017

Nicely done @Yarn !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.