Skip to content

Commit

Permalink
Simplify MD5 Ternary → Bitwise
Browse files Browse the repository at this point in the history
  • Loading branch information
leoherzog committed Sep 20, 2024
1 parent 9ee5616 commit 5016f55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code.gs
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ function getCalculatedHourlyPrecipAccum_(currentPrecipRate) {
// https://gist.github.com/rcknr/ad7d4623b0a2d90415323f96e634cdee
function md5_(input) {
return Utilities.computeDigest(Utilities.DigestAlgorithm.MD5, input)
.reduce((output, byte) => output + (byte < 0 ? byte + 256 : byte).toString(16).padStart(2, '0'), '');
.reduce((output, byte) => output + (byte & 255).toString(16).padStart(2, '0'), '');
}

function checkGithubReleaseVersion_() {
Expand Down

0 comments on commit 5016f55

Please sign in to comment.