jstrings  1
A tool for finding JIS-based character strings in binary streams
Public Member Functions | Static Public Member Functions | List of all members
shift_jis Class Reference

Find Shift-JIS encoded strings in a byte stream. More...

#include <shift_jis.h>

Inheritance diagram for shift_jis:
jis_enc

Public Member Functions

 shift_jis (std::istream *instream)
 
std::vector< found_string > * find ()
 Performs the search of the data stream.
 
- Public Member Functions inherited from jis_enc
 jis_enc (std::istream *instream)
 
void set_min_len (size_t min_len)
 Setter for min_len.
 
size_t get_min_len ()
 Getter for min_len.
 
void set_is_big_endian (bool is_big_endian)
 Setter for is_big_endian.
 
bool get_is_big_endian ()
 Getter for is_big_endian.
 
void set_use_jisx0213 (bool use_jisx0213)
 Setter for use_jisx0213.
 
bool get_use_jisx0213 ()
 Getter for use_jisx0213.
 

Static Public Member Functions

static bool is_jisx0201_printable (const uint8_t *c)
 Determines if a given byte is valid for JIS X 0201 and is printable. More...
 
static bool is_jisx0208 (const uint8_t *c_h, const uint8_t *c_l)
 Determines if the given bytes make up a valid JIS X 0208 character. More...
 
static bool is_jisx0213 (const uint8_t *c_h, const uint8_t *c_l)
 Determines if the given bytes make up a valid JIS X 0213 character. More...
 

Additional Inherited Members

- Protected Attributes inherited from jis_enc
std::istream * instream
 
size_t min_len = 10
 Minimum number of characters to match to count as a found string.
 
bool is_big_endian = true
 Determines byte order for multibyte characters.
 
bool use_jisx0213 = false
 Use the JIS X 0213 character set instead of JIS X 0208.
 

Detailed Description

Find Shift-JIS encoded strings in a byte stream.

Author
Damian Rogers (damia.nosp@m.n@su.nosp@m.dden-.nosp@m.desu.nosp@m..net)
Version
1.0
Date
2017.12.30

Member Function Documentation

◆ is_jisx0201_printable()

bool shift_jis::is_jisx0201_printable ( const uint8_t *  c)
static

Determines if a given byte is valid for JIS X 0201 and is printable.

Returns
True if the byte is valid

In this case, valid means not within the reserved range (0x80 to 0xa0, 0xe0 to 0xff) and not an ASCII control character (0x00 to 0x1f, 0x7f)

◆ is_jisx0208()

bool shift_jis::is_jisx0208 ( const uint8_t *  c_h,
const uint8_t *  c_l 
)
static

Determines if the given bytes make up a valid JIS X 0208 character.

Returns
True if the bytes are valid

◆ is_jisx0213()

bool shift_jis::is_jisx0213 ( const uint8_t *  c_h,
const uint8_t *  c_l 
)
static

Determines if the given bytes make up a valid JIS X 0213 character.

Returns
True if the bytes are valid

The documentation for this class was generated from the following files: