[Mono-bugs] [Bug 371695] New: ICryptoTransform should be reusable

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Mar 17 06:59:29 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=371695


           Summary: ICryptoTransform should be reusable
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System.Security
        AssignedTo: spouliot at novell.com
        ReportedBy: dominik.reichl at gmx.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=202513)
 --> (https://bugzilla.novell.com/attachment.cgi?id=202513)
Source code of the testing program

Description of problem: When constructing an ICryptoTransform of a
RijndaelManaged object (ECB mode), the transform should be reusable. In
Microsoft .NET Framework 2.0 the CanReuseTransform property returns true, in
Mono 1.9 it returns false.

Steps to reproduce the problem: Compile and run the following code (also as
file in the attachment):

using System;
using System.Security.Cryptography;

namespace TestRijndael
{
        class Program
        {
                static void Main(string[] args)
                {
                        byte[] pbIV = new byte[16];
                        Array.Clear(pbIV, 0, pbIV.Length);

                        byte[] pbKey = new byte[32];
                        Array.Clear(pbKey, 0, pbKey.Length);

                        RijndaelManaged r = new RijndaelManaged();
                        r.IV = pbIV;
                        r.Mode = CipherMode.ECB;
                        r.KeySize = 256;
                        r.Key = pbKey;

                        ICryptoTransform iTrans = r.CreateEncryptor();

                        if(iTrans.CanReuseTransform == false)
                                throw new Exception("Can't reuse transform!");

                        Console.Write("End of program.");
                }
        }
}

Actual Results: Mono 1.9 throws an exception, because CanReuseTransform returns
false.

Expected Results: The CanReuseTransform property should return true.

How often does this happen? Always.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list