Questions tagged [rijndaelmanaged]

.NET Framework (1.1 and later) managed version of the Rijndael (AES) algorithm.

.NET Framework (1.1 and later) managed version of the Rijndael (AES) cryptographic algorithm. Any public static (Shared in VB) members of this type are thread safe.

Class: System.Security.Cryptography.RijndaelManaged

269 questions
0
votes
3 answers

Length of data to decrypt is Invalid

I've been researching an issue I'm having while attempting to decrypt using the Rijndael C# libraries. I've tried several solutions that have been posted on here but none seem to work or apply. The issue: I'm attempting to decrypt a HTTP Request…
Encryption
  • 1,809
  • 9
  • 37
  • 52
0
votes
1 answer

Utilizing RijndaelManaged, Enterprise Library and Autofac together

I'm newly experimenting with the cryptography application block while using Autofac as the container. As a result, I'm using the nuget package EntLibContrib 5.0 - Autofac Configurator. With the DPAPI Symmetric Crypto Provider, I was able to…
Ken
  • 834
  • 9
  • 25
0
votes
1 answer

.Net RijndaelManaged can't find Javascript

I'm using the following Encrypt / Decrypt in my C# WCF: public static string EncryptString(string InputText, string Password) { RijndaelManaged RijndaelCipher = new RijndaelManaged(); RijndaelCipher.Padding =…
Joseph
  • 1,716
  • 3
  • 24
  • 42
0
votes
1 answer

Padding is invalid and cannot be removed

Exception: Source: mscorlib Message: Padding is invalid and cannot be removed. Stack trace: at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) at…
Snake3ite
  • 43
  • 2
  • 7
0
votes
1 answer

RijndaelManaged Cryptostream to decrypt file from disc into memory

I have a library I wrote a while back that uses the same logic as the class code below, but when it decrypts a file, it decrypts it onto the disc, and give an option to delete the encrypted version or not. I'm trying to add an option to decrypt the…
wakurth
  • 1,644
  • 1
  • 23
  • 39
0
votes
2 answers

Index was outside the bounds of the array. Rijndael Encryption

Before spending any time reading this, see the self-answer below. The problem was invalid input. When I try to decrypt some strings it throws this exception: " at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[]…
Ahmad Hajjar
  • 1,796
  • 3
  • 18
  • 33
0
votes
1 answer

Exception thrown when CryptoStream instance closed

I have a DecryptString function that uses the RijndaelManaged Cipher. It works 99.999% of the time but very occationally it throws an "IndexOutOfRangeException" exception with the message of "Index was outside the bounds of the array." when it…
Jonathan Stanton
  • 2,531
  • 1
  • 28
  • 35
0
votes
1 answer

Why can't I decrypt data using RijndaelManaged?

I'm working on a program that sends and receives messages just like messengers, and I need to encrypt the message on send button and decrypt the message when received. I'm using the RijndaelManaged class and the following methods to encrypt/decrypt …
Lisa
  • 3,121
  • 15
  • 53
  • 85
0
votes
0 answers

System.Security.Cryptography.UniversalCryptoDecryptor fails to decrypt our passwords in .NET Core 6, 7

Our RijndaelManaged decrypt code no longer decrypts passwords correctly (it truncates) with .NET Core 7 and 6, but used to work with .NET Core 5. It only decrypts the first 16 bytes, then ignores the rest of the message, so we only get 16 first…
jakob gaardsted
  • 111
  • 1
  • 7
0
votes
1 answer

How to transport IV in C# with Classes RijndaelManaged, CryptoStream and CBC?

i tried some tests with code below. The filesize of encrypted size is always +16 Bytes in compare of the filesize of the decrypted files. Should not be the file size the same? So i guess, the RijndaelManaged-Class or the CryptoStream-Class…
Eloy
  • 19
  • 4
0
votes
0 answers

Decryption failing despite key and packing being correct

I'm getting the infamous "Padding is invalid and cannot be removed." error. However, despite ensuring the padding mode is set as well as verifying the key is the same on both encrypt and decrypt. I can't get past the issue. What am I doing wrong o'…
Reahreic
  • 596
  • 2
  • 7
  • 26
0
votes
1 answer

Decryptor Function gives output a list of numbers instead of string

I have a encryptor and decryptor function in my code as you can see below, it encrypts and decrypts a plain string using same algorithm Rijndael-js with the help of crypto and PKCS7-Padding packages. The encryptor function is working fine but a…
0
votes
0 answers

Rijndael CreateDecryptor Throws Length of the data to decrypt is invalid

In my project there is a section which makes decryption using one among several cryptography providers such as DESCryptoServiceProvider, TripleDESCryptoServiceProvider, RijndaelManaged etc. Project was running without any issue with…
RaZzLe
  • 1,984
  • 3
  • 13
  • 24
0
votes
1 answer

RijndaelManaged Decryption in .net 5 not working

I have below code in .net framework to decrypt some information and it is working fine. I have been tasked to upgrade this code to .net 5 and the same code is not working. Current code in .net framework works fine private static string…
rednerus
  • 401
  • 2
  • 9
  • 21
0
votes
2 answers

How to properly call openssl_decrypt method if I have base64 string which contains from IV and encrypted data?

I have code in C# which encrypts and decrypts string: private readonly UTF8Encoding _encoder; private readonly ICryptoTransform _encryptor; private readonly RijndaelManaged _rijndael; public Crypter() { _rijndael = new RijndaelManaged { Key = {…
Aleksandrs
  • 1,488
  • 1
  • 14
  • 34