User guide
E-74
PLI Access Routines
Caution
This routine must be called before any other source protection
routine.
A NULL return value means the call to malloc() failed. Your
program should test for this.
vcsSpOvaDecodeLine
Syntax
vcsSpStateID vcsSpOvaDecodeLine(vcsSpStateID esp, char
*line)
Synopsis
This routine decrypts one line.
Use this routine to decrypt one line of protected IP code such as OVA
code. Pass in a null vcsSpStateID handle with the first line of code
and a non-null handle with subsequent lines.
Returns
Returns NULL when the last line has been decrypted.
Example D-34 Example of vcsSpOvaDecodeLine
#include "enclib.h"
if (strcmp(linebuf, "‘protected_ip synopsys\n")==0) {
/* start IP decryption */
vcsSpStateID esp = NULL;
while (fgets(linebuf, sizeof(linebuf), infile)) {
/* linebuf contains encrypted source */
esp = vcsSpOvaDecodeLine(esp, linebuf);
if (linebuf[0]) {
/* linebuf contains decrypted source */