int fko_set_raw_spa_digest(fko_ctx_t ctx) { /* Must be initialized */ if(!CTX_INITIALIZED(ctx)) return(FKO_ERROR_CTX_NOT_INITIALIZED); /* Must have encoded message data to start with. */ if(ctx->encrypted_msg == NULL) return(FKO_ERROR_MISSING_ENCODED_DATA); return set_digest(ctx->encrypted_msg, &ctx->raw_digest, ctx->raw_digest_type, &ctx->raw_digest_len); }
int fko_set_spa_digest(fko_ctx_t ctx) { #if HAVE_LIBFIU fiu_return_on("fko_set_spa_digest_init", FKO_ERROR_CTX_NOT_INITIALIZED); #endif /* Must be initialized */ if(!CTX_INITIALIZED(ctx)) return(FKO_ERROR_CTX_NOT_INITIALIZED); /* Must have encoded message data to start with. */ if(ctx->encoded_msg == NULL) return(FKO_ERROR_MISSING_ENCODED_DATA); #if HAVE_LIBFIU fiu_return_on("fko_set_spa_digest_encoded", FKO_ERROR_MISSING_ENCODED_DATA); #endif return set_digest(ctx->encoded_msg, &ctx->digest, ctx->digest_type, &ctx->digest_len); }