]> git.bitcoin.ninja Git - ldk-java/commitdiff
bindings updates
authorMatt Corallo <git@bluematt.me>
Tue, 2 Feb 2021 03:02:01 +0000 (22:02 -0500)
committerMatt Corallo <git@bluematt.me>
Tue, 2 Feb 2021 03:02:51 +0000 (22:02 -0500)
16 files changed:
liblightningjni.so
src/main/java/org/ldk/structs/ChannelKeys.java
src/main/java/org/ldk/structs/ChannelMonitor.java
src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.java
src/main/java/org/ldk/structs/RoutingMessageHandler.java
src/main/java/org/ldk/structs/SpendableOutputDescriptor.java
src/main/jni/bindings.c
ts/structs/ChannelKeys.ts
ts/structs/ChannelMonitor.ts
ts/structs/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.ts
ts/structs/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.ts
ts/structs/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.ts
ts/structs/RoutingMessageHandler.ts
ts/structs/SpendableOutputDescriptor.ts

index a1c44c61642d5ac9bff4820b32f0d8dec17d5d9c..8d8c83959ffe8f87fdd82c51793c727b62fe9f5a 100755 (executable)
Binary files a/liblightningjni.so and b/liblightningjni.so differ
index dbad7616ffb351c7a0d417f29ab50aa5c7e5e278..500e69306f6d5ac81952d529acf6cb171b92b897 100644 (file)
@@ -110,7 +110,9 @@ public class ChannelKeys extends CommonBase {
                long ret = bindings.ChannelKeys_key_derivation_params(this.ptr);
                long ret_a = bindings.LDKC2Tuple_u64u64Z_get_a(ret);
                long ret_b = bindings.LDKC2Tuple_u64u64Z_get_b(ret);
-               TwoTuple<Long, Long> ret_conv = new TwoTuple<Long, Long>(ret_a, ret_b);
+               TwoTuple<Long, Long> ret_conv = new TwoTuple<Long, Long>(ret_a, ret_b, () -> {
+                       bindings.C2Tuple_u64u64Z_free(ret);
+               });
                return ret_conv;
        }
 
index 2b102329166d4139948ec0f927ce49a4efb2c370..e19dfe42da49b7c4a159cc7807070f0aca1596b3 100644 (file)
@@ -47,7 +47,10 @@ public class ChannelMonitor extends CommonBase {
                OutPoint ret_a_hu_conv = new OutPoint(null, ret_a);
                ret_a_hu_conv.ptrs_to.add(this);;
                byte[] ret_b = bindings.LDKC2Tuple_OutPointScriptZ_get_b(ret);
-               TwoTuple<OutPoint, byte[]> ret_conv = new TwoTuple<OutPoint, byte[]>(ret_a_hu_conv, ret_b);
+               TwoTuple<OutPoint, byte[]> ret_conv = new TwoTuple<OutPoint, byte[]>(ret_a_hu_conv, ret_b, () -> {
+                       bindings.C2Tuple_OutPointScriptZ_free(ret);
+               });
+               ret_a_hu_conv.ptrs_to.add(ret_conv);
                return ret_conv;
        }
 
@@ -94,10 +97,14 @@ public class ChannelMonitor extends CommonBase {
                                int arr_conv_26_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(arr_conv_26);
                                long arr_conv_26_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(arr_conv_26));
                                TxOut arr_conv_26_b_conv = new TxOut(null, arr_conv_26_b);;
-                               TwoTuple<Integer, TxOut> arr_conv_26_conv = new TwoTuple<Integer, TxOut>(arr_conv_26_a, arr_conv_26_b_conv);
+                               TwoTuple<Integer, TxOut> arr_conv_26_conv = new TwoTuple<Integer, TxOut>(arr_conv_26_a, arr_conv_26_b_conv, () -> {
+                                       bindings.C2Tuple_u32TxOutZ_free(arr_conv_26);
+                               });
+                               arr_conv_26_b_conv.ptrs_to.add(arr_conv_26_conv);
                                arr_conv_26_arr[a] = arr_conv_26_conv;
                        };
                        TwoTuple<byte[], TwoTuple<Integer, TxOut>[]> arr_conv_46_conv = new TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>(arr_conv_46_a, arr_conv_26_arr);
