Skip to content

Commit 8ce16d1

Browse files
committed
xrCore/Crypto/xr_dsa_signer: Ported to stdlib.
1 parent 9ea58fc commit 8ce16d1

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/xrCore/Crypto/xr_dsa_signer.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,10 @@ shared_str const xr_dsa_signer::sign_mt(u8 const * data,
4242
return m_dsa.sign (m_private_key, m_sha.pointer(), m_sha.digest_length);
4343
}
4444

45-
char const * current_time(string64 & dest_time)
45+
char *current_time(string64 &dest_time)
4646
{
47-
time_t tmp_curr_time;
48-
49-
dest_time[0] = 0;
50-
_time64 (&tmp_curr_time);
51-
tm* tmp_tm = _localtime64(&tmp_curr_time);
47+
const time_t tmp_curr_time = std::time(nullptr);
48+
tm *tmp_tm = std::localtime(&tmp_curr_time);
5249

5350
xr_sprintf(dest_time, sizeof(dest_time),
5451
"%02d.%02d.%d_%02d:%02d:%02d",

src/xrCore/Crypto/xr_dsa_signer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ class XRCORE_API xr_dsa_signer
2828

2929
}; //xr_dsa_signer
3030

31-
XRCORE_API char const * current_time(string64 & dest_time);
31+
XRCORE_API char *current_time(string64 &dest_time);
3232

33-
#endif //#ifndef XR_DSA_SIGNER_INCLUDED
33+
#endif //#ifndef XR_DSA_SIGNER_INCLUDED

0 commit comments

Comments
 (0)