|
|
Home » Developing U++ » UppHub » Protect package - A starting copy protection system
Re: Protect package - A starting copy protection system [message #29028 is a reply to message #29024] |
Sat, 02 October 2010 18:08   |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
281264 wrote on Sat, 02 October 2010 16:00 | Hi Massimo,
I am finding some unexpected outcome. The problem seems to be related with the key. The encryption key I am using is AABBCCDDEEFF00112233445566778899 (as shown, without quotes); the GetKey function is as the example:
String GetKey(void)
{
// WARNING -- TO PUT A NULL BYTE (0X00) INSIDE KEYSTRING
// REQUIRES SOME ADDITIONAL WORK !
String k = "\xAA\xBB\xCC\xDD\xEE\xFF";
k.Cat('\x00');
k += "\x11\x22\x33\x44\x55\x66\x77\x88\x99";
return k;
}
The application compiles well and it runs fine, but it does not recognize the kye!
Where is the bug?
|
The bug is that your encryption key is AABBCCDDEEFF00112233445566778899 but in your source you use AABBCCDDEEFF.... Keys in optional build step command line and inside your code must match.
Quote: |
Remarks:
1.- can I use an ASCII String, such as “AA………99” without the hex format?
|
well, you can use whathever you like, it's enough that keys are 16 or 32 byte long.
Of course, for sake of simplicity, the key in custom build step is entered as hex-ascii string, so AABB.... where each couple of chars form an hex byte, otherwise it would be hard to enter keys with control chars there.
If you enter for example 303132333435 in custom build step, the key in your code should be any of :
[code]
12345
\x30\x31\x32\x33\x34\x35
[/quote]
I'd suggest the second form as it's easy to compare with the custom build step one.....
2.- what is len in the PROTECT_DECRIPT function? The length of the key, perhaps (the it should be 16bytes or 32 bytes)?
[/quote]
PROTECT_DECRYPT is an helper function which takes following parameters :
Address of the block to be decoded
Length of the block
A String containing the key
In your case you should use :
bool Decrypt(byte *start, size_t len)
{
return PROTECT_DECRYPT ( start, len, GetKey());
}
Where the GetKey() function is your above one.
Anyways, I guess I've to change the help a bit.....
Ciao
Max
|
|
|
 |
|
Protect package - A starting copy protection system
By: mdelfede on Sun, 19 September 2010 21:07
|
 |
|
Re: Protect package - A starting copy protection system
By: dolik.rce on Mon, 20 September 2010 00:50
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Mon, 20 September 2010 10:02
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Mon, 20 September 2010 13:57
|
 |
|
Re: Protect package - A starting copy protection system
By: dolik.rce on Mon, 20 September 2010 18:29
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Mon, 20 September 2010 21:38
|
 |
|
Re: Protect package - A starting copy protection system
By: dolik.rce on Mon, 20 September 2010 23:21
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Mon, 20 September 2010 23:38
|
 |
|
Re: Protect package - A starting copy protection system
By: koldo on Mon, 20 September 2010 08:14
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Wed, 22 September 2010 00:52
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Thu, 23 September 2010 17:05
|
 |
|
Re: Protect package - A starting copy protection system
By: koldo on Thu, 23 September 2010 20:39
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Fri, 24 September 2010 10:13
|
 |
|
Re: Protect package - A starting copy protection system
By: Zbych on Sat, 25 September 2010 13:36
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Sat, 25 September 2010 15:37
|
 |
|
Re: Protect package - A starting copy protection system
By: Zbych on Sat, 25 September 2010 18:03
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Sat, 25 September 2010 18:59
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Wed, 29 September 2010 22:29
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Thu, 30 September 2010 21:30
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Thu, 30 September 2010 22:59
|
 |
|
Re: Protect package - A starting copy protection system
By: koldo on Fri, 01 October 2010 08:11
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Fri, 01 October 2010 13:53
|
 |
|
Re: Protect package - A starting copy protection system
By: 281264 on Fri, 01 October 2010 21:53
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Fri, 01 October 2010 22:36
|
 |
|
Re: Protect package - A starting copy protection system
By: 281264 on Sat, 02 October 2010 16:00
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Sat, 02 October 2010 18:08
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Sun, 03 October 2010 22:49
|
 |
|
Re: Protect package - A starting copy protection system
By: koldo on Fri, 08 October 2010 12:29
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Fri, 08 October 2010 14:10
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Sun, 10 October 2010 14:35
|
 |
|
Re: Protect package - A starting copy protection system
By: koldo on Wed, 13 October 2010 09:11
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Thu, 14 October 2010 01:42
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Thu, 14 October 2010 10:45
|
 |
|
Re: Protect package - A starting copy protection system
By: koldo on Fri, 15 October 2010 10:54
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Fri, 15 October 2010 11:23
|
 |
|
Re: Protect package - A starting copy protection system
By: koldo on Fri, 15 October 2010 12:05
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Fri, 15 October 2010 12:23
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Sun, 30 January 2011 19:24
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Fri, 04 February 2011 01:39
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Fri, 04 February 2011 12:04
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 06 April 2011 10:02
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Wed, 06 April 2011 13:49
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 06 April 2011 15:23
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Wed, 06 April 2011 23:18
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Thu, 07 April 2011 14:55
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 08 June 2011 10:08
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: koldo on Mon, 17 October 2011 21:24
|
 |
|
Re: Protect package - A starting copy protection system
By: ratah on Wed, 28 December 2011 10:54
|
 |
|
Re: Protect package - A starting copy protection system
By: koldo on Wed, 28 December 2011 13:04
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Fri, 01 June 2018 15:43
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: koldo on Mon, 04 June 2018 08:53
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Tue, 05 June 2018 11:37
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Tue, 05 June 2018 19:10
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Tue, 05 June 2018 20:22
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: mdelfede on Wed, 13 October 2010 01:06
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Tue, 05 June 2018 21:08
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 06 June 2018 08:31
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 06 June 2018 09:30
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 06 June 2018 10:12
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 06 June 2018 12:16
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 06 June 2018 12:34
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 06 June 2018 12:42
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 06 June 2018 13:32
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 06 June 2018 15:30
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Thu, 07 June 2018 12:26
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Thu, 07 June 2018 13:16
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Fri, 08 June 2018 12:42
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Fri, 08 June 2018 13:00
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Fri, 08 June 2018 14:22
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Fri, 08 June 2018 14:41
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Sat, 09 June 2018 09:49
|
 |
|
Re: Protect package - A starting copy protection system
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Tue, 12 June 2018 20:23
|
 |
|
Re: Protect package - A starting copy protection system
By: Tom1 on Wed, 06 June 2018 12:32
|
 |
|
Re: Protect package - A starting copy protection system
|
Goto Forum:
Current Time: Sat Apr 26 09:56:56 CEST 2025
Total time taken to generate the page: 0.01471 seconds
|
|
|