Package com.iizix.gyro
Interface ISensitiveParameterHandler
- All Known Implementing Classes:
ServerSecurityManager
public interface ISensitiveParameterHandlerInterface used for sensitive parameter encoding and decoding with keys exchanged between the server and the client.- Author:
- Christopher Mindus
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringdecodeParameter(java.lang.String data)Decodes a sensitive information device parameter using the previously exchanged keys.java.lang.StringencodeParameter(java.lang.String param)Encodes a sensitive information device parameter using the previously exchanged keys.
Method Detail
decodeParameter
java.lang.String decodeParameter(java.lang.String data) throws java.io.UnsupportedEncodingException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, java.security.DigestExceptionDecodes a sensitive information device parameter using the previously exchanged keys.- Parameters:
data- The base64 encoded data.- Returns:
- The decoded string.
- Throws:
java.lang.IllegalArgumentException- If the data encoding is invalid (not base64).javax.crypto.NoSuchPaddingExceptionjava.security.NoSuchAlgorithmExceptionjava.security.InvalidAlgorithmParameterExceptionjava.security.InvalidKeyExceptionjavax.crypto.BadPaddingExceptionjavax.crypto.IllegalBlockSizeExceptionjava.security.DigestExceptionjava.io.UnsupportedEncodingException
encodeParameter
java.lang.String encodeParameter(java.lang.String param) throws java.io.UnsupportedEncodingException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingExceptionEncodes a sensitive information device parameter using the previously exchanged keys.- Parameters:
param- The parameter.- Returns:
- The base64 encoded data.
- Throws:
java.lang.IllegalArgumentException- If the data encoding is invalid (not base64).javax.crypto.NoSuchPaddingExceptionjava.security.NoSuchAlgorithmExceptionjava.security.InvalidAlgorithmParameterExceptionjava.security.InvalidKeyExceptionjavax.crypto.BadPaddingExceptionjavax.crypto.IllegalBlockSizeExceptionjava.io.UnsupportedEncodingException