Skip to content

306470558/tea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

QQ 填充算法和Tea加解密的golang实现

Example:

  package main

  import (
    "log"
    "github.com/sun8911879/qqtea"
  )

  func main() {
    key := []byte{120, 76, 249, 219, 21, 206, 98, 255, 135, 49, 196, 249, 195, 140, 250, 13}
    value := []byte{0, 3, 31, 3, 90, 125, 0, 0, 0, 5, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 224, 243, 85, 220, 6, 100, 0, 0, 0, 0, 1, 66, 151, 244, 75, 19, 149, 82, 53, 36, 91, 36, 151, 57, 157, 122, 147, 41, 35, 190, 132, 225, 108, 214, 174, 82, 144, 73, 241, 241, 187, 233, 235, 0, 0, 0, 0, 1, 70, 96, 30, 211, 198, 36, 22, 191, 202, 162, 158, 158, 184, 154, 210, 78, 32, 2, 149, 246, 0, 0, 0, 1, 0, 0}
    t,err := qqtea.NewCipher(key)
    if err != nil{
      log.Panicln(err)
    }
    result := t.Encrypt(value)
    log.Println(result)
    result = t.Decrypt(result)
    log.Println(result)
  }

golang 算法根据 QQ填充算法和TEA 加解密的JavaScript实现 改写而成.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages