Blame include/openssl/mdc2.h
|
Packit |
c4476c |
/*
|
|
Packit |
c4476c |
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
|
Packit |
c4476c |
*
|
|
Packit |
c4476c |
* Licensed under the OpenSSL license (the "License"). You may not use
|
|
Packit |
c4476c |
* this file except in compliance with the License. You can obtain a copy
|
|
Packit |
c4476c |
* in the file LICENSE in the source distribution or at
|
|
Packit |
c4476c |
* https://www.openssl.org/source/license.html
|
|
Packit |
c4476c |
*/
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
#ifndef HEADER_MDC2_H
|
|
Packit |
c4476c |
# define HEADER_MDC2_H
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
# include <openssl/opensslconf.h>
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
#ifndef OPENSSL_NO_MDC2
|
|
Packit |
c4476c |
# include <stdlib.h>
|
|
Packit |
c4476c |
# include <openssl/des.h>
|
|
Packit |
c4476c |
# ifdef __cplusplus
|
|
Packit |
c4476c |
extern "C" {
|
|
Packit |
c4476c |
# endif
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
# define MDC2_BLOCK 8
|
|
Packit |
c4476c |
# define MDC2_DIGEST_LENGTH 16
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
typedef struct mdc2_ctx_st {
|
|
Packit |
c4476c |
unsigned int num;
|
|
Packit |
c4476c |
unsigned char data[MDC2_BLOCK];
|
|
Packit |
c4476c |
DES_cblock h, hh;
|
|
Packit |
c4476c |
int pad_type; /* either 1 or 2, default 1 */
|
|
Packit |
c4476c |
} MDC2_CTX;
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
int MDC2_Init(MDC2_CTX *c);
|
|
Packit |
c4476c |
int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len);
|
|
Packit |
c4476c |
int MDC2_Final(unsigned char *md, MDC2_CTX *c);
|
|
Packit |
c4476c |
unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md);
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
# ifdef __cplusplus
|
|
Packit |
c4476c |
}
|
|
Packit |
c4476c |
# endif
|
|
Packit |
c4476c |
# endif
|
|
Packit |
c4476c |
|
|
Packit |
c4476c |
#endif
|