Package java.security

Examples of java.security.Provider$EngineDescription


  static void init() {
    if (initialized) {
      return;
    }
    /* Installs SunJCE provider */
    Provider sunJce = new com.sun.crypto.provider.SunJCE();
    Security.addProvider(sunJce);
    initialized = true;
  }
View Full Code Here


     */
    protected HsqlSocketFactorySecure() throws Exception {

        super();

        Provider p;
        String   cls;

        if (Security.getProvider("SunJSSE") == null) {
            try {
                p = (Provider) Class.forName(
View Full Code Here

        if (SOSKeyGenerator.keyLenght == 0) { throw new Exception("keyLenght cannot be 0"); }
        try {

            if (SOSKeyGenerator.provider.equalsIgnoreCase("BC")
                    && Security.getProvider("BC") == null) {
                Provider bp = new org.bouncycastle.jce.provider.BouncyCastleProvider();
                Security.addProvider(bp);
            }

            KeyPairGenerator generator = KeyPairGenerator.getInstance(
                    SOSKeyGenerator.keyAlgorithmName, SOSKeyGenerator.provider);
View Full Code Here

        PrivateKey priv = null;

        try {
            if (SOSKeyGenerator.provider.equalsIgnoreCase("BC")
                    && Security.getProvider("BC") == null) {
                Provider bp = new org.bouncycastle.jce.provider.BouncyCastleProvider();
                Security.addProvider(bp);
            }

           
View Full Code Here

        PublicKey pubKey = null;

        try {
            if (SOSKeyGenerator.provider.equalsIgnoreCase("BC")
                    && Security.getProvider("BC") == null) {
                Provider bp = new org.bouncycastle.jce.provider.BouncyCastleProvider();
                Security.addProvider(bp);
            }

            byte[] encKey = readFromFile(keyFile);
           
View Full Code Here

            PrivateKey privKey) throws Exception {

        try {
            if (SOSSignature.provider.equalsIgnoreCase("BC")
                    && Security.getProvider("BC") == null) {
                Provider bp = new org.bouncycastle.jce.provider.BouncyCastleProvider();
                Security.addProvider(bp);
            }

            String algo = SOSSignature.hashAlgorithm + "With"
                    + privKey.getAlgorithm();
View Full Code Here

            /* unterschrift from file signature lesen */
            byte[] sigToVerify = readFromFile(signFile);

            if (SOSSignature.provider.equalsIgnoreCase("BC")
                    && Security.getProvider("BC") == null) {
                Provider bp = new org.bouncycastle.jce.provider.BouncyCastleProvider();
                Security.addProvider(bp);
            }

            /*
             * Signature Objekt erzeugen mit mit public key verify
View Full Code Here

            }
            if (cons == null) {
                // BouncyCastle is not available so just return
                return;
            } else {
                Provider provider = (java.security.Provider)cons.newInstance();
                Security.insertProviderAt(provider, 2);
            }
        }
    }
View Full Code Here

            }
            if (cons == null) {
                // BouncyCastle is not available so just return
                return;
            } else {
                Provider provider = (java.security.Provider)cons.newInstance();
                Security.insertProviderAt(provider, 2);
            }
        }
    }
View Full Code Here

                cons = c.getConstructor(new Class[] {});
            } catch (Exception e) {
                //ignore
            }
            if (cons != null) {
                Provider provider = (java.security.Provider)cons.newInstance();
                Security.insertProviderAt(provider, 1);
                ecKeyControl = loadPublicKey("ec.key", "EC");
            }
        }
View Full Code Here

TOP

Related Classes of java.security.Provider$EngineDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.