npCiph plugin

About this plugin

This plugin allow you to encrypt and decrypt strings and files using the RC4 and one of the availables hash algorithms: MD5, SHA1, SHA256, SHA384 and SHA512. All without need of thirdparty files or DLLs, just using the provided Windows API.

The plugin also have the appropiate events in order to get the control around a encrypt or decrypt operations. You can abort an operation every time, find if an operation is in progress, etc. And of course you can manage more than one operations at a time.

Thirparty

This plugin are imposible without the aid of this people:

Thanks a lot!

Plugin actions index

npCiphCreate

This action creates a new instance of an Ciph object. The result variable store the ID of the new Ciph object. You can use this ID with other plugin actions.

↑↑

npCiphDestroy

This action destruct a previously created Ciph object instance. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.

↑↑

npCiphDestroyAll

This action destruct all previously created Ciph object instances.

↑↑

npCiphEncryptStr

Encrypt a string with RC4 using one of the available hash algorithms to derive key. The result variable store the encrypted string if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.

↑↑

npCiphDecryptStr

Decrypt a string previously encrypted using the plugin. Dont forget to use the same algorithm and password that you use to encrypt the string. The result variable store the decrypted string if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.

↑↑

npCiphEncryptFile

Encrypt a file with RC4 using one of the available hash algorithms to derive key. The result variable store the encrypted string if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.

↑↑

npCiphDecryptFile

Decrypt a file previously encrypted using the plugin. Dont forget to use the same algorithm and password that you use to encrypt the file. The result variable store the encrypted string if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.

↑↑

npCiphAbort

Use this action to abort a currently working Ciph operation. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.

↑↑

npCiphIsWorking

Find if any Ciph operation is working. Store in the result variable "True" if any operation is working, or "False" in any other case. The [LastError] variable can contain information about some error if occur.

↑↑

npOnCiphWork

Set an optional NeoBook subroutine to be execute while a Ciph operation are in progress. The instance variable contain the Ciph object instance that fire the event. Store in the progress variable the number of bytes yet processed. The [LastError] variable can contain information about some error if occur. See also npOnCiphWorkBegin,

↑↑

npOnCiphWorkBegin

Set an optional NeoBook subroutine to be execute when a Ciph operation has begin. The instance variable contain the Ciph object instance that fire the event. Store in the max progress variable the total of bytes that must be processed. The [LastError] variable can contain information about some error if occur. See also npOnCiphWork

↑↑

npOnCiphWorkEnd

Set an optional NeoBook subroutine to be executed when a Ciph operation has well end. The instance variable contain the Ciph object instance that fire the event. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.

↑↑

npOnCiphAbort

Set an optional NeoBook subroutine to be executed when a Ciph operation has aborted. The instance variable contain the Ciph object instance that fire the event. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.

↑↑

npOnCiphError

Set an optional NeoBook subroutine to be executed in the rarelly case that a error is found while the Ciph operation. The instance variable contain the Ciph object instance that fire the event. Store in the error variable the found Windows error. The result variable store "True" if every is OK, or "False" if not, for example, because no instance is found with the provided ID. In this last case the [LastError] variable contain information about the error.

↑↑

Action errors subroutine

All the NeoPlugins deal with errors in the same way that NeoBook does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.

But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:

Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:

:OnNeoPluginActionError
  AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]"
Return

Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.

↑↑