func (c *Cipher) Encrypt(dst, src []byte) {
    uintLen := c.stateSize / 64
    tmpin, tmpout := c.getTempData()
    for i := 0; i < uintLen; i++ {
        tmpin[i] = binary.LittleEndian.Uint64(src[i*8 : i*8+8])
    }
    c.encrypt(tmpin, tmpout)
    for i := 0; i < uintLen; i++ {
        binary.LittleEndian.PutUint64(dst[i*8:i*8+8], tmpout[i])
    }
}
Encrypt a block.
Dst and src may point at the same memory.

dst
Destination of encypted data (cipher data)
src
Contains a block of plain data
package threefish
import (
    "strconv"
    "encoding/binary"
)
const (
    KEY_SCHEDULE_CONST  = uint64(0x1BD11BDAA9FC1A22)
    EXPANDED_TWEAK_SIZE = 3
)
type cipherInternal interface {
    encrypt(input, output []uint64)
    decrypt(input, output []uint64)
    getTempData() ([]uint64, []uint64)
    setTweak(tweak []uint64)
    setKey(key []uint64)
}
type Cipher struct {
    stateSize int
    cipherInternal
}
type KeySizeError int
func (k KeySizeError) Error() string {
    return "crypto/threefish: invalid key size " + strconv.Itoa(int(k))
}
func New(key []byte, tweak []uint64) (*Cipher, error) {
    var err error
    var internal cipherInternal
    switch len(key) {
    case 32:
        internal, err = newThreefish256(key, tweak)
    case 64:
        internal, err = newThreefish512(key, tweak)
    case 128:
        internal, err = newThreefish1024(key, tweak)
    default:
        return nil, KeySizeError(len(key))
    }
    return &Cipher{len(key) * 8, internal}, err
}
func New64(key, tweak []uint64) (*Cipher, error) {
    var err error
    var internal cipherInternal
    switch len(key) {
    case 4:
        internal, err = newThreefish256_64(key, tweak)
    case 8:
        internal, err = newThreefish512_64(key, tweak)
    case 16:
        internal, err = newThreefish1024_64(key, tweak)
    default:
        return nil, KeySizeError(len(key))
    }
    return &Cipher{len(key) * 8, internal}, err
}
func NewSize(size int) (*Cipher, error) {
    var err error
    var internal cipherInternal
    switch size {
    case 256:
        internal, err = newThreefish256(nil, nil)
    case 512:
        internal, err = newThreefish512(nil, nil)
    case 1024:
        internal, err = newThreefish1024(nil, nil)
    default:
        return nil, KeySizeError(size)
    }
    return &Cipher{size, internal}, err
}
func (c *Cipher) BlockSize() int {
    return c.stateSize / 8
}