File: obfuscate.h

package info (click to toggle)
covered 0.7.10-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 8,916 kB
  • sloc: ansic: 48,807; yacc: 11,650; xml: 8,838; tcl: 7,698; sh: 3,925; lex: 2,240; makefile: 360; perl: 329
file content (62 lines) | stat: -rw-r--r-- 1,970 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef __OBFUSCATE_H__
#define __OBFUSCATE_H__

/*
 Copyright (c) 2006-2010 Trevor Williams

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by the Free Software
 Foundation; either version 2 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 See the GNU General Public License for more details.

 You should have received a copy of the GNU General Public License along with this program;
 if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

/*!
 \file     obfuscate.h
 \author   Trevor Williams  (phase1geo@gmail.com)
 \date     9/16/2006
 \brief    Contains functions for internal obfuscation.
*/


/*!
 Used for obfuscating signal names.  Improves performance when obfuscation mode is not turned on.
*/
#define obf_sig(x) (obf_mode ? obfuscate_name(x,'s') : x)

/*!
 Used for obfuscating functional unit names.  Improves performance when obfuscation mode is not
 turned on.
*/
#define obf_funit(x) (obf_mode ? obfuscate_name(x,'f') : x)

/*!
 Used for obfuscating file names.  Improves performance when obfuscation mode is not turned on.
*/
#define obf_file(x) (obf_mode ? obfuscate_name(x,'v') : x)

/*!
 Used for obfuscating instance names.  Improves performance when obfuscation mode is not turned on.
*/
#define obf_inst(x) (obf_mode ? obfuscate_name(x,'i') : x)


extern bool obf_mode;


/*! \brief Sets the global 'obf_mode' variable to the specified value */
void obfuscate_set_mode( bool value );

/*! \brief Gets an obfuscated name for the given actual name */
/*@shared@*/ char* obfuscate_name( const char* real_name, char prefix );

/*! \brief Deallocates all memory associated with obfuscation */
void obfuscate_dealloc();

#endif