bkey.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* 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 "port_before.h"
#include "global.h"
#include "bsafe2.h"
#include "bkey.h"
#include "kinfotyp.h"
#include "kiitem.h"
#include "port_after.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 */
}