Altiwrap
altiwrap#
About altiwrap#
altiwrap encrypts code programs written as persistent stored modules (PSMs). This utility prevents PSM code (e.g., stored procedures and stored functions) from being exposed.
altiwarp {--iname input_file} [--oname output_file]
Syntax#
Parameters#
Parameter | Description |
---|---|
-h/--h | Outputs help |
--iname | Specifies the name of the file to encrypt. On omission of the extension, .sql is assumed. |
--oname | Specifies the file name under which an encrypted code program is to be saved. On omission of the extension, it is saved as a .plb file. |
Description#
altiwrap encrypts the code programs of stored procedures and stored functions to prevent them from being exposed.
Altibase can encrypt the following statements.
-
CREATE [OR REPLACE] PROCEDURE
-
CREATE [OR REPLACE] FUNCTION
-
CREATE [OR REPLACE] TYPESET
-
CREATE [OR REPLACE] PACKAGE
-
CREATE [OR REPLACE] PACKAGE BODY
Considerations#
- Code programs cannot be modified after encryption. Changes must be made to the original code program, and then re-encrypted.
- Triggers cannot be encrypted.
- Encrypted code programs cannot be checked for syntax and semantic errors.
Example#
Use altiwrap to encrypt the sample1.sql file, and then output it.
Create the sample1. sql file.
iSQL> create or replace procedure proc1 as
type arr1 is table of char(30) index by integer;
v1 arr1;
begin
v1[0] := 'create or replace';
v1[1] := 'typeset';
v1[2] := 'is';
v1[3] := 'success';
println( v1[0] || v1[1] || v1[2] || v1[3] || '!' );
end;
/
Encrypt the file
$ altiwrap --iname sample1.sql --oname --sample1.plb
Run the encrypted file in iSQL.
iSQL> @sample1.plb
iSQL> create or replace procedure proc1 WRAPPED
'MjQz
MTk2
AAhjcmVhdGUgb3IgcmVwbGFjZSBwcm9jZWR1cqQBAAQxIGFzCnR5cGUgYXJyMSBpcyB0YWJsQAYAAWYgY2hhcigzMCkgaW5kZXggYnlAAQZ0ZWdlcjsKdjGYBQAEOwpiZWdpbgp2MVswXSA6PSAnY3JlYSu5ASdyBVsxtAN/DHNldK0CMq4CaXO5ATO4AQNzdWNjZXNsAgZwcmludGxuKCC2C3x8YAFACaABVAegAVwGDHx8ICchJyApOwplbmQ7ChEAADVBRDlBRkIzMDE0MzI1Q0U0MzY1RjYxNEI2NkYwQzRDREMzMTdDQTU=
';
/
Create success.
iSQL> exec proc1;
create or replace typeset is success!
Execute success.