Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

HP OpenVMS Systems Documentation

Content starts here
HP Open Source Security for OpenVMS Volume 1: Common Data Security Architecture > CDSA API Functions

QueryKeySizeInBits

 » Table of Contents

 » Glossary

 » Index

NAME

CSSM_QueryKeySizeInBits, CSP_QueryKeySizeInBits — Get CSP logical and effective sizes (CDSA)

SYNOPSIS

# include <cssm.h>
API:
CSSM_RETURN CSSMAPI CSSM_QueryKeySizeInBits
(CSSM_CSP_HANDLE CSPHandle,
CSSM_CC_HANDLE CCHandle,
const CSSM_KEY *Key,
CSSM_KEY_SIZE_PTR KeySize)
SPI:
CSSM_RETURN CSSMCSPI CSP_QueryKeySizeInBits
(CSSM_CSP_HANDLE CSPHandle,
CSSM_CC_HANDLE CCHandle,
const CSSM_CONTEXT *Context,
const CSSM_KEY *Key,
CSSM_KEY_SIZE_PTR KeySize)

LIBRARY

Common Security Services Manager library (cdsa$incssm300_shr.exe)

API PARAMETERS

CSPHandle (input/optional)
  

The handle that describes the Cryptographic Service Provider module used to perform this function.

For the API, this parameter is ignored if a valid cryptographic context handle is specified.

CCHandle (input/optional)
  

A handle to a context that describes a cryptographic operation. The cryptographic context should contain a handle to the CSP that is being queried and the key about which key-size information is being requested.

Key (input/optional)
  

A pointer to a CSSM_KEY structure containing the key about which key-size information is being requested. This parameter is ignored if a valid cryptographic context handle is specified.

KeySize (output) 

Pointer to a CSSM_KEY_SIZE data structure. The logical and effective sizes (in bits) for the key are returned in this structure.

For the API, if no context handle is provided, only the CSSM_KEY_SIZE LogicalKeySizeInBits field is set.

SPI PARAMETERS

Context (input) 

Pointer to CSSM_CONTEXT structure that describes the attributes with this context.

DESCRIPTION

This function queries a Cryptographic Service Provider (CSP) for the logical and effective sizes of a specified key.

The Cryptographic Service Provider (handle) and the key can be specified either in the cryptographic context or as parameters to the function call. If a valid cryptographic context handle parameter is specified, the CSP handle and key parameters are ignored.

RETURN VALUE

A CSSM_RETURN value indicating success or specifying a particular error condition. The value CSSM_OK indicates success. All other values represent an error condition.

ERRORS

Errors are described in the CDSA Technical Standard.

CSSMERR_CSP_QUERY_SIZE_UNKNOWN

SEE ALSO

Books

Intel CDSA Application Developer's Guide

Online Help

Functions for the CSSM API:

CSSM_GenerateRandom, CSSM_GenerateKeyPair, CSSM_GenerateKey

Functions for the CSP SPI:

CSP_GenerateRandom, CSP_GenerateKeyPair, CSP_GenerateKey

 

** About PDF files: The PDF files on this Web site can be read online or printed using Adobe® Acrobat® Reader. If you do not have this software installed on your system, you may download it from the Adobe Web site.
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.