- All Known Implementing Classes:
CryptorProviderImpl,CryptorProviderImpl
public interface CryptorProvider
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumA combination of ciphers to use for filename and file content encryption -
Method Summary
Modifier and TypeMethodDescriptionstatic CryptorProviderforScheme(CryptorProvider.Scheme scheme) Finds a CryptorProvider implementation for the given combination of ciphers.provide(Masterkey masterkey, SecureRandom random) Creates a new Cryptor instance for the given keyscheme()
-
Method Details
-
forScheme
Finds a CryptorProvider implementation for the given combination of ciphers.- Parameters:
scheme- A cipher combination- Returns:
- A CryptorProvider implementation supporting the requestes
scheme - Throws:
UnsupportedOperationException- If theschemeis not implemented
-
scheme
CryptorProvider.Scheme scheme()- Returns:
- The combination of ciphers used by this CryptorProvider implementation.
-
provide
Creates a new Cryptor instance for the given key- Parameters:
masterkey- The key used by the returned cryptor during encryption and decryptionrandom- A native (if possible) SecureRandom used to seed internal CSPRNGs- Returns:
- A new cryptor
-