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 a hash function to the crypto contract #379

Merged
merged 1 commit into from
Sep 18, 2020
Merged

Conversation

turbolent
Copy link
Member

Add support for hashing data to the crypto contract.

Add a hash function to both the Crypto contract and the HashAlgorithm struct.

For example, the new functions can be used like this:

Crypto.SHA3_256.hash("01020304".decodeHex()) ==
Crypto.hash("01020304".decodeHex(), algorithm: Crypto.SHA3_256)

Copy link
Member

@joshuahannan joshuahannan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for adding!

Copy link
Contributor

@psiemens psiemens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, nice!

@turbolent turbolent merged commit 93077b8 into master Sep 18, 2020
@turbolent turbolent deleted the bastian/hash-function branch September 18, 2020 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants