com.JRcServer.commons.conv
クラス ScIO

java.lang.Object
  上位を拡張 com.JRcServer.commons.conv.ScIO

public class ScIO
extends java.lang.Object

ScIO(Simple-Code-Input/Output).

単純暗号入出力処理.
極めて単純な暗号処理をサポートします.
利用想定として、マルチキャスト(IPV4)による通信で 利用するように考えています.

導入されたバージョン:
JRcCommons 1.00
バージョン:
1.00, 2005/08/02
作成者:
Masahito Suzuki

フィールドの概要
static int TABLE_LENGTH
          暗号表長.
 
メソッドの概要
static byte[] getNewTable()
          新しい暗号表を生成.
static byte[] getNewUniqueTable()
          新しいユニーク暗号表を生成.
static void input(BinResource out, byte[] table, int code, int offset, int length)
          暗号処理.
static void input(BinResource out, int bCd, byte[] table, int code, int offset, int length)
          暗号処理.
static void input(BinResource out, int code, int offset, int length)
          暗号処理.
static void input(BinResource out, int bCd, int code, int offset, int length)
          暗号処理.
static void input(byte[] out, byte[] table, int code, int offset, int length)
          暗号処理.
static void input(byte[] out, int bCd, byte[] table, int code, int offset, int length)
          暗号処理.
static void input(byte[] out, int code, int offset, int length)
          暗号処理.
static void input(byte[] out, int bCd, int code, int offset, int length)
          暗号処理.
static void output(BinResource out, byte[] table, int code, int offset, int length)
          解析処理.
static void output(BinResource out, int bCd, byte[] table, int code, int offset, int length)
          解析処理.
static void output(BinResource out, int code, int offset, int length)
          解析処理.
static void output(BinResource out, int bCd, int code, int offset, int length)
          解析処理.
static void output(byte[] out, byte[] table, int code, int offset, int length)
          解析処理.
static void output(byte[] out, int bCd, byte[] table, int code, int offset, int length)
          解析処理.
static void output(byte[] out, int code, int offset, int length)
          解析処理.
static void output(byte[] out, int bCd, int code, int offset, int length)
          解析処理.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

TABLE_LENGTH

public static final int TABLE_LENGTH
暗号表長.

関連項目:
定数フィールド値
メソッドの詳細

input

public static final void input(byte[] out,
                               int code,
                               int offset,
                               int length)
                        throws InputException
暗号処理.

暗号処理を行います.

パラメータ:
out - 暗号対象のバイナリを設定します.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

input

public static final void input(byte[] out,
                               byte[] table,
                               int code,
                               int offset,
                               int length)
                        throws InputException
暗号処理.

暗号処理を行います.

パラメータ:
out - 暗号対象のバイナリを設定します.
table - 暗号表を設定します.
この情報は[256]byteの条件で設定する必要があります.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

input

public static final void input(byte[] out,
                               int bCd,
                               int code,
                               int offset,
                               int length)
                        throws InputException
暗号処理.

暗号処理を行います.

パラメータ:
out - 暗号対象のバイナリを設定します.
bCd - 対象の基本コードを設定します.
設定可能な範囲は[0]から[268435200]まで設定可能です.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

input

public static final void input(byte[] out,
                               int bCd,
                               byte[] table,
                               int code,
                               int offset,
                               int length)
                        throws InputException
暗号処理.

暗号処理を行います.

パラメータ:
out - 暗号対象のバイナリを設定します.
bCd - 対象の基本コードを設定します.
設定可能な範囲は[0]から[268435200]まで設定可能です.
table - 暗号表を設定します.
この情報は[256]byteの条件で設定する必要があります.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

input

public static final void input(BinResource out,
                               int code,
                               int offset,
                               int length)
                        throws InputException
暗号処理.

暗号処理を行います.

パラメータ:
out - 暗号対象のバイナリを設定します.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

input

public static final void input(BinResource out,
                               byte[] table,
                               int code,
                               int offset,
                               int length)
                        throws InputException
暗号処理.

暗号処理を行います.

パラメータ:
out - 暗号対象のバイナリを設定します.
table - 暗号表を設定します.
この情報は[256]byteの条件で設定する必要があります.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

input

public static final void input(BinResource out,
                               int bCd,
                               int code,
                               int offset,
                               int length)
                        throws InputException
暗号処理.

暗号処理を行います.

