Include Usages field when computing HMAC

This commit is contained in:
Andrew Buss
2018-03-12 12:39:32 -07:00
committed by Kyle Isom
parent 2e2ee53f30
commit 4571399c6f
+4
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)
}