string s1="image";string s2="images";//this code shows hash of md5MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); Byte bytes4MD5 = Encoding.UTF8.GetBytes(s1); byte checkSum = md5.ComputeHash(bytes4MD5); string result = BitConverter.ToString(checkSum).Replace("-", String.Empty);
how can i get hash from the both strings? I thought that it may be smooth like this:
Byte bytes4MD5 = Encoding.UTF8.GetBytes(s1,s2); //but pc does not understand me...
I am trying to make an OpenOfficeWriter StarBasic-Macro Program, that turns wiki source code to Open office Writer. I need a starbasic macro, that generates the MD5 checksum. There is a MD5Thumbprint in the Documentation for OpenOffice, so I suppose you can compute the MD5 in a Open Office starbasic macro using some kind of macro code. This is what I'm looking for.
I suppose I have to use the XCertificate Interface in the security module, but I don't know how the macro code should be. So I need a Open Office starbasic macro command or code like:
stringMD5=s.md5(), where will be a string (for example something like "Douglas C-47 Skytrain.jpg") and stringMD5 should be a string or something that I can make to a string (in this example the outcome in the end should be the string "40decfb5f1be8bca1e56c8a853027941", which is the MD5 for the String "Douglas C-47 Skytrain.jpg").
I would like to avoid using Python (see:How to get MD5 sum of a string?) and create a starbasic macro instead. If somebody has a tip, I will be of course very glad. George
Currently I'm generating the MD5 checksum for a package using:
library(tools)#the files in the package main directory and subdirectoriesnames = (list.files("package_directory/", recursive = T)) files = do.call(paste, list("package_directory", names, sep = "")) #pasting the directory name so it forms a complete filename, can be skipped ##if you set your working directory to the same directory as the package#md5 checksum generationmd5 = as.vector(md5sum(files))#aggregating it in a fileexpt = do.call(paste, list(md5, names, sep = " *"))#and writing it to the package directorywrite(expt, "package_directory/MD5")
I just started venturing package development, and I'm not sure this method will always work. So, what's the smart way of doing it all?
This question already has an answer here:
the above variable contains a password called test.I want to hash this password using sha512 md5 and salt how do i do that as ive found only benifits of salt and sha512,i allready know md5 encryption.please i need the solution as my system is vunerable
and please explain it with a code example because im still attached to md5
from what ive understood by your comments and answers ive got the following code
$pass="test";$hashed_pass= openssl_digest($pass, 'sha512');
ok seems solid enough but what is [salt='']?does it generate a random salt string or something if so the how to implement it?