Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CheckParameters()

static void System.Security.Cryptography.AesCcm.CheckParameters ( ReadOnlySpan< byte > plaintext,
ReadOnlySpan< byte > ciphertext,
ReadOnlySpan< byte > nonce,
ReadOnlySpan< byte > tag )
inlinestaticprivate

Definition at line 65 of file AesCcm.cs.

66 {
67 if (plaintext.Length != ciphertext.Length)
68 {
70 }
71 if (!nonce.Length.IsLegalSize(NonceByteSizes))
72 {
74 }
75 if (!tag.Length.IsLegalSize(TagByteSizes))
76 {
78 }
79 }
static string Cryptography_InvalidNonceLength
Definition SR.cs:98
static string Cryptography_PlaintextCiphertextLengthMismatch
Definition SR.cs:128
static string Cryptography_InvalidTagLength
Definition SR.cs:100
Definition SR.cs:7

References System.SR.Cryptography_InvalidNonceLength, System.SR.Cryptography_InvalidTagLength, System.SR.Cryptography_PlaintextCiphertextLengthMismatch, System.ReadOnlySpan< T >.Length, System.Security.Cryptography.AesCcm.NonceByteSizes, and System.Security.Cryptography.AesCcm.TagByteSizes.

Referenced by System.Security.Cryptography.AesCcm.Decrypt(), and System.Security.Cryptography.AesCcm.Encrypt().