com.aspose.note.revision

Interfaces

Classes

com.aspose.note.revision

Class EncryptionSession

    • Constructor Detail

      • EncryptionSession

        public EncryptionSession(EncryptionConfig config,
                                 CryptoEncryptionData data)

        Initializes a new instance of the EncryptionSession class.

        Parameters:
        config - The config.
        data - The data.
    • Method Detail

      • createInstance

        public static IEncryptionSession createInstance(String password)

        Initializes a new instance of the EncryptionSession class.

        Parameters:
        password - The password.
        Returns:
        The IEncryptionSession.
      • isUnlocked

        public boolean isUnlocked()

        Gets a value indicating whether is unlocked.

        Specified by:
        isUnlocked in interface IEncryptionSession
      • loadFromStream

        public static IEncryptionSession loadFromStream(com.aspose.ms.System.IO.Stream stream)

        The load from stream.

        Parameters:
        stream - The stream.
        Returns:
        The IEncryptionSession.
      • unlockWithPassword

        public boolean unlockWithPassword(String password)

        The unlock with password.

        Specified by:
        unlockWithPassword in interface IEncryptionSession
        Parameters:
        password - The password.
        Returns:
        The bool.
        Throws:
        com.aspose.ms.System.InvalidOperationException - Can't unlock encryption session using specified password.
      • writeToStream

        public void writeToStream(com.aspose.ms.System.IO.Stream stream)

        The write to stream.

        Specified by:
        writeToStream in interface IEncryptionSession
        Parameters:
        stream - The stream.
      • getEncryptedStream

        public com.aspose.ms.System.IO.Stream getEncryptedStream(com.aspose.ms.System.IO.Stream stream)

        The get encrypted stream.

        Specified by:
        getEncryptedStream in interface IEncryptionSession
        Parameters:
        stream - The stream.
        Returns:
        The EncryptedStream.
        Throws:
        com.aspose.ms.System.InvalidOperationException - Encryption session was not unlocked.
      • decrypt

        public com.aspose.ms.System.IO.Stream decrypt(byte[] encryptedBytes)

        Decrypts encrypted data. Real package length should be placed in the beginning of the encrypted package.

        Specified by:
        decrypt in interface IEncryptionSession
      • decrypt

        public com.aspose.ms.System.IO.Stream decrypt(byte[] encryptedBytes,
                                                      int encryptedPackageLength)

        Decrypts encrypted data when encrypted package doesn't contain the real length.

        Specified by:
        decrypt in interface IEncryptionSession
      • decrypt

        public com.aspose.ms.System.IO.Stream decrypt(com.aspose.ms.System.IO.Stream stream)

        The decrypt.

        Specified by:
        decrypt in interface IEncryptionSession
      • getEncryptor

        public com.aspose.ms.System.Security.Cryptography.ICryptoTransform getEncryptor()

        The get encryptor.

        Specified by:
        getEncryptor in interface IEncryptionSession
        Returns:
        The ICryptoTransform.
      • getDecryptor

        public com.aspose.ms.System.Security.Cryptography.ICryptoTransform getDecryptor()

        The get decryptor.

        Specified by:
        getDecryptor in interface IEncryptionSession
        Returns:
        The ICryptoTransform.