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

[Bug 14223] Add messageDigest() function with SHA2 and SHA3 support #5229

Merged
merged 11 commits into from Mar 9, 2017

Conversation

Projects
None yet
5 participants
@peter-b
Contributor

peter-b commented Feb 28, 2017

Add a new messageDigest(<type>, <message>) function that allows
access to a large variety of cryptographic message digest hash
functions, including SHA2 and SHA3.

peter-b added some commits Feb 27, 2017

Refactor message digest exec functions
Move SHA1 and MD5 message digest functions in a new file just for
message digests, and add basic infrastructure for generalized message
digests.

@peter-b peter-b added this to the 9.0.0-dp-6 milestone Feb 28, 2017

@montegoulding

This comment has been minimized.

Show comment
Hide comment
@montegoulding

montegoulding Feb 28, 2017

Contributor

@peter-b the params feel like they are in the wrong order to me. I think most engine functions would be thing to do something to, options rather than the other way around.

Contributor

montegoulding commented Feb 28, 2017

@peter-b the params feel like they are in the wrong order to me. I think most engine functions would be thing to do something to, options rather than the other way around.

peter-b added some commits Feb 27, 2017

Import SHA2 & SHA3 implementations from rhash
Import SHA2 & SHA3 implementation from https://github.com/rhash/RHash/
at commit 010357fb96018f8d1e5befb677596db5affe9004.
Add messageDigest() function to LiveCode Script
Add a new `messageDigest(<message>, <type>)` function that allows
access to a large variety of cryptographic message digest hash
functions.

@livecodeali livecodeali modified the milestones: 9.0.0-dp-6, 9.0.0-dp-7 Mar 1, 2017

peter-b added some commits Feb 28, 2017

Add documentation for messageDigest() function
Also modify the `sha1digest()` and `md5digest()` functions to warn
against using them and recommend `messageDigest()` instead.
Add warning notes to UUID documentation
Add a note that only "random" UUIDs should be used in any sort of
security scheme.

@peter-b peter-b added enhancement and removed need-docs WIP labels Mar 1, 2017

@peter-b

This comment has been minimized.

Show comment
Hide comment
@peter-b

peter-b Mar 1, 2017

Contributor

@montegoulding I've swapped the parameters over so they're the same order as e.g. textEncode().

Contributor

peter-b commented Mar 1, 2017

@montegoulding I've swapped the parameters over so they're the same order as e.g. textEncode().

@peter-b peter-b changed the title from Add messageDigest() function with SHA2 and SHA3 support to [Bug 14223] Add messageDigest() function with SHA2 and SHA3 support Mar 1, 2017

@peter-b peter-b requested a review from runrevmark Mar 1, 2017

@runrevmark

This comment has been minimized.

Show comment
Hide comment
@runrevmark
Contributor

runrevmark commented Mar 8, 2017

@livecode-vulcan

This comment has been minimized.

Show comment
Hide comment
@livecode-vulcan

livecode-vulcan commented Mar 8, 2017

💙 review by @runrevmark ok a303de8

livecode-vulcan added a commit that referenced this pull request Mar 8, 2017

Auto-merge pull request #5229 from peter-b/message-digest
[Bug 14223] Add messageDigest() function with SHA2 and SHA3 support

Add a new `messageDigest(<type>, <message>)` function that allows
access to a large variety of cryptographic message digest hash
functions, including SHA2 and SHA3.
@livecode-vulcan

This comment has been minimized.

Show comment
Hide comment
@livecode-vulcan

livecode-vulcan Mar 8, 2017

😞 test failure a303de8

livecode-vulcan commented Mar 8, 2017

😞 test failure a303de8

Use C++11 initializer lists to return default-constructed values
MSVC 2010 doesn't like this patch due to use of newer C++ language
features; since it's going to need MSVC 2015 to merge it, go "full
C++11" and get rid of some redundant code.
@livecodeali

This comment has been minimized.

Show comment
Hide comment
@livecodeali
Member

livecodeali commented Mar 9, 2017

@livecode-vulcan

This comment has been minimized.

Show comment
Hide comment
@livecode-vulcan

livecode-vulcan commented Mar 9, 2017

💙 review by @livecodeali ok f5bbd6b

@livecode-vulcan

This comment has been minimized.

Show comment
Hide comment
@livecode-vulcan

livecode-vulcan Mar 9, 2017

😞 test failure f5bbd6b

livecode-vulcan commented Mar 9, 2017

😞 test failure f5bbd6b

Ensure message digest buffer alignment is definitely a constexpr
This should hopefully make the MSVC compiler happy.
@livecodeali

This comment has been minimized.

Show comment
Hide comment
@livecodeali
Member

livecodeali commented Mar 9, 2017

@livecode-vulcan

This comment has been minimized.

Show comment
Hide comment
@livecode-vulcan

livecode-vulcan commented Mar 9, 2017

💙 review by @livecodeali ok 507744e

@livecode-vulcan

This comment has been minimized.

Show comment
Hide comment
@livecode-vulcan

livecode-vulcan Mar 9, 2017

😎 test success 507744e

livecode-vulcan commented Mar 9, 2017

😎 test success 507744e

@peter-b peter-b merged commit 2c26d16 into livecode:develop Mar 9, 2017

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/vulcan/cla Contributor Agreement signed by @peter-b
continuous-integration/vulcan/pr The Vulcan build succeeded on 7 builders
continuous-integration/vulcan/review Approved by reviewer @livecodeali

@peter-b peter-b deleted the peter-b:message-digest branch Mar 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment