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
1 answer

Random characters at beginning of decrypted data

I am using a TADOQuery component in Delphi to read the contents of a column in a database which have been encrypted by a 3rd party .net application using RijndaelManaged algorithm. I have "sucessfully" decrypted the data back to its original XML…
Gavin
  • 2,123
  • 1
  • 15
  • 19
0
votes
1 answer

C# Rijndael key too short in Ruby

I am trying to reimplement C# code in Ruby. The following code (with different secrets) works to decrypt the file: using System.IO; using System.Security.Cryptography; using System.Text; public static class Decrypt { private const string KEY =…
Ethan Kent
  • 381
  • 1
  • 4
  • 20
0
votes
2 answers

Rijndael File Encryption Issue

Rijndael File Encryption Issue I want to encrypt large files using Rijndael but I getting out of memory exception error. Any idea? Here is my code public void Rijndael_EncryptFile(string password, string filepath, int opt) { try …
user5084971
0
votes
1 answer

Reading and writing to a TCP socket using CryptoStream

I'm trying to encrypt data that I send over a TCP connection, however, I'm not receiving any data through my CryptoStream. Here is the class where I set up the streams: public class SecureCommunication { public SecureCommunication(TcpClient…
flakes
  • 21,558
  • 8
  • 41
  • 88
0
votes
2 answers

SymmetricAlgorithm Key and initialization vector (IV) implementation

I have a Web Site which takes userId and encrypts it with RijndaelManaged provider. After it encrypts this data, it will put into a queue. As my understanding every data should be encrypted with different IV value and this can be public. To…
Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158
0
votes
0 answers

Decrypt data using RijndaelManaged in SQL

In my asp.net project i have encrypted data using RijndaelManaged (from C#) and save the data in SQL database. I want to decrypt these data by SQL query and return. See below, SELECT Name FROM Person Here "Name" is encrypted from C# code. I want to…
Dumi
  • 1,414
  • 4
  • 21
  • 41
0
votes
1 answer

Decrypting string encrypted in C# with RijndaelManaged class using PHP

Here's some C# code (I've modified it slightly to modify some of the hard coded values in it): public static string Decrypt(string InputFile) { string outstr = null; if ((InputFile != null)) { if (File.Exists(InputFile)) …
Rocket04
  • 1,801
  • 5
  • 25
  • 47
0
votes
0 answers

RijndaelManaged Specified key is not a valid size for this algorithm

using (RijndaelManaged rijAlg = new RijndaelManaged()) rijAlg.Key = Key; rijAlg.IV = IV; This gives me an error "Specified key is not a valid size for this algorithm." to get Key and IV string checkPass = "select password…
0
votes
1 answer

Program crashes when setting values in Rijndael class

I currently have the following code. I am generating a byte array from a hard coded random string. Now I noticed that when setting up a Rijndael class the application crashes when setting the key value. Any suggestions on why it crashes when the key…
Rajeshwar
  • 11,179
  • 26
  • 86
  • 158
0
votes
1 answer

AES 128 Cross-Platform Swift / C#

I've been trying to encrypt and decrypt on both iOS and .NET but I haven't been very successful. I've used this question but I get the error: Specified initialisation vector (IV) does not match the block size for this algorithm. Here's my…
brimstone
  • 3,370
  • 3
  • 28
  • 49
0
votes
2 answers

Write Serialized XML to String and Display in Browser

I have a serialized object which needs to be sent as an encrypted XML string. I am able to save the serialized object to a well-formed XML file, but this is not what I want. I have already got Rijndael encrypt/decrypt working for a sample…
IrishChieftain
  • 15,108
  • 7
  • 50
  • 91
0
votes
1 answer

CryptoStream error Padding is invalid and cannot be removed

i have problem with my code. Problem occures in function Decryptor. FlushFinalBlock throw "Padding is invalid and cannot be removed" In function Decryptor i get myData of length 6048, when line cryptoStream.Write(myData, 0, myData.Length); is done i…
Martin86
  • 123
  • 1
  • 2
  • 19
0
votes
3 answers

how to check whether data is already encrypted or not

I am using RijndaelManaged in my current project to encrypt data , is there any way tht I can check whether the data is already encrypted or not so i don't end up encrypting it twice?
Punit
  • 1,347
  • 3
  • 20
  • 39
0
votes
1 answer

how to call RijndaelAlg.CreateEncryptor in C# correctly when saving lots of independent files

In my situation I have a number of files that will be stored on a server. Each of these files is created by a C# application that I am writing. background: For this application, the amount of time needed to encrypt isnt important, the files tend…
stuck
  • 2,264
  • 2
  • 28
  • 62
0
votes
1 answer

Encrypt and Decrypt C# Rijndael Managed out of memory

I am currently programing a little software like WinRAR. When I encrypt or decrypt a array of bytes corresponding to my file, I have a large memory leak (or a high RAM consumption) and sometimes when I want to encrypt a file of 500MB it throws an…
Eastrall
  • 7,609
  • 1
  • 16
  • 30