client-interface-cleanup (#6)
Refactoring and code cleanup. Improved client command interface.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package peer
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"crypto/rand"
|
||||
@@ -39,10 +38,6 @@ func (sc *dataCipher) Key() [32]byte {
|
||||
return sc.key
|
||||
}
|
||||
|
||||
func (sc *dataCipher) HasKey(k [32]byte) bool {
|
||||
return bytes.Equal(k[:], sc.key[:])
|
||||
}
|
||||
|
||||
func (sc *dataCipher) Encrypt(h Header, data, out []byte) []byte {
|
||||
const s = dataHeaderSize
|
||||
out = out[:s+dataCipherOverhead+len(data)]
|
||||
|
||||
Reference in New Issue
Block a user