import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
+import javax.annotation.Nullable;
/**
if (ptr != 0) { bindings.Sha256_free(ptr); }
}
+ /**
+ * Creates a copy of the Sha256
+ */
+ public Sha256 clone() {
+ long ret = bindings.Sha256_clone(this.ptr);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Sha256 ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new Sha256(null, ret); }
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Checks if two Sha256s contain equal inner contents.
+ */
+ public long hash() {
+ long ret = bindings.Sha256_hash(this.ptr);
+ return ret;
+ }
+
/**
* Checks if two Sha256s contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
return ret;
}
- /**
- * Creates a copy of the Sha256
- */
- public Sha256 clone() {
- long ret = bindings.Sha256_clone(this.ptr);
- Sha256 ret_hu_conv = new Sha256(null, ret);
- ret_hu_conv.ptrs_to.add(this);
- return ret_hu_conv;
- }
-
}