X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FBolt12InvoiceFeatures.cs;fp=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FBolt12InvoiceFeatures.cs;h=98b72e127b5b53f53b83ffd9f8ee16a26e5abd14;hb=3d1f246d05172683acd3b81836de4e4e9f0c1afd;hp=517d44ae3bcf16e677e1ce5dfe4a5aba3ba50dc8;hpb=a32b8843c44637ebd82c83390d17db573b972153;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/Bolt12InvoiceFeatures.cs b/c_sharp/src/org/ldk/structs/Bolt12InvoiceFeatures.cs index 517d44ae..98b72e12 100644 --- a/c_sharp/src/org/ldk/structs/Bolt12InvoiceFeatures.cs +++ b/c_sharp/src/org/ldk/structs/Bolt12InvoiceFeatures.cs @@ -50,6 +50,18 @@ public class Bolt12InvoiceFeatures : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Bolt12InvoiceFeatures. + */ + public long hash() { + long ret = bindings.Bolt12InvoiceFeatures_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Create a blank Features with no features set */