Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to encrypt dll files?

How to encrypt dll files?

Scheduled Pinned Locked Moved C#
csharpvisual-studiotutorialquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bobby887
    wrote on last edited by
    #1

    As you guys know Dynamic Link Libraries created in visual studio .NET can be decrypted, oooh my goodness. How can it be encrypted? Dotfuscator can do somethings, but when u encrypt your class with it,all the members of your class rename to letters and furthur useness would be horrible. Thank you in advanced. bobby877

    I 2 Replies Last reply
    0
    • B Bobby887

      As you guys know Dynamic Link Libraries created in visual studio .NET can be decrypted, oooh my goodness. How can it be encrypted? Dotfuscator can do somethings, but when u encrypt your class with it,all the members of your class rename to letters and furthur useness would be horrible. Thank you in advanced. bobby877

      I Offline
      I Offline
      Ingo
      wrote on last edited by
      #2

      Someone told me that with .Net 2.0 its possible to compile to native code. But I don't know if he his correct. I didn't found a way to, yet. So if anybody knows, I'm interested in, too. Greetings, Ingo

      D R 2 Replies Last reply
      0
      • I Ingo

        Someone told me that with .Net 2.0 its possible to compile to native code. But I don't know if he his correct. I didn't found a way to, yet. So if anybody knows, I'm interested in, too. Greetings, Ingo

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        ihoecken wrote:

        Someone told me that with .Net 2.0 its possible to compile to native code.

        No, it's not. Well, only if you're writing in unmanaged C++. Managed C++ compiles to a combination of native and managed code. There are tools out there that will compile down to Native code, but they cost a bloody fortune to buy. There is no way to encrypt the .DLL and still have it work, other than obfuscation. No matter what you do, the .DLL must be decrypted to use, even if it's done in memory. At that point, you're entire encryption scheme just defeated itself. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        1 Reply Last reply
        0
        • I Ingo

          Someone told me that with .Net 2.0 its possible to compile to native code. But I don't know if he his correct. I didn't found a way to, yet. So if anybody knows, I'm interested in, too. Greetings, Ingo

          R Offline
          R Offline
          Rob Graham
          wrote on last edited by
          #4

          even in .Net 1.0 you can use NGen to compile a .Net dll to native code. This has to happen on the target machine however, since Ngen will optimize for the processor it finds, and installs the resulting image in the native image cache. Your installer script could Ngen normal dlls in a temporary location, then delete the uncompliled dlls... Absolute faith corrupts as absolutely as absolute power Eric Hoffer All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke

          D 1 Reply Last reply
          0
          • R Rob Graham

            even in .Net 1.0 you can use NGen to compile a .Net dll to native code. This has to happen on the target machine however, since Ngen will optimize for the processor it finds, and installs the resulting image in the native image cache. Your installer script could Ngen normal dlls in a temporary location, then delete the uncompliled dlls... Absolute faith corrupts as absolutely as absolute power Eric Hoffer All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            But that, of course, means that the source MSIL files would have to be on the installation CD's too! :-D You could easily stop the installer from deleting the files just by modifying the permissions on the TEMP folders. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            1 Reply Last reply
            0
            • B Bobby887

              As you guys know Dynamic Link Libraries created in visual studio .NET can be decrypted, oooh my goodness. How can it be encrypted? Dotfuscator can do somethings, but when u encrypt your class with it,all the members of your class rename to letters and furthur useness would be horrible. Thank you in advanced. bobby877

              I Offline
              I Offline
              Ingo
              wrote on last edited by
              #6

              Well I found a software which allows to convert .Net projects to native code. It's called .Net Reactor[^] I tried it. The code is encrypted afterwards. Reflector isn't able to disassemble it. Greetings, Ingo ------------------------------ A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature! -- modified at 11:27 Tuesday 7th February, 2006

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups