X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FBolt12InvoiceFeatures.cs;h=98b72e127b5b53f53b83ffd9f8ee16a26e5abd14;hb=239d70ea23fdf148440dfedf9479944dc0fbf394;hp=517d44ae3bcf16e677e1ce5dfe4a5aba3ba50dc8;hpb=afb5ef3730c7175ccdd22a20ea4e071c663cb709;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 */