diff options
| author | Mikio Hara <mikioh.mikioh@gmail.com> | 2012-12-15 14:19:17 +0900 |
|---|---|---|
| committer | Mikio Hara <mikioh.mikioh@gmail.com> | 2012-12-15 14:19:17 +0900 |
| commit | eeef66c5287c304f8b2e04072263bb5edf2814a5 (patch) | |
| tree | 4795e9a9c52f64e6170ec926ec898fcdd2ee299b | |
| parent | 54c65aebf48315c6bb0ffbf0384aabbce05c23c4 (diff) | |
| download | go-x-crypto-eeef66c5287c304f8b2e04072263bb5edf2814a5.tar.xz | |
go.crypto: gofmt -w -s
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/6948057
| -rw-r--r-- | bcrypt/bcrypt.go | 2 | ||||
| -rw-r--r-- | openpgp/packet/encrypted_key.go | 2 | ||||
| -rw-r--r-- | openpgp/packet/private_key.go | 2 | ||||
| -rw-r--r-- | openpgp/write_test.go | 4 | ||||
| -rw-r--r-- | scrypt/scrypt.go | 2 | ||||
| -rw-r--r-- | ssh/client_auth.go | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/bcrypt/bcrypt.go b/bcrypt/bcrypt.go index b71fc41..542cde8 100644 --- a/bcrypt/bcrypt.go +++ b/bcrypt/bcrypt.go @@ -6,7 +6,7 @@ // algorithm. See http://www.usenix.org/event/usenix99/provos/provos.pdf package bcrypt -// The code is a port of Provos and Mazières's C implementation. +// The code is a port of Provos and Mazières's C implementation. import ( "code.google.com/p/go.crypto/blowfish" "crypto/rand" diff --git a/openpgp/packet/encrypted_key.go b/openpgp/packet/encrypted_key.go index e32d522..be96bf8 100644 --- a/openpgp/packet/encrypted_key.go +++ b/openpgp/packet/encrypted_key.go @@ -104,7 +104,7 @@ func SerializeEncryptedKey(w io.Writer, pub *PublicKey, cipherFunc CipherFunctio binary.BigEndian.PutUint64(buf[1:9], pub.KeyId) buf[9] = byte(pub.PubKeyAlgo) - keyBlock := make([]byte, 1 /* cipher type */ +len(key)+2 /* checksum */ ) + keyBlock := make([]byte, 1 /* cipher type */ +len(key)+2 /* checksum */) keyBlock[0] = byte(cipherFunc) copy(keyBlock[1:], key) checksum := checksumKeyMaterial(key) diff --git a/openpgp/packet/private_key.go b/openpgp/packet/private_key.go index f76c9c5..98cc14b 100644 --- a/openpgp/packet/private_key.go +++ b/openpgp/packet/private_key.go @@ -121,7 +121,7 @@ func (pk *PrivateKey) Serialize(w io.Writer) (err error) { if err != nil { return } - buf.WriteByte(0 /* no encryption */ ) + buf.WriteByte(0 /* no encryption */) privateKeyBuf := bytes.NewBuffer(nil) diff --git a/openpgp/write_test.go b/openpgp/write_test.go index 3d0be93..d1c9988 100644 --- a/openpgp/write_test.go +++ b/openpgp/write_test.go @@ -169,7 +169,7 @@ func TestEncryption(t *testing.T) { } buf := new(bytes.Buffer) - w, err := Encrypt(buf, kring[:1], signed, nil, /* no hints */ nil) + w, err := Encrypt(buf, kring[:1], signed, nil /* no hints */, nil) if err != nil { t.Errorf("#%d: error in Encrypt: %s", i, err) continue @@ -187,7 +187,7 @@ func TestEncryption(t *testing.T) { continue } - md, err := ReadMessage(buf, kring, nil, /* no prompt */ nil) + md, err := ReadMessage(buf, kring, nil /* no prompt */, nil) if err != nil { t.Errorf("#%d: error reading message: %s", i, err) continue diff --git a/scrypt/scrypt.go b/scrypt/scrypt.go index d43fbc9..1c01fa5 100644 --- a/scrypt/scrypt.go +++ b/scrypt/scrypt.go @@ -76,7 +76,7 @@ func smix(b []byte, r, N int, v, xy []byte) { // Key derives a key from the password, salt, and cost parameters, returning // a byte slice of length keyLen that can be used as cryptographic key. -// +// // N is a CPU/memory cost parameter, which must be a power of two greater than 1. // r and p must satisfy r * p < 2³⁰. If the parameters do not satisfy the // limits, the function returns a nil byte slice and an error. diff --git a/ssh/client_auth.go b/ssh/client_auth.go index 2422722..b0c41f6 100644 --- a/ssh/client_auth.go +++ b/ssh/client_auth.go @@ -57,7 +57,7 @@ func (c *ClientConn) authenticate(session []byte) error { } func keys(m map[string]bool) (s []string) { - for k, _ := range m { + for k := range m { s = append(s, k) } return |
