Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DCing algorithm
#2
Code:
/*Programmed by Silva
Stolen stuff from Blue Phoenix
Latest version: 14 Jan 2009
*/

   import java.io.*;

    public class ReadFile{
       public static void main(String[] args) throws IOException{
         File f;
         f=new File("template.dat");// file rawr
          
         if(!f.exists()&& f.length()<0)
            System.out.println("The specified file is not exist");
        
         else{
            FileInputStream finp=new FileInputStream(f);
            int counta = 0;
            int countTo123 = 0;
            byte b;
            byte d;
            do{
               countTo123++;
               b=(byte)finp.read();
               if (countTo123 > 123)
               {
              
                  d = DecryptByte(counta,b);
                  counta++;
                  if (counta > 36){
                     counta = 0;
                  }
                  System.out.print((char)d);
               }
            }
            while(b!=-1);
            finp.close();
         }
      }
      
       public static byte DecryptByte(int counta,byte b){
         String plainEncryptionKey = "odBearBecauseHeIsVeryGoodSiuHungIsAGo";
         b -= (byte)plainEncryptionKey.charAt(counta);
         return b;
      }
   }

My version :) (works faster because it uses streams ;) ).
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by: Silverthorn


Messages In This Thread
DCing algorithm - by Silverthorn - 01-14-2009, 07:33 PM
RE: DCing algorithm - by Boop - 01-14-2009, 08:23 PM
RE: DCing algorithm - by YinYin - 03-26-2015, 07:58 AM
RE: DCing algorithm - by Som1Lse - 03-26-2015, 12:40 PM
RE: DCing algorithm - by YinYin - 03-26-2015, 12:57 PM
RE: DCing algorithm - by Silverthorn - 01-14-2009, 08:26 PM
RE: DCing algorithm - by Azriel - 01-15-2009, 06:09 PM
RE: DCing algorithm - by Boop - 01-15-2009, 06:29 PM
RE: DCing algorithm - by 1477 - 01-15-2009, 09:50 PM
RE: DCing algorithm - by Boop - 01-15-2009, 11:09 PM
RE: DCing algorithm - by Silverthorn - 01-16-2009, 03:06 PM
RE: DCing algorithm - by Yakui - 01-18-2009, 09:19 PM
RE: DCing algorithm - by Kevin - 08-01-2012, 10:45 AM
RE: DCing algorithm - by Boop - 08-01-2012, 11:53 AM
RE: DCing algorithm - by A-Man - 03-26-2015, 08:11 AM
RE: DCing algorithm - by YinYin - 03-26-2015, 08:31 AM
RE: DCing algorithm - by A-Man - 03-26-2015, 02:14 PM
RE: DCing algorithm - by Dia6lo - 06-19-2015, 11:57 AM
RE: DCing algorithm - by Som1Lse - 06-19-2015, 05:14 PM
RE: DCing algorithm - by Dia6lo - 06-19-2015, 05:37 PM
RE: DCing algorithm - by Hellblazer - 06-21-2015, 10:33 AM
RE: DCing algorithm - by Zelphir - 06-13-2021, 10:38 AM
RE: DCing algorithm - by Mesujin - 08-30-2022, 03:47 PM



Users browsing this thread: 1 Guest(s)