Interface CryptorProvider


  • public interface CryptorProvider
    • 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 the scheme is 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 decryption
        random - A native (if possible) SecureRandom used to seed internal CSPRNGs
        Returns:
        A new cryptor