Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Related Pages
Here is a list of all related documentation pages:
oSKC Directory Structure
oBuilding The Examples
oBuilding Your Application With SKC
oLoading Components
oDeploying SKC
oSKC Redistributibles
oSKC Toolkit Examples
oSKC References
ocfilestream.h
ocfilestream.cpp
occonsolestream.h
occonsolestream.cpp
oRelease Notes
oKMIP Reference Guide
oKMIP Examples
oKMIP Example 1 - Basic Code StructureThis example shows the basic code structure used to access KMIP operations in the SDK
oex-kmip-1.cpp
oKMIP Example 2 - Asynchronous KMIP operationThis example shows how to use the SDK to perform an asynchronous KMIP operation (specifically an asynchronous locate operation)
oex-kmip-2.cpp
oKMIP Example 3 - Key WrappingThis example shows how to request a key off of the KMIP server wrapped (i.e., encrypted) by another key
oex-kmip-3.cpp
oKMIP Example 4 - Register a symmetric keyThis example shows how to create a symmetric key along with setting its cipher algorithm meta data so that the KMIP server can save it with the key material
oex-kmip-4.cpp
oKMIP Example 5 - Clean all managed objects off of KMIP serverDuring testing or even in production a key or other managed object (e.g., certificate) may be left in the KMIP server by accident
oex-kmip-5.cpp
oKMIP Example 6 - Notify and Put SupportThis example demonstrates how to use the p6IKMIPServer component to receive and process asynchronous, incoming Notify and Put requests from the KMIP server
oex-kmip-6.cpp
oKMIP Example 7 - Create and register asymmetric keysThis example demonstrates how to create and save a public / private key pair on a KMIP server
oex-kmip-7.cpp
oKMIP Example 8 - KMIP server creates asymmetric keysThis example demonstrates how to ask the KMIP server to generate a public / private key pair
oex-kmip-8.cpp
oKMIP Example 9 - KMIP server creates certificate for key pairThis example demonstrates how to ask the KMIP server to generate a certificate for a key pair
oex-kmip-9.cpp
oKMIP Example 10 - Adding multiple attributes to a managed objectThis example demonstrates how multiple attributes can be added / modified to a key managed object with one SDK call
oex-kmip-10.cpp
oKMIP Example 11 - Attributes and EnumeratorsThis example demonstrates how to get the attributes of a registered certificate (or key) via the SDK's enumerator mechanism
oex-kmip-11.cpp
oKMIP Example 12 - Query Server and EnumeratorsThis example demonstrates how to query a KMIP server to get what it supports and to process the returned information via the SDK's enumerator mechanism
oex-kmip-12.cpp
oKMIP Example 13 - Low Level SDK APIsThis example demonstrates how to use the lower level APIs of the SDK
oex-kmip-13.cpp
oKMIP Example 14 - Key Management with Low Level SDK APIsThis example demonstrates how to use the lower level APIs of the SDK to create, modify, locate and get keys
oex-kmip-14.cpp
oKMIP Example 15 - A C Language version of example 1This example demonstrates how to use the C programming language to access the P6R KMIP SDK API
oex-kmip-15.c
oKMIP Example 16 - Generate a KMIP keystoreThis example demonstrates how to properly create and initialize a keystore with KMIP server credentials
oex-kmip-16.c
oKMIP Example 17 - Create a key if not found on KMIP serverThis example demonstrates a specific use case: search of a key on a KMIP server with a specific 'Name' attribute
oex-kmip-17.c
oKMIP Example 18 - Rekey an existing key with a Name attributeThis example demonstrates how an application with an existing key can replace it by using the RE-Key KMIP operation
oex-kmip-18.c
oKMIP Example 19 - Locate and Get a Symmetric KeyThis example is similar to example 1 with a few additions
oex-kmip-19.c
oKMIP Example 20 - Multiple Create Key Operations in a single KMIP RequestThis example demonstrates how an application can perform multiple KMIP Create symmetric key operations in a single request to a KMIP server
oex-kmip-20.c
oKMIP Example 21 - ReKey Operation Creating a Chain of Replaced KeysThis example demonstrates how an application can perform multiple KMIP Re-Key operations in a row creating a chain of replaced keys
oex-kmip-21.cpp
oKMIP Example 22 - Retriving Extension AttributesThis example demonstrates how an application can retrieve an extension (i.e., custom) attribute's name and value (e.g., x-ID attribute name)
oex-kmip-22.cpp
oKMIP Example 23 - Register a key with no key materialThis example demonstrates how an application can register (i.e., save) a key object that does not contain any key material to a KMIP server
oex-kmip-23.cpp
oHPE Atalla NSP PKCS 11 Reference Guide
oPKCS 11 Examples
oPKCS 11 Example 1: Initialize a tokenThis example demonstrate how to initialize a token for the first time for the Security Officer (SO) account and the normal user's account
oex-pkcs11-1.c
oPKCS 11 Example 2: Store a key onto a tokenThis example demonstrate how to store a key that was created by a client into a token, and then modify/add attributes to it
oex-pkcs11-2.c
oPKCS 11 Example 3: Search for a key on a tokenThis example demonstrate how to search for one or more keys in a token, read attributes from a found key, and deletes some of the found keys
oex-pkcs11-3.c
oPKCS 11 Example 4: Generate a key on a tokenThis example demonstrate how to have a token generate a key using a PKCS 11 mechanism
oex-pkcs11-4.c
oPKCS 11 Example 5: Perform Encryption / DecryptionThis example demonstrate how to perform encryption / decryption with a key stored on a token
oex-pkcs11-5.c
oPKCS 11 Example 6: Utimaco HSM Integration, Initialize a TokenThis example demonstrates how to use a Utimaco HSM extension to initialize a token from the PKCS#11 API
oex-pkcs11-6.c
oPKCS 11 Example 7: Utimaco HSM Integration, Perform Encryption / DecryptionThis example demonstrates how to use a Utimaco HSM as a token to generate a key and use that key to perform encryption
oex-pkcs11-7.c
oPKCS 11 Example 8: HSM Integration, list all slots on HSM tokenP6R's PKCS 11 library maps one HSM slot to a P6R slot
oex-pkcs11-8.c
oPKCS 11 Example 9: Thales nShield Connect HSM IntegrationDemonstrate how to use the Thales nShield Connect HSM vendor extensions: C_LoginBegin, C_LoginNext, and C_LoginEnd via P6R's PKCS 11 library
oex-pkcs11-9.c
oPKCS 11 Example 10: FutureX HSM IntegrationDemonstrate how to use the FutureX PKCS 11 vendor extensions: C_FX_HexEncode, C_FX_HexDecode, C_FX_MemFree, C_FX_GetErrorString, C_FX_GetMechanismString, C_FX_GenericCreateMutex, C_FX_GenericLockMutex, C_FX_GenericUnlockMutex, C_FX_GenericDestroyMutex, C_FX_SleepMS
oex-pkcs11-10.c
oPKCS 11 Example 11: Java Security Provider -- Public/Private keysDemonstrate how to use P6R's PKCS 11 library as a Java Security Provider
oKeyGenExample.java
oPKCS 11 Example 12: Java Security Provider -- Symmetric KeysDemonstrate how to use P6R's PKCS 11 library as a Java Security Provider
oSymmetricKeyExample.java
oPKCS 11 Example 13: Java Security Provider -- Streaming EncryptionDemonstrate how to use P6R's PKCS 11 library as a Java Security Provider
oStreamingKeyExample.java
oPKCS 11 Example 14: Wrap a KeyThis example demonstrate how to wrap a data key created on an HSM with a Key Encrypting Key (KEK) created on the same HSM
oex-pkcs11-14.c
op6Loader ExamplesP6loader is used to load P6R's component libraries
oBasic example of loading a component libraryThis is a simple example of loading and using a P6R component library
op6api.cpp
oJSN Reference
oJSON Parser Examples
oJSON Example 1 - Verifying JSON DataIn this example, the JSON parser is used to parse and verify a a JSON documents structure and data
oex-json-1.cpp
occontenthandler.h
occontenthandler.cpp
oJSON Example 2 - How to detect errorsThis example shows how to detect errors as a JSON document is being parsed
oex-json-2.cpp
occontenthandler.h
occontenthandler.cpp
ocerrorhandler.h
ocerrorhandler.cpp
oJSON Example 3 - The Bare MinimumProvides an extremely simple example of a content handler which you can use as a starting point for your own handler
oex-json3.cpp
occontenthandler.cpp
occontenthandler.h
oSAX2 Reference
oSAX2 Examples
oSAX2 Example 1 - Set features and content handlersThis example is meant as a simple place to start using the SAX2 parser
oex-sax2-1.cpp
occontenthandler.cpp
occontenthandler.h
ocerrorhandler.cpp
ocerrorhandler.h
oSAX2 Example 2 - Streaming InterfaceBoth the XML SAX2 and JSON SAX2-like parsers are streaming (i.e., the XML or JSON to parse can be given in small chunks until the entire document is provided)
oex-sax2-2.cpp
occontenthandler.cpp
occontenthandler.h
oXPath 2.0 and DOM Tree Reference
oDOM & XPath 2.0 Examples
oDOM/Xpath Example 1 - DOM & XPath 2.0We use XPath 2.0 to access the DOM tree after XML, JSON, or JsonML is parsed into an instance of a DOM
oex-dom-1.cpp
oDOM/Xpath Example 2 - Manual Generation of XML, JSON and JsonMLOur DOM object supports the manual generation of both XML, JSON, or JsonML
oex-dom-2.cpp
oDOM/Xpath Example 3 - Advanced Sorting Fetaures of p6IDOMNodesetThis example demonstrates the advanced sorting feature of the p6IDOMNodeset component
oex-dom-3.cpp
oDOM/Xpath Example 4 - Namespaces & XPath 2.0This example demonstrates how XML namespaces can be used in XPath expressions
oex-dom-4.cpp
onamespaces.h
onamespaces.cpp
oDOM/Xpath Example 5 - JsonML with DOM and XPath 2.0
oex-dom-5.cpp
oXSLT 2.0 Implementation
oXSLT Examples
oXSLT Example 1 - The bare minimumThis example shows what it takes to run a basic template
oex-xslt1.cpp
ofilestream.h
ofilestream.cpp
oXSLT Example 2 - Using JSONHere is an example of both using JSON as the XSLT source document and outputing the template result tree as JSON
oex-xslt2.cpp
ofilestream.h
ofilestream.cpp
oXSLT Example 3 - Exending Functionality with XPath 2.0Demonstrate how XPATH is extended by the use of an application written component
oex-xslt3.cpp
ofilestream.h
ofilestream.cpp
ocxpathextend.h
ocxpathextend.cpp
oembeddedxml.xsl
oXSLT Example 4 - Character MapsDemonstrate how character maps work in XSLT 2.0
oex-xslt4.cpp
ofilestream.h
ofilestream.cpp
oRGX Reference Guide
oExample 1 - Split & ExplodeP6R provides both wide and narrow string regex support
oExample 2 - Three ways to do replaceShow three different functions to perform text replacement including "replaceWithCallback" which is a unique P6R feature
oExample 3 - Narrow Examples Including Split and Explode
oExample 4 - Wide Examples
oExample 5 - EGREP Style RegexSimple examples of using an EGREP style regular expression
oExample 6 - Look-Ahead and Look-Behind
oCConsoleStream
oExample 7 - Multiple Matches
oNetworking APIs
oSecure Socket Networking
oAsynchronous UDP I/O Engine
oDatabase connector object
oSKC UEFI Platform Reference Guide
oPKCS 11 Command Line Tool Reference Guide
oKMIP Command Line Tool Reference Guide
oKMIP Command Line Tool Reference Guide
oJava Native Interface (JNI) KMIP Reference Guide
oJava Native Interface (JNI) KMIP Examples
oJNI KMIP Example 1 - Basic Client OperationThis example demonstrates a basic sequence of KMIP operations all in one test
oJniBasicKmip.java
oJNI KMIP Example 2 - Locate a KMIP KeyThis example demonstrates how a Java program can locate a key by searching for keys with specific attribute values
oJniLocateKmip.java
oJNI KMIP Example 3 - Activate a KMIP KeyThis example demonstrates how a Java program can activate an existing key on a KMIP server
oJniActivateKmip.java
oJNI KMIP Example 4 - Re-key a KMIP KeyThis example demonstrates how a Java program can re-key a symmetric key and an asymmetric key pair
oJniRekeyKmip.java
oJNI KMIP Example 5 - KMIP AttributesThis example demonstrates how a Java program can add / modify / delete attributes on an existing KMIP object (e.g., a symmetric key)
oJniAttributesKmip.java
oJNI KMIP Example 6 - Register a KeyThis example demonstrates how a Java program can save a java generated key onto a KMIP server
oJniRegisterKmip.java
oJNI KMIP Example 7 - KMIP Structure AttributesThis example demonstrates how a Java program can add / modify / delete KMIP attributes that require a strcuture to represent (i.e., the attribute has multiple parts)
oJniStructAttributesKmip.java
oJNI KMIP Example 8 - Register a CertificateThis example demonstrates how a Java program can save a java generated X509 Certificate onto a KMIP server
oJniCertificatesKmip.java
oJNI KMIP Example 9 - Register Secret / Opaque ObjectsThis example demonstrates how a Java program can save KMIP Secret Data and Opaque Data object onto a KMIP server
oJniObjectsKmip.java
oJNI KMIP Example 10 - Random Data from KMIPThis example demonstrates how a Java program can obtain random data from a KMIP server's random number generator
oJniRandomDataKmip.java
oJNI KMIP Example 11 - Basic Cryptographic OperationsThis example demonstrates how a Java program can perform encryption / decryption and sign / signatureVerify operations on a KMIP server
oJniCryptoKmip.java
oJNI KMIP Example 12 - Wrapping KMIP KeysThis example demonstrates how a Java program can get an existing key off of a KMIP server wrapped (i.e., encrypted) in another key (i.e., a Key Encrypting Key [KEK])
oJniWrappingKmip.java
oJNI KMIP Example 13 - Streaming Cryptographic OperationsThis example demonstrates how a Java program can perform encryption / decryption operation on a KMIP server by passing the data to be encrypted in chunks rather than all at once
oJniStreamingKmip.java
oJNI KMIP Example 14 - Streaming 2 Cryptographic OperationsThis example demonstrates how a Java program uses streaming encryption / decryption KMIP operations
oJniStreaming2Kmip.java
oJNI KMIP Example 15 - Alternate Configuration KMIPThis example demonstrates how a Java program can use more than one p6kmiptool.conf file to support different groups of KMIP servers
oJniAlternateConfigKmip.java
oJNI KMIP Example 16 - KMIP Multi-Instance AttributesDoes your KMIP server under test properly implement the 'Name' attribute's support of multi-instance values
oJniMultiInstanceKmip.java
oJNI KMIP Example 17 - KMIP Derive KeyThis example demonstrates how a Java program can derive a key from from either a symmetric or asymmetric key using several different derivation methods
oJniDeriveKmip.java
oJNI KMIP Example 18 - KMIP PKCS#12 SupportThis example demonstrates how a Java program can export a private key and its associated certificate in PKCS#12 format from a KMIP server
oJniPKCS12Kmip.java
oJNI KMIP Example 19 - KMIP OAEP SupportThis example demonstrates how a Java program can use RSA OAEP encryption with a KMIP server
oJniOAEPKmip.java
oJNI KMIP Example 20 - KMIP Signing with Digested DataThis example demonstrates how a Java program can generate digital signatures with the use of digested data
oJniSignKmip.java
oJNI KMIP Example 21 - KMIP Streaming SigningThis example demonstrates how a Java program can generate and verify digital signatures with streaming data over several API calls: signInit(), signUpdate(), signFinal(), signatureVerifyInit(), signatureVerifyUpdate(), and signatureVerifyFinal()
oJniStreaming3Kmip.java
oJNI KMIP Example 22 - KMIP GCM SupportThis example demonstrates how a Java program can perform GCM encryption and decryption with streaming data
oJniStreamingGCMKmip.java
oJNI KMIP Example 23 - KMIP Elliptic Curve SupportThis example demonstrates how a Java program can have the KMIP server create EC keys
oJniECKeyKmip.java
oJNI KMIP Example 24 - KMIP OAEP SupportThis example demonstrates how a Java program can use RSA OAEP encryption with a KMIP server when the RSA keys are created on the server
oJniOAEP2Kmip.java
oJNI KMIP Example 25 - KMIP PKCS#11 Inspired AttributesThis example demonstrates how a Java program can use set and get PKCS#11 inspired mandatory attributes: Sensitive, Extractable, Always Sensitive, Never Extractable
oJniBoolAttributesKmip.java
oThe P6R Component Object Model
oWhat is [p6]COM
oP6COM Helpers
\P6 Error CodesP6R::P6ERR's are 32 bit unsigned values separated into "status", "facility" and "code",