hash_kef_generic.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <k5-int.h>
int
{
int i;
int rv = CRYPTO_FAILED;
"k5_ef_hash() invalid mech specified: 0x%llx",
(long long)context->kef_hash_mt);
return (CRYPTO_FAILED);
}
mech.cm_param_len = 0;
if (rv != CRYPTO_SUCCESS) {
return (rv);
}
for (i = 0; i < icount; i++) {
if (rv != CRYPTO_SUCCESS) {
"crypto_digest_update error: %0x", rv);
return (rv);
}
}
/*
* crypto_digest_final() internally destroys the context. So, we
* do not use the context any more. This means we do not call
* crypto_cancel_ctx() for the failure case here unlike the failure
* case of crypto_digest_update() where we do.
*/
if (rv != CRYPTO_SUCCESS) {
}
return (rv);
}
int
{
int rv;
"k5_ef_mac() invalid mech specified: 0x%llx",
(long long)context->kef_hash_mt);
return (CRYPTO_FAILED);
}
if (rv != CRYPTO_SUCCESS) {
"k5_ef_mac(): crypto_mac error: %0x", rv);
}
return (rv);
}