srp

package
v0.0.0-...-ecf2efd Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 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