org.bitcoin
Class NativeSecp256k1
java.lang.Object
org.bitcoin.NativeSecp256k1
public class NativeSecp256k1
- extends Object
This class holds native methods to handle ECDSA verification.
You can find an example library that can be used for this at https://github.com/sipa/secp256k1
To build secp256k1 for use with bitcoinj, run `./configure` and `make libjavasecp256k1.so` then copy
libjavasecp256k1.so to your system library path or point the JVM to the folder containing it with -Djava.library.path
|
Field Summary |
static boolean |
enabled
|
|
Method Summary |
static boolean |
verify(byte[] data,
byte[] signature,
byte[] pub)
Verifies the given secp256k1 signature in native code. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
enabled
public static boolean enabled
NativeSecp256k1
public NativeSecp256k1()
verify
public static boolean verify(byte[] data,
byte[] signature,
byte[] pub)
- Verifies the given secp256k1 signature in native code.
Calling when enabled == false is undefined (probably library not loaded)
- Parameters:
data - The data which was signed, must be exactly 32 bytessignature - The signaturepub - The public key which did the signing
Copyright © 2014. All rights reserved.