Jonathan Turner 8 лет назад
Родитель
Сommit
0dd3ce7587
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      crypto/rfc4757/encryption.go

+ 1 - 0
crypto/rfc4757/encryption.go

@@ -72,6 +72,7 @@ func DecryptMessage(key, data []byte, usage uint32, export bool, e etype.EType)
 	return pt[e.GetConfounderByteSize():], nil
 }
 
+// VerifyIntegrity checks the integrity checksum of the data matches that calculated from the decrypted data.
 func VerifyIntegrity(key, pt, data []byte, e etype.EType) bool {
 	chksum := HMAC(key, pt)
 	if bytes.Equal(chksum, data[:e.GetHMACBitLength()/8]) {