Include Usages field when computing HMAC

This commit is contained in:
Andrew Buss
2015-12-05 20:09:28 -08:00
committed by Kyle Isom
parent 2e2ee53f30
commit 4571399c6f

View File

@@ -223,6 +223,10 @@ func (encrypted *EncryptedData) computeHmac(key []byte) []byte {
mac.Write([]byte(usage))
}
for index := range encrypted.Usages {
mac.Write([]byte(encrypted.Usages[index]))
}
return mac.Sum(nil)
}