File Object Names
- 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)
- 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
Names and Unique Names
If you looked into IEncryptedDirectory interface, you might have noticed that some functions require item's name as an argument, and some use item's unique name. So what are they and how do they differ?
Kryptel 7 introduced a new storage format that allows undeleting previously deleted items. The only thing that distinguishes a deleted item from a normal one is the EFL_OBJECT_DELETED flag set. That immediately led to a problem with file system items – if a file gets replaced, we have two (or more) different files with the same name.
As a solution, Kryptel 7 file agents added a new item property called unique name. If the item is not deleted, that name is the same as the regular item's name. When the items gets deleted, the agent generates a new name, which is guaranteed to be unique. Functions that can work with deleted items, use unique names.
Some functions require specifying unique path. It is simply a path consisting of unique names so that it can address an object inside a deleted directory tree.
IFileSystemAttributes interface has two functions – GetName and GetUniqueName returning the item names.
The last thing worth mentioning is what happens if we try to undelete a file and there exist a file with the same name, which is not deleted. This collision is solved by adding a version number to the name of the file being undeleted.