help with pack()ing a string

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

help with pack()ing a string

Post by liljester »

Greetings,

Ive written a script to generate passwords for an LDAP server, and with a little searching online ive found the bits to make it work. BUT, just getting it to work isnt good enough for me, i want to understand how it works. the only bit i dont understand is when

Code: Select all

pack("H*", $hash);
so this packs the string into binary format, high nibble first. what does high nibble first mean?

if givin the hex value 0x10, what is the process to convert that value binary, hight bibble first?

Thanks!
Post Reply