summaryrefslogtreecommitdiff
path: root/src/libstdcrypto
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-12-20 12:34:14 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-12-20 12:34:14 +0000
commit0d82edd9f8bebb396a9154d4e1003340dbf6b967 (patch)
tree0659c834f387f3504944a610ed6858b9e268e6c7 /src/libstdcrypto
parent2436785702b47996e9f0e281df0d6027660ec914 (diff)
downloadskalibs-0d82edd9f8bebb396a9154d4e1003340dbf6b967.tar.xz
Lots of cosmetic fixes.
sha256 documented.
Diffstat (limited to 'src/libstdcrypto')
-rw-r--r--src/libstdcrypto/md5_final.c2
-rw-r--r--src/libstdcrypto/md5_init.c2
-rw-r--r--src/libstdcrypto/md5_update.c2
-rw-r--r--src/libstdcrypto/rc4.c2
-rw-r--r--src/libstdcrypto/rc4_init.c2
-rw-r--r--src/libstdcrypto/sha1-internal.h2
-rw-r--r--src/libstdcrypto/sha1_feed.c2
-rw-r--r--src/libstdcrypto/sha1_final.c2
-rw-r--r--src/libstdcrypto/sha1_init.c2
-rw-r--r--src/libstdcrypto/sha1_update.c2
-rw-r--r--src/libstdcrypto/sha256-internal.h2
-rw-r--r--src/libstdcrypto/sha256_feed.c2
-rw-r--r--src/libstdcrypto/sha256_final.c2
-rw-r--r--src/libstdcrypto/sha256_init.c2
-rw-r--r--src/libstdcrypto/sha256_update.c2
15 files changed, 15 insertions, 15 deletions
diff --git a/src/libstdcrypto/md5_final.c b/src/libstdcrypto/md5_final.c
index 834d57c..e89e075 100644
--- a/src/libstdcrypto/md5_final.c
+++ b/src/libstdcrypto/md5_final.c
@@ -5,7 +5,7 @@
#include <skalibs/md5.h>
#include "md5-internal.h"
-void md5_final (MD5Schedule_ref ctx, char *digest /* 16 chars */)
+void md5_final (MD5Schedule *ctx, char *digest /* 16 chars */)
{
register unsigned int count = (ctx->bits[0] >> 3) & 0x3F ;
register unsigned char *p = ctx->in + count ;
diff --git a/src/libstdcrypto/md5_init.c b/src/libstdcrypto/md5_init.c
index cb2f611..56c85de 100644
--- a/src/libstdcrypto/md5_init.c
+++ b/src/libstdcrypto/md5_init.c
@@ -2,7 +2,7 @@
#include <skalibs/md5.h>
-void md5_init (MD5Schedule_ref ctx)
+void md5_init (MD5Schedule *ctx)
{
ctx->buf[0] = 0x67452301UL ;
ctx->buf[1] = 0xefcdab89UL ;
diff --git a/src/libstdcrypto/md5_update.c b/src/libstdcrypto/md5_update.c
index 63fdea3..c03a598 100644
--- a/src/libstdcrypto/md5_update.c
+++ b/src/libstdcrypto/md5_update.c
@@ -5,7 +5,7 @@
#include <skalibs/md5.h>
#include "md5-internal.h"
-void md5_update (MD5Schedule_ref ctx, char const *s, unsigned int len)
+void md5_update (MD5Schedule *ctx, char const *s, unsigned int len)
{
register uint32 t = ctx->bits[0] ;
if ((ctx->bits[0] = t + (len << 3)) < t)
diff --git a/src/libstdcrypto/rc4.c b/src/libstdcrypto/rc4.c
index 7ead2c6..e52a706 100644
--- a/src/libstdcrypto/rc4.c
+++ b/src/libstdcrypto/rc4.c
@@ -4,7 +4,7 @@
#include <skalibs/bytestr.h>
#include <skalibs/rc4.h>
-void rc4 (RC4Schedule_ref r, char const *in, char *out, unsigned int n)
+void rc4 (RC4Schedule *r, char const *in, char *out, unsigned int n)
{
register unsigned int i = 0 ;
for (; i < n ; i++)
diff --git a/src/libstdcrypto/rc4_init.c b/src/libstdcrypto/rc4_init.c
index d6f8c20..2be9ac3 100644
--- a/src/libstdcrypto/rc4_init.c
+++ b/src/libstdcrypto/rc4_init.c
@@ -4,7 +4,7 @@
#include <skalibs/bytestr.h>
#include <skalibs/rc4.h>
-void rc4_init (RC4Schedule_ref r, char const *key, unsigned int ksize)
+void rc4_init (RC4Schedule *r, char const *key, unsigned int ksize)
{
register unsigned int i = 0, j = 0 ;
register unsigned char c = 0;
diff --git a/src/libstdcrypto/sha1-internal.h b/src/libstdcrypto/sha1-internal.h
index eae3947..584c874 100644
--- a/src/libstdcrypto/sha1-internal.h
+++ b/src/libstdcrypto/sha1-internal.h
@@ -6,7 +6,7 @@
#include <skalibs/uint32.h>
#include <skalibs/sha1.h>
-extern void sha1_feed (SHA1Schedule_ref, unsigned char) ;
+extern void sha1_feed (SHA1Schedule *, unsigned char) ;
extern void sha1_transform (uint32 * /* 5 uint32s */, uint32 const * /* 16 uint32s */) ;
#endif
diff --git a/src/libstdcrypto/sha1_feed.c b/src/libstdcrypto/sha1_feed.c
index 208cebd..65764bc 100644
--- a/src/libstdcrypto/sha1_feed.c
+++ b/src/libstdcrypto/sha1_feed.c
@@ -5,7 +5,7 @@
#include <skalibs/sha1.h>
#include "sha1-internal.h"
-void sha1_feed (SHA1Schedule_ref ctx, unsigned char inb)
+void sha1_feed (SHA1Schedule *ctx, unsigned char inb)
{
register uint32 tmp ;
diff --git a/src/libstdcrypto/sha1_final.c b/src/libstdcrypto/sha1_final.c
index 4af2efb..603c89c 100644
--- a/src/libstdcrypto/sha1_final.c
+++ b/src/libstdcrypto/sha1_final.c
@@ -4,7 +4,7 @@
#include <skalibs/sha1.h>
#include "sha1-internal.h"
-void sha1_final (SHA1Schedule_ref ctx, char *digest)
+void sha1_final (SHA1Schedule *ctx, char *digest)
{
char pack[8] ;
register unsigned int i = 0 ;
diff --git a/src/libstdcrypto/sha1_init.c b/src/libstdcrypto/sha1_init.c
index bdcb5fd..e6fadd9 100644
--- a/src/libstdcrypto/sha1_init.c
+++ b/src/libstdcrypto/sha1_init.c
@@ -2,7 +2,7 @@
#include <skalibs/sha1.h>
-void sha1_init (SHA1Schedule_ref ctx)
+void sha1_init (SHA1Schedule *ctx)
{
register unsigned int i = 0 ;
ctx->buf[0] = 0x67452301UL ;
diff --git a/src/libstdcrypto/sha1_update.c b/src/libstdcrypto/sha1_update.c
index 1b3c4de..8758a4d 100644
--- a/src/libstdcrypto/sha1_update.c
+++ b/src/libstdcrypto/sha1_update.c
@@ -3,7 +3,7 @@
#include <skalibs/sha1.h>
#include "sha1-internal.h"
-void sha1_update (SHA1Schedule_ref ctx, char const *buf, unsigned int len)
+void sha1_update (SHA1Schedule *ctx, char const *buf, unsigned int len)
{
register unsigned int i = 0 ;
for (; i < len ; i++) sha1_feed(ctx, (unsigned char)buf[i]) ;
diff --git a/src/libstdcrypto/sha256-internal.h b/src/libstdcrypto/sha256-internal.h
index 377e6ef..e5bb974 100644
--- a/src/libstdcrypto/sha256-internal.h
+++ b/src/libstdcrypto/sha256-internal.h
@@ -6,7 +6,7 @@
#include <skalibs/uint32.h>
#include <skalibs/sha256.h>
-extern void sha256_feed (SHA256Schedule_ref, unsigned char) ;
+extern void sha256_feed (SHA256Schedule *, unsigned char) ;
extern void sha256_transform (uint32 *, uint32 const *) ;
#endif
diff --git a/src/libstdcrypto/sha256_feed.c b/src/libstdcrypto/sha256_feed.c
index 5533d75..a0a3503 100644
--- a/src/libstdcrypto/sha256_feed.c
+++ b/src/libstdcrypto/sha256_feed.c
@@ -5,7 +5,7 @@
#include <skalibs/sha256.h>
#include "sha256-internal.h"
-void sha256_feed (SHA256Schedule_ref ctx, unsigned char inb)
+void sha256_feed (SHA256Schedule *ctx, unsigned char inb)
{
register uint32 tmp ;
ctx->in[ctx->b>>2] <<= 8 ;
diff --git a/src/libstdcrypto/sha256_final.c b/src/libstdcrypto/sha256_final.c
index 58b938a..be0af2d 100644
--- a/src/libstdcrypto/sha256_final.c
+++ b/src/libstdcrypto/sha256_final.c
@@ -5,7 +5,7 @@
#include <skalibs/sha256.h>
#include "sha256-internal.h"
-void sha256_final (SHA256Schedule_ref ctx, char *digest)
+void sha256_final (SHA256Schedule *ctx, char *digest)
{
register unsigned int i = 0 ;
register unsigned char *p = (unsigned char *)digest ;
diff --git a/src/libstdcrypto/sha256_init.c b/src/libstdcrypto/sha256_init.c
index e8a9ae1..6dbe865 100644
--- a/src/libstdcrypto/sha256_init.c
+++ b/src/libstdcrypto/sha256_init.c
@@ -2,7 +2,7 @@
#include <skalibs/sha256.h>
-void sha256_init (SHA256Schedule_ref ctx)
+void sha256_init (SHA256Schedule *ctx)
{
SHA256Schedule empty = SHA256_INIT() ;
*ctx = empty ;
diff --git a/src/libstdcrypto/sha256_update.c b/src/libstdcrypto/sha256_update.c
index c87644e..3cd4781 100644
--- a/src/libstdcrypto/sha256_update.c
+++ b/src/libstdcrypto/sha256_update.c
@@ -3,7 +3,7 @@
#include <skalibs/sha256.h>
#include "sha256-internal.h"
-void sha256_update (SHA256Schedule_ref ctx, char const *buf, unsigned int len)
+void sha256_update (SHA256Schedule *ctx, char const *buf, unsigned int len)
{
register unsigned int i = 0 ;
for (; i < len ; i++) sha256_feed(ctx, (unsigned char)buf[i]) ;