Perl script logic converted to C# -
i have perl script need convert c#.
but have hit speedbump.
the perl script:
use math::basecnv; use math::basecnv dig; use xml::simple; use lwp::simple; dig('url'); # select right alphabet base64 $parser = new xml::simple; $url = 'http://10.0.2.128/api.xml'; $content = $url or die "unable $url\n"; $data = $parser->xmlin($content); $stringdata=$data->{datafield}; $decvalue = cnv('a'.substr($stringdata,3,54),64,10); dig('hex'); $hexvalue = cnv($decvalue,10,16);
the value of $stringdata is ws=3lcobgcaxjqaadljiqeaaag2fdadiaab7qhka6eyapqga1cc8gaa4e
length: 57
the value of $decvalue is
29461891743732702623135632717213292230507524331718660652410396996938709350973448271678550990392836
length: 98
and value of $hexvalue is
dcb08e06009ac634000039632101000001b6143003880001ed01ca03a13200f420035702f20000e04
length: 81
my issue cant same $decvalue
, $hexvalue
when using c#. have searched google dry , not close getting these values.
so greate if know way decode these values in c#?
thanks in advance :)
Comments
Post a Comment