[jira] [Commented] (GROOVY-8780) Add `sha256` DGM
[ https://issues.apache.org/jira/browse/GROOVY-8780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16607919#comment-16607919 ] ASF GitHub Bot commented on GROOVY-8780: Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/793 > Add `sha256` DGM > > > Key: GROOVY-8780 > URL: https://issues.apache.org/jira/browse/GROOVY-8780 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Minor > Fix For: 3.0.0-alpha-4, 2.5.3 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8780) Add `sha256` DGM
[ https://issues.apache.org/jira/browse/GROOVY-8780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16607911#comment-16607911 ] ASF GitHub Bot commented on GROOVY-8780: Github user danielsun1106 commented on a diff in the pull request: https://github.com/apache/groovy/pull/793#discussion_r216121282 --- Diff: src/main/java/org/codehaus/groovy/runtime/EncodingGroovyMethods.java --- @@ -389,6 +390,26 @@ public static String md5(byte[] self) throws NoSuchAlgorithmException { return digest(self, MD5); } +/** + * Calculate SHA-256 of the CharSequence instance + * @return SHA-256 value + * @throws NoSuchAlgorithmException if SHA-256 algorithm not found + * @since 2.5.0 + */ +public static String sha256(CharSequence self) throws NoSuchAlgorithmException { +return digest(self, SHA_256); +} + +/** + * Calculate SHA-256 of the byte array + * @return SHA-256 value + * @throws NoSuchAlgorithmException if SHA-256 algorithm not found + * @since 2.5.0 --- End diff -- OK. I'll fix it. Thanks ;-) > Add `sha256` DGM > > > Key: GROOVY-8780 > URL: https://issues.apache.org/jira/browse/GROOVY-8780 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Minor > Fix For: 3.0.0-alpha-4, 2.5.3 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8780) Add `sha256` DGM
[ https://issues.apache.org/jira/browse/GROOVY-8780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16607909#comment-16607909 ] ASF GitHub Bot commented on GROOVY-8780: Github user paulk-asert commented on a diff in the pull request: https://github.com/apache/groovy/pull/793#discussion_r216121214 --- Diff: src/main/java/org/codehaus/groovy/runtime/EncodingGroovyMethods.java --- @@ -389,6 +390,26 @@ public static String md5(byte[] self) throws NoSuchAlgorithmException { return digest(self, MD5); } +/** + * Calculate SHA-256 of the CharSequence instance + * @return SHA-256 value + * @throws NoSuchAlgorithmException if SHA-256 algorithm not found + * @since 2.5.0 + */ +public static String sha256(CharSequence self) throws NoSuchAlgorithmException { +return digest(self, SHA_256); +} + +/** + * Calculate SHA-256 of the byte array + * @return SHA-256 value + * @throws NoSuchAlgorithmException if SHA-256 algorithm not found + * @since 2.5.0 --- End diff -- ditto > Add `sha256` DGM > > > Key: GROOVY-8780 > URL: https://issues.apache.org/jira/browse/GROOVY-8780 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Minor > Fix For: 3.0.0-alpha-4, 2.5.3 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8780) Add `sha256` DGM
[ https://issues.apache.org/jira/browse/GROOVY-8780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16607908#comment-16607908 ] ASF GitHub Bot commented on GROOVY-8780: Github user paulk-asert commented on a diff in the pull request: https://github.com/apache/groovy/pull/793#discussion_r216121209 --- Diff: src/main/java/org/codehaus/groovy/runtime/EncodingGroovyMethods.java --- @@ -389,6 +390,26 @@ public static String md5(byte[] self) throws NoSuchAlgorithmException { return digest(self, MD5); } +/** + * Calculate SHA-256 of the CharSequence instance + * @return SHA-256 value + * @throws NoSuchAlgorithmException if SHA-256 algorithm not found + * @since 2.5.0 --- End diff -- 2.5.3? > Add `sha256` DGM > > > Key: GROOVY-8780 > URL: https://issues.apache.org/jira/browse/GROOVY-8780 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Minor > Fix For: 3.0.0-alpha-4, 2.5.3 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8780) Add `sha256` DGM
[ https://issues.apache.org/jira/browse/GROOVY-8780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16607902#comment-16607902 ] ASF GitHub Bot commented on GROOVY-8780: GitHub user danielsun1106 opened a pull request: https://github.com/apache/groovy/pull/793 GROOVY-8780: Add `sha256` DGM You can merge this pull request into a Git repository by running: $ git pull https://github.com/danielsun1106/groovy more-digest Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/793.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #793 commit c6a8a1ecbd82a83aeffb8502afed19ba5dcfc0cf Author: danielsun1106 Date: 2018-09-08T04:15:43Z GROOVY-8780: Add `sha256` DGM > Add `sha256` DGM > > > Key: GROOVY-8780 > URL: https://issues.apache.org/jira/browse/GROOVY-8780 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Minor > Fix For: 3.0.0-alpha-4, 2.5.3 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)