mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 21:04:02 +03:00
Add client package
This commit is contained in:
@@ -34,7 +34,7 @@ func TestFrameMagic(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFrameDC(t *testing.T) {
|
||||
assert.Equal(t, int16(770), makeFrame().DC())
|
||||
assert.Equal(t, int16(771), makeFrame().DC())
|
||||
}
|
||||
|
||||
func TestFrameValid(t *testing.T) {
|
||||
|
||||
@@ -19,9 +19,7 @@ type Obfuscated2 struct {
|
||||
// details: http://telegra.ph/telegram-blocks-wtf-05-26
|
||||
//
|
||||
// Beware, link above is in russian.
|
||||
func ParseObfuscated2ClientFrame(secret, data []byte) (*Obfuscated2, int16, error) {
|
||||
frame := Frame(data)
|
||||
|
||||
func ParseObfuscated2ClientFrame(secret []byte, frame Frame) (*Obfuscated2, int16, error) {
|
||||
decHasher := sha256.New()
|
||||
decHasher.Write(frame.Key()) // nolint: errcheck
|
||||
decHasher.Write(secret) // nolint: errcheck
|
||||
|
||||
Reference in New Issue
Block a user