bkey.c revision 65c4736d9c0ebc6d9b1d991593b55566909da9cd
/* Copyright (C) RSA Data Security, Inc. created 1993, 1996. This is an
unpublished work protected as such under copyright law. This work
contains proprietary, confidential, and trade secret information of
RSA Data Security, Inc. Use, disclosure or reproduction without the
express written authorization of RSA Data Security, Inc. is
prohibited.
*/
#include "global.h"
#include "bsafe2.h"
#include "bkey.h"
#include "kinfotyp.h"
#include "kiitem.h"
{
return (BE_KEY_OBJ);
return (BE_KEY_ALREADY_SET);
/* This will cache the encoding. */
}
{
int status;
return (BE_KEY_OBJ);
return (BE_KEY_NOT_SET);
/* First check if the encoding is already in the encoding cache.
*/
return (0);
/* Info is not in the cache, go ahead and encode.
*/
return (status);
}
/* Create an ITEM out of the data and len and cache it as KITItem.
The data is already alloced in the info cache.
Returns 0, BE_ALLOC.
*/
unsigned char *data;
unsigned int len;
{
int status;
if ((status = B_MemoryPoolAlloc
!= 0)
return (status);
return (B_InfoCacheAddInfo
}
/* Return the number of bits in the canonical, positive integer.
B_IntegerBits (0) = 0.
*/
unsigned char *integer;
unsigned int integerLen;
{
if (bytes == integerLen)
return (0);
/* Get byte to test and increment byte count for final calculation */
/* Get number of bits in most significant byte */
}