0
私はこのコードを何か似たような時間をWebアプリケーションのサーバーコード内で使用しましたが、今はコマンドを作成しようとしていますメンテナンスバックエンドで作業するためのオンラインユーティリティです。Miffed ...シンプルなコードですが、org.jasypt.exceptions.EncryptionOperationNotPossibleException
EncryptionOperationNotPossibleException
を取得し続けるが、コードで何が間違っているのかわからない。スニペットをテストするために、実際の暗号化された文字列を使用してテスト入力ではないことを確認しました。
この例外はコード内のどこにありますか?
import org.jasypt.exceptions.EncryptionOperationNotPossibleException;
import org.jasypt.util.text.BasicTextEncryptor;
public class decipher {
/**
* @param args
*/
public static void main(String[] args) {
if (args[0] != null) {
String encstr = args[0];
String decstr = "";
if (encstr != null && !encstr.equals("")) {
try {
BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
textEncryptor.setPassword("1234566789");
decstr = textEncryptor.decrypt(encstr);
System.out.println(decstr);
} catch (EncryptionOperationNotPossibleException e) {
System.out.println(e.toString());
}
} else {
System.out.println("Passed empty string... not decrypted.");
}
} else {
System.out.println("This program requires and encrypted text input.");
}
}
}