X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FShutdown.cs;h=142d8fdf9d30da2085493ebb6924a054b4478528;hb=3d1f246d05172683acd3b81836de4e4e9f0c1afd;hp=a7ea3d7840743587b7a036a6025f384f512c9b66;hpb=afb5ef3730c7175ccdd22a20ea4e071c663cb709;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/Shutdown.cs b/c_sharp/src/org/ldk/structs/Shutdown.cs index a7ea3d78..142d8fdf 100644 --- a/c_sharp/src/org/ldk/structs/Shutdown.cs +++ b/c_sharp/src/org/ldk/structs/Shutdown.cs @@ -92,6 +92,18 @@ public class Shutdown : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Shutdown. + */ + public long hash() { + long ret = bindings.Shutdown_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Checks if two Shutdowns contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields.