Skip to content

Commit a11ab0c

Browse files
committed
Add SHA512 hashing function
1 parent fb47d41 commit a11ab0c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

get/syncer.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ var hashMap = map[string]crypto.Hash{
6464
"sha": crypto.SHA1,
6565
"sha1": crypto.SHA1,
6666
"sha256": crypto.SHA256,
67+
"sha512": crypto.SHA512,
6768
}
6869

6970
const repomdPath = "repodata/repomd.xml"
@@ -459,6 +460,7 @@ func (r *Syncer) decide(location string, checksum XMLChecksum, checksumMap map[s
459460
}
460461
defer reader.Close()
461462

463+
log.Printf("Reading %s checksum\n", checksum.Type)
462464
readChecksum, err := util.Checksum(reader, hashMap[checksum.Type])
463465
if err != nil || readChecksum != checksum.Checksum {
464466
return Download

0 commit comments

Comments
 (0)