Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / Sha256.java
index 76c110a7372691e2cf37777bdd9c8900dc4a99fc..011cd86130d5d3dd1c804eda24a1415c60c5d489 100644 (file)
@@ -19,14 +19,8 @@ public class Sha256 extends CommonBase {
                if (ptr != 0) { bindings.Sha256_free(ptr); }
        }
 
-       /**
-        * Checks if two Sha256s contain equal inner contents.
-        * This ignores pointers and is_owned flags and looks at the values in fields.
-        * Two objects with NULL inner values will be considered "equal" here.
-        */
-       public boolean eq(Sha256 b) {
-               boolean ret = bindings.Sha256_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
-               this.ptrs_to.add(b);
+       long clone_ptr() {
+               long ret = bindings.Sha256_clone_ptr(this.ptr);
                return ret;
        }
 
@@ -35,10 +29,29 @@ public class Sha256 extends CommonBase {
         */
        public Sha256 clone() {
                long ret = bindings.Sha256_clone(this.ptr);
-               if (ret < 1024) { return null; }
-               Sha256 ret_hu_conv = new Sha256(null, ret);
+               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.
+        * Two objects with NULL inner values will be considered "equal" here.
+        */
+       public boolean eq(Sha256 b) {
+               boolean ret = bindings.Sha256_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
+               this.ptrs_to.add(b);
+               return ret;
+       }
+
 }