Source File
key.go
Belonging Package
github.com/gotd/td/internal/exchange
package exchangeimport ()// PublicKey is a public Telegram server key.type PublicKey struct {// RSA public key.RSA *rsa.PublicKey}// Zero denotes that current PublicKey is zero value.func ( PublicKey) () bool {return .RSA == nil}// Fingerprint computes key fingerprint.func ( PublicKey) () int64 {return crypto.RSAFingerprint(.RSA)}// PrivateKey is a private Telegram server key.type PrivateKey struct {// RSA private key.RSA *rsa.PrivateKey}// Zero denotes that current PublicKey is zero value.func ( PrivateKey) () bool {return .RSA == nil}// Fingerprint computes key fingerprint.func ( PrivateKey) () int64 {return crypto.RSAFingerprint(&.RSA.PublicKey)}// Public returns PublicKey of this PrivateKey pair.func ( PrivateKey) () PublicKey {return PublicKey{RSA: &.RSA.PublicKey,}}
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |