/**
* Creates a new tuple which has the same data as `orig`
* but with all dynamically-allocated buffers duplicated in new buffers.
*/
public TwoTuple_PaymentHashPaymentSecretZ clone() {
long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_clone(this.ptr);
/**
* Creates a new tuple which has the same data as `orig`
* but with all dynamically-allocated buffers duplicated in new buffers.
*/
public TwoTuple_PaymentHashPaymentSecretZ clone() {
long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_clone(this.ptr);
TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
* Creates a new C2Tuple_PaymentHashPaymentSecretZ from the contained elements.
*/
public static TwoTuple_PaymentHashPaymentSecretZ of(byte[] a, byte[] b) {
* Creates a new C2Tuple_PaymentHashPaymentSecretZ from the contained elements.
*/
public static TwoTuple_PaymentHashPaymentSecretZ of(byte[] a, byte[] b) {
- long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_new(a, b);
- if (ret < 1024) { return null; }
+ long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_new(InternalUtils.check_arr_len(a, 32), InternalUtils.check_arr_len(b, 32));
+ if (ret >= 0 && ret <= 4096) { return null; }
TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;
TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
return ret_hu_conv;