mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-28 21:33:09 +00:00
Move SHA1 computation from render/glyph.c to os/
Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Rémi Cardona <remi@gentoo.org>
This commit is contained in:
parent
25344ba7f7
commit
5551609494
6 changed files with 116 additions and 36 deletions
19
include/xsha1.h
Normal file
19
include/xsha1.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef XSHA1_H
|
||||
#define XSHA1_H
|
||||
|
||||
/* Initialize SHA1 computation. Returns NULL on error. */
|
||||
void *x_sha1_init(void);
|
||||
|
||||
/*
|
||||
* Add some data to be hashed. ctx is the value returned by x_sha1_init()
|
||||
* Returns 0 on error, 1 on success.
|
||||
*/
|
||||
int x_sha1_update(void *ctx, void *data, int size);
|
||||
|
||||
/*
|
||||
* Place the hash in result, and free ctx.
|
||||
* Returns 0 on error, 1 on success.
|
||||
*/
|
||||
int x_sha1_final(void *ctx, unsigned char result[20]);
|
||||
|
||||
#endif
|
||||
Loading…
Reference in a new issue