mirror of
https://github.com/golang/go
synced 2024-09-29 09:34:28 -06:00
crypto/rsa: improve the comment of PublicKey.Size
Change-Id: Ic507cb740395e76d1d011a5a2f395b96c3d172a2 Reviewed-on: https://go-review.googlesource.com/105915 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
0de0ed369f
commit
c90e0504c0
@ -42,7 +42,8 @@ type PublicKey struct {
|
||||
E int // public exponent
|
||||
}
|
||||
|
||||
// Size returns the number of bytes for signatures from this key.
|
||||
// Size returns the modulus size in bytes. Raw signatures and ciphertexts
|
||||
// for or by this public key will have the same size.
|
||||
func (pub *PublicKey) Size() int {
|
||||
return (pub.N.BitLen() + 7) / 8
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user