1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
12 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
13 public class Sha256 extends CommonBase {
14 Sha256(Object _dummy, long ptr) { super(ptr); }
15 @Override @SuppressWarnings("deprecation")
16 protected void finalize() throws Throwable {
18 if (ptr != 0) { bindings.Sha256_free(ptr); }
22 * Checks if two Sha256s contain equal inner contents.
23 * This ignores pointers and is_owned flags and looks at the values in fields.
24 * Two objects with NULL inner values will be considered "equal" here.
26 public boolean eq(Sha256 b) {
27 boolean ret = bindings.Sha256_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
33 * Creates a copy of the Sha256
35 public Sha256 clone() {
36 long ret = bindings.Sha256_clone(this.ptr);
37 if (ret < 1024) { return null; }
38 Sha256 ret_hu_conv = new Sha256(null, ret);
39 ret_hu_conv.ptrs_to.add(this);