System\Security\Cryptography\SymmetricAlgorithm.cs (77)
15PaddingValue = PaddingMode.PKCS7;
156public virtual PaddingMode Padding
165if ((value < PaddingMode.None) || (value > PaddingMode.ISO10126))
262/// The padding mode <see cref="PaddingMode.None" /> was used, but <paramref name="plaintextLength" />
266public int GetCiphertextLengthEcb(int plaintextLength, PaddingMode paddingMode) =>
306/// The padding mode <see cref="PaddingMode.None" /> was used, but <paramref name="plaintextLength" />
310public int GetCiphertextLengthCbc(int plaintextLength, PaddingMode paddingMode = PaddingMode.PKCS7) =>
313private int GetCiphertextLengthBlockAligned(int plaintextLength, PaddingMode paddingMode)
327case PaddingMode.None when remainder != 0:
329case PaddingMode.None:
330case PaddingMode.Zeros when remainder == 0:
332case PaddingMode.Zeros:
333case PaddingMode.PKCS7:
334case PaddingMode.ANSIX923:
335case PaddingMode.ISO10126:
380/// The padding mode <see cref="PaddingMode.None" /> was used, but <paramref name="plaintextLength" />
394public int GetCiphertextLengthCfb(int plaintextLength, PaddingMode paddingMode = PaddingMode.None, int feedbackSizeInBits = 8)
406case PaddingMode.None when remainder != 0:
408case PaddingMode.None:
409case PaddingMode.Zeros when remainder == 0:
411case PaddingMode.Zeros:
412case PaddingMode.PKCS7:
413case PaddingMode.ANSIX923:
414case PaddingMode.ISO10126:
444public byte[] DecryptEcb(byte[] ciphertext, PaddingMode paddingMode)
467public byte[] DecryptEcb(ReadOnlySpan<byte> ciphertext, PaddingMode paddingMode)
509public int DecryptEcb(ReadOnlySpan<byte> ciphertext, Span<byte> destination, PaddingMode paddingMode)
538public bool TryDecryptEcb(ReadOnlySpan<byte> ciphertext, Span<byte> destination, PaddingMode paddingMode, out int bytesWritten)
562public byte[] EncryptEcb(byte[] plaintext, PaddingMode paddingMode)
585public byte[] EncryptEcb(ReadOnlySpan<byte> plaintext, PaddingMode paddingMode)
627public int EncryptEcb(ReadOnlySpan<byte> plaintext, Span<byte> destination, PaddingMode paddingMode)
656public bool TryEncryptEcb(ReadOnlySpan<byte> plaintext, Span<byte> destination, PaddingMode paddingMode, out int bytesWritten)
685public byte[] DecryptCbc(byte[] ciphertext, byte[] iv, PaddingMode paddingMode = PaddingMode.PKCS7)
713public byte[] DecryptCbc(ReadOnlySpan<byte> ciphertext, ReadOnlySpan<byte> iv, PaddingMode paddingMode = PaddingMode.PKCS7)
770PaddingMode paddingMode = PaddingMode.PKCS7)
810PaddingMode paddingMode = PaddingMode.PKCS7)
840public byte[] EncryptCbc(byte[] plaintext, byte[] iv, PaddingMode paddingMode = PaddingMode.PKCS7)
871PaddingMode paddingMode = PaddingMode.PKCS7)
923PaddingMode paddingMode = PaddingMode.PKCS7)
963PaddingMode paddingMode = PaddingMode.PKCS7)
1012public byte[] DecryptCfb(byte[] ciphertext, byte[] iv, PaddingMode paddingMode = PaddingMode.None, int feedbackSizeInBits = 8)
1065PaddingMode paddingMode = PaddingMode.None,
1142PaddingMode paddingMode = PaddingMode.None,
1202PaddingMode paddingMode = PaddingMode.None,
1255PaddingMode paddingMode = PaddingMode.None,
1305PaddingMode paddingMode = PaddingMode.None,
1374PaddingMode paddingMode = PaddingMode.None,
1434PaddingMode paddingMode = PaddingMode.None,
1467PaddingMode paddingMode,
1491PaddingMode paddingMode,
1522PaddingMode paddingMode,
1548PaddingMode paddingMode,
1576PaddingMode paddingMode,
1609PaddingMode paddingMode,
1616private static void CheckPaddingMode(PaddingMode paddingMode)
1618if (paddingMode < PaddingMode.None || paddingMode > PaddingMode.ISO10126)
1637protected PaddingMode PaddingValue;