From 355f00c2bd6f4b2870133d0423420ef8046b7156 Mon Sep 17 00:00:00 2001 From: Slávek Banko Date: Thu, 14 Jan 2021 02:37:59 +0100 Subject: Added controlled conversions to char* instead of automatic ascii conversions. The definition of -UTQT_NO_ASCII_CAST is no longer needed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- src/crypto.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/crypto.cpp') 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; -- cgit v1.2.3