Skip to content

Instantly share code, notes, and snippets.

How to get Telegram Bot Chat ID

Create a Telegram Bot and get a Bot Token

  1. Open Telegram application then search for @BotFather
  2. Click Start
  3. Click Menu -> /newbot or type /newbot and hit Send
  4. Follow the instruction until we get message like so
    Done! Congratulations on your new bot. You will find it at t.me/new_bot.
    
@Yagniksojitra
Yagniksojitra / AESHelper.java
Created June 16, 2024 15:15 — forked from thackerronak/AESHelper.java
AES encryption/decryption in crypto-js way, use KDF for generating IV and Key, use CBC with PKCS7Padding for Cipher
import com.sun.jersey.core.util.Base64;
import java.io.UnsupportedEncodingException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Arrays;
import java.util.Random;
import javax.crypto.BadPaddingException;
@Yagniksojitra
Yagniksojitra / aes.dart
Created June 16, 2024 18:57 — forked from CoderJava/aes.dart
CryptoJS encryption decryption in Vue, PHP, and Dart based on this solution (https://stackoverflow.com/a/64330804/10308290)
import 'dart:convert';
import 'dart:math';
import 'dart:typed_data';
import 'package:crypto/crypto.dart';
import 'package:tuple/tuple.dart';
import 'package:encrypt/encrypt.dart' as encrypt;
// Thanks to https://medium.com/@chingsuehok/cryptojs-aes-encryption-decryption-for-flutter-dart-7ca123bd7464
class AES {