diff options
| author | Russ Cox <rsc@golang.org> | 2022-04-11 13:06:45 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-04-11 22:02:26 +0000 |
| commit | 7b82a4e95df4499652dca2c0d4185de9fffbdc8f (patch) | |
| tree | 7c7fe98a006a759abd61e5b0c4e4b7b0a6102e28 /openpgp | |
| parent | 5352b09029215197cc109b46f0560d05ffab29db (diff) | |
| download | go-x-crypto-7b82a4e95df4499652dca2c0d4185de9fffbdc8f.tar.xz | |
all: gofmt
Gofmt to update doc comments to the new formatting.
For golang/go#51082.
Change-Id: I076031b6613691eefbb0f21739366e3fd2011ec9
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/399356
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'openpgp')
| -rw-r--r-- | openpgp/armor/armor.go | 12 | ||||
| -rw-r--r-- | openpgp/armor/encode.go | 3 | ||||
| -rw-r--r-- | openpgp/elgamal/elgamal.go | 4 | ||||
| -rw-r--r-- | openpgp/packet/signature_v3_test.go | 25 |
4 files changed, 26 insertions, 18 deletions
diff --git a/openpgp/armor/armor.go b/openpgp/armor/armor.go index ebc8787..be342ad 100644 --- a/openpgp/armor/armor.go +++ b/openpgp/armor/armor.go @@ -23,12 +23,14 @@ import ( // A Block represents an OpenPGP armored structure. // // The encoded form is: -// -----BEGIN Type----- -// Headers // -// base64-encoded Bytes -// '=' base64 encoded checksum -// -----END Type----- +// -----BEGIN Type----- +// Headers +// +// base64-encoded Bytes +// '=' base64 encoded checksum +// -----END Type----- +// // where Headers is a possibly empty sequence of Key: Value lines. // // Since the armored data can be very large, this package presents a streaming diff --git a/openpgp/armor/encode.go b/openpgp/armor/encode.go index 6f07582..5b6e16c 100644 --- a/openpgp/armor/encode.go +++ b/openpgp/armor/encode.go @@ -96,7 +96,8 @@ func (l *lineBreaker) Close() (err error) { // trailer. // // It's built into a stack of io.Writers: -// encoding -> base64 encoder -> lineBreaker -> out +// +// encoding -> base64 encoder -> lineBreaker -> out type encoding struct { out io.Writer breaker *lineBreaker diff --git a/openpgp/elgamal/elgamal.go b/openpgp/elgamal/elgamal.go index 84396a0..743b35a 100644 --- a/openpgp/elgamal/elgamal.go +++ b/openpgp/elgamal/elgamal.go @@ -77,8 +77,8 @@ func Encrypt(random io.Reader, pub *PublicKey, msg []byte) (c1, c2 *big.Int, err // returns the plaintext of the message. An error can result only if the // ciphertext is invalid. Users should keep in mind that this is a padding // oracle and thus, if exposed to an adaptive chosen ciphertext attack, can -// be used to break the cryptosystem. See ``Chosen Ciphertext Attacks -// Against Protocols Based on the RSA Encryption Standard PKCS #1'', Daniel +// be used to break the cryptosystem. See “Chosen Ciphertext Attacks +// Against Protocols Based on the RSA Encryption Standard PKCS #1”, Daniel // Bleichenbacher, Advances in Cryptology (Crypto '98), func Decrypt(priv *PrivateKey, c1, c2 *big.Int) (msg []byte, err error) { s := new(big.Int).Exp(c1, priv.X, priv.P) diff --git a/openpgp/packet/signature_v3_test.go b/openpgp/packet/signature_v3_test.go index ad7b62a..73b46ae 100644 --- a/openpgp/packet/signature_v3_test.go +++ b/openpgp/packet/signature_v3_test.go @@ -66,18 +66,23 @@ func v3KeyReader(t *testing.T) io.Reader { // keySigV3Armor is some V3 public key I found in an SKS dump. // Old: Public Key Packet(tag 6)(141 bytes) -// Ver 4 - new -// Public key creation time - Fri Sep 16 17:13:54 CDT 1994 -// Pub alg - unknown(pub 0) -// Unknown public key(pub 0) +// +// Ver 4 - new +// Public key creation time - Fri Sep 16 17:13:54 CDT 1994 +// Pub alg - unknown(pub 0) +// Unknown public key(pub 0) +// // Old: User ID Packet(tag 13)(39 bytes) -// User ID - Armin M. Warda <warda@nephilim.ruhr.de> +// +// User ID - Armin M. Warda <warda@nephilim.ruhr.de> +// // Old: Signature Packet(tag 2)(149 bytes) -// Ver 4 - new -// Sig type - unknown(05) -// Pub alg - ElGamal Encrypt-Only(pub 16) -// Hash alg - unknown(hash 46) -// Hashed Sub: unknown(sub 81, critical)(1988 bytes) +// +// Ver 4 - new +// Sig type - unknown(05) +// Pub alg - ElGamal Encrypt-Only(pub 16) +// Hash alg - unknown(hash 46) +// Hashed Sub: unknown(sub 81, critical)(1988 bytes) const keySigV3Armor = `-----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.0.10 |
