Changeset 1193 for trunk/CrypPlugins/DES


Ignore:
Timestamp:
Feb 26, 2010, 1:27:59 AM (12 years ago)
Author:
Sven Rech
Message:

more speed for bruteforcing by using unsafe code in AES and DES (just temporary)

Location:
trunk/CrypPlugins/DES
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/DES/DES.cs

    r1192 r1193  
    556556            int size = bytesToUse > ciphertext.Length ? ciphertext.Length : bytesToUse;
    557557
    558             return NativeCryptography.Crypto.decryptDES(ciphertext, key, size, ((DESSettings)plugin.Settings).Mode);
     558            unsafe
     559            {
     560                fixed (byte* inp = ciphertext)
     561                fixed (byte* akey = key)
     562                {
     563                    return NativeCryptography.Crypto.decryptDES(inp, akey, size, ((DESSettings)plugin.Settings).Mode);
     564                }
     565            }
    559566        }
    560567
  • trunk/CrypPlugins/DES/DES.csproj

    r1191 r1193  
    2424    <ErrorReport>prompt</ErrorReport>
    2525    <WarningLevel>4</WarningLevel>
     26    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    2627  </PropertyGroup>
    2728  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    3233    <ErrorReport>prompt</ErrorReport>
    3334    <WarningLevel>4</WarningLevel>
     35    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    3436  </PropertyGroup>
    3537  <ItemGroup>
Note: See TracChangeset for help on using the changeset viewer.