- public static DataLossProtect constructor_new(byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg) {
- long ret = bindings.DataLossProtect_new(your_last_per_commitment_secret_arg, my_current_per_commitment_point_arg);
- DataLossProtect ret_hu_conv = new DataLossProtect(null, ret);
+ public static DataLossProtect of(byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg) {
+ long ret = bindings.DataLossProtect_new(InternalUtils.check_arr_len(your_last_per_commitment_secret_arg, 32), InternalUtils.check_arr_len(my_current_per_commitment_point_arg, 33));
+ Reference.reachabilityFence(your_last_per_commitment_secret_arg);
+ Reference.reachabilityFence(my_current_per_commitment_point_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ DataLossProtect ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new DataLossProtect(null, ret); }