Skip to content

X2OX/tea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JetBrains Open Source Licenses GoDoc Sourcegraph Go Report Card Release MIT license

Example

package main

import (
	"bytes"
	"fmt"
	
	"go.x2ox.com/tea"
)

func main() {
	out := make([]byte, 8)

	c, err := tea.NewTEA([]byte{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF})
	if err != nil {
		fmt.Println(err)
		return
	}

	c.Encrypt(out, []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08})

	if bytes.Compare(out, []byte{0xDE, 0xB1, 0xC0, 0xA2, 0x7E, 0x74, 0x5D, 0xB3}) != 0 {
		fmt.Println(err)
	}
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages