From bb7089c792278bfe896e116feb44487b428f604f Mon Sep 17 00:00:00 2001 From: carlossanlop Date: Thu, 2 Sep 2021 23:50:00 -0700 Subject: [PATCH 1/3] Port System.Security.Cryptography triple slash to docs --- .../SymmetricAlgorithm.xml | 856 +++++++++++++----- 1 file changed, 646 insertions(+), 210 deletions(-) diff --git a/xml/System.Security.Cryptography/SymmetricAlgorithm.xml b/xml/System.Security.Cryptography/SymmetricAlgorithm.xml index 273655e269a..e8dcd162fd0 100644 --- a/xml/System.Security.Cryptography/SymmetricAlgorithm.xml +++ b/xml/System.Security.Cryptography/SymmetricAlgorithm.xml @@ -644,12 +644,27 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The initialization vector. + The padding mode used to produce the ciphertext and remove during decryption. + Decrypts data using CBC mode with the specified padding mode. + The decrypted plaintext data. + + . + + ]]> + + + or is . + + is not a valid padding mode. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The ciphertext could not be decrypted successfully. @@ -678,12 +693,25 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The initialization vector. + The padding mode used to produce the ciphertext and remove during decryption. + Decrypts data using CBC mode with the specified padding mode. + The decrypted plaintext data. + + . + + ]]> + + + is not a valid padding mode. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The ciphertext could not be decrypted successfully. @@ -713,13 +741,27 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The initialization vector. + The buffer to receive the plaintext data. + The padding mode used to produce the ciphertext and remove during decryption. + Decrypts data into the specified buffer, using CBC mode with the specified padding mode. + The total number of bytes written to + + . + + ]]> + + + is not a valid padding mode. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The ciphertext could not be decrypted successfully. + The buffer in is too small to hold the plaintext data. @@ -749,13 +791,32 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The initialization vector. + The padding mode used to produce the ciphertext and remove during decryption. + The feedback size, specified in bits. + Decrypts data using CFB mode with the specified padding mode and feedback size. + The decrypted plaintext data. + + . + + ]]> + + + or is . + + is not a valid padding mode. + -or- + is not positive or represent a whole number of bytes. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The ciphertext could not be decrypted successfully. + -or- + The feedback size is not valid for the algorithm. @@ -785,13 +846,30 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The initialization vector. + The padding mode used to produce the ciphertext and remove during decryption. + The feedback size, specified in bits. + Decrypts data using CFB mode with the specified padding mode and feedback size. + The decrypted plaintext data. + + . + + ]]> + + + is not a valid padding mode. + -or- + is not positive or represent a whole number of bytes. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The ciphertext could not be decrypted successfully. + -or- + The feedback size is not valid for the algorithm. @@ -822,14 +900,33 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The initialization vector. + The buffer to receive the plaintext data. + The padding mode used to produce the ciphertext and remove during decryption. + The feedback size, specified in bits. + Decrypts data into the specified buffer, using CFB mode with the specified padding mode and feedback size. + The total number of bytes written to . + + . + + ]]> + + + is not a valid padding mode. + -or- + is not positive or represent a whole number of bytes. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + -or- + The buffer in is too small to hold the plaintext data. + The ciphertext could not be decrypted successfully. + -or- + is not valid for the algorithm. @@ -858,11 +955,24 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The padding mode used to produce the ciphertext and remove during decryption. + Decrypts data using ECB mode with the specified padding mode. + The decrypted plaintext data. + + . + + ]]> + + + is . + + is not a valid padding mode. + The ciphertext could not be decrypted successfully. @@ -891,11 +1001,22 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The padding mode used to produce the ciphertext and remove during decryption. + Decrypts data using ECB mode with the specified padding mode. + The decrypted plaintext data. + + . + + ]]> + + + is not a valid padding mode. + The ciphertext could not be decrypted successfully. @@ -925,12 +1046,24 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The buffer to receive the plaintext data. + The padding mode used to produce the ciphertext and remove during decryption. + Decrypts data into the specified buffer, using ECB mode with the specified padding mode. + The total number of bytes written to + + . + + ]]> + + + is not a valid padding mode. + The ciphertext could not be decrypted successfully. + The buffer in is too small to hold the plaintext data. @@ -1084,12 +1217,27 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The initialization vector. + The padding mode used to produce the ciphertext and remove during decryption. + Encrypts data using CBC mode with the specified padding mode. + The encrypted ciphertext data. + + . + + ]]> + + + or is . + + is not a valid padding mode. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The plaintext could not be encrypted successfully. @@ -1118,12 +1266,25 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The initialization vector. + The padding mode used to produce the ciphertext and remove during decryption. + Encrypts data using CBC mode with the specified padding mode. + The encrypted ciphertext data. + + . + + ]]> + + + is not a valid padding mode. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The plaintext could not be encrypted successfully. @@ -1153,13 +1314,27 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The initialization vector. + The buffer to receive the ciphertext data. + The padding mode used to produce the ciphertext and remove during decryption. + Encrypts data into the specified buffer, using CBC mode with the specified padding mode. + The total number of bytes written to . + + . + + ]]> + + + is not a valid padding mode. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The plaintext could not be encrypted successfully. + The buffer in is too small to hold the ciphertext data. @@ -1189,13 +1364,32 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The initialization vector. + The padding mode used to produce the ciphertext and remove during decryption. + The feedback size, specified in bits. + Encrypts data using CFB mode with the specified padding mode and feedback size. + The encrypted ciphertext data. + + . + + ]]> + + + or is . + + is not a valid padding mode. + -or- + is not positive or represent a whole number of bytes. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The plaintext could not be encrypted successfully. + -or- + The feedback size is not valid for the algorithm. @@ -1225,13 +1419,30 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The initialization vector. + The padding mode used to produce the ciphertext and remove during decryption. + The feedback size, specified in bits. + Encrypts data using CFB mode with the specified padding mode and feedback size. + The encrypted ciphertext data. + + . + + ]]> + + + is not a valid padding mode. + -or- + is not positive or represent a whole number of bytes. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The plaintext could not be encrypted successfully. + -or- + The feedback size is not valid for the algorithm. @@ -1262,14 +1473,31 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The initialization vector. + The buffer to receive the ciphertext data. + The padding mode used to produce the ciphertext and remove during decryption. + The feedback size, specified in bits. + Encrypts data into the specified buffer, using CFB mode with the specified padding mode and feedback size. + The total number of bytes written to . + + . + + ]]> + + + is not a valid padding mode. + -or- + is not positive or represent a whole number of bytes. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The plaintext could not be encrypted successfully. + -or- + The feedback size is not valid for the algorithm. @@ -1298,11 +1526,24 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The padding mode used to produce the ciphertext and remove during decryption. + Encrypts data using ECB mode with the specified padding mode. + The encrypted ciphertext data. + + . + + ]]> + + + is . + + is not a valid padding mode. + The plaintext could not be encrypted successfully. @@ -1331,11 +1572,22 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The padding mode used to produce the ciphertext and remove during decryption. + Encrypts data using ECB mode with the specified padding mode. + The encrypted ciphertext data. + + . + + ]]> + + + is not a valid padding mode. + The plaintext could not be encrypted successfully. @@ -1365,12 +1617,24 @@ We recommend that you specify the algorithm by calling the - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The buffer to receive the ciphertext data. + The padding mode used to produce the ciphertext and remove during decryption. + Encrypts data into the specified buffer, using ECB mode with the specified padding mode. + The total number of bytes written to . + + . + + ]]> + + + is not a valid padding mode. + The plaintext could not be encrypted successfully. + The buffer in is too small to hold the ciphertext data. @@ -2510,14 +2774,28 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The initialization vector. + The buffer to receive the plaintext data. + When this method returns, the total number of bytes written to . + The padding mode used to produce the ciphertext and remove during decryption. + Attempts to decrypt data into the specified buffer, using CBC mode with the specified padding mode. + + if was large enough to receive the decrypted data; otherwise, . + + . + + ]]> + + + is not a valid padding mode. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The ciphertext could not be decrypted successfully. @@ -2549,14 +2827,24 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The initialization vector. + The buffer to receive the plaintext data. + The padding mode used to produce the ciphertext and remove during decryption. + When this method returns, the total number of bytes written to . + When overridden in a derived class, attempts to decrypt data into the specified buffer, using CBC mode with the specified padding mode. + + if was large enough to receive the decrypted data; otherwise, . + + + + A derived class has not provided an implementation. @@ -2588,15 +2876,33 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The initialization vector. + The buffer to receive the plaintext data. + When this method returns, the total number of bytes written to . + The padding mode used to produce the ciphertext and remove during decryption. + The feedback size, specified in bits. + Attempts to decrypt data into the specified buffer, using CFB mode with the specified padding mode and feedback size. + + if was large enough to receive the decrypted data; otherwise, . + + . + + ]]> + + + is not a valid padding mode. + -or- + is not positive or represent a whole number of bytes. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The ciphertext could not be decrypted successfully. + -or- + is not valid for the algorithm. @@ -2629,15 +2935,25 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The initialization vector. + The buffer to receive the plaintext data. + The padding mode used to produce the ciphertext and remove during decryption. + The feedback size, specified in bits. + When this method returns, the total number of bytes written to . + When overridden in a derived class, attempts to decrypt data into the specified buffer, using CFB mode with the specified padding mode and feedback size. + + if was large enough to receive the decrypted data; otherwise, . + + + + A derived class has not provided an implementation. @@ -2668,13 +2984,25 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The buffer to receive the plaintext data. + The padding mode used to produce the ciphertext and remove during decryption. + When this method returns, the total number of bytes written to . + Attempts to decrypt data into the specified buffer, using ECB mode with the specified padding mode. + + if was large enough to receive the decrypted data; otherwise, . + + . + + ]]> + + + is not a valid padding mode. + The ciphertext could not be decrypted successfully. @@ -2705,13 +3033,23 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to decrypt. + The buffer to receive the plaintext data. + The padding mode used to produce the ciphertext and remove during decryption. + When this method returns, the total number of bytes written to . + When overridden in a derived class, attempts to decrypt data into the specified buffer, using ECB mode with the specified padding mode. + + if was large enough to receive the decrypted data; otherwise, . + + + + A derived class has not provided an implementation. @@ -2742,14 +3080,28 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The initialization vector. + The buffer to receive the ciphertext data. + When this method returns, the total number of bytes written to . + The padding mode used to produce the ciphertext and remove during decryption. + Attempts to encrypt data into the specified buffer, using CBC mode with the specified padding mode. + + if was large enough to receive the encrypted data; otherwise, . + + . + + ]]> + + + is not a valid padding mode. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The plaintext could not be encrypted successfully. @@ -2781,14 +3133,32 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The initialization vector. + The buffer to receive the ciphertext data. + The padding mode used to produce the ciphertext and remove during decryption. + When this method returns, the total number of bytes written to . + When overridden in a derived class, attempts to encrypt data into the specified buffer, using CBC mode with the specified padding mode. + + if was large enough to receive the encrypted data; otherwise, . + + + + A derived class has not provided an implementation. @@ -2820,15 +3190,33 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The initialization vector. + The buffer to receive the ciphertext data. + When this method returns, the total number of bytes written to . + The padding mode used to produce the ciphertext and remove during decryption. + The feedback size, specified in bits. + Attempts to encrypt data into the specified buffer, using CFB mode with the specified padding mode and feedback size. + + if was large enough to receive the encrypted data; otherwise, . + + . + + ]]> + + + is not a valid padding mode. + -or- + is not positive or represent a whole number of bytes. + + is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). + The plaintext could not be encrypted successfully. + -or- + The feedback size is not valid for the algorithm. @@ -2861,15 +3249,33 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The initialization vector. + The buffer to receive the ciphertext data. + The padding mode used to produce the ciphertext and remove during decryption. + The feedback size, specified in bits. + When this method returns, the total number of bytes written to . + When overridden in a derived class, attempts to encrypt data into the specified buffer, using CFB mode with the specified padding mode and feedback size. + + if was large enough to receive the encrypted data; otherwise, . + + + + A derived class has not provided an implementation. @@ -2900,13 +3306,25 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The buffer to receive the ciphertext data. + The padding mode used to produce the ciphertext and remove during decryption. + When this method returns, the total number of bytes written to . + Attempts to encrypt data into the specified buffer, using ECB mode with the specified padding mode. + + if was large enough to receive the encrypted data; otherwise, . + + . + + ]]> + + + is not a valid padding mode. + The plaintext could not be encrypted successfully. @@ -2937,13 +3355,31 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to encrypt. + The buffer to receive the ciphertext data. + The padding mode used to produce the ciphertext and remove during decryption. + When this method returns, the total number of bytes written to . + When overridden in a derived class, attempts to encrypt data into the specified buffer, using ECB mode with the specified padding mode. + + if was large enough to receive the encrypted data; otherwise, . + + + + A derived class has not provided an implementation. From 5b1af0b2d92ea8031ff26939e8ce0c52bdc73037 Mon Sep 17 00:00:00 2001 From: carlossanlop Date: Fri, 3 Sep 2021 00:49:01 -0700 Subject: [PATCH 2/3] Fix -or- spacing --- .../SymmetricAlgorithm.xml | 152 +++++++++++------- 1 file changed, 93 insertions(+), 59 deletions(-) diff --git a/xml/System.Security.Cryptography/SymmetricAlgorithm.xml b/xml/System.Security.Cryptography/SymmetricAlgorithm.xml index e8dcd162fd0..f6c79f173ce 100644 --- a/xml/System.Security.Cryptography/SymmetricAlgorithm.xml +++ b/xml/System.Security.Cryptography/SymmetricAlgorithm.xml @@ -810,13 +810,17 @@ This method's behavior is defined by or is . is not a valid padding mode. - -or- - is not positive or represent a whole number of bytes. + +-or- + + is not positive or represent a whole number of bytes. is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). The ciphertext could not be decrypted successfully. - -or- - The feedback size is not valid for the algorithm. + +-or- + +The feedback size is not valid for the algorithm. @@ -863,13 +867,17 @@ This method's behavior is defined by is not a valid padding mode. - -or- - is not positive or represent a whole number of bytes. + +-or- + + is not positive or represent a whole number of bytes. is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). The ciphertext could not be decrypted successfully. - -or- - The feedback size is not valid for the algorithm. + +-or- + +The feedback size is not valid for the algorithm. @@ -918,15 +926,21 @@ This method's behavior is defined by is not a valid padding mode. - -or- - is not positive or represent a whole number of bytes. + +-or- + + is not positive or represent a whole number of bytes. is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). - -or- - The buffer in is too small to hold the plaintext data. + +-or- + +The buffer in is too small to hold the plaintext data. The ciphertext could not be decrypted successfully. - -or- - is not valid for the algorithm. + +-or- + + is not valid for the algorithm. @@ -1383,13 +1397,17 @@ This method's behavior is defined by or is . is not a valid padding mode. - -or- - is not positive or represent a whole number of bytes. + +-or- + + is not positive or represent a whole number of bytes. is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). The plaintext could not be encrypted successfully. - -or- - The feedback size is not valid for the algorithm. + +-or- + +The feedback size is not valid for the algorithm. @@ -1436,13 +1454,17 @@ This method's behavior is defined by is not a valid padding mode. - -or- - is not positive or represent a whole number of bytes. + +-or- + + is not positive or represent a whole number of bytes. is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). The plaintext could not be encrypted successfully. - -or- - The feedback size is not valid for the algorithm. + +-or- + +The feedback size is not valid for the algorithm. @@ -1491,13 +1513,17 @@ This method's behavior is defined by is not a valid padding mode. - -or- - is not positive or represent a whole number of bytes. + +-or- + + is not positive or represent a whole number of bytes. is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). The plaintext could not be encrypted successfully. - -or- - The feedback size is not valid for the algorithm. + +-or- + +The feedback size is not valid for the algorithm. @@ -1883,19 +1909,19 @@ Allows an to attempt to free resources and perfor is a negative number. -- or - - - when padded is too large to represent as a signed 32-bit integer. +-or- + + when padded is too large to represent as a signed 32-bit integer. + +-or- -- or - - - is not a valid padding mode. + is not a valid padding mode. is not a positive integer. -- or - - - is not a whole number of bytes. It must be divisible by 8. +-or- + + is not a whole number of bytes. It must be divisible by 8. The padding mode was used, but is not a whole number of blocks. @@ -1943,22 +1969,22 @@ Allows an to attempt to free resources and perfor is not a positive number. -- or - - - is a negative number. +-or- + + is a negative number. -- or - - - when padded is too large to represent as a signed 32-bit integer. +-or- -- or - + when padded is too large to represent as a signed 32-bit integer. - is not a valid padding mode. +-or- + + is not a valid padding mode. The padding mode was used, but is not a whole number of blocks. -- or - +-or- - is not a whole number of bytes. It must be divisible by 8. + is not a whole number of bytes. It must be divisible by 8. @@ -1995,19 +2021,19 @@ Allows an to attempt to free resources and perfor is a negative number. -- or - +-or- - when padded is too large to represent as a signed 32-bit integer. + when padded is too large to represent as a signed 32-bit integer. -- or - +-or- - is not a valid padding mode. + is not a valid padding mode. is not a positive integer. -- or - +-or- - is not a whole number of bytes. It must be divisible by 8. + is not a whole number of bytes. It must be divisible by 8. The padding mode was used, but is not a whole number of blocks. @@ -2896,13 +2922,17 @@ This method's behavior is defined by is not a valid padding mode. - -or- - is not positive or represent a whole number of bytes. + +-or- + + is not positive or represent a whole number of bytes. is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). The ciphertext could not be decrypted successfully. - -or- - is not valid for the algorithm. + +-or- + + is not valid for the algorithm. @@ -3210,13 +3240,17 @@ This method's behavior is defined by is not a valid padding mode. - -or- - is not positive or represent a whole number of bytes. + +-or- + + is not positive or represent a whole number of bytes. is the incorrect length. Callers are expected to pass an initialization vector that is exactly in length, converted to bytes (BlockSize / 8). The plaintext could not be encrypted successfully. - -or- - The feedback size is not valid for the algorithm. + +-or- + +The feedback size is not valid for the algorithm. From 65213f24e8e2e2df578858a19c55075f4fe58b09 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com> Date: Wed, 8 Sep 2021 12:39:14 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- xml/System.Security.Cryptography/HMACMD5.xml | 2 +- xml/System.Security.Cryptography/HMACSHA1.xml | 2 +- .../HMACSHA512.xml | 2 +- .../SymmetricAlgorithm.xml | 30 +++++++++---------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/xml/System.Security.Cryptography/HMACMD5.xml b/xml/System.Security.Cryptography/HMACMD5.xml index dcc8b50051f..ed44eb8405b 100644 --- a/xml/System.Security.Cryptography/HMACMD5.xml +++ b/xml/System.Security.Cryptography/HMACMD5.xml @@ -567,7 +567,7 @@ The HMAC key. The data to HMAC. The buffer to receive the HMAC value. - When this method returns, the total number of bytes written into . + When this method returns, contains the total number of bytes written into . Attempts to compute the HMAC of data using the MD5 algorithm. if is too small to hold the calculated hash, otherwise. diff --git a/xml/System.Security.Cryptography/HMACSHA1.xml b/xml/System.Security.Cryptography/HMACSHA1.xml index 144fa13f74f..2e610c9a0c1 100644 --- a/xml/System.Security.Cryptography/HMACSHA1.xml +++ b/xml/System.Security.Cryptography/HMACSHA1.xml @@ -695,7 +695,7 @@ Releases the unmanaged resources used by the The HMAC key. The data to HMAC. The buffer to receive the HMAC value. - When this method returns, the total number of bytes written into . + When this method returns, contains the total number of bytes written into . Attempts to compute the HMAC of data using the SHA1 algorithm. if is too small to hold the calculated hash, otherwise. diff --git a/xml/System.Security.Cryptography/HMACSHA512.xml b/xml/System.Security.Cryptography/HMACSHA512.xml index 903dbe77587..b3b1bcc6f62 100644 --- a/xml/System.Security.Cryptography/HMACSHA512.xml +++ b/xml/System.Security.Cryptography/HMACSHA512.xml @@ -631,7 +631,7 @@ public static void Test() The HMAC key. The data to HMAC. The buffer to receive the HMAC value. - When this method returns, the total number of bytes written into . + When this method returns, contains the total number of bytes written into . Attempts to compute the HMAC of data using the SHA512 algorithm. if is too small to hold the calculated hash, otherwise. diff --git a/xml/System.Security.Cryptography/SymmetricAlgorithm.xml b/xml/System.Security.Cryptography/SymmetricAlgorithm.xml index f6c79f173ce..5b9af63cf55 100644 --- a/xml/System.Security.Cryptography/SymmetricAlgorithm.xml +++ b/xml/System.Security.Cryptography/SymmetricAlgorithm.xml @@ -2803,7 +2803,7 @@ This member is an explicit interface member implementation. It can be used only The data to decrypt. The initialization vector. The buffer to receive the plaintext data. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . The padding mode used to produce the ciphertext and remove during decryption. Attempts to decrypt data into the specified buffer, using CBC mode with the specified padding mode. @@ -2857,7 +2857,7 @@ This method's behavior is defined by The initialization vector. The buffer to receive the plaintext data. The padding mode used to produce the ciphertext and remove during decryption. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . When overridden in a derived class, attempts to decrypt data into the specified buffer, using CBC mode with the specified padding mode. if was large enough to receive the decrypted data; otherwise, . @@ -2905,7 +2905,7 @@ Derived classes must override this and provide an implementation. The data to decrypt. The initialization vector. The buffer to receive the plaintext data. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . The padding mode used to produce the ciphertext and remove during decryption. The feedback size, specified in bits. Attempts to decrypt data into the specified buffer, using CFB mode with the specified padding mode and feedback size. @@ -2970,7 +2970,7 @@ This method's behavior is defined by The buffer to receive the plaintext data. The padding mode used to produce the ciphertext and remove during decryption. The feedback size, specified in bits. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . When overridden in a derived class, attempts to decrypt data into the specified buffer, using CFB mode with the specified padding mode and feedback size. if was large enough to receive the decrypted data; otherwise, . @@ -3017,7 +3017,7 @@ Derived classes must override this and provide an implementation. The data to decrypt. The buffer to receive the plaintext data. The padding mode used to produce the ciphertext and remove during decryption. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . Attempts to decrypt data into the specified buffer, using ECB mode with the specified padding mode. if was large enough to receive the decrypted data; otherwise, . @@ -3066,7 +3066,7 @@ This method's behavior is defined by The data to decrypt. The buffer to receive the plaintext data. The padding mode used to produce the ciphertext and remove during decryption. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . When overridden in a derived class, attempts to decrypt data into the specified buffer, using ECB mode with the specified padding mode. if was large enough to receive the decrypted data; otherwise, . @@ -3113,7 +3113,7 @@ Derived classes must override this and provide an implementation. The data to encrypt. The initialization vector. The buffer to receive the ciphertext data. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . The padding mode used to produce the ciphertext and remove during decryption. Attempts to encrypt data into the specified buffer, using CBC mode with the specified padding mode. @@ -3167,7 +3167,7 @@ This method's behavior is defined by The initialization vector. The buffer to receive the ciphertext data. The padding mode used to produce the ciphertext and remove during decryption. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . When overridden in a derived class, attempts to encrypt data into the specified buffer, using CBC mode with the specified padding mode. if was large enough to receive the encrypted data; otherwise, . @@ -3179,7 +3179,7 @@ This method's behavior is defined by The data to encrypt. The initialization vector. The buffer to receive the ciphertext data. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . The padding mode used to produce the ciphertext and remove during decryption. The feedback size, specified in bits. Attempts to encrypt data into the specified buffer, using CFB mode with the specified padding mode and feedback size. @@ -3288,7 +3288,7 @@ The feedback size is not valid for the algorithm. The buffer to receive the ciphertext data. The padding mode used to produce the ciphertext and remove during decryption. The feedback size, specified in bits. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . When overridden in a derived class, attempts to encrypt data into the specified buffer, using CFB mode with the specified padding mode and feedback size. if was large enough to receive the encrypted data; otherwise, . @@ -3300,7 +3300,7 @@ The feedback size is not valid for the algorithm. Derived classes must override this and provide an implementation. - Implementations of this method must write precisely +Implementations of this method must write precisely `GetCiphertextLengthCfb(plaintext.Length, paddingMode, feedbackSizeInBits)` bytes to `destination` and report that via `bytesWritten`. @@ -3343,7 +3343,7 @@ Derived classes must override this and provide an implementation. The data to encrypt. The buffer to receive the ciphertext data. The padding mode used to produce the ciphertext and remove during decryption. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . Attempts to encrypt data into the specified buffer, using ECB mode with the specified padding mode. if was large enough to receive the encrypted data; otherwise, . @@ -3392,7 +3392,7 @@ This method's behavior is defined by The data to encrypt. The buffer to receive the ciphertext data. The padding mode used to produce the ciphertext and remove during decryption. - When this method returns, the total number of bytes written to . + When this method returns, contains the total number of bytes written to . When overridden in a derived class, attempts to encrypt data into the specified buffer, using ECB mode with the specified padding mode. if was large enough to receive the encrypted data; otherwise, . @@ -3404,7 +3404,7 @@ This method's behavior is defined by