X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FOfferFeatures.cs;h=8e6af54be25f154ad8c7f0efd6114a3467934655;hb=12fdbefaac81d5b4be6bb67addd6dcd7c46a182b;hp=9bfc37876ef2c6131170321633dbac5486e564e0;hpb=afb5ef3730c7175ccdd22a20ea4e071c663cb709;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 */