Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stream_cipher.go 196B

1234567891011
  1. package utils
  2. import (
  3. "crypto/aes"
  4. "crypto/cipher"
  5. )
  6. func MakeStreamCipher(key, iv []byte) cipher.Stream {
  7. block, _ := aes.NewCipher(key) // nolint: gosec
  8. return cipher.NewCTR(block, iv)
  9. }