+                       // Warning: We may not free the C tuple object!
                        arr_conv_46_arr[u] = arr_conv_46_conv;
                }
                /* TODO 2 TwoTuple<Long, byte[]>  */;
index 70127ff0184e15d07236bb6df300940e9626fe47..dc57ee0744b64e146ce2038615ec232607a8758f 100644 (file)
@@ -28,7 +28,10 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
                        long res_b = bindings.LDKC2Tuple_BlockHashChannelManagerZ_get_b(res);
                        ChannelManager res_b_hu_conv = new ChannelManager(null, res_b);
                        res_b_hu_conv.ptrs_to.add(this);;
-                       TwoTuple<byte[], ChannelManager> res_conv = new TwoTuple<byte[], ChannelManager>(res_a, res_b_hu_conv);
+                       TwoTuple<byte[], ChannelManager> res_conv = new TwoTuple<byte[], ChannelManager>(res_a, res_b_hu_conv, () -> {
+                               bindings.C2Tuple_BlockHashChannelManagerZ_free(res);
+                       });
+                       res_b_hu_conv.ptrs_to.add(res_conv);
                        this.res = res_conv;
                }
                public Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK(TwoTuple<byte[], ChannelManager> res) {
index a3e3d2310383b05ef92cfbf1d3a9711f685d89d6..5daf871c08f0d42380f48b54dc9c8481cb6472b4 100644 (file)
@@ -28,7 +28,10 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
                        long res_b = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_b(res);
                        ChannelMonitor res_b_hu_conv = new ChannelMonitor(null, res_b);
                        res_b_hu_conv.ptrs_to.add(this);;
-                       TwoTuple<byte[], ChannelMonitor> res_conv = new TwoTuple<byte[], ChannelMonitor>(res_a, res_b_hu_conv);
+                       TwoTuple<byte[], ChannelMonitor> res_conv = new TwoTuple<byte[], ChannelMonitor>(res_a, res_b_hu_conv, () -> {
+                               bindings.C2Tuple_BlockHashChannelMonitorZ_free(res);
+                       });
+                       res_b_hu_conv.ptrs_to.add(res_conv);
                        this.res = res_conv;
                }
                public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK(TwoTuple<byte[], ChannelMonitor> res) {
index b58d3a8bfce9047478b0a771b9f3a79984c361b9..1a610732d5d46cc11d8aafd2ea64e52e0bd4516d 100644 (file)
@@ -26,7 +26,9 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase {
                        long res = bindings.LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(ptr);
                        byte[] res_a = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(res);
                        byte[][] res_b = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(res);
-                       TwoTuple<byte[], byte[][]> res_conv = new TwoTuple<byte[], byte[][]>(res_a, res_b);
+                       TwoTuple<byte[], byte[][]> res_conv = new TwoTuple<byte[], byte[][]>(res_a, res_b, () -> {
+                               bindings.C2Tuple_SignatureCVec_SignatureZZ_free(res);
+                       });
                        this.res = res_conv;
                }
                public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK(TwoTuple<byte[], byte[][]> res) {
index a4f5353dd237799770c820f8fd44fb54b7ee6033..8a50a54b4aeba579c6dcdb76fc91a75165181948 100644 (file)
@@ -146,7 +146,12 @@ public class RoutingMessageHandler extends CommonBase {
                        long arr_conv_63_c = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(arr_conv_63);
                        ChannelUpdate arr_conv_63_c_hu_conv = new ChannelUpdate(null, arr_conv_63_c);
                        arr_conv_63_c_hu_conv.ptrs_to.add(this);;
-                       ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> arr_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(arr_conv_63_a_hu_conv, arr_conv_63_b_hu_conv, arr_conv_63_c_hu_conv);
+                       ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> arr_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(arr_conv_63_a_hu_conv, arr_conv_63_b_hu_conv, arr_conv_63_c_hu_conv, () -> {
+                               bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(arr_conv_63);
+                       });
+                       arr_conv_63_a_hu_conv.ptrs_to.add(arr_conv_63_conv);
+                       arr_conv_63_b_hu_conv.ptrs_to.add(arr_conv_63_conv);
+                       arr_conv_63_c_hu_conv.ptrs_to.add(arr_conv_63_conv);
                        arr_conv_63_arr[l] = arr_conv_63_conv;
                }
                return arr_conv_63_arr;
index 5558dd7fa7b3f269a9dc174b6355e9c35b4f0d22..eda82f8ebca432cad1c3e863317bb5f43039dd28 100644 (file)
@@ -62,7 +62,9 @@ public class SpendableOutputDescriptor extends CommonBase {
                        long key_derivation_params = obj.key_derivation_params;
                        long key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params);
                        long key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params);
-                       TwoTuple<Long, Long> key_derivation_params_conv = new TwoTuple<Long, Long>(key_derivation_params_a, key_derivation_params_b);
+                       TwoTuple<Long, Long> key_derivation_params_conv = new TwoTuple<Long, Long>(key_derivation_params_a, key_derivation_params_b, () -> {
+                               bindings.C2Tuple_u64u64Z_free(key_derivation_params);
+                       });
                        this.key_derivation_params = key_derivation_params_conv;
                        this.revocation_pubkey = obj.revocation_pubkey;
                }
