Changeset 1195 for trunk/CrypPlugins/DES


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

removed unsafe code

Location:
trunk/CrypPlugins/DES
Files:
2 edited

Legend:

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

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

    r1193 r1195  
    2424    <ErrorReport>prompt</ErrorReport>
    2525    <WarningLevel>4</WarningLevel>
    26     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     26    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
    2727  </PropertyGroup>
    2828  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    3333    <ErrorReport>prompt</ErrorReport>
    3434    <WarningLevel>4</WarningLevel>
    35     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     35    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
    3636  </PropertyGroup>
    3737  <ItemGroup>
Note: See TracChangeset for help on using the changeset viewer.