Skip to content

Instantly share code, notes, and snippets.

@tm604
Created April 28, 2015 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tm604/c222fa5e31643f39f1c9 to your computer and use it in GitHub Desktop.
Save tm604/c222fa5e31643f39f1c9 to your computer and use it in GitHub Desktop.
tom@roku:~/dev/hashperl/crypt-rijndael$ uname -a
Linux roku 3.16.0-34-lowlatency #47~14.04.1-Ubuntu SMP PREEMPT Fri Apr 10 18:18:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
tom@roku:~/dev/hashperl/crypt-rijndael$ perl -V
Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
Platform:
osname=linux, osvers=3.16.0-34-lowlatency, archname=x86_64-linux
uname='linux roku 3.16.0-34-lowlatency #45~14.04.1-ubuntu smp preempt tue mar 24 11:32:36 utc 2015 x86_64 x86_64 x86_64 gnulinux '
config_args='-de -Dprefix=/home/tom/perl5/perlbrew/perls/perl-5.10.1 -Aeval:scriptdir=/home/tom/perl5/perlbrew/perls/perl-5.10.1/bin'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.8.2', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib /lib64 /usr/lib64
libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.19'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_64_BIT_ALL
USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
Locally applied patches:
Devel::PatchPerl 1.30
Built under linux
Compiled at Apr 17 2015 23:56:50
%ENV:
PERL5LIB="/home/tom/dev/local-lib/5.10.1/lib/perl5"
PERLBREW_BASHRC_VERSION="0.73"
PERLBREW_HOME="/home/tom/.perlbrew"
PERLBREW_MANPATH="/home/tom/perl5/perlbrew/perls/perl-5.10.1/man"
PERLBREW_PATH="/home/tom/perl5/perlbrew/bin:/home/tom/perl5/perlbrew/perls/perl-5.10.1/bin"
PERLBREW_PERL="perl-5.10.1"
PERLBREW_ROOT="/home/tom/perl5/perlbrew"
PERLBREW_VERSION="0.73"
PERL_CPANM_OPT="--mirror http://cpan.perlsite.co.uk --mirror-only"
PERL_LOCAL_LIB_ROOT="/home/tom/dev/local-lib/5.10.1"
PERL_LWP_SSL_VERIFY_HOSTNAME="0"
PERL_MB_OPT="--install_base "/home/tom/dev/local-lib/5.10.1""
PERL_MM_OPT="INSTALL_BASE=/home/tom/dev/local-lib/5.10.1"
PERL_MM_USE_DEFAULT="1"
@INC:
/home/tom/dev/local-lib/5.10.1/lib/perl5/x86_64-linux
/home/tom/dev/local-lib/5.10.1/lib/perl5
/home/tom/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/x86_64-linux
/home/tom/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1
/home/tom/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux
/home/tom/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1
.
tom@roku:~/dev/hashperl/crypt-rijndael$ cpanm -f Crypt::Rijndael
--> Working on Crypt::Rijndael
Fetching http://cpan.perlsite.co.uk/authors/id/B/BD/BDFOY/Crypt-Rijndael-1.12.tar.gz ... OK
Configuring Crypt-Rijndael-1.12 ... OK
Building and testing Crypt-Rijndael-1.12 ... OK
Successfully reinstalled Crypt-Rijndael-1.12
1 distribution installed
tom@roku:~/dev/hashperl/crypt-rijndael$ cat testcase.pl
#!/usr/bin/env perl
use strict;
use warnings;
use v5.10;
use Crypt::Rijndael;
my $cipher = Crypt::Rijndael->new('a' x 32, Crypt::Rijndael::MODE_CBC());
if (open(IN, '<', 'testcase.dat')) {
local $/ = undef; # Read complete files
my $data=<IN>;
close IN;
$data = $cipher->decrypt($data);
use Devel::Peek 'Dump';
Dump $data;
$data =~ s/\0+$//;
Dump $data;
}
tom@roku:~/dev/hashperl/crypt-rijndael$ od -t x1z testcase.dat
0000000 fa ce d8 e8 8c 90 31 b4 ad 87 03 85 09 1d ba 2e >......1.........<
0000020
tom@roku:~/dev/hashperl/crypt-rijndael$ perl testcase.pl
SV = PV(0x1558018) at 0x158e360
REFCNT = 1
FLAGS = (PADMY,POK,pPOK)
PV = 0x155af80 "Bug\0\0\0\0\0\0\0\0\0\0\0\0\0"
CUR = 16
LEN = 24
SV = PV(0x1558018) at 0x158e360
REFCNT = 1
FLAGS = (PADMY,POK,pPOK)
PV = 0x155af80 "Bug\0\0\0\0\0\0\0\0\0\0\0\0\0"
CUR = 16
LEN = 24
tom@roku:~/dev/hashperl/crypt-rijndael$ exit
exit
Script done on Tue 28 Apr 2015 06:15:03 BST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment