/// <summary> /// Returns the 10 byte AUTH CODE to be checked or appended immediately following the AES data stream. /// </summary> public byte[] GetAuthCode() { // We usually don't get advance notice of final block. Hash requres a TransformFinal. if (!_finalised) { byte[] dummy = new byte[0]; #if NET45 _hmacsha1.TransformFinalBlock(dummy, 0, 0); #elif NETSTANDARD1_3 _hmacsha1.AppendData(dummy); #endif _finalised = true; } #if NET45 return(_hmacsha1.Hash); #elif NETSTANDARD1_3 return(_hmacsha1.GetHashAndReset()); #endif }