File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/Files.App/ViewModels/Properties Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ public async Task<bool> CompareFileAsync()
146146
147147 if ( file is not null )
148148 {
149- var selectedFileHash = await CalculateSHA384HashAsync ( file . Path ) ;
149+ var selectedFileHash = await CalculateFileHashAsync ( file . Path ) ;
150150 var compare = CompareHash ( "SHA384" , selectedFileHash ) ;
151151
152152 return compare ;
@@ -171,13 +171,13 @@ public string FindMatchingAlgorithm(string hash)
171171 return string . Empty ;
172172 }
173173
174- public async Task < string > CalculateSHA384HashAsync ( string filePath )
174+ public async Task < string > CalculateFileHashAsync ( string filePath )
175175 {
176176 using ( var stream = File . OpenRead ( filePath ) )
177177 {
178- using ( var sha384 = SHA384 . Create ( ) )
178+ using ( var md5 = MD5 . Create ( ) )
179179 {
180- var hash = await Task . Run ( ( ) => sha384 . ComputeHash ( stream ) ) ;
180+ var hash = await Task . Run ( ( ) => md5 . ComputeHash ( stream ) ) ;
181181 return BitConverter . ToString ( hash ) . Replace ( "-" , "" ) . ToLowerInvariant ( ) ;
182182 }
183183 }
You can’t perform that action at this time.
0 commit comments