パラメータ:
out - 暗号対象のバイナリを設定します.
bCd - 対象の基本コードを設定します.
設定可能な範囲は[0]から[268435200]まで設定可能です.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

input

public static final void input(BinResource out,
                               int bCd,
                               byte[] table,
                               int code,
                               int offset,
                               int length)
                        throws InputException
暗号処理.

暗号処理を行います.

パラメータ:
out - 暗号対象のバイナリを設定します.
bCd - 対象の基本コードを設定します.
設定可能な範囲は[0]から[268435200]まで設定可能です.
table - 暗号表を設定します.
この情報は[256]byteの条件で設定する必要があります.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

output

public static final void output(byte[] out,
                                int code,
                                int offset,
                                int length)
                         throws InputException
解析処理.

暗号化された情報を解析します.

パラメータ:
out - 暗号解析対象のバイナリを設定します.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

output

public static final void output(byte[] out,
                                byte[] table,
                                int code,
                                int offset,
                                int length)
                         throws InputException
解析処理.

暗号化された情報を解析します.

パラメータ:
out - 暗号解析対象のバイナリを設定します.
table - 暗号表を設定します.
この情報は[256]byteの条件で設定する必要があります.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

output

public static final void output(byte[] out,
                                int bCd,
                                int code,
                                int offset,
                                int length)
                         throws InputException
解析処理.

暗号化された情報を解析します.

パラメータ:
out - 暗号解析対象のバイナリを設定します.
bCd - 対象の基本コードを設定します.
設定可能な範囲は[0]から[268435200]まで設定可能です.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

output

public static final void output(byte[] out,
                                int bCd,
                                byte[] table,
                                int code,
                                int offset,
                                int length)
                         throws InputException
解析処理.

暗号化された情報を解析します.

パラメータ:
out - 暗号解析対象のバイナリを設定します.
bCd - 対象の基本コードを設定します.
設定可能な範囲は[0]から[268435200]まで設定可能です.
table - 暗号表を設定します.
この情報は[256]byteの条件で設定する必要があります.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

output

public static final void output(BinResource out,
                                int code,
                                int offset,
                                int length)
                         throws InputException
解析処理.

暗号化された情報を解析します.

パラメータ:
out - 暗号解析対象のバイナリを設定します.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

output

public static final void output(BinResource out,
                                byte[] table,
                                int code,
                                int offset,
                                int length)
                         throws InputException
解析処理.

暗号化された情報を解析します.

パラメータ:
out - 暗号解析対象のバイナリを設定します.
table - 暗号表を設定します.
この情報は[256]byteの条件で設定する必要があります.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

output

public static final void output(BinResource out,
                                int bCd,
                                int code,
                                int offset,
                                int length)
                         throws InputException
解析処理.

暗号化された情報を解析します.

パラメータ:
out - 暗号解析対象のバイナリを設定します.
bCd - 対象の基本コードを設定します.
設定可能な範囲は[0]から[268435200]まで設定可能です.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

output

public static final void output(BinResource out,
                                int bCd,
                                byte[] table,
                                int code,
                                int offset,
                                int length)
                         throws InputException
解析処理.

暗号化された情報を解析します.

パラメータ:
out - 暗号解析対象のバイナリを設定します.
bCd - 対象の基本コードを設定します.
設定可能な範囲は[0]から[268435200]まで設定可能です.
table - 暗号表を設定します.
この情報は[256]byteの条件で設定する必要があります.
code - 対象の暗号コードを設定します.
offset - 開始位置を設定します.
length - データ長を設定します.
例外:
InputException - 入力例外.

getNewTable

public static final byte[] getNewTable()
新しい暗号表を生成.

新しいユニークでない暗号表を生成します.
条件として、0-255までのテーブルをランダムに生成します.
このときの暗号表は、ランダムに割り当てられます.
そのため、ユニークな暗号表を利用する場合は、メソッド [ScIO.getNewUniqueTable()]を利用してください.

戻り値:
byte[] 新しい暗号表が返されます.

getNewUniqueTable

public static final byte[] getNewUniqueTable()
新しいユニーク暗号表を生成.

新しいユニーク暗号表を生成します.
条件として、0-255までのテーブルをランダムに生成します.
このときの暗号表は、ユニークに割り当てられます.
そのため、ユニークでない暗号表を利用する場合は、メソッド [ScIO.getNewTable()]を利用してください.

戻り値:
byte[] 新しい暗号表が返されます.