SourceFormatX

Overview

Features

Why Use It

Formatting Show

Integration

Screenshots

Documentation

FAQs & Tips

Update History

Award Gallery

Testimonials

License Policy

CodeMorph

CodeToHtml

C# Source Code Obfuscation Show


SourceFormatX is not only the multi-language code formatter but also a code obfuscator that can obfuscate your C# (C-Sharp) source code for the purposes of source code security and intellectual property protection.

C/C++ Java C# Delphi (Pascal)
PHP JSP JavaScript HTML Components
CORBA IDL


  C# Source Code Obfuscation Examples:     Example 1   |   Example 2

This is C# code obfuscating example, the purpose of it is to show the power of SourceFormatX C# Code Formatter's syntax parse engine.

  /* Before C# Code Obfuscating */

  using System;
  using System.IO;

  namespace Indy.Sockets.Protocols.Encoding
  {
    public abstract class DecoderBase
    {
      protected Stream _Stream;
      private System.Text.Encoding mEncoding = System.Text.Encoding.ASCII;

      public void Decode(string AIn)
      {
        Decode(AIn, 0, -1);
      }

      public void Decode(string AIn, int AStartPos)
      {
        Decode(AIn, AStartPos, -1);
      }

      public abstract void Decode(string AIn, int AStartPos, int ABytes);

      public virtual void DecodeBegin(Stream ADestStream)
      {
        _Stream = ADestStream;
      }

      public string DecodeString(string AString)
      {
        using(MemoryStream ms = new MemoryStream())
        {
          DecodeBegin(ms);
          Decode(AString);
          DecodeEnd();
          ms.Position = 0;
          using(StreamReader sr = new StreamReader(ms))
          {
            try
            {
              return sr.ReadToEnd();
            }
            finally
            {
              sr.Close();
            }
          }
        }
      }

      public virtual void DecodeEnd(){}

      public System.Text.Encoding Encoding
      {
        get
        {
          return mEncoding;
        }
        set
        {
          mEncoding = value;
        }
      }
    }
  }


  /* After C# Code Obfuscating */

  using System;using System.IO;namespace Indy.Sockets.Protocols.Encoding{public
  abstract class DecoderBase{protected Stream _Stream;private
  System.Text.Encoding mEncoding=System.Text.Encoding.ASCII;public void Decode(
  string AIn){Decode(AIn,0,-1);}public void Decode(string AIn,int AStartPos){
  Decode(AIn,AStartPos,-1);}public abstract void Decode(string AIn,int AStartPos,
  int ABytes);public virtual void DecodeBegin(Stream ADestStream){_Stream=
  ADestStream;}public string DecodeString(string AString){using(MemoryStream ms=
  new MemoryStream()){DecodeBegin(ms);Decode(AString);DecodeEnd();ms.Position=0;
  using(StreamReader sr=new StreamReader(ms)){try{return sr.ReadToEnd();}finally{
  sr.Close();}}}}public virtual void DecodeEnd(){}public System.Text.Encoding
  Encoding{get{return mEncoding;}set{mEncoding=value;}}}}

Example 1   |   Example 2

  Download SourceFormatX C# Code Formatter to reformat and obfuscate all your C# source code files today!