@@ -83,7 +85,9 @@ public class SpendableOutputDescriptor extends CommonBase {
                        long key_derivation_params = obj.key_derivation_params;
                        long key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params);
                        long key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params);
-                       TwoTuple<Long, Long> key_derivation_params_conv = new TwoTuple<Long, Long>(key_derivation_params_a, key_derivation_params_b);
+                       TwoTuple<Long, Long> key_derivation_params_conv = new TwoTuple<Long, Long>(key_derivation_params_a, key_derivation_params_b, () -> {
+                               bindings.C2Tuple_u64u64Z_free(key_derivation_params);
+                       });
                        this.key_derivation_params = key_derivation_params_conv;
                }
        }
index 3aa76d3c0755058acba800c7d42dd9052d36c3c7..a1374eecd444495a7da85036862530c4d4cbb040 100644 (file)
@@ -112,15 +112,15 @@ static inline jstring str_ref_to_java(JNIEnv *env, const char* chars, size_t len
        FREE(err_buf);
        return err_conv;
 }
-static jclass arr_of_J_clz = NULL;
 static jclass arr_of_B_clz = NULL;
+static jclass arr_of_J_clz = NULL;
 JNIEXPORT void Java_org_ldk_impl_bindings_init_1class_1cache(JNIEnv * env, jclass clz) {
-       arr_of_J_clz = (*env)->FindClass(env, "[J");
-       CHECK(arr_of_J_clz != NULL);
-       arr_of_J_clz = (*env)->NewGlobalRef(env, arr_of_J_clz);
        arr_of_B_clz = (*env)->FindClass(env, "[B");
        CHECK(arr_of_B_clz != NULL);
        arr_of_B_clz = (*env)->NewGlobalRef(env, arr_of_B_clz);
+       arr_of_J_clz = (*env)->FindClass(env, "[J");
+       CHECK(arr_of_J_clz != NULL);
+       arr_of_J_clz = (*env)->NewGlobalRef(env, arr_of_J_clz);
 }
 static inline struct LDKThirtyTwoBytes ThirtyTwoBytes_clone(const struct LDKThirtyTwoBytes *orig) { struct LDKThirtyTwoBytes ret; memcpy(ret.data, orig->data, 32); return ret; }
 static inline LDKAccessError LDKAccessError_from_java(JNIEnv *env, jclass clz) {
index 957dc512f372b5d836e2b00ca93db6c76007554d..61daa2567a913f860b8010839fe09d0af42cf937 100644 (file)
@@ -138,7 +138,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                number ret = bindings.ChannelKeys_key_derivation_params(this.ptr);
                number ret_a = bindings.LDKC2Tuple_u64u64Z_get_a(ret);
                number ret_b = bindings.LDKC2Tuple_u64u64Z_get_b(ret);
-               TwoTuple<Number, Number> ret_conv = new TwoTuple<Number, Number>(ret_a, ret_b);
+               TwoTuple<Number, Number> ret_conv = new TwoTuple<Number, Number>(ret_a, ret_b, () -> {
+                       bindings.C2Tuple_u64u64Z_free(ret);
+               });
                return ret_conv;
        }
 
index 8baaf1897141c0c97ad929fc4d825284bcf7b22f..ff746a206aa4d6710141f5d54ecf94f242e4c55e 100644 (file)
@@ -51,7 +51,10 @@ import * as bindings from '../bindings' // TODO: figure out location
                const ret_a_hu_conv: OutPoint = new OutPoint(null, ret_a);
                ret_a_hu_conv.ptrs_to.add(this);;
                Uint8Array ret_b = bindings.LDKC2Tuple_OutPointScriptZ_get_b(ret);
-               TwoTuple<OutPoint, Uint8Array> ret_conv = new TwoTuple<OutPoint, Uint8Array>(ret_a_hu_conv, ret_b);
+               TwoTuple<OutPoint, Uint8Array> ret_conv = new TwoTuple<OutPoint, Uint8Array>(ret_a_hu_conv, ret_b, () -> {
+                       bindings.C2Tuple_OutPointScriptZ_free(ret);
+               });
+               ret_a_hu_conv.ptrs_to.add(ret_conv);
                return ret_conv;
        }
 
@@ -98,10 +101,14 @@ import * as bindings from '../bindings' // TODO: figure out location
                                number arr_conv_25_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(arr_conv_25);
                                number arr_conv_25_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(arr_conv_25));
                                TxOut arr_conv_25_b_conv = new TxOut(null, arr_conv_25_b);;
-                               TwoTuple<Number, TxOut> arr_conv_25_conv = new TwoTuple<Number, TxOut>(arr_conv_25_a, arr_conv_25_b_conv);
+                               TwoTuple<Number, TxOut> arr_conv_25_conv = new TwoTuple<Number, TxOut>(arr_conv_25_a, arr_conv_25_b_conv, () -> {
+                                       bindings.C2Tuple_u32TxOutZ_free(arr_conv_25);
+                               });
+                               arr_conv_25_b_conv.ptrs_to.add(arr_conv_25_conv);
                                arr_conv_25_arr[z] = arr_conv_25_conv;
                        };
                        TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]> arr_conv_49_conv = new TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>(arr_conv_49_a, arr_conv_25_arr);
+                       // Warning: We may not free the C tuple object!
                        arr_conv_49_arr[x] = arr_conv_49_conv;
                }
                /* TODO 2 TwoTuple<Number, Uint8Array>  */;
index 81d95ece646131bf4eff9cbf498c1ed3df862a0e..91fcaa401e5788d6e19cfccdd8758c3543606057 100644 (file)
@@ -24,7 +24,10 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ extends CommonB
                        number res_b = bindings.LDKC2Tuple_BlockHashChannelManagerZ_get_b(res);
                        const res_b_hu_conv: ChannelManager = new ChannelManager(null, res_b);
                        res_b_hu_conv.ptrs_to.add(this);;
