-
- All Known Implementing Classes:
CryptorProviderImpl,CryptorProviderImpl
public interface CryptorProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCryptorProvider.SchemeA combination of ciphers to use for filename and file content encryption
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static CryptorProviderforScheme(CryptorProvider.Scheme scheme)Finds a CryptorProvider implementation for the given combination of ciphers.Cryptorprovide(Masterkey masterkey, SecureRandom random)Creates a new Cryptor instance for the given keyCryptorProvider.Schemescheme()
-
-
-
Method Detail
-
forScheme
static CryptorProvider forScheme(CryptorProvider.Scheme scheme)
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
Cryptor provide(Masterkey masterkey, SecureRandom random)
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
-
-