Class Encryptor

    • Constructor Detail

      • Encryptor

        public Encryptor()
    • Method Detail

      • getDataStream

        public abstract java.io.OutputStream getDataStream​(DirectoryNode dir)
                                                    throws java.io.IOException,
                                                           java.security.GeneralSecurityException
        Return a output stream for encrypted data.
        Parameters:
        dir - the node to write to
        Returns:
        encrypted stream
        Throws:
        java.io.IOException
        java.security.GeneralSecurityException
      • confirmPassword

        public abstract void confirmPassword​(java.lang.String password,
                                             byte[] keySpec,
                                             byte[] keySalt,
                                             byte[] verifier,
                                             byte[] verifierSalt,
                                             byte[] integritySalt)
      • confirmPassword

        public abstract void confirmPassword​(java.lang.String password)
      • getDataStream

        public java.io.OutputStream getDataStream​(POIFSFileSystem fs)
                                           throws java.io.IOException,
                                                  java.security.GeneralSecurityException
        Throws:
        java.io.IOException
        java.security.GeneralSecurityException
      • getDataStream

        public ChunkedCipherOutputStream getDataStream​(java.io.OutputStream stream,
                                                       int initialOffset)
                                                throws java.io.IOException,
                                                       java.security.GeneralSecurityException
        Throws:
        java.io.IOException
        java.security.GeneralSecurityException
      • getSecretKey

        public javax.crypto.SecretKey getSecretKey()
      • setSecretKey

        public void setSecretKey​(javax.crypto.SecretKey secretKey)
      • setEncryptionInfo

        public void setEncryptionInfo​(EncryptionInfo encryptionInfo)
      • setChunkSize

        public void setChunkSize​(int chunkSize)
        Sets the chunk size of the data stream. Needs to be set before the data stream is requested. When not set, the implementation uses method specific default values
        Parameters:
        chunkSize - the chunk size, i.e. the block size with the same encryption key
      • clone

        public Encryptor clone()
                        throws java.lang.CloneNotSupportedException
        Throws:
        java.lang.CloneNotSupportedException