Links#
See also:- https://issues.apache.org/jira/browse/JSPWIKI-205Content unavailable! (broken link)https://jspwiki-wiki.apache.org/images/out.png
- http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.htmlContent unavailable! (broken link)https://jspwiki-wiki.apache.org/images/out.png
- EncryptedPageFilter
Overview#
This is a new feature part of JSPWiki 2.10.2The WikiEngine, now contains access to a CryptoManager which can be accessed by wikiEngine.getCryptoManager()
The CryptoManager has one function getCryptoProvider() which gets the CryptoProvider as specified by jspwiki.cryptoProvider property in jspwiki-custom.properties.
The CryptoProvider has the following interface methods:
public byte[] encrypt(char[] key, byte[] content) throws EncryptionException; public byte[] decrypt(char[] key, byte[] content) throws EncryptionException;
The default value for the cryptoProvider is a org.apache.wiki.crypto.BaseCryptoProvider which is an Identity provider, and does no encryption or decryption at all.
The BaseCryptoProvider can be a base class to other cryptoProviders, as it read the properties file jspwiki.cryptoFile as specified in jspwiki.properties, and places these in a property called cryptoProperties.
The default value for the jspwiki.cryptoFile is jspwiki-crypto.properties.
Another cryptoProvider implementation is the PBECryptoProvider (Password Base Encryption).
This provider expects the following cryptoProperties:
Property | description | type | default |
---|---|---|---|
crypto.base64 | if true changed encrypted string to base64 | boolean | true |
crypto.salt | The salt used to create the PBEParameterSpec | String | A random string |
crypto.blocksize | The block size of the salt for the PBE algorithm | int | 8 |
crypto.itrcount | The iteration count for the PBE algorithm | int | 2048 |
crypto.algorithm | The algorithm to be used as per CryptoSpecContent unavailable! (broken link)https://jspwiki-wiki.apache.org/images/out.png | String | PBEWithMD5AndDES |
Category.Documentation