IEncryptedFile interface
Contents
- Introduction to the Library
- Basic support package (com.kryptel.bslx)
- Kryptel API Commons package (com.kryptel)
- Cipher package (com.kryptel.cipher)
- Compressor package (com.kryptel.compressor)
- Exceptions package (com.kryptel.exceptions)
- Hash function package (com.kryptel.hash_function)
- MAC function package (com.kryptel.mac)
- Key-related functions (com.kryptel.key)
- Silver Key engine (com.kryptel.silver_key)
- Kryptel encrypted storage (com.kryptel.storage)
- Handlers and Agents
- Names and Unique Names
- Kryptel class
- FileStorageStatistics structure
- StorageStatistics structure
- IEncryptedStorage interface
- IEncryptedStorageInfo interface
- IEncryptedObject interface
- IEncryptedStream interface
- IEncryptedFileStorage interface
- IEncryptedFileStorageInfo interface
- IFileSystemAttributes interface
- IEncryptedDirectory interface
- IEncryptedFile interface
- Example: Password storage
- File encryption examples
Declaration
package com.kryptel.storage; public interface IEncryptedFile extends IFileSystemAttributes { long FileSize() throws Exception; IEncryptedStream Create(byte uComprLevel) throws Exception; IEncryptedStream Open() throws Exception; String[] GetKeywords() throws Exception; void SetKeywords(String[] keywords) throws Exception; }
Description
This interface extends IFileSystemAttributes representing an encrypted file.
Note that this interface is rarely (if ever) used for file encryption or decryption. IEncryptedDirectory contains batch functions, which maintain integral progress bar, correctly process file name collisions, and in general, are better fit for the job.
FileSize
long FileSize() throws Exception;
Returns the size of the file.
Create
IEncryptedStream Create(byte uComprLevel) throws Exception;
Creates the file's data stream and returns its IEncryptedStream. If the file already has a data stream, the old stream is deleted.
- uComprLevel
- Specifies the level of compression from 0 (no compression) to 9 (max compression). See the CT_* named constants in the Constants class.
IEncryptedStream Open() throws Exception;
Opens the file's data stream and returns its IEncryptedStream. This function always returns a valid IEncryptedStream even if the file does not have one (for example, a just created IEncryptedFile has no data stream).
GetKeywords
String[] GetKeywords() throws Exception;
Returns the keywords attached to this file or null if the file has no attached keywords.
SetKeywords
void SetKeywords(String[] keywords) throws Exception;
Attaches keywords to the file.
- keywords
- A set of keywords to attach or null to remove all keywords.