HabboEncoding C++ (new crypto)

Results 1 to 8 of 8
  1. #1
    Alpha Member Emily is offline
    MemberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    HabboEncoding C++ (new crypto)

    Don't know if they are already released, but here I release HabboEncoding for new crypto for C++.
    It only contains the decoding functions as the encoding functions were useless.
    This is my first time coding in C++.

    HabboEncoding.h:
    PHP Code:
    #pragma once
    ref class HabboEncoding
    {
    public:
        static 
    int DecodeInteger(System::Stringv);
        static 
    short DecodeShort(System::Stringv);
        static 
    int DecodeInteger(System::Byte v[]);
        static 
    short DecodeShort(System::Byte v[]);
    }; 
    HabboEncoding.cpp:
    PHP Code:
    #include "stdafx.h"
    #include "HabboEncoding.h"


    int HabboEncoding::DecodeInteger(System::Stringv)
    {
        if ((((
    v[0] | v[1]) | v[2]) | v[3]) < 0)
            return -
    1;

        return ((((
    v[0] << 0x18) + (v[1] << 0x10)) + (v[2] << 8)) + v[3]);
    }

    short HabboEncoding::DecodeShort(System::Stringv)
    {
        if ((
    v[0] | v[1]) < 0)
        {
            return -
    1;
        }

        return ((
    v[0] << 8) + v[1]);
    }

    int HabboEncoding::DecodeInteger(System::Byte v[])
    {
        if ((((
    v[0] | v[1]) | v[2]) | v[3]) < 0)
            return -
    1;

        return ((((
    v[0] << 0x18) + (v[1] << 0x10)) + (v[2] << 8)) + v[3]);
    }

    short HabboEncoding::DecodeShort(System::Byte v[])
    {
        if ((
    v[0] | v[1]) < 0)
        {
            return -
    1;
        }

        return ((
    v[0] << 8) + v[1]);

    How to use it:

    At the upper add:
    PHP Code:
    #include "HabboEncoding.h" 
    Where you want it do:
    PHP Code:
    int ID HabboEncoding::DecodeInteger(""); 
    Or:
    PHP Code:
    short ID HabboEncoding::DecodeShort(""); 
    DecodeInteger returns int (Int32) and DecodeShort returns short (Int16)

    Proof it will work:

    Last edited by Emily; 03-01-13 at 02:40 PM.


  2. #2
    Chasing 99 Red Balloons Jordan is offline
    MemberRank
    Jan 2008 Join Date
    UKLocation
    1,763Posts

    HabboEncoding C++ (new crypto)

    You've gone the wrong way about this by using strings

  3. #3
    Alpha Member Emily is offline
    MemberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    Re: HabboEncoding C++ (new crypto)

    Quote Originally Posted by Jordan View Post
    You've gone the wrong way about this by using strings
    Right, added codes.

  4. #4
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts

    Re: HabboEncoding C++ (new crypto)

    Why would you even use .NET..? :(

  5. #5
    Alpha Member Emily is offline
    MemberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    Re: HabboEncoding C++ (new crypto)

    Quote Originally Posted by Caustik View Post
    Why would you even use .NET..? :(
    It's easy.

    We know Java is good, and I love Java, but the point is we have no C++ emulators (well maybe one or 2 but no flash)
    Anyways, It would be lovely to see a C++ emulator working on new crypto.
    And I wanted to make something in C++ so I decide to port some files in C++ (from C#)

  6. #6
    Alpha Member Caustik is offline
    MemberRank
    May 2011 Join Date
    LondonLocation
    1,837Posts
    Quote Originally Posted by Tha View Post
    It's easy.

    We know Java is good, and I love Java, but the point is we have no C++ emulators (well maybe one or 2 but no flash)
    Anyways, It would be lovely to see a C++ emulator working on new crypto.
    And I wanted to make something in C++ so I decide to port some files in C++ (from C#)
    C++ is more than capable of performing such tasks without using .NET. That restricts software to Windows; unless you hneed to use something windows-specific you shouldn't be using C++.NET (C++ has more than capable socket implementations which work across a variety of platforms) . It defeats the whole purpose of C/C++'s cross-platform abilities.
    /rant

  7. #7
    Account Upgraded | Title Enabled! Ma Ma is offline
    MemberRank
    Jan 2011 Join Date
    home.phpLocation
    580Posts

    Re: HabboEncoding C++ (new crypto)

    Quote Originally Posted by Caustik View Post
    C++ is more than capable of performing such tasks without using .NET. That restricts software to Windows; unless you hneed to use something windows-specific you shouldn't be using C++.NET (C++ has more than capable socket implementations which work across a variety of platforms) . It defeats the whole purpose of C/C++'s cross-platform abilities.
    /rant
    I agree if you use .net for c++ is just stupid

    Nice release , i've been learning c++ for months now and this might come in handy some day

  8. #8
    Banned V for Vendetta is offline
    BannedRank
    Feb 2007 Join Date
    1,809Posts

    Re: HabboEncoding C++ (new crypto)

    I assume that nobody have ever coded their emulator based off C++ But they are based off c# Or based on Java and so i suppose that you can give it a try but like others say: Just get along with .net if that makes you feel good furtherer good luck@!



Advertisement