Help for this page

Select Code to Download


  1. or download this
    use JSON::XS;
    use Digest::MD5 'md5_hex';
    ...
    <input type="hidden" name="_signature" value="@{[ $signature ]}" />
    <input type="hidden" name="_data" value="@{[ $base64_encoded ]}" />
    HTML
    
  2. or download this
    
    my $json_string   = decode_base64( $q->param('_data') );
    ...
      die "The data has been tampered with";
    }# end unless()