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