This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Calculates an eTag for a local file that should match the S3 eTag of the uploaded file. | |
$md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider | |
$blocksize = (1024*1024*5) | |
$startblocks = (1024*1024*16) | |
function AmazonEtagHashForFile($filename) { | |
$lines = 0 | |
[byte[]] $binHash = @() |