Skip to content

Commit 55a35e7

Browse files
authored
Merge pull request #45 from SUMO-Kwiatkowski/SP-X
Dependency updates
2 parents fdf77f9 + f486fc3 commit 55a35e7

File tree

4 files changed

+41
-33
lines changed

4 files changed

+41
-33
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ examples/.DS_Store
1818
# PHPUnit
1919
.phpunit.cache/
2020
.phpunit.result.cache
21-
test/unit/_html
21+
test/unit/_html
22+
test/unit/BitPayKeyUtils/Storage/test1.txt
23+
test/unit/BitPayKeyUtils/Storage/test11.txt

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
"ext-iconv": "*"
2929
},
3030
"require-dev": {
31-
"phpunit/phpunit": "10.5.45"
31+
"phpunit/phpunit": "^10.5.48"
3232
},
3333
"suggest": {
34-
"ext-gmp": "Required to use this package with GMP instead of BCMath"
34+
"ext-gmp": "GMP provides better performance than BCMath"
3535
}
36-
}
36+
}

composer.lock

Lines changed: 31 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/BitPayKeyUtils/Util/Util.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,15 @@ class Util
1919

2020
/**
2121
* Computes a digest hash value for the given data using
22-
* the given method, and returns a raw or binhex encoded
23-
* string, see:
24-
* http://us1.php.net/manual/en/function.openssl-digest.php
22+
* the hash function.
2523
*
2624
* @param string $data
2725
*
2826
* @return string
2927
*/
3028
public static function sha512($data)
3129
{
32-
return openssl_digest($data, 'sha512');
30+
return hash('sha512', $data);
3331
}
3432

3533
/**
@@ -68,7 +66,7 @@ public static function sha256ripe160($data)
6866
*/
6967
public static function ripe160($data, $binary = false)
7068
{
71-
return openssl_digest($data, 'ripemd160', $binary);
69+
return hash('ripemd160', $data, $binary);
7270
}
7371

7472
/**
@@ -84,7 +82,7 @@ public static function ripe160($data, $binary = false)
8482
*/
8583
public static function sha256($data, $binary = false)
8684
{
87-
return openssl_digest($data, 'SHA256', $binary);
85+
return hash('sha256', $data, $binary);
8886
}
8987

9088
/**

0 commit comments

Comments
 (0)