Skip to content

HonokaMiku Usage

MikuAuahDark edited this page Sep 16, 2016 · 3 revisions

#HonokaMiku Usage

Below are ways to use HonokaMiku in 2 scenarios

###Used as an application

Using HonokaMiku as application requires it to be invoked with command shell. HonokaMiku command-line is

HonokaMiku [options] <input> [options] [output]

If no output specificed, input will be overwritten. Command-line can be any order.

options can be:

  • -1 or --olddecrypt: Encrypt/decrypt version 1 game files. Also needs one of the game file flag to be set. Encryption mode will be ignored if this option is set.

  • -b<name> or --basename<name>: Use basename name as decrypt/encrypt key. Required if reading from stdin.

  • -c or --sif-cn: Assume input file is SIF CN game file. *

  • -d or --detect: Detect game file type only. output other parameters is ignored (except game file flag)

  • -e or --encrypt: Encrypt instead of decrypting it. One of the game file flag must be specificed.

  • -j or --sif-jp: Assume input file is SIF JP game file. *

  • -k or --sif-kr: Assume input file is SIF KR game file. Files encrypted with this game file flag is backward compatible with SIF JP. *

  • -t or --sif-tw: Assume input file is SIF TW game file. *

  • -v or --version: Show version information (like HonokaMiku version and compiler that compiles HonokaMiku).

  • -w or --sif-en or --sif-ww: Assume input file is SIF EN game file. *

  • -x<game> or --cross-encrypt<game>: Cross-encrypt to another game file (changing it's key). Desired game can be w, j, t, k, or c **

* - One of game file flags
** - w for SIF EN, j for SIF JP, t for SIF TW, k for SIF KR (or JP), and c for SIF CN.

Aguments that expects value can be in form <command-line> <value> or <command-line><value>. Both will do same thing.

Example: Decrypt file with unknown encrypted type: HonokaMiku file.png
Example2: Cross-encrypt to SIF JP: HonokaMiku -x j file.png

###Embedded in application

HonokaMiku is also designed to be embedable for other application. HonokaMiku is written under C++03 standard, so you need a C++ compiler which comply at least to C++03 standard. Most compilers today even already supports C++11 so you're good.

You need all files in src folder, except HonokaMiku.cc (which defines the main entry point for executable) and CompilerName.h. After you included necessary files in your project, simply include DecrypterContext.h in your source code and you can use HonokaMiku functions in your application.

For more documentation about the API functions, please see DecrypterContext.h or generate doxygen documentation from DecrypterContext.h.

Clone this wiki locally