Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 2f74e0c
  • /
  • test
  • /
  • testenc
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:42db56c2bea9c409cab4f15d0ee09b414e998b4e
directory badge Iframe embedding
swh:1:dir:1cc89dbe69dfdccc79dd150a093cb642daeec7d6
testenc
#!/bin/sh

testsrc=Makefile.ssl
test=./p
cmd=../apps/ssleay

cat $testsrc >$test;

echo cat
$cmd enc < $test > $test.cipher
$cmd enc < $test.cipher >$test.clear
cmp $test $test.clear
if [ $? != 0 ]
then
	exit 1
else
	/bin/rm $test.cipher $test.clear
fi
echo base64
$cmd enc -a -e < $test > $test.cipher
$cmd enc -a -d < $test.cipher >$test.clear
cmp $test $test.clear
if [ $? != 0 ]
then
	exit 1
else
	/bin/rm $test.cipher $test.clear
fi

for i in rc4 \
	des-cfb des-ede-cfb des-ede3-cfb \
	des-ofb des-ede-ofb des-ede3-ofb \
	des-ecb des-ede des-ede3 desx \
	des-cbc des-ede-cbc des-ede3-cbc \
	idea-ecb idea-cfb idea-ofb idea-cbc \
	rc2-ecb rc2-cfb rc2-ofb rc2-cbc \
	bf-ecb bf-cfb bf-ofb bf-cbc rc4 \
	cast5-ecb cast5-cfb cast5-ofb cast5-cbc
do
	echo $i
	$cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher
	$cmd $i -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear
	cmp $test $test.$i.clear
	if [ $? != 0 ]
	then
		exit 1
	else
		/bin/rm $test.$i.cipher $test.$i.clear
	fi

	echo $i base64
	$cmd $i -bufsize 113 -a -e -k test < $test > $test.$i.cipher
	$cmd $i -bufsize 157 -a -d -k test < $test.$i.cipher >$test.$i.clear
	cmp $test $test.$i.clear
	if [ $? != 0 ]
	then
		exit 1
	else
		/bin/rm $test.$i.cipher $test.$i.clear
	fi
done
rm -f $test

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top