Kryptel API Commons (package com.kryptel)
This package contains a collection of commonly used constants, interfaces, and utility classes.
- Introduction to the Library
- Basic support package (com.kryptel.bslx)
- Kryptel API Commons package (com.kryptel)
- ApiHelpers class
- IComponentCapabilities interface
- IComponentState interface
- IDataSink interface
- IKeyCallback interface
- IKryptelComponent interface
- INotification interface
- IProgressCallback interface
- IReplaceCallback interface
- KeyRecord structure
- Loader class
- Message class
- Progress class
- ProgressCallback class
- 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)
There are four classes defining constants (and only constants).
Contains a set of CAP_* constants, which specify a set of allowed features. The typical usage for these constants is limiting a component functionality to the licensed set. If you don't need to limit functionality, just call the component loader without arguments when creating a component. By default the loader uses the CAP_DEFAULT_CAPABILITIES value, which allows all possible features.
Contains commonly used constants, most notably TYPE_*, which define the type of a given component. All those constants are self-explanatory except TYPE_HIDDEN_COMPONENT, which deserves a few more words.
TYPE_HIDDEN_COMPONENT specifies a component, which a user is not allowed to select. An example is NullCipher, which imitates a cipher but performs no encryption at all. Marking this component as hidden limits its use for debugging purpose only.
Another example is DES cipher. We need to include it for compatibility with old versions, but it should not be selected for creating new files.
Note also that programmatically a hidden component can be created and used without any limitation. TYPE_HIDDEN_COMPONENT just declares that the component is not user-selectable. If user preferences includes some component GUIDs, make sure that they don't refer to hidden components (it would probably be easy for an attacker to edit user preferences data).
See also: IKryptelComponent interface.
This class defines two sets of very important constants: component IDs and interface IDs. Every component in the library is identified by a unique 128-bit UUID structure called component ID. Every interface exported by a component is identified by a unique 128-bit UUID structure called interface ID.
Lists static 128-bit key IDs.
Every binary key has an associated key ID, which uniquely identifies the given key file. In addition to 'dynamic' key file IDs, there are a number of pre-defined static IDs that specify the key material used during encryption. For example, IDENT_PASSWORD means that the data was encrypted with a password.
During decryption the key material ID is compared with all the static IDs. If it does not match any, then this ID belongs to a binary key file.
See also: Key File Format.
Common Component Interfaces
An interface for getting/setting component's compatibility mask
This interface is mandatory for every component and contains functions for querying state, resetting, and cloning.
This is the base component interface, giving access to all the component's interfaces and data.
The standard interface used by components to output processed data.
This interface defines key callback; high-level Kryptel components such as storage handlers obtain key material by calling client-supplied callback.
A client-implemented interface. High-level components use it for displaying short messages.
This callback displays a progress bar(s) for high-level components.
High-level components call this callback when file name conflict occurs. The callback returns the desired action – replace, skip, etc.
Various Helper Classes
This class contains various helper functions used by library components. Those functions are unlikely to be of any interest for a developer of a client application.
Component loader is used to instantiate a component by its CID (Component ID).
This class contains messages used mostly by high-level components.
A helper class for library components. Handles client-supplied IProgressCallback.
This class implements IProgressCallback and helps the user to create a progress box.