Broke out session object.

This commit is contained in:
Brad Arant committed 2025-05-06 07:33:04 -07:00
1 parent fd5069f69f
commit 2f30b3f8c4
11 files changed
+834

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#include "SessionId.h"
namespace jet {
SessionId::SessionId() {
unsigned char hashit[64];
unsigned char hash[SHA_DIGEST_LENGTH];
setBufferSize(64);
sprintf((char *)hashit, "JETSESSION%ld", time(0));
SHA1(hashit, strlen((char *)hashit), hash);
sprintf(getData(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
hash[0], hash[1], hash[2], hash[3], hash[4], hash[5], hash[6], hash[7], hash[8], hash[9],
hash[10], hash[11], hash[12], hash[13], hash[14], hash[15], hash[16], hash[17], hash[18], hash[19]);
}
}