PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 1st, 2000, 05:02 PM
simist simist is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 1999
Location: Wiesbaden, Hessen, Germany
Posts: 2 simist User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hello,

I'm a newbie to php3 and wanted to convert an asp-site to php3. Therefore I need a bitwise XOR command. I just could find logical XOR and bitwise AND and OR but not bitwise XOR. I know that some mathematicians will laugh about that, but it's a long time ago where I had calculated with this stuff (at least I think it is possible to combine the other bitwise operators, but I don't know how to).

Please help, thanks in advance.

simist

Reply With Quote
  #2  
Old February 2nd, 2000, 08:15 PM
scollo scollo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 1999
Posts: 114 scollo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 44 sec
Reputation Power: 15
The caret (^) character is the bitwise exclusive-or operator:

11 ^ 13 == 6

(11 is binary 1011
&nbsp;13 is binary 1101
&nbsp;06 is binary 0110)

-- Christopher

PS - I'm so curious: Why do you need this? When I described these operators in my book, I stated that they were rarely used in PHP. You're making me look bad

[This message has been edited by scollo (edited February 02, 2000).]

Reply With Quote
  #3  
Old February 3rd, 2000, 05:51 AM
simist simist is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 1999
Location: Wiesbaden, Hessen, Germany
Posts: 2 simist User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you very much Christopher,

I need bitwise XOR for an decryption engine which I have developed about a year ago. With a good friend we had programmed a small advertising game called "PHYSIKUS DriveIn" ("www.physikus.de", section "DriveIn"). It's a quite funny game with which you can win something. The cryption engine was embedded into VisualBasic and will now be ported to C++ for better performance. With this engine we have encoded the hiscore of the game into an alphanumerical code using a multiple shifting XOR sieve. There are several arrays with secret numbers as XOR sieves which have to be run through by the hiscore. It's a little bit like DES (of course less secure). I had no experience in dynamic web programming that time so we outsourced the online decryption engine to another company which programmed it in ASP. Today we want to make more of these games but don't want to use ASP any more (other companies always take more than i will take for myself...) That's why I want to use PHP for it.

Well, I made the same experience. I have bought the only two books on PHP which where ever published here in Germany. But both ones, written from different auhtors, doesn't include bitwise XOR even in their reference. One of these books has even 732 pages without the reference part. With reference this book counts over 1000 pages. So I never thought it could be possible that this huge tome could miss anything... But before that I could never imagine to use bitwise XOR, too. It's really not difficult programming but anything else but everyday usage of a programming language.

So after all I don't think I'm really making you looking bad URL At least you have mentioned bitwise XOR in contrast to the German books I have bought. Perhaps you can tell me where I can buy your book?

Thanks again,

Kar-Wing

Reply With Quote
  #4  
Old February 3rd, 2000, 12:03 PM
scollo scollo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 1999
Posts: 114 scollo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 44 sec
Reputation Power: 15
Hi,

I checked out physikus.de. It looks great. Why don't I get to do the fun projects like that? Vielleicht muss ich wieder nach deutschland umziehen.

This is the sort of shameless self-promotion that I never thought I would do, but judging from my email, most of the DevShed Discussion Forum people already seem to know about my book anyway. So here you go:
Professional PHP Programming
ISBN 1861002963
If you like the "independent" bookstore thing, you can try http://www.codysbooks.com/ and do a search for "scollo". Or you can find it at the publisher's site: http://www.wrox.com/Consumer/Store/...ISBN=1861002963
I hope you enjoy it.

-- Christopher



Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Bitwise XOR with php3

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap