This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TelegramWebApp = | |
open System.Security.Cryptography | |
open System.Text | |
open System.Web | |
let validateInitData botToken (initData: string) = | |
let items = | |
initData.Split "&" |> Array.map (fun x -> let p = x.Split("=") in (p[0], p[1])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Text = | |
/// поиск индекс первого вхождения образца в строке | |
let findFirst (s: string) (p: string) = | |
// предикат проверяющий совпадение части строки с образцом | |
let eqSample i (s: string) (p: string) = | |
let rec loop j = | |
if j < p.Length && p.[j] = s.[i + j] then | |
loop (j + 1) | |
else |
OlderNewer