Skip to content

Instantly share code, notes, and snippets.

View leekeifuture's full-sized avatar

Vladislav Brezovsky leekeifuture

View GitHub Profile
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.codec.digest.HmacUtils;
private Boolean isTelegramAccountDataRight(
String telegramAccountData, // data check string
String telegramBotToken // bot token
) {
byte[] data = telegramAccountData.toString().getBytes();
byte[] secret = DigestUtils.sha256(telegramBotToken);