LINEBURG


<< . .

 7
( 9)



. . >>


OCI Functions for C 6-21
OCISecuritySetBlock



6.19 OCISecuritySetBlock
Purpose
OCISecuritySetBlock sets a buffer block to a known state.

Parameter Descriptions
Following is a list of parameters, their descriptions, modes, and types.

Table 6“26 OCISecuritySetBlock parameters
Parameter Name Description Mode Type
OCISecurity osshandle
OCIError error_handle
¬‚ags_to_set Flags to set {IN} uword
buffer_length Length of buffer {IN} size_t
used_buffer_length Used length of buffer {IN} size_t
buffer_block Buffer {IN} ub1


Comments
This function allocates memory and stores a pointer in the buffer block.




6-22 Oracle Cryptographic Toolkit Programmer™s Guide
7
PL/SQL Functions

This chapter describes the PL/SQL interface to the Oracle Cryptographic Toolkit.
The PL/SQL procedures and functions are grouped into the following ¬ve func-
tional categories:
Section 7.1, “General Purpose Procedures”
Section 7.2, “Digital Signature”
Section 7.3, “Hash”
Section 7.4, “Random Number Generation”
Each PL/SQL function description contains the following information:

Table 7“1 PL/SQL Procedure and Function Descriptions
Purpose Describes what the procedure or function does
Parameter Descriptions Lists each parameter name along with its mode and type




PL/SQL Functions 7-1
General Purpose Procedures



7.1 General Purpose Procedures
The following functions and procedures are available to applications. They are con-
tained within the DBMS_CRYPTO_TOOLKIT package. Consult the ¬le
DBMS_OCTK.SQL for a full listing of functions and procedures.

Initialize
Initialize starts the Oracle Cryptographic Toolkit operation. No additional parame-
ters are required.

Terminate
Terminate ends the Oracle Cryptographic Toolkit operation. No additional parame-
ters are required.

OpenWallet
OpenWallet opens a wallet based on a given wallet resource locator (WRL). There
are two versions of this procedure: one enables an application to use its own data
structure for the wallet, and the other lets the application use the wallet data struc-
ture that comes with the Oracle Cryptographic Toolkit.

Table 7“2 PROCEDURE OpenWallet
Parameter Name Mode Type
password IN VARCHAR2
wallet IN OUT Wallet
persona_list OUT Persona_List
wallet_resource_locator IN VARCHAR2




7-2 Oracle Cryptographic Toolkit Programmer™s Guide
General Purpose Procedures



7.1.1 Procedures Used by Applications That Use the Wallet
The following functions and procedures are used by applications which want to
use the wallet kept by the Oracle Cryptographic Toolkit.

OpenWallet
OpenWallet opens a wallet based on a given wallet resource locator (optional).
There are two versions of this procedure. This version opens the wallet that is kept
internally by the package.

Table 7“3 PROCEDURE OpenWallet
Parameter Name Mode Type
password IN VARCHAR2
persona_list OUT Persona_List
wallet_resource_locator IN VARCHAR2


CloseWallet
CloseWallet closes a wallet. This version uses the wallet that is kept internally by
the package. No parameters are needed for the function.

Table 7“4 PROCEDURE CloseWallet
Parameter Name Mode Type



DestroyWallet
DestroyWallet deletes a wallet bases on a given wallet resource locator. The wallet
resource locator is optional.

Table 7“5 PROCEDURE DestroyWallet
Parameter Name Mode Type
password IN VARCHAR2
wallet_resource_locator IN VARCHAR2




PL/SQL Functions 7-3
General Purpose Procedures



StorePersona
StorePersona stores a given persona in the speci¬ed wallet.

Table 7“6 PROCEDURE StorePersona
Parameter Name Mode Type
persona IN Persona


OpenPersona
OpenPersona opens a persona within a wallet.

Table 7“7 PROCEDURE OpenPersona
Parameter Name Mode Type
persona IN Persona


ClosePersona
ClosePersona closes a persona within a wallet.

Table 7“8 PROCEDURE ClosePersona
Parameter Name Mode Type
persona IN Persona


RemovePersona
RemovePersona removes a persona from a wallet.

Table 7“9 PROCEDURE RemovePersona
Parameter Name Mode Type
persona IN Persona


CreatePersona
CreatePersona creates a persona.

Table 7“10 PROCEDURE CreatePersona
Parameter Name Mode Type
cipher_type IN Cipher
private_information IN OUT Private_Persona_Information




7-4 Oracle Cryptographic Toolkit Programmer™s Guide
General Purpose Procedures



Table 7“10 PROCEDURE CreatePersona
Parameter Name Mode Type
prl IN OUT VARCHAR2
alias IN VARCHAR2
longer_description IN VARCHAR2
persona OUT Persona

