Project

rubytea

0.0
No commit activity in last 3 years
No release in over 3 years
A wrapper around the XXTEA block encryption algorithm
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

 Project Readme

Usage

key = TEA::Key.new(1234, 4567, 2345, 3456)
data = "bobafett".unpack("N*") # (needs to be a multiple of 4 bytes long)

TEA.encrypt!(data, key) # encrypts your integer array in place; returns it for convenience

TEA.decrypt!(data, key) # in place too
data.pack("N*") # => "bobafett"