Example, use command line program get-filehash
in Windows 10, or the terminal and command md5 in macOS, or call a function from the opensslR program to compare hashsum of R download file, e.g., R-3.6.1-win.exe, against fingerprint.
Windows 10
Open PowerShell (type “powershell” in search)
Enter on one line
get-filehash -Algorithm MD5
Navigate to folder (or note file path) which contains the file to check, highlight the file, then drag and drop to add to the command
get-filehash -Algorithm MD5C:\Users\userName\Downloads\R-3.6.1-win.exe
get-filehash
uses the Sha256 algorithm by default (Microsoft).
replace userName with your user account
macOS
Open terminal (type “terminal” in Spotlight)
Enter on one line “md5” plus a space
md5
Navigate to folder (or note file path) which contains the file to check, highlight the file, then drag and drop to add to the command
md5 /Users/userName/Downloads/R-3.6.1.pkg
Alternatively, replace md5 with the better sha256
Open R, install package openssl, and follow examples provided at https://cran.r-project.org/web/packages/openssl/vignettes/crypto_hashing.html