Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Handling binary

by flexvault (Monsignor)
on Sep 12, 2015 at 13:52 UTC ( #1141775=note: print w/replies, xml ) Need Help??


in reply to Handling binary

Welcome G109B,

I think you will find it easier to use binary strings for your project. To get you started:

perl -e '$h=pack("H*","139686DA20C1");$b=unpack("B*",$h);print length( +$b)," $b\n";'

Then use 'substr' to get 5 binary digits at a time.

while( $b ) { print substr($b,0,5,""); }
Do the opposite to build your blob.

Why are you using Base 5, when the rest of the world uses binary?

Regards...Ed

"Well done is better than well said." - Benjamin Franklin

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1141775]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2022-01-22 00:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?