User Tools

Site Tools


wiki:plugins:crypto

Crypto Plugin

The crypto plugin for DokuWiki allows you to save encrypted Text in an wiki page. The encryption is done via AJAX on the server side using the blowfish algorithm already delivered with DokuWiki 1).

The plugin is at the moment not maintained anymore! It is also not working with newer version of dokuwiki.
The data,the secret and the result of the encryption are transfered by HTTP Post to the server. You are strongly encourage to use this plugin only in conjunction with SSL and only on servers where you trust the server administration.

Installation

Use the plugin manager to install the plugin from this link: crypto.tar.gz

Usage

After Installation you will find within the editor toolbar two new buttons. When clicking on the encryption button you can encrypt the currently selected text after entering the secret. An encrypted text could be decrypted by clicking the decryption button .

To decrypt a encrypted text within the rendered page it is enough to enclose the encrypted text with the decrypt tag. The code

<decrypt>ERG4Ssib 4lR14RoU uAS1QKSD X1iE+5vK</decrypt>

will result in the following text: <decrypt>ERG4Ssib 4lR14RoU uAS1QKSD X1iE+5vK</decrypt>. By pressing on the decrypting button you can decrypt the text. Within all the examples on this page is the secret “secret”.

Parameters of the decrypt tag

There exists some parameters for the decrypt tag, with which you can customize the behavior.

inline

With the inline attribute you can specify if the decrypted text is shown within the text. The following code will show the text within one line 2):

This text is a single line encryption: <decrypt inline="true">ERG4Ssib 4lR14RoU uAS1QKSD X1iE+5vK</decrypt>

This text is a single line encryption: <decrypt inline=“true”>ERG4Ssib 4lR14RoU uAS1QKSD X1iE+5vK</decrypt>

When you encrypted a multiline text it is better to separate it from the text using a pre tag within XHTML. Then you should use inline=“false”. See also the following example:

This text is a multi line encryption: 

<decrypt inline="false">
ERG4Ssib 4lR14RoU uAS1QB7I NfBwGOIf UjmJw2vr e85XR8zH VTo0gRTD Tlf4xwIg kwwg/O6k 5Q3ayNki xlReLjDI TuxeBMqg 7gwYnnLl zpaNAsJs 47VYgQfF rICAqMT1 VG9wJ5dU V+qxdbuz su5L7aB8 h2yFwzHb i9RVNvKm RFSRBd3j AZrAdxdS byr8v5D2 icacLp/z ka6xrFPm rxACTP7B r1OIvdZZ SR//rScJ tg9HTWIm zN05AzMG OJ3WiP70 N4DjZu1W 1SjnE0I8 YqpAaw==
</decrypt>

This text is a multi line encryption:

<decrypt inline=“false”> ERG4Ssib 4lR14RoU uAS1QB7I NfBwGOIf UjmJw2vr e85XR8zH VTo0gRTD Tlf4xwIg kwwg/O6k 5Q3ayNki xlReLjDI TuxeBMqg 7gwYnnLl zpaNAsJs 47VYgQfF rICAqMT1 VG9wJ5dU V+qxdbuz su5L7aB8 h2yFwzHb i9RVNvKm RFSRBd3j AZrAdxdS byr8v5D2 icacLp/z ka6xrFPm rxACTP7B r1OIvdZZ SRrScJ tg9HTWIm zN05AzMG OJ3WiP70 N4DjZu1W 1SjnE0I8 YqpAaw== </decrypt> ==== hint ==== With this attribute you can customize the title of the decryption dialog. <code> <decrypt hint=“The Secret is secret”>ERG4Ssib 4lR14RoU uAS1QKSD X1iE+5vK</decrypt> </code> <decrypt hint=“The Secret is secret”>ERG4Ssib 4lR14RoU uAS1QKSD X1iE+5vK</decrypt> ===== Configuration Parameter ===== The only configuration parameter is at the moment the parameter cache_password. It is disabled by default. When enabled the password is cached within the JSINFO array 3) for easier use with multiple decrypt tags on one page.

1)
see the file inc/blowfish.php
2)
inline=“true” is the default behavior
3)
the index is 'crypto_password'
wiki/plugins/crypto.txt · Last modified: 2013/11/25 22:10 by rene