43
43
// BlockSize returns the Blowfish block size, 8 bytes.
44
44
// It is necessary to satisfy the Cipher interface in the
46
46
func (c *Cipher) BlockSize() int { return BlockSize }
48
48
// Encrypt encrypts the 8-byte buffer src using the key k
49
49
// and stores the result in dst.
50
50
// Note that for amounts of data larger than a block,
51
51
// it is not safe to just call Encrypt on successive blocks;
53
53
func (c *Cipher) Encrypt(dst, src []byte) {
54
54
l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
55
55
r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])