diff options
Diffstat (limited to 'library/cpp/tvmauth/utils.cpp')
-rw-r--r-- | library/cpp/tvmauth/utils.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/tvmauth/utils.cpp b/library/cpp/tvmauth/utils.cpp index a06cd6f5ba..16e9cb63b9 100644 --- a/library/cpp/tvmauth/utils.cpp +++ b/library/cpp/tvmauth/utils.cpp @@ -1,18 +1,18 @@ -#include "utils.h" - -namespace NTvmAuth::NUtils { - TStringBuf RemoveTicketSignature(TStringBuf ticketBody) { - if (ticketBody.size() < 2 || - ticketBody[0] != '3' || - ticketBody[1] != ':') { - return ticketBody; - } - - size_t pos = ticketBody.rfind(':'); - if (pos == TStringBuf::npos) { // impossible - return ticketBody; - } - - return ticketBody.substr(0, pos + 1); - } -} +#include "utils.h" + +namespace NTvmAuth::NUtils { + TStringBuf RemoveTicketSignature(TStringBuf ticketBody) { + if (ticketBody.size() < 2 || + ticketBody[0] != '3' || + ticketBody[1] != ':') { + return ticketBody; + } + + size_t pos = ticketBody.rfind(':'); + if (pos == TStringBuf::npos) { // impossible + return ticketBody; + } + + return ticketBody.substr(0, pos + 1); + } +} |