go.crypto: gofmt -w -s
R=golang-dev, dave CC=golang-dev https://golang.org/cl/6948057
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user