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 TypeMethodDescriptionbyte[]
decrypt
(byte[] bytes) Decrypts the given bytes.byte[]
encrypt
(byte[] bytes) Encrypts the given bytes.void
init
(ICryptingDelegateFactory factory) Initialize the delegate.
-
Method Details
-
init
Initialize the delegate.- Parameters:
factory
- factory for the delegate.
-
encrypt
Encrypts the given bytes.- Parameters:
bytes
- bytes to be encrypted- Returns:
- encrypted bytes
- Throws:
Exception
- when an error occurs
-
decrypt
Decrypts the given bytes.- Parameters:
bytes
- bytes to be decrypted- Returns:
- decrypted bytes
- Throws:
Exception
- when an error occurs
-