Ok so I'll be as specific as I can, even to a fault; but I really need any help I can get cause I'm kind of lost with this.. I'm trying to add a right click option to every file so that it executes a command. Seems simple enough at first glance.
By going in the registry editor, specifically HKCR\*\shell (which represents the context menu options that appear for every file type), I added my own key as such :
HKEY_CLASSES_ROOT * shell my_right_click_option (Default) = "Click me!" command (Default) = my_command
After this, I should have the clickable entry appearing in the context menu instantly.In my case, the key is called "checkmd5" (and as you might have guessed the cmd is used to calculate the md5 sum of a file) The command key's "Default" value stores the cmd to execute when clicked.In my case the command is :
"C:\Quite_a_long_path\md5\md5.exe" -n "%1" | clip
The -n option is just to remove the name of the program that gets displayed after the hash.The %1 will be replaced by the right clicked program's path, and the double quotes are used in case any of the paths contain some whitespaces. Sadly, all I've managed to do is execute the command (a cmd window appears and disappears, which means that the cmd has been executed) and also, just to be sure, I checked with Process Monitor (from the SysInternals Suite) the command line being executed in the small cmd window that appears and disappears and it looks like the command I put is being executed exactly as I wanted.Nonetheless, even after appending to the command either "| clip" (to redirect output to clipboard) or "> file.txt" (to a file) [I tried using an absolute path for file too], the clipboard doesn't update, nor the file.txt gets created with the output of the command..
I can't seem to understand how to make it work..Any help from you windows savvy will be greatly appreciated.
Thank you again for your patience, especially after getting to the end of this long post.
I am working on an ETL process (no primary key -> no transactional replication) between Oracle and SQL Server and using a MD5 hash to detect for differences between the source and the destination databases.
This works fine for those records where the data falls into the first 127 ASCII characters. But when there are any 'extended ascii'* characters such as
© SQL Server's
HASHBYTES function hashes these characters in a non-standard way (i.e. different from Oracle's
DBMS_CRYPTO.Hash, the .Net Cryptographic library etc).
So when I run this in Oracle:
select rawtohex(DBMS_CRYPTO.Hash ( UTL_I18N.STRING_TO_RAW ('°', 'AL32UTF8'), 2)) from dual;
And when I run this in SQL Server:
SELECT HASHBYTES('md5', '°');
And when I run this C# code:
string password = "°";// byte array representation of that stringbyte encodedPassword = new UTF8Encoding().GetBytes(password);// need MD5 to calculate the hashbyte hash = ((HashAlgorithm) CryptoConfig.CreateFromName("MD5")).ComputeHash(encodedPassword);// string representation (similar to UNIX format)string encoded = BitConverter.ToString(hash) // without dashes .Replace("-", string.Empty) // make lowercase .ToLower();
4723EB5AA8B0CD28C7E09433839B8FAE i.e. the same as in Oracle and every online tool that I have used.
Is there any SQL-based solution to this problem or would I need to create a CLR stored procedure and hash the data there?
*I realise that the term is somewhat controversial
I am writing an image processing service in C# which takes a stream as input, resize the image using the popular ImageResizer library and then save the result to AWS S3.As part of the process I am creating an MD5 hash of the stream, which I am setting as the MD5Digest on my S3 PUT request. This means that AWS will re-hash the content and compare their MD5 with the one I provided to make sure the image wasn't corrupted in transit.
This all works great when I upload a file to my service and upload it to S3 directly, but if I resize it before uploading to S3, the hash of ImageResizer's output stream doesn't match what S3 is expecting (and yes, I'm using the hash of the resized image, not the original image)
So my question is: is there anything in the ImageResizer output stream other than the image content, and if there is, how do I get rid of it?
I need to decrypt this hashed password: e59dc19f2a3a569417fa183696f91604 and have the salt: 4067. Is it possible to recover the password with this information?
How to generate a random Md5 hash value in C#?