Exemple #1
0
        /// <summary>
        /// Open the Jenkins hash dialog.
        /// </summary>
        private async void DoJenkinsHashCommand()
        {
            var strToHash = await _dialogCoordinator.ShowInputAsync(this, "Jenkins Hash", "What would you like to hash?");

            if (string.IsNullOrWhiteSpace(strToHash))
            {
                return;
            }

            var hash32 = JenkinsHash.GetHash32(strToHash);
            var hash64 = JenkinsHash.GetHash64(strToHash);
            await _dialogCoordinator.ShowMessageAsync(this, "Hash Result",
                                                      $"The 32-bit Jenkins hash of \"{strToHash}\" is 0x{hash32:X8}.\nThe 64-bit Jenkins hash is 0x{hash64:X16}.");
        }