diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2021-01-14 02:37:59 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-01-14 02:37:59 +0100 |
commit | 355f00c2bd6f4b2870133d0423420ef8046b7156 (patch) | |
tree | 914337ce5bd4bd2bc984866f02c370c2a2788c7e /src/crypto.cpp | |
parent | 5962b7e681adb58055898f2e35665934bd08e235 (diff) | |
download | tork-355f00c2bd6f4b2870133d0423420ef8046b7156.tar.gz tork-355f00c2bd6f4b2870133d0423420ef8046b7156.zip |
Added controlled conversions to char* instead of automatic ascii conversions.
The definition of -UTQT_NO_ASCII_CAST is no longer needed.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src/crypto.cpp')
-rw-r--r-- | src/crypto.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto.cpp b/src/crypto.cpp index 0e6836f..31e7084 100644 --- a/src/crypto.cpp +++ b/src/crypto.cpp @@ -133,7 +133,7 @@ TQString getFPDigestFromFP(const TQString &fp) TQString FP = fp; FP.replace("$",""); - base16_decode(digest, DIGEST_LEN, FP, strlen(FP)); + base16_decode(digest, DIGEST_LEN, FP.latin1(), strlen(FP.latin1())); digest_to_base64(identity64, digest); return identity64; } @@ -163,7 +163,7 @@ TQString getFPFromNickName(const TQString &nickname) if (fp.isEmpty()) return TQString(); - if (!digest_from_base64(buf, fp)) + if (!digest_from_base64(buf, fp.latin1())) base16_encode(hexdigest, HEX_DIGEST_LEN+1, buf, DIGEST_LEN); return hexdigest; @@ -174,7 +174,7 @@ TQString getFPFromFPDigest(const TQString &fp) char buf[256]; char hexdigest[HEX_DIGEST_LEN+1]; - digest_from_base64(buf, fp); + digest_from_base64(buf, fp.latin1()); base16_encode(hexdigest, HEX_DIGEST_LEN+1, buf, DIGEST_LEN); return hexdigest; |