srp

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Пакет srp реализует Secure Random Password protocol, который телеграм использует для реализации 2FA.

https://core.telegram.org/api/srp

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModPow

type ModPow struct {
	Salt1 []byte
	Salt2 []byte
	G     int32
	P     []byte
}

this is simpler struct, copied from PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow

type SrpAnswer

type SrpAnswer struct {
	GA []byte
	M1 []byte
}

copy of InputCheckPasswordSRPObj

func GetInputCheckPassword

func GetInputCheckPassword(password string, srpB []byte, mp *ModPow) (*SrpAnswer, error)

GetInputCheckPassword считает нужные для 2FA хеши, описан в доке телеграма: https://core.telegram.org/api/srp#checking-the-password-with-srp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL