Skip to content

Commit

Permalink
crypto/rsa: improve the comment of PublicKey.Size
Browse files Browse the repository at this point in the history
Change-Id: Ic507cb740395e76d1d011a5a2f395b96c3d172a2
Reviewed-on: https://go-review.googlesource.com/105915
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
FiloSottile committed Apr 9, 2018
1 parent 0de0ed3 commit c90e050
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/crypto/rsa/rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c90e050

Please sign in to comment.