New Features in Maple 2018 - Encrypted Procedures - Maplesoft

What's New in Maple 2018

Encrypted Procedures




Maple 2018 lets you encrypt procedures. An encrypted procedure acts and behaves like any normal procedure in Maple, but it can not be viewed or debugged. This provides a way for professional users to share executable procedures while protecting their IP. 

The following defines a procedure that implements a block game as described at "http://rosettacode.org/wiki/ABC_Problem#Maple". The procedure is then saved into a repository file called "abc.mla". 


Embedded component

After executing the code above we can call the canSpell procedure to test what words can be spelled with the given blocks.  

canSpell(

true

canSpell(

false

Normally the statements of a procedure can be seen via commands such as showstat and eval in Maple. This is true for this procedure too because it was just defined. Note: option encrypted only takes full effect when the procedure is loaded from a library, not when it was just entered from source. 

eval(canSpell); 1 

proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{
proc (w) local blocks, i, j, word, found, N; option encrypted; blocks := Array([{

Let’s restart and then reference the procedure from the "abc.mla" repository that we saved it in: 

restart; 1 

libname := libname, cat(FileTools:-TemporaryDirectory(),  


We can use the procedure: 

canSpell( 

true

But we can no longer see the implementation: 

eval(canSpell); 1

proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;
proc (w) local blocks, i, j, word, found, N; option encrypted;