1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

remove checking of webapp data from webapp module due to its existing in core

This commit is contained in:
InsanusMokrassar 2022-04-29 19:18:22 +06:00
parent 4799617ced
commit 78a7a3546a

View File

@ -1,9 +0,0 @@
package dev.inmo.tgbotapi.webapps
import dev.inmo.tgbotapi.utils.*
/**
* @param rawData Data from [dev.inmo.tgbotapi.webapps.WebApp.initData]
* @param hash Data from [dev.inmo.tgbotapi.webapps.WebApp.initDataUnsafe] from the field [dev.inmo.tgbotapi.webapps.WebAppInitData.hash]
*/
fun TelegramAPIUrlsKeeper.checkWebAppLink(rawData: String, hash: String) = rawData.hmacSha256(webAppDataSecretKey).hex() == hash