码迷,mamicode.com
首页 > 编程语言 > 详细

Decrypt.java

时间:2015-01-27 16:12:44      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:

import java.io.PrintStream;
import weblogic.security.internal.*;
import weblogic.security.internal.encryption.*;

public class Decrypt
{
    static EncryptionService es = null;
    static ClearOrEncryptedService ces = null;
    public static void main(String args[])
    {
        String s = null;
        if(args.length == 0)
            s = ServerAuthenticate.promptValue("Password: ", false);
        else
        if(args.length == 1)
            s = args[0];
        else
            System.err.println("Usage: java Decrypt [ password ]");
        es = SerializedSystemIni.getExistingEncryptionService();
        if(es == null)
        {
            System.err.println("Unable to initialize encryption service");
            return;
        }
        ces = new ClearOrEncryptedService(es);
        if(s != null)
            System.out.println("\nDecrypted Password is:"+ces.decrypt(s));
    }
}

Decrypt.java

标签:

原文地址:http://www.cnblogs.com/holdon521/p/4253225.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!