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