jp.veritrans.tercerog.mdk.gw.utils
クラス EncryptionUtils

java.lang.Object
  上位を拡張 jp.veritrans.tercerog.mdk.gw.utils.EncryptionUtils

public class EncryptionUtils
extends Object

暗号、復号クラス。 ハイブリット暗号方式にて暗号、復号する。 公開鍵暗号方式:RSA:512bit 共通鍵暗号方式:AES/CBC/PKCS5PADDING

バージョン:
2.0 2012/07/13
作成者:
Veritrans Inc

フィールドの概要
static String KEYSTORE_TYPE_JKS
          キーストアタイプ(JKS)
static String KEYSTORE_TYPE_PKCS12
          キーストアタイプ(PKCS12)
 
コンストラクタの概要
EncryptionUtils()
           
 
メソッドの概要
 byte[] base64Dec(String str)
          base64Encの逆バージョン。
 String base64Enc(byte[] bytes)
          Base64(改行を入れないバージョン)した後、 URLエンコードしなくていいように"/"、"+"、"="を別の文字に変換する。
 String decryption(String storeFile, String storeType, String storePass, String storeAliasName, String storeAliasPass, String trustFile, String trustType, String trustPass, String trustAliasName, String cipher)
          復号化。
 String encryption(String storeFile, String storeType, String storePass, String storeAliasName, String storeAliasPass, String trustFile, String trustType, String trustPass, String trustAliasName, String pal)
          暗号化。
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

KEYSTORE_TYPE_JKS

public static final String KEYSTORE_TYPE_JKS
キーストアタイプ(JKS)

関連項目:
定数フィールド値

KEYSTORE_TYPE_PKCS12

public static final String KEYSTORE_TYPE_PKCS12
キーストアタイプ(PKCS12)

関連項目:
定数フィールド値
コンストラクタの詳細

EncryptionUtils

public EncryptionUtils()
メソッドの詳細

base64Enc

public String base64Enc(byte[] bytes)
                 throws Exception
Base64(改行を入れないバージョン)した後、 URLエンコードしなくていいように"/"、"+"、"="を別の文字に変換する。 エンコード後の文字列を"/"を"-"に、"+"を"_"に、"="を"*"に置換して返却する。

パラメータ:
bytes - Base64化するデータ
戻り値:
Base64化したデータ
例外:
Exception

base64Dec

public byte[] base64Dec(String str)
                 throws Exception
base64Encの逆バージョン。

パラメータ:
str - Base64を解くデータ
戻り値:
Base64を解いたデータ
例外:
Exception

encryption

public String encryption(String storeFile,
                         String storeType,
                         String storePass,
                         String storeAliasName,
                         String storeAliasPass,
                         String trustFile,
                         String trustType,
                         String trustPass,
                         String trustAliasName,
                         String pal)
                  throws Exception
暗号化。

パラメータ:
storeFile - キーストアファイルへのパス。
storeType - キーストアタイプ。
storePass - キーストアファイルのパスワード。
storeAliasName - プライベートキーを取得するエイリアス。(クライアント側)
storeAliasPass - プライベートキーを取得するためのパスワード。
trustFile - トラストストアファイルへのパス。
trustType - トラストストアタイプ。
trustPass - トラストストアファイルのパスワード。
trustAliasName - トラストストアキーを取得するエイリアス。(サーバ側)
pal - 暗号化する文字列。
例外:
Exception
導入されたバージョン:
1.0

decryption

public String decryption(String storeFile,
                         String storeType,
                         String storePass,
                         String storeAliasName,
                         String storeAliasPass,
                         String trustFile,
                         String trustType,
                         String trustPass,
                         String trustAliasName,
                         String cipher)
                  throws Exception
復号化。

パラメータ:
storeFile - キーストアファイルへのパス。
storeType - キーストアタイプ。
storePass - キーストアファイルのパスワード。
storeAliasName - プライベートキーを取得するエイリアス。(クライアント側)
storeAliasPass - プライベートキーを取得するためのパスワード。
trustFile - トラストストアファイルへのパス。
trustType - トラストストアタイプ。
trustPass - トラストストアファイルのパスワード。
trustAliasName - トラストストアキーを取得するエイリアス。(サーバ側)
cipher - 復号化する文字列。
例外:
Exception
導入されたバージョン:
1.0


Copyright © 2017. All rights reserved.