1
0
Fork 0
forked from External/grumble

Grumble gofmt run.

This commit is contained in:
Mikkel Krautz 2011-05-13 15:46:45 +02:00
parent 0a40f7fa98
commit d535cbc6fa
5 changed files with 47 additions and 47 deletions

View file

@ -246,7 +246,7 @@ func times2(block []byte) {
} }
func times3(block []byte) { func times3(block []byte) {
carry := (block[0] >> 7) & 0x1; carry := (block[0] >> 7) & 0x1
for i := 0; i < AESBlockSize-1; i++ { for i := 0; i < AESBlockSize-1; i++ {
block[i] ^= (block[i] << 1) | ((block[i+1] >> 7) & 0x1) block[i] ^= (block[i] << 1) | ((block[i+1] >> 7) & 0x1)
} }

View file

@ -76,7 +76,7 @@ func (pds *PacketDataStream) Next8() (ret uint8) {
// Put a byte (represented in an uint64) into the // Put a byte (represented in an uint64) into the
// PacketDataStream. // PacketDataStream.
func (pds *PacketDataStream) append(val uint64) { func (pds *PacketDataStream) append(val uint64) {
if (val > 0xff) { if val > 0xff {
pds.ok = false pds.ok = false
return return
} }

View file

@ -121,7 +121,7 @@ func TestSelfFloat32(t *testing.T) {
} }
func TestSelfBytes(t *testing.T) { func TestSelfBytes(t *testing.T) {
msg := [15]byte{ 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, } msg := [15]byte{0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}
buf := make([]byte, 500) buf := make([]byte, 500)
pds := New(buf) pds := New(buf)
pds2 := New(buf) pds2 := New(buf)