static PaddingMode FromSysPaddingMode(System.Security.Cryptography.PaddingMode padding) { switch (padding) { case System.Security.Cryptography.PaddingMode.None: return(PaddingMode.None); case System.Security.Cryptography.PaddingMode.PKCS7: return(PaddingMode.PKCS7); case System.Security.Cryptography.PaddingMode.Zeros: return(PaddingMode.Zeros); case System.Security.Cryptography.PaddingMode.ANSIX923: return(PaddingMode.ANSIX923); case System.Security.Cryptography.PaddingMode.ISO10126: return(PaddingMode.ISO10126); default: throw new Exception(); } }
public int GetCiphertextLengthEcb(int plaintextLength, System.Security.Cryptography.PaddingMode paddingMode) { throw null; }
public int GetCiphertextLengthCfb(int plaintextLength, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.None, int feedbackSizeInBits = 8) { throw null; }
public int GetCiphertextLengthCbc(int plaintextLength, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7) { throw null; }
public int EncryptEcb(System.ReadOnlySpan <byte> plaintext, System.Span <byte> destination, System.Security.Cryptography.PaddingMode paddingMode) { throw null; }
public void InvalidPaddingMode(string hexKey, string hexIv, string plainText, System.Security.Cryptography.PaddingMode paddingMode) { byte[] key = hexKey.FromHex(); byte[] iv = hexIv.FromHex(); byte[] plainBytes = plainText.FromHex(); byte[] encrptedBytes; //None of the cipher texts are an even multiple of the block size, so using no padding causes .NET to throw an error AesProvider aes = new AesProvider(key, iv, paddingMode); Exception ex = Assert.Throws <System.Security.Cryptography.CryptographicException>(() => encrptedBytes = aes.Encrypt(plainBytes)); }
protected virtual bool TryEncryptEcbCore(System.ReadOnlySpan <byte> plaintext, System.Span <byte> destination, System.Security.Cryptography.PaddingMode paddingMode, out int bytesWritten) { throw null; }
public bool TryEncryptCbc(System.ReadOnlySpan <byte> plaintext, System.ReadOnlySpan <byte> iv, System.Span <byte> destination, out int bytesWritten, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7) { throw null; }
public byte[] EncryptCbc(System.ReadOnlySpan <byte> plaintext, System.ReadOnlySpan <byte> iv, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7) { throw null; }
public byte[] EncryptCbc(byte[] plaintext, byte[] iv, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7) { throw null; }
public byte[] DecryptEcb(System.ReadOnlySpan <byte> ciphertext, System.Security.Cryptography.PaddingMode paddingMode) { throw null; }
public byte[] DecryptEcb(byte[] ciphertext, System.Security.Cryptography.PaddingMode paddingMode) { throw null; }
public int DecryptCfb(System.ReadOnlySpan <byte> ciphertext, System.ReadOnlySpan <byte> iv, System.Span <byte> destination, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.None, int feedbackSizeInBits = 8) { throw null; }
public int DecryptCbc(System.ReadOnlySpan <byte> ciphertext, System.ReadOnlySpan <byte> iv, System.Span <byte> destination, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7) { throw null; }
public byte[] DecryptCbc(byte[] ciphertext, byte[] iv, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7) { throw null; }
protected virtual bool TryDecryptCfbCore(System.ReadOnlySpan <byte> ciphertext, System.ReadOnlySpan <byte> iv, System.Span <byte> destination, System.Security.Cryptography.PaddingMode paddingMode, int feedbackSizeInBits, out int bytesWritten) { throw null; }
public bool TryDecryptEcb(System.ReadOnlySpan <byte> ciphertext, System.Span <byte> destination, System.Security.Cryptography.PaddingMode paddingMode, out int bytesWritten) { throw null; }
public byte[] EncryptCfb(byte[] plaintext, byte[] iv, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.None, int feedbackSizeInBits = 8) { throw null; }
public bool TryEncryptCfb(System.ReadOnlySpan <byte> plaintext, System.ReadOnlySpan <byte> iv, System.Span <byte> destination, out int bytesWritten, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.None, int feedbackSizeInBits = 8) { throw null; }
public byte[] EncryptCfb(System.ReadOnlySpan <byte> plaintext, System.ReadOnlySpan <byte> iv, System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.None, int feedbackSizeInBits = 8) { throw null; }
/// <summary> /// Sets the PaddingMode. /// </summary> /// <param name="paddingMode">new PaddingMode</param> public void updatePadding(System.Security.Cryptography.PaddingMode paddingMode = System.Security.Cryptography.PaddingMode.PKCS7) { this.paddingMode = paddingMode; }
public byte[] EncryptEcb(byte[] plaintext, System.Security.Cryptography.PaddingMode paddingMode) { throw null; }