Keep your Axon safe.Axon Encryptor now out for SkySpark v3.1

afAxonEncryptorExt

Encrypts and obfuscates Axon source code
afAxonEncryptorExtAxon funcs

Registered StackHub users may elect to receive email notifications whenever a new package version is released or a comment is posted on the forum.

There is 1 watcher.

v2.0.0

afAxonEncryptor_encryptFunc
afAxonEncryptor_encryptFunc(funcRec, passPhrase, keyFunc: null, options: null)

Encrypts the given function record by obfuscating the src field.

passPhrase is a seed string that's used to generate the actual runtimeKey used to encrypt the axon source code.

Example:

{func, name:"fnName", src:"()=>69"}.afAxonEncryptor_encryptFunc("<passPhrase>")

Returns a Dict which contains, amongst other fields, the runtime key needed to run the function.

By default, the encrypted source contains the runtimeKey which is fine for obfuscation and general purpose use. Alternatively a keyFunc may be passed in. The keyFunc should either be a Str of Axon code, or a Fn that returns a Str of Axon code, that when executed returns the runtimeKey. Also see afAxonEncryptor_stackhubKeyFunc.

If keyFunc is an Axon Fn it is called with two arguments: fnName and runtimeKey.

options defaults to null and is not used at this time.

Fantom signature:
@Axon static Dict afAxonEncryptor_encryptFunc(Dict funcRec, Str passPhrase, Obj? keyFunc := null, Dict? options := null)
afAxonEncryptor_encryptTrioFile
afAxonEncryptor_encryptTrioFile(trioFile, outputDir, passPhrase, keyFunc: null, options: null)

Encrypts the given Trio file of Axon functions.

Example:

afAxonEncryptor_encryptTrioFile(`io/funcs.trio`, `io/build/`, "<passPhrase>")

trioFile is the file to be encrypted.

passPhrase is a seed string used to generate a runtimeKey that is used to execute the encrypted source code.

Returns a Dict which contains, amongst other fields, the runtime key needed to run the functions.

By default, the encrypted source contains the runtimeKey which is fine for obfuscation and general purpose use. Alternatively a keyFunc may be passed in. The keyFunc should either be a Str of Axon code, or a Fn that returns a Str of Axon code, that when executed returns the runtimeKey. Also see afAxonEncryptor_stackhubKeyFunc.

If keyFunc is an Axon Fn it is called with two arguments: fnName and runtimeKey.

options defaults to null and is not used at this time.

Fantom signature:
@Axon static Dict afAxonEncryptor_encryptTrioFile(Uri trioFile, Uri outputDir, Str passPhrase, Obj? keyFunc := null, Dict? options := null)
afAxonEncryptor_stackhubKeyFunc
afAxonEncryptor_stackhubKeyFunc(stackHubPkg)

Returns a keyFunc function that finds a valid StackHub licence for the given package (name and version) and returns the runtimeKey property from that licence.

The returned keyFunc can only be used with encryption functions.

Example:

keyFunc   : afAxonEncryptor_stackhubKeyFunc("pkgName 1.0")
encrypted : afAxonEncryptor_encryptFile(`io/funcs.trio`, "<passPhrase>", keyFunc)
Fantom signature:
@Axon static Obj afAxonEncryptor_stackhubKeyFunc(Str stackHubPkg)
Published by Fantom Factory

Products & Services by Fantom Factory

Packages by Fantom Factory

Commercial packages

Free packages