RemoveIdentity
RemoveIdentity destroys an identity.

Table 7“11 PROCEDURE RemoveIdentity
Parameter Name Mode Type
identity OUT Identity


CreateIdentity
CreateIdentity creates an identity.

Table 7“12 CreateIdentity
Parameter Name Mode Type
identitytype IN Identity_Type
public_identity IN VARCHAR2
alias IN VARCHAR2
longer_description IN VARCHAR2
trust_quali¬er IN VARCHAR2
identity OUT Identity


AbortIdentity
AbortIdentity aborts an identity.

Table 7“13 AbortIdentity
Parameter Name Mode Type
identity IN OUT Identity
persona IN




PL/SQL Functions 7-5
General Purpose Procedures



StoreTrustedIdentity
StoreTrustedIdentity stores an identity as a trustpoint within a wallet.

Table 7“14 StoreTrustedIdentity
Parameter Name Mode Type
identity IN OUT Identity


Validate
Validate uses the trusted identities associated with a persona to validate an identity.

Table 7“15 Validate
Parameter Name Mode Type
persona IN Persona
identity IN Identity
validated OUT BOOLEAN




7-6 Oracle Cryptographic Toolkit Programmer™s Guide
Digital Signature




7.2 Digital Signature
Use the following routines to create and verify digital signatures. There are two ver-
sions of each routine: one for raw data and another for strings. The routines are as
follows:
Section 7.2.1, “Sign”
Section 7.2.2, “Verify”
Section 7.2.3, “SignDetached”
Section 7.2.4, “VerifyDetached”




PL/SQL Functions 7-7
Digital Signature



7.2.1 Sign

Purpose
The Sign routine creates an attached signature.

Parameter Descriptions
Following is a list of parameters, their descriptions, modes, and types.

Table 7“16 Sign parameters for raw data
Parameter Name Mode Type
persona IN Persona
input IN RAW
signature OUT RAW
signature_state IN Crypto_Engine_State

Table 7“17 Sign parameters for string data
Parameter Name Mode Type
persona IN Persona
input_string IN VARCHAR2
signature OUT RAW
signature_state IN Crypto_Engine_State




7-8 Oracle Cryptographic Toolkit Programmer™s Guide
Digital Signature



7.2.2 Verify

Purpose
The Verify routine veri¬es an attached signature.

Parameter Descriptions
Following is a list of parameters, their descriptions, modes, and types.

Table 7“18 Verify parameters for raw data
Parameter Name Mode Type
persona IN Persona
signature IN RAW
extracted_message OUT RAW
veri¬ed OUT BOOLEAN
validated OUT BOOLEAN
signing_party_identity OUT Identity
signature_state IN Crypto_Engine_State

Table 7“19 Verify parameters for string data
Parameter Name Mode Type
persona IN Persona
signature IN RAW
extracted_message_string OUT VARCHAR2
veri¬ed OUT BOOLEAN
validated OUT BOOLEAN
signing_party_identity OUT Identity
signature_state IN Crypto_Engine_State




PL/SQL Functions 7-9
Digital Signature



7.2.3 SignDetached

Purpose
The SignDetached routine generates a detached signature.

Parameter Descriptions
Following is a list of parameters, their descriptions, modes, and types.

Table 7“20 SignDetached parameters for raw data
Parameter Name Mode Type
persona IN Persona
input IN RAW
signature OUT RAW
signature_state IN Crypto_Engine_State

Table 7“21 SignDetached parameters for string data
Parameter Name Mode Type
persona IN Persona
input_string IN VARCHAR2
signature OUT RAW
signature_state IN Crypto_Engine_State




7-10 Oracle Cryptographic Toolkit Programmer™s Guide
Digital Signature



7.2.4 VerifyDetached

Purpose
The VerifyDetached routine veri¬es a detached signature.

Parameter Descriptions
Following is a list of parameters, their descriptions, modes, and types.

Table 7“22 VerifyDetached parameters for raw data
Parameter Name Mode Type
persona IN Persona
data IN RAW
signature IN RAW
veri¬ed OUT BOOLEAN
validated OUT BOOLEAN
signing_party_identity OUT Identity
signature_state IN Crypto_Engine_State

Table 7“23 VerifyDetached parameters for string data
Parameter Name Mode Type
persona IN Persona
data_string IN VARCHAR2
signature IN RAW
veri¬ed OUT BOOLEAN
validated OUT BOOLEAN
signing_party_identity OUT Identity
signature_state IN Crypto_Engine_State




PL/SQL Functions 7-11
Hash



7.3 Hash
Use the following routines to generate checksums. There are two versions of each
routine: one for raw data and another for strings. The routines are as follows:

<< . .

 7
( 9)



. . >>

Copyright Design by: Sunlight webdesign