|
105 | 105 | <ReturnType>System.Int32</ReturnType>
|
106 | 106 | </ReturnValue>
|
107 | 107 | <Docs>
|
108 |
| - <summary>To be added.</summary> |
109 |
| - <value>To be added.</value> |
110 |
| - <remarks>To be added.</remarks> |
| 108 | + <summary>Gets or sets the block size, in bits, of the cryptographic operation.</summary> |
| 109 | + <value>The block size, in bits.</value> |
| 110 | + <remarks> |
| 111 | + <format type="text/markdown"><![CDATA[ |
| 112 | + |
| 113 | +## Remarks |
| 114 | + The block size is the basic unit of data that can be encrypted or decrypted in one operation. Messages longer than the block size are handled as successive blocks; messages shorter than the block size must be padded with extra bits to reach the size of a block. Valid block sizes are determined by the symmetric algorithm used. |
| 115 | + |
| 116 | + ]]></format> |
| 117 | + </remarks> |
| 118 | + <exception cref="T:System.Security.Cryptography.CryptographicException">The block size is invalid.</exception> |
111 | 119 | </Docs>
|
112 | 120 | </Member>
|
113 | 121 | <MemberGroup MemberName="CreateDecryptor">
|
|
400 | 408 | <Parameter Name="disposing" Type="System.Boolean" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinmac-3.0" />
|
401 | 409 | </Parameters>
|
402 | 410 | <Docs>
|
403 |
| - <param name="disposing">To be added.</param> |
404 |
| - <summary>To be added.</summary> |
| 411 | + <param name="disposing"> |
| 412 | + <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param> |
| 413 | + <summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.AesCryptoServiceProvider" /> and optionally releases the managed resources.</summary> |
405 | 414 | <remarks>To be added.</remarks>
|
406 | 415 | </Docs>
|
407 | 416 | </Member>
|
|
431 | 440 | <ReturnType>System.Int32</ReturnType>
|
432 | 441 | </ReturnValue>
|
433 | 442 | <Docs>
|
434 |
| - <summary>To be added.</summary> |
435 |
| - <value>To be added.</value> |
| 443 | + <summary>Gets or sets the feedback size, in bits, of the cryptographic operation for the Cipher Feedback (CFB) and Output Feedback (OFB) cipher modes.</summary> |
| 444 | + <value>The feedback size in bits.</value> |
436 | 445 | <remarks>To be added.</remarks>
|
| 446 | + <exception cref="T:System.Security.Cryptography.CryptographicException">The feedback size is larger than the block size.</exception> |
437 | 447 | </Docs>
|
438 | 448 | </Member>
|
439 | 449 | <Member MemberName="GenerateIV">
|
|
546 | 556 | <ReturnType>System.Byte[]</ReturnType>
|
547 | 557 | </ReturnValue>
|
548 | 558 | <Docs>
|
549 |
| - <summary>To be added.</summary> |
550 |
| - <value>To be added.</value> |
551 |
| - <remarks>To be added.</remarks> |
| 559 | + <summary>Gets or sets the initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />) for the symmetric algorithm.</summary> |
| 560 | + <value>The initialization vector.</value> |
| 561 | + <remarks> |
| 562 | + <format type="text/markdown"><![CDATA[ |
| 563 | + |
| 564 | +## Remarks |
| 565 | + The <xref:System.Security.Cryptography.SymmetricAlgorithm.IV%2A> property is automatically set to a new random value whenever you create a new instance of one of the <xref:System.Security.Cryptography.SymmetricAlgorithm> classes or when you manually call the <xref:System.Security.Cryptography.SymmetricAlgorithm.GenerateIV%2A> method. The size of the <xref:System.Security.Cryptography.SymmetricAlgorithm.IV%2A> property must be the same as the <xref:System.Security.Cryptography.SymmetricAlgorithm.BlockSize%2A> property divided by 8. |
| 566 | + |
| 567 | + The classes that derive from the <xref:System.Security.Cryptography.SymmetricAlgorithm> class use a chaining mode called cipher block chaining (CBC), which requires a key and an initialization vector to perform cryptographic transformations on data. To decrypt data that was encrypted using one of the <xref:System.Security.Cryptography.SymmetricAlgorithm> classes, you must set the <xref:System.Security.Cryptography.SymmetricAlgorithm.Key%2A> property and <xref:System.Security.Cryptography.SymmetricAlgorithm.IV%2A> property to the same values that were used for encryption. |
| 568 | + |
| 569 | + For a given secret key *k*, a simple block cipher that does not use an initialization vector will encrypt the same input block of plain text into the same output block of cipher text. If you have duplicate blocks within your plain text stream, you will have duplicate blocks within your cipher text stream. If unauthorized users know anything about the structure of a block of your plain text, they can use that information to decipher the known cipher text block and possibly recover your key. To combat this problem, information from the previous block is mixed into the process of encrypting the next block. Thus, the output of two identical plain text blocks is different. Because this technique uses the previous block to encrypt the next block, an initialization vector is needed to encrypt the first block of data. |
| 570 | + |
| 571 | + ]]></format> |
| 572 | + </remarks> |
| 573 | + <exception cref="T:System.ArgumentNullException">An attempt was made to set the initialization vector to <see langword="null" />.</exception> |
| 574 | + <exception cref="T:System.Security.Cryptography.CryptographicException">An attempt was made to set the initialization vector to an invalid size.</exception> |
552 | 575 | </Docs>
|
553 | 576 | </Member>
|
554 | 577 | <Member MemberName="Key">
|
|
674 | 697 | <ReturnType>System.Security.Cryptography.KeySizes[]</ReturnType>
|
675 | 698 | </ReturnValue>
|
676 | 699 | <Docs>
|
677 |
| - <summary>To be added.</summary> |
678 |
| - <value>To be added.</value> |
679 |
| - <remarks>To be added.</remarks> |
| 700 | + <summary>Gets the block sizes, in bits, that are supported by the symmetric algorithm.</summary> |
| 701 | + <value>An array that contains the block sizes supported by the algorithm.</value> |
| 702 | + <remarks> |
| 703 | + <format type="text/markdown"><![CDATA[ |
| 704 | + |
| 705 | +## Remarks |
| 706 | + For AES, the only legal block size is 128 bits. |
| 707 | + ]]></format> |
| 708 | + </remarks> |
680 | 709 | </Docs>
|
681 | 710 | </Member>
|
682 | 711 | <Member MemberName="LegalKeySizes">
|
|
703 | 732 | <ReturnType>System.Security.Cryptography.KeySizes[]</ReturnType>
|
704 | 733 | </ReturnValue>
|
705 | 734 | <Docs>
|
706 |
| - <summary>To be added.</summary> |
707 |
| - <value>To be added.</value> |
708 |
| - <remarks>To be added.</remarks> |
| 735 | + <summary>Gets the key sizes, in bits, that are supported by the symmetric algorithm.</summary> |
| 736 | + <value>An array that contains the key sizes supported by the algorithm.</value> |
| 737 | + <remarks> |
| 738 | + <format type="text/markdown"><![CDATA[ |
| 739 | + |
| 740 | +## Remarks |
| 741 | + For AES, the legal key sizes are 128, 192, and 256 bits. |
| 742 | +]]></format> |
| 743 | + </remarks> |
709 | 744 | </Docs>
|
710 | 745 | </Member>
|
711 | 746 | <Member MemberName="Mode">
|
|
734 | 769 | <ReturnType>System.Security.Cryptography.CipherMode</ReturnType>
|
735 | 770 | </ReturnValue>
|
736 | 771 | <Docs>
|
737 |
| - <summary>To be added.</summary> |
738 |
| - <value>To be added.</value> |
739 |
| - <remarks>To be added.</remarks> |
| 772 | + <summary>Gets or sets the mode for operation of the symmetric algorithm.</summary> |
| 773 | + <value>The mode for operation of the symmetric algorithm. The default is <see cref="F:System.Security.Cryptography.CipherMode.CBC" />.</value> |
| 774 | + <remarks> |
| 775 | + <format type="text/markdown"><![CDATA[ |
| 776 | + |
| 777 | +## Remarks |
| 778 | + See <xref:System.Security.Cryptography.CipherMode> enumeration for a description of specific modes. |
| 779 | + |
| 780 | + ]]></format> |
| 781 | + </remarks> |
| 782 | + <exception cref="T:System.Security.Cryptography.CryptographicException">The cipher mode is not one of the <see cref="T:System.Security.Cryptography.CipherMode" /> values.</exception> |
740 | 783 | </Docs>
|
741 | 784 | </Member>
|
742 | 785 | <Member MemberName="Padding">
|
|
765 | 808 | <ReturnType>System.Security.Cryptography.PaddingMode</ReturnType>
|
766 | 809 | </ReturnValue>
|
767 | 810 | <Docs>
|
768 |
| - <summary>To be added.</summary> |
769 |
| - <value>To be added.</value> |
770 |
| - <remarks>To be added.</remarks> |
| 811 | + <summary>Gets or sets the padding mode used in the symmetric algorithm.</summary> |
| 812 | + <value>The padding mode used in the symmetric algorithm. The default is <see cref="F:System.Security.Cryptography.PaddingMode.PKCS7" />.</value> |
| 813 | + <remarks> |
| 814 | + <format type="text/markdown"><![CDATA[ |
| 815 | + |
| 816 | +## Remarks |
| 817 | + Most plain text messages do not consist of a number of bytes that completely fill blocks. Often, there are not enough bytes to fill the last block. When this happens, a padding string is added to the text. For example, if the block length is 64 bits and the last block contains only 40 bits, 24 bits of padding are added. See the <xref:System.Security.Cryptography.PaddingMode> enumeration for a description of specific modes. |
| 818 | + |
| 819 | + ]]></format> |
| 820 | + </remarks> |
| 821 | + <exception cref="T:System.Security.Cryptography.CryptographicException">The padding mode is not one of the <see cref="T:System.Security.Cryptography.PaddingMode" /> values.</exception> |
771 | 822 | </Docs>
|
772 | 823 | </Member>
|
773 | 824 | </Members>
|
|
0 commit comments