package crypto

import (
	
	 // #nosec
	
	

	
)

// RSAFingerprint returns fingerprint of RSA public key as defined in MTProto.
func ( *rsa.PublicKey) int64 {
	 := big.NewInt(int64(.E))

	// See "Creating an Authorization Key" for reference:
	// * https://core.telegram.org/mtproto/auth_key#dh-exchange-initiation
	// rsa_public_key n:string e:string = RSAPublicKey
	 := new(bin.Buffer)
	.PutBytes(.N.Bytes())
	.PutBytes(.Bytes())

	 := sha1.New() // #nosec
	_, _ = .Write(.Buf)
	 := .Sum(nil)[12:sha1.Size]
	return int64(binary.LittleEndian.Uint64())
}