Package rs.baselib.crypto
Interface ICryptingDelegate
- All Known Implementing Classes:
DefaultCryptingDelegate
public interface ICryptingDelegate
Delegate for encrypting and decrypting.
- Author:
- ralph
-
Method Summary
Modifier and Type Method Description byte[]decrypt(byte[] bytes)Decrypts the given bytes.byte[]encrypt(byte[] bytes)Encrypts the given bytes.voidinit(ICryptingDelegateFactory factory)Initialize the delegate.
-
Method Details
-
init
Initialize the delegate.- Parameters:
factory- factory for the delegate.
-
encrypt
byte[] encrypt(byte[] bytes) throws java.lang.ExceptionEncrypts the given bytes.- Parameters:
bytes- bytes to be encrypted- Returns:
- encrypted bytes
- Throws:
java.lang.Exception- when an error occurs
-
decrypt
byte[] decrypt(byte[] bytes) throws java.lang.ExceptionDecrypts the given bytes.- Parameters:
bytes- bytes to be decrypted- Returns:
- decrypted bytes
- Throws:
java.lang.Exception- when an error occurs
-