Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Perl strings questions

by bliako (Monsignor)
on Jun 02, 2021 at 07:58 UTC ( [id://11133403]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $str = "hello"; # no special chars, 1-127
    my $sha256 = Digest::SHA::sha256("abc123"); # bytes 0-255
    ...
    $ua->POST("aurl" ... $buffer ... $HTTPheader ...);
    $ua->GET("aurl" ... $buffer ... $HTTPheader ...);
    $ua->GET("aurl" ... $unicode_string ... $HTTPheader ...);
    
  2. or download this
        postdata = urllib.parse.urlencode(data)
        encoded = (str(data['nonce']) + postdata).encode()
        message = urlpath.encode() + hashlib.sha256(encoded).digest()
    
  3. or download this
    my $postdata = Encode::encode('UTF-8', "x=1&y=2&z=greektext"); # for e
    +xample, 
    my $p1 = "$nonsense".'&'.$postdata; # yes & needed
    ...
      . $api_sha256; #<< last one is binary
    
    # ... and post after some more massaging
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11133403]
Approved by kcott
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-19 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found