Decrypt.java

it2022-05-11  74

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));    }}

转载于:https://www.cnblogs.com/holdon521/p/4253225.html

相关资源:Encrypt and Decrypt

最新回复(0)