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

  • 72f02e4
  • /
  • demos
  • /
  • maurice
  • /
  • Makefile
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:f9bf62276e83ad2bba25c0b2450efa613041c1d3
directory badge Iframe embedding
swh:1:dir:9a9852572869b564d654a3313e0f6f1889ed2db9
Makefile
CC=cc
CFLAGS= -g -I../../include -Wall
LIBS=  -L../.. -lcrypto
EXAMPLES=example1 example2 example3 example4

all: $(EXAMPLES) 

example1: example1.o loadkeys.o 
	$(CC) -o example1 example1.o loadkeys.o $(LIBS)

example2: example2.o loadkeys.o
	$(CC) -o example2 example2.o loadkeys.o $(LIBS)

example3: example3.o 
	$(CC) -o example3 example3.o $(LIBS)

example4: example4.o
	$(CC) -o example4 example4.o $(LIBS)

clean:	
	rm -f $(EXAMPLES) *.o

test: all
	@echo
	@echo Example 1 Demonstrates the sealing and opening APIs
	@echo Doing the encrypt side...
	./example1 <README >t.t
	@echo Doing the decrypt side...
	./example1 -d <t.t >t.2
	diff t.2 README
	rm -f t.t t.2
	@echo  example1 is OK

	@echo
	@echo Example2 Demonstrates rsa encryption and decryption
	@echo   and it should just print \"This the clear text\"
	./example2

	@echo
	@echo Example3 Demonstrates the use of symmetric block ciphers
	@echo in this case it uses EVP_des_ede3_cbc
	@echo i.e. triple DES in Cipher Block Chaining mode
	@echo Doing the encrypt side...
	./example3 ThisIsThePassword <README >t.t
	@echo Doing the decrypt side...
	./example3 -d ThisIsThePassword <t.t >t.2
	diff t.2 README
	rm -f t.t t.2
	@echo  example3 is OK

	@echo
	@echo Example4 Demonstrates base64 encoding and decoding
	@echo Doing the encrypt side...
	./example4 <README >t.t
	@echo Doing the decrypt side...
	./example4 -d <t.t >t.2
	diff t.2 README
	rm -f t.t t.2
	@echo example4 is OK

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

back to top