go.crypto: gofmt -w -s

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/6948057
This commit is contained in:
Mikio Hara
2012-12-15 14:19:17 +09:00
parent 54c65aebf4
commit eeef66c528
6 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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