Method: Specinfra::Command::Windows::Base::File.get_md5sum
- Defined in:
- lib/specinfra/command/windows/base/file.rb
permalink .get_md5sum(file) ⇒ Object
[View source]
49 50 51 52 53 54 55 |
# File 'lib/specinfra/command/windows/base/file.rb', line 49 def get_md5sum(file) " $md5 = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider\n $sum = [System.BitConverter]::ToString($md5.ComputeHash([System.IO.File]::ReadAllBytes(\"\#{file}\")))\n echo $sum.ToLower().Replace(\"-\",\"\")\n EOT\nend\n" |