KMSAgentCryptoUtilities.cpp revision 4f14b0f29aa144cc03efdde5508ae126ae197acf
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/**
* \file KMSAgentCryptoUtilities.cpp
*/
#include "KMSAgentCryptoUtilities.h"
#include "SYSCommon.h"
#include "KMSAgentStringUtilities.h"
//#include "ApplianceParameters.h"
// Find header in CryptoUtilities.h
bool GetPseudorandomBytes(
int i_iNumBytes,
unsigned char* o_pBytes )
{
{
return false;
}
return true;
}
// assumes o_pHashedBuffer points to HASH_LENGTH bytes
bool HashBuffer(
const unsigned char* i_pBufferToHash,
int i_iBufferToHashSize,
unsigned char* o_pHashedBuffer )
{
unsigned char aDigest[HASH_LENGTH];
{
return false;
}
return true;
}
// assumes o_pHMACBuffer points to HMAC_LENGTH bytes
bool HMACBuffers(
int i_iBufferCount,
const unsigned char** i_pBufferToHMAC,
int* i_pBufferToHMACSize,
const unsigned char* i_pHMACKey,
int i_iHMACKeySize,
unsigned char* o_pHMACBuffer )
{
// assumes o_pHMACBuffer points to HMAC_LENGTH bytes
FATAL_ASSERT( (i_iBufferCount > 0) &&
i_pHMACKey &&
(i_iHMACKeySize > 0) && o_pHMACBuffer );
HMAC_CTX_init( &stContext );
int i;
for ( i = 0; i < i_iBufferCount; i++ )
{
}
unsigned int iHMACSize = HMAC_LENGTH;
return true;
}