Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
libretro-chailove
Commits
0f6b95bf
Verified
Commit
0f6b95bf
authored
Apr 16, 2018
by
RobLoach
Browse files
sha1: Update SHA1 usage
parent
41751e41
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
0f6b95bf
...
...
@@ -4,6 +4,10 @@ All notable changes to [ChaiLove](https://github.com/RobLoach/ChaiLove) will be
The format is based on
[
Keep a Changelog
](
http://keepachangelog.com/en/1.0.0/
)
and this project adheres to
[
Semantic Versioning
](
http://semver.org/spec/v2.0.0.html
)
.
## 0.19.1 - Development Branch
-
`love.data.hash()`
`sha1`
support
## 0.19.0 - 2018-04-13
### Added
-
Android build
...
...
src/love/data.cpp
View file @
0f6b95bf
...
...
@@ -7,6 +7,7 @@
#include <iostream>
#include "zlib.h"
#include "utils/md5.h"
#include "TinySHA1.hpp"
namespace
love
{
...
...
@@ -120,7 +121,7 @@ std::string data::hash(const std::string& hashFunction, const std::string& data)
uint32_t
digest
[
5
];
s
.
getDigest
(
digest
);
char
tmp
[
48
];
snprintf
(
tmp
,
45
,
"%08x
%08x
%08x
%08x
%08x"
,
digest
[
0
],
digest
[
1
],
digest
[
2
],
digest
[
3
],
digest
[
4
]);
snprintf
(
tmp
,
sizeof
(
tmp
)
,
"%08x%08x%08x%08x%08x"
,
digest
[
0
],
digest
[
1
],
digest
[
2
],
digest
[
3
],
digest
[
4
]);
return
std
::
string
(
tmp
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment