The php[architect] has posted an article published in their February 2018 issue by Edward Barnard as a part of his " Station" column. The article covers bit and how it relates to cryptography in PHP.

The basics can be tricky. This month we take a careful walk-through of a few lines of cryptographic code in PHP. This leads us through the difference between ones’ complement and two’s complement representation. We achieve weirdness by combining logical AND with integer addition.

He starts with a bit of a history lesson going back to mainframes and keypunching followed by a look at the logical and bitwise operators. He then takes some of these basics and applies them to the world of cryptography and provides some example code and a constant- encoding algorithm. This leads to a discussion about ones’ compliment, signed zero, two’s compliment and "packing".



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here