Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87181 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Sep 20, 2024
1 parent a8a07f2 commit 8b23b7a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions doc/COPYRIGHTS
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@ src/library/tools/src/md5.[ch]

Copyright (C) 1995, 1996, 2001 Free Software Foundation, Inc.

src/library/tools/src/sha256.c

extracted from the public domain version SHA-crypt.txt verison 0.6
(2016-8-31) by Ulrich Drepper

src/extra/intl/*

Expand Down
5 changes: 3 additions & 2 deletions doc/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@
vector of bytes by using the \code{bytes=} argument instead
of \code{files=}. The two arguments are mutually exclusive.

\item Added \code{sha256sum()} analogous to \code{md5sum()},
but implementing the SHA-256 hashing algorithm.
\item Added function \code{sha256sum()} in package \pkg{tools}
analogous to \code{md5sum()} implementing the SHA-256 hashing
algorithm.
}
}

Expand Down
7 changes: 6 additions & 1 deletion src/library/tools/src/sha256.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
* https://www.R-project.org/Licenses/
*/

/*
extracted from the public domain version SHA-crypt.txt verison 0.6
(2016-8-31) by Ulrich Drepper
*/

#include <Rconfig.h>
#include <sys/types.h>

Expand Down Expand Up @@ -284,7 +289,7 @@ void sha256_process_bytes (const void *buffer, size_t len, struct sha256_ctx *ct
left_over -= 64;
memcpy (ctx->buffer, &ctx->buffer[64], left_over);
}
ctx->buflen = left_over;
ctx->buflen = (unsigned int) left_over;
}
}

Expand Down

0 comments on commit 8b23b7a

Please sign in to comment.