Method: FFXCodec#setup_encryption

Defined in:
lib/ffxcodec.rb

#setup_encryption(key, tweak) ⇒ void

This method returns an undefined value.

Setup encryption

Auto-enables encryption after encoding and decryption before decoding.

Parameters:

  • key (String)

    for AES as a hexadecimal string

  • tweak (String)

    for AES



27
28
29
# File 'lib/ffxcodec.rb', line 27

def setup_encryption(key, tweak)
  @crypto = Encrypt.new(key, tweak, @encoder.size, 2)
end