private static void Main(string[] args) { var mybute = Encoding.Unicode.GetBytes("hello world"); var a = MD5.Create(); var hash = a.ComputeHash(mybute); Console.WriteLine(new Guid(hash).ToString()); //Thread.Sleep(10000); var mybute2 = Encoding.Unicode.GetBytes("hello world"); var hash2 = a.ComputeHash(mybute2); Console.WriteLine(new Guid(hash2).ToString()); Console.ReadLine(); var d = GuidUtility.Create(GuidUtility.DnsNamespace, "vincent", 5); Console.WriteLine(d.ToString()); Thread.Sleep(5000); var e = GuidUtility.Create(GuidUtility.DnsNamespace, "vincent", 5); Console.WriteLine(e.ToString()); Console.ReadLine(); Console.Write(MainUtil.GetMD5Hash("vincent li meng han hello world wassup this is for testing no other purpose. yoyo . Yes, i like it..woohhoo")); }
/// <summary> /// Edit Text Button /// </summary> /// <param name="args"> /// The args. /// </param> private new void EditText(ClientPipelineArgs args) { Assert.ArgumentNotNull(args, "args"); if (!this.Disabled) { if (args.IsPostBack) { if ((args.Result != null) && (args.Result != "undefined")) { this.UpdateHtml(args); } } else { var url2 = new RichTextEditorUrl { Conversion = RichTextEditorUrl.HtmlConversion.DoNotConvert, Disabled = this.Disabled, FieldID = this.FieldID, ID = this.ID, ItemID = this.ItemID, Language = this.ItemLanguage, Mode = string.Empty, Source = this.Source, Url = "/sitecore/shell/Controls/Rich Text Editor/EditorPage.aspx", Value = this.Value, Version = this.ItemVersion }; var urlReturn = url2.GetUrl().ToString(); if (this.GetViewStateString("Source").Contains("&")) { urlReturn = this.GetViewStateString("Source").Split('&').Aggregate(urlReturn, (current, queryString) => current + "&" + queryString); } this.handle = url2.Handle; var id = MainUtil.GetMD5Hash(this.Source + this.ItemLanguage); SheerResponse.Eval(string.Concat(new object[] { "scContent.editRichText(\"", urlReturn, "\", \"", id.ToShortID(), "\", ", StringUtil.EscapeJavascriptString(this.Value), ")" })); args.WaitForPostBack(); } } }