Commit c90e0504 authored by Filippo Valsorda's avatar Filippo Valsorda

crypto/rsa: improve the comment of PublicKey.Size

Change-Id: Ic507cb740395e76d1d011a5a2f395b96c3d172a2
Reviewed-on: https://go-review.googlesource.com/105915Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 0de0ed36
...@@ -42,7 +42,8 @@ type PublicKey struct { ...@@ -42,7 +42,8 @@ type PublicKey struct {
E int // public exponent 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 { func (pub *PublicKey) Size() int {
return (pub.N.BitLen() + 7) / 8 return (pub.N.BitLen() + 7) / 8
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment