Code Examples – Introduction
Introduction: In this section, we provide some code examples demonstrating the usage of different algorithms implemented by the FlexiProvider packages. We assume that you are familiar with Java programming and basic cryptographic techniques, so only the stuff related to the usage of the FlexiProvider will be explained in detail. These explanations should enable you to integrate security methods based on the FlexiProvider into your Java applications.
For reasons of a clearer presentation, the examples do not contain any exception handling. Instead, the main() method of each example is declared to throw an Exception. Please consult the JCA/JCE documentation and the FlexiProvider API documentation for explanations of the thrown exceptions.
The described code examples can either be read online or you can download the code snippets and try them out yourself. The examples are tailored for FlexiProvider version 1.5.1p2 and CoDec version build17-jdk13. They have been tested with Java versions 1.3.1_18, 1.4.2_12, 1.5.0_10, and 1.6.0_03.
All examples use the FlexiCoreProvider. In order to use the elliptic curve examples, you will also need the FlexiECProvider. Please note that these FlexiProvider packages must be on the classpath of your building environment.