jstrings  1
A tool for finding JIS-based character strings in binary streams
shift_jis.h
1 
8 #ifndef SHIFT_JIS_H
9 #define SHIFT_JIS_H
10 #include <vector>
11 #include <iostream>
12 #include <stdint.h>
13 #include "jis_enc.h"
14 
15 class shift_jis : public jis_enc {
16  static bool is_byte2_valid(const uint8_t* c);
17 
18 public:
19  shift_jis(std::istream* instream) : jis_enc(instream) {};
20  ~shift_jis();
21  std::vector<found_string>* find();
28  static bool is_jisx0201_printable(const uint8_t* c);
33  static bool is_jisx0208(const uint8_t* c_h, const uint8_t* c_l);
38  static bool is_jisx0213(const uint8_t* c_h, const uint8_t* c_l);
39 };
40 
41 #endif // SHIFT_JIS_H
static bool is_jisx0201_printable(const uint8_t *c)
Determines if a given byte is valid for JIS X 0201 and is printable.
Definition: shift_jis.cpp:98
std::vector< found_string > * find()
Performs the search of the data stream.
Definition: shift_jis.cpp:25
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.
Definition: shift_jis.cpp:106
Abstract class for JIS based encoding classes.
Definition: jis_enc.h:29
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.
Definition: shift_jis.cpp:172
Find Shift-JIS encoded strings in a byte stream.
Definition: shift_jis.h:15