Blame usr/lib/cca_stdll/defs.h

Packit 8681c6
/*
Packit 8681c6
 * COPYRIGHT (c) International Business Machines Corp. 2001-2017
Packit 8681c6
 *
Packit 8681c6
 * This program is provided under the terms of the Common Public License,
Packit 8681c6
 * version 1.0 (CPL-1.0). Any use, reproduction or distribution for this
Packit 8681c6
 * software constitutes recipient's acceptance of CPL-1.0 terms which can be
Packit 8681c6
 * found in the file LICENSE file or at
Packit 8681c6
 * https://opensource.org/licenses/cpl1.0.php
Packit 8681c6
 */
Packit 8681c6
Packit 8681c6
/* File:  defs.h
Packit 8681c6
 *
Packit 8681c6
 * Contains various definitions needed by both the host-side
Packit 8681c6
 * and coprocessor-side code.
Packit 8681c6
 */
Packit 8681c6
Packit 8681c6
#ifndef _CCA_DEFS_H
Packit 8681c6
#define _CCA_DEFS_H
Packit 8681c6
Packit 8681c6
#include "../common/defs.h"
Packit 8681c6
Packit 8681c6
#undef MAX_PIN_LEN
Packit 8681c6
#undef MIN_PIN_LEN
Packit 8681c6
#define MAX_PIN_LEN 128
Packit 8681c6
#define MIN_PIN_LEN   4
Packit 8681c6
Packit 8681c6
#define CCA_CHAIN_VECTOR_LEN     128
Packit 8681c6
#define CCA_HASH_PART_FIRST        0
Packit 8681c6
#define CCA_HASH_PART_MIDDLE       1
Packit 8681c6
#define CCA_HASH_PART_LAST         2
Packit 8681c6
#define CCA_HASH_PART_ONLY         3
Packit 8681c6
Packit 8681c6
struct cca_sha_ctx {
Packit 8681c6
    unsigned char chain_vector[CCA_CHAIN_VECTOR_LEN];
Packit 8681c6
    long chain_vector_len;
Packit 8681c6
    unsigned char tail[MAX_SHA_BLOCK_SIZE];
Packit 8681c6
    long tail_len;
Packit 8681c6
    unsigned char hash[MAX_SHA_HASH_SIZE];
Packit 8681c6
    long hash_len;
Packit 8681c6
    int part;
Packit 8681c6
};
Packit 8681c6
Packit 8681c6
#endif