Skip to content

Commit b32e44f

Browse files
Fix ffi ext
1 parent 79215ca commit b32e44f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Crypto/sr25519.dylib

2.21 MB
Binary file not shown.

src/Crypto/sr25519.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ class sr25519
2424

2525
public function __construct ()
2626
{
27+
$path = PHP_OS == "Darwin" ? '/sr25519.dylib' : '/sr25519.so';
2728
$this->FFIInstant = FFI::cdef(
2829
file_get_contents(__DIR__ . "/sr25519_lib.h"),
29-
__DIR__ . '/sr25519.so'
30+
__DIR__ . $path
3031
);
3132
}
3233

@@ -58,7 +59,7 @@ public function InitKeyPair ($secretSeed): keyPair
5859
* Verify signature, return true if signature is correct
5960
*
6061
* @param keyPair $pair keyPair instance
61-
* @param string $msg msg to be signed
62+
* @param string $msg msg to be signed
6263
* @param string $signature signature
6364
* @return bool
6465
*/

0 commit comments

Comments
 (0)