Add compact2der() method
This commit is contained in:
@@ -64,4 +64,6 @@ public class Secp256k1CFunctions {
|
||||
public static native byte[] secp256k1_ecdh(long ctx, byte[] seckey, byte[] pubkey);
|
||||
|
||||
public static native byte[] secp256k1_ecdsa_recover(long ctx, byte[] sig, byte[] msg32, int recid);
|
||||
|
||||
public static native byte[] secp256k1_compact_to_der(long ctx, byte[] sig);
|
||||
}
|
||||
|
||||
@@ -83,4 +83,8 @@ public object NativeSecp256k1 : Secp256k1 {
|
||||
override fun ecdsaRecover(sig: ByteArray, message: ByteArray, recid: Int): ByteArray {
|
||||
return Secp256k1CFunctions.secp256k1_ecdsa_recover(Secp256k1Context.getContext(), sig, message, recid)
|
||||
}
|
||||
|
||||
override fun compact2der(sig: ByteArray): ByteArray {
|
||||
return Secp256k1CFunctions.secp256k1_compact_to_der(Secp256k1Context.getContext(), sig)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user