-                       TwoTuple<Uint8Array, ChannelManager> res_conv = new TwoTuple<Uint8Array, ChannelManager>(res_a, res_b_hu_conv);
+                       TwoTuple<Uint8Array, ChannelManager> res_conv = new TwoTuple<Uint8Array, ChannelManager>(res_a, res_b_hu_conv, () -> {
+                               bindings.C2Tuple_BlockHashChannelManagerZ_free(res);
+                       });
+                       res_b_hu_conv.ptrs_to.add(res_conv);
                        this.res = res_conv;
                }
                public Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_OK(TwoTuple<Uint8Array, ChannelManager> res) {
index 5b2d6c20ce77faf5a071e9a3c859369332c2ad02..c563f8489511c3ff868020ffea162c483b34f1ab 100644 (file)
@@ -24,7 +24,10 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ extends CommonB
                        number res_b = bindings.LDKC2Tuple_BlockHashChannelMonitorZ_get_b(res);
                        const res_b_hu_conv: ChannelMonitor = new ChannelMonitor(null, res_b);
                        res_b_hu_conv.ptrs_to.add(this);;
-                       TwoTuple<Uint8Array, ChannelMonitor> res_conv = new TwoTuple<Uint8Array, ChannelMonitor>(res_a, res_b_hu_conv);
+                       TwoTuple<Uint8Array, ChannelMonitor> res_conv = new TwoTuple<Uint8Array, ChannelMonitor>(res_a, res_b_hu_conv, () -> {
+                               bindings.C2Tuple_BlockHashChannelMonitorZ_free(res);
+                       });
+                       res_b_hu_conv.ptrs_to.add(res_conv);
                        this.res = res_conv;
                }
                public Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK(TwoTuple<Uint8Array, ChannelMonitor> res) {
index eb3564633dc3a681ae9f81112e9d2d8e1504db7a..23aad79f4edd0de13cac2c73898836dd6b7eec65 100644 (file)
@@ -22,7 +22,9 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ extends CommonBase {
                        number res = bindings.LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(ptr);
                        Uint8Array res_a = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(res);
                        Uint8Array[] res_b = bindings.LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(res);
-                       TwoTuple<Uint8Array, Uint8Array[]> res_conv = new TwoTuple<Uint8Array, Uint8Array[]>(res_a, res_b);
+                       TwoTuple<Uint8Array, Uint8Array[]> res_conv = new TwoTuple<Uint8Array, Uint8Array[]>(res_a, res_b, () -> {
+                               bindings.C2Tuple_SignatureCVec_SignatureZZ_free(res);
+                       });
                        this.res = res_conv;
                }
                public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ_OK(TwoTuple<Uint8Array, Uint8Array[]> res) {
index 2ab676ca407715b6aec957cb26e98ee455fefc03..28552c66dbc37ce7a9742597c4e6a3bd5faffe09 100644 (file)
@@ -174,7 +174,12 @@ import * as bindings from '../bindings' // TODO: figure out location
                        number arr_conv_63_c = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(arr_conv_63);
                        const arr_conv_63_c_hu_conv: ChannelUpdate = new ChannelUpdate(null, arr_conv_63_c);
                        arr_conv_63_c_hu_conv.ptrs_to.add(this);;
-                       ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> arr_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(arr_conv_63_a_hu_conv, arr_conv_63_b_hu_conv, arr_conv_63_c_hu_conv);
+                       ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> arr_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(arr_conv_63_a_hu_conv, arr_conv_63_b_hu_conv, arr_conv_63_c_hu_conv, () -> {
+                               bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(arr_conv_63);
+                       });
+                       arr_conv_63_a_hu_conv.ptrs_to.add(arr_conv_63_conv);
+                       arr_conv_63_b_hu_conv.ptrs_to.add(arr_conv_63_conv);
+                       arr_conv_63_c_hu_conv.ptrs_to.add(arr_conv_63_conv);
                        arr_conv_63_arr[l] = arr_conv_63_conv;
                }
                return arr_conv_63_arr;
index 79a3f6ce0b53d52d582fe6750a15da23a9af4898..005b9741b6f967c585df9e2ef3c46203ac57381d 100644 (file)
@@ -58,7 +58,9 @@ export class DynamicOutputP2WSH extends SpendableOutputDescriptor {
                const key_derivation_params: number = obj.key_derivation_params;
                number key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params);
                        number key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params);
-                       TwoTuple<Number, Number> key_derivation_params_conv = new TwoTuple<Number, Number>(key_derivation_params_a, key_derivation_params_b);
+                       TwoTuple<Number, Number> key_derivation_params_conv = new TwoTuple<Number, Number>(key_derivation_params_a, key_derivation_params_b, () -> {
+                               bindings.C2Tuple_u64u64Z_free(key_derivation_params);
+                       });
                this.key_derivation_params = key_derivation_params_conv;
                this.revocation_pubkey = obj.revocation_pubkey;
        }
@@ -79,7 +81,9 @@ export class StaticOutputCounterpartyPayment extends SpendableOutputDescriptor {
                const key_derivation_params: number = obj.key_derivation_params;
                number key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params);
                        number key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params);
-                       TwoTuple<Number, Number> key_derivation_params_conv = new TwoTuple<Number, Number>(key_derivation_params_a, key_derivation_params_b);
+                       TwoTuple<Number, Number> key_derivation_params_conv = new TwoTuple<Number, Number>(key_derivation_params_a, key_derivation_params_b, () -> {
+                               bindings.C2Tuple_u64u64Z_free(key_derivation_params);
+                       });
                this.key_derivation_params = key_derivation_params_conv;
        }
 }