summaryrefslogtreecommitdiffstats
path: root/src/mbedTLS++/Sha1Checksum.cpp
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-04-07 23:23:54 +0200
committerGitHub <noreply@github.com>2020-04-07 23:23:54 +0200
commit6a21bf979c5ef4ad473971257f59fe9101397cd6 (patch)
treec8d2c94a59982b7a80a36542e77ae872158a6814 /src/mbedTLS++/Sha1Checksum.cpp
parentFilter blocks to add to redstone sim's wake queue (#4621) (diff)
downloadcuberite-6a21bf979c5ef4ad473971257f59fe9101397cd6.tar
cuberite-6a21bf979c5ef4ad473971257f59fe9101397cd6.tar.gz
cuberite-6a21bf979c5ef4ad473971257f59fe9101397cd6.tar.bz2
cuberite-6a21bf979c5ef4ad473971257f59fe9101397cd6.tar.lz
cuberite-6a21bf979c5ef4ad473971257f59fe9101397cd6.tar.xz
cuberite-6a21bf979c5ef4ad473971257f59fe9101397cd6.tar.zst
cuberite-6a21bf979c5ef4ad473971257f59fe9101397cd6.zip
Diffstat (limited to 'src/mbedTLS++/Sha1Checksum.cpp')
-rw-r--r--src/mbedTLS++/Sha1Checksum.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mbedTLS++/Sha1Checksum.cpp b/src/mbedTLS++/Sha1Checksum.cpp
index f55df025a..8ed7976ae 100644
--- a/src/mbedTLS++/Sha1Checksum.cpp
+++ b/src/mbedTLS++/Sha1Checksum.cpp
@@ -85,6 +85,20 @@ void cSha1Checksum::Finalize(cSha1Checksum::Checksum & a_Output)
+void cSha1Checksum::DigestToHex(const Checksum & a_Digest, AString & a_Out)
+{
+ a_Out.clear();
+ a_Out.reserve(40);
+ for (int i = 0; i < 20; i++)
+ {
+ AppendPrintf(a_Out, "%x", a_Digest[i]);
+ }
+}
+
+
+
+
+
void cSha1Checksum::DigestToJava(const Checksum & a_Digest, AString & a_Out)
{
Checksum Digest;