PolarSSL v1.3.9
Data Structures | Macros | Functions
ripemd160.h File Reference

RIPE MD-160 message digest. More...

#include "config.h"
#include <string.h>
#include <inttypes.h>
Include dependency graph for ripemd160.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ripemd160_context
 RIPEMD-160 context structure. More...
 

Macros

#define POLARSSL_ERR_RIPEMD160_FILE_IO_ERROR   -0x007E
 Read/write error in file. More...
 

Functions

void ripemd160_init (ripemd160_context *ctx)
 Initialize RIPEMD-160 context. More...
 
void ripemd160_free (ripemd160_context *ctx)
 Clear RIPEMD-160 context. More...
 
void ripemd160_starts (ripemd160_context *ctx)
 RIPEMD-160 context setup. More...
 
void ripemd160_update (ripemd160_context *ctx, const unsigned char *input, size_t ilen)
 RIPEMD-160 process buffer. More...
 
void ripemd160_finish (ripemd160_context *ctx, unsigned char output[20])
 RIPEMD-160 final digest. More...
 
void ripemd160_process (ripemd160_context *ctx, const unsigned char data[64])
 
void ripemd160 (const unsigned char *input, size_t ilen, unsigned char output[20])
 Output = RIPEMD-160( input buffer ) More...
 
int ripemd160_file (const char *path, unsigned char output[20])
 Output = RIPEMD-160( file contents ) More...
 
void ripemd160_hmac_starts (ripemd160_context *ctx, const unsigned char *key, size_t keylen)
 RIPEMD-160 HMAC context setup. More...
 
void ripemd160_hmac_update (ripemd160_context *ctx, const unsigned char *input, size_t ilen)
 RIPEMD-160 HMAC process buffer. More...
 
void ripemd160_hmac_finish (ripemd160_context *ctx, unsigned char output[20])
 RIPEMD-160 HMAC final digest. More...
 
void ripemd160_hmac_reset (ripemd160_context *ctx)
 RIPEMD-160 HMAC context reset. More...
 
void ripemd160_hmac (const unsigned char *key, size_t keylen, const unsigned char *input, size_t ilen, unsigned char output[20])
 Output = HMAC-RIPEMD-160( hmac key, input buffer ) More...
 
int ripemd160_self_test (int verbose)
 Checkup routine. More...
 

Detailed Description

RIPE MD-160 message digest.

Copyright (C) 2014-2014, Brainspark B.V.

This file is part of PolarSSL (http://www.polarssl.org) Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Definition in file ripemd160.h.

Macro Definition Documentation

#define POLARSSL_ERR_RIPEMD160_FILE_IO_ERROR   -0x007E

Read/write error in file.

Definition at line 45 of file ripemd160.h.

Function Documentation

void ripemd160 ( const unsigned char *  input,
size_t  ilen,
unsigned char  output[20] 
)

Output = RIPEMD-160( input buffer )

Parameters
inputbuffer holding the data
ilenlength of the input data
outputRIPEMD-160 checksum result
int ripemd160_file ( const char *  path,
unsigned char  output[20] 
)

Output = RIPEMD-160( file contents )

Parameters
pathinput file name
outputRIPEMD-160 checksum result
Returns
0 if successful, or POLARSSL_ERR_RIPEMD160_FILE_IO_ERROR
void ripemd160_finish ( ripemd160_context ctx,
unsigned char  output[20] 
)

RIPEMD-160 final digest.

Parameters
ctxRIPEMD-160 context
outputRIPEMD-160 checksum result
void ripemd160_free ( ripemd160_context ctx)

Clear RIPEMD-160 context.

Parameters
ctxRIPEMD-160 context to be cleared
void ripemd160_hmac ( const unsigned char *  key,
size_t  keylen,
const unsigned char *  input,
size_t  ilen,
unsigned char  output[20] 
)

Output = HMAC-RIPEMD-160( hmac key, input buffer )

Parameters
keyHMAC secret key
keylenlength of the HMAC key
inputbuffer holding the data
ilenlength of the input data
outputHMAC-RIPEMD-160 result
void ripemd160_hmac_finish ( ripemd160_context ctx,
unsigned char  output[20] 
)

RIPEMD-160 HMAC final digest.

Parameters
ctxHMAC context
outputRIPEMD-160 HMAC checksum result
void ripemd160_hmac_reset ( ripemd160_context ctx)

RIPEMD-160 HMAC context reset.

Parameters
ctxHMAC context to be reset
void ripemd160_hmac_starts ( ripemd160_context ctx,
const unsigned char *  key,
size_t  keylen 
)

RIPEMD-160 HMAC context setup.

Parameters
ctxHMAC context to be initialized
keyHMAC secret key
keylenlength of the HMAC key
void ripemd160_hmac_update ( ripemd160_context ctx,
const unsigned char *  input,
size_t  ilen 
)

RIPEMD-160 HMAC process buffer.

Parameters
ctxHMAC context
inputbuffer holding the data
ilenlength of the input data
void ripemd160_init ( ripemd160_context ctx)

Initialize RIPEMD-160 context.

Parameters
ctxRIPEMD-160 context to be initialized
void ripemd160_process ( ripemd160_context ctx,
const unsigned char  data[64] 
)
int ripemd160_self_test ( int  verbose)

Checkup routine.

Returns
0 if successful, or 1 if the test failed
void ripemd160_starts ( ripemd160_context ctx)

RIPEMD-160 context setup.

Parameters
ctxcontext to be initialized
void ripemd160_update ( ripemd160_context ctx,
const unsigned char *  input,
size_t  ilen 
)

RIPEMD-160 process buffer.

Parameters
ctxRIPEMD-160 context
inputbuffer holding the data
ilenlength of the input data