Package lv.odylab.evemanage.application.exception

Examples of lv.odylab.evemanage.application.exception.EveManageSecurityException


        try {
            byte[] decodedApiKeyBytes = Base64.decode(fullApiKey.getEncodedApiKeyString());
            byte[] decryptedApiKeyBytes = securityManager.decrypt(decodedApiKeyBytes);
            fullApiKeyString = new String(decryptedApiKeyBytes);
        } catch (IOException e) {
            throw new EveManageSecurityException(e);
        }

        if ("CHARACTER".equals(level)) {
            proceedIndustryJobImport(eveApiGateway.getCharacterIndustryJobs(fullApiKeyString, fullApiKey.getApiKeyUserID(), characterID), attachedCharacterID, sharingLevel, userKey);
        } else {
View Full Code Here


        try {
            byte[] decodedApiKeyBytes = Base64.decode(encodedApikeyString);
            byte[] decryptedApiKeyBytes = securityManager.decrypt(decodedApiKeyBytes);
            return new String(decryptedApiKeyBytes);
        } catch (IOException e) {
            throw new EveManageSecurityException(e);
        }
    }
View Full Code Here

    public PrivateKeyProvider() {
        try {
            privateKey = readPrivateKeyFromFile("/private.key");
        } catch (IOException e) {
            throw new EveManageSecurityException(e);
        }
    }
View Full Code Here

        PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(data);
        try {
            KeyFactory keyFactory = KeyFactory.getInstance("RSA");
            return keyFactory.generatePrivate(privateKeySpec);
        } catch (NoSuchAlgorithmException e) {
            throw new EveManageSecurityException(e);
        } catch (InvalidKeySpecException e) {
            throw new EveManageSecurityException(e);
        }
    }
View Full Code Here

            byte[] apiKeyUserIDBytes = String.valueOf(apiKeyUserID).getBytes();
            byte[] salt = Base64.encodeBytesToBytes(apiKeyUserIDBytes);
            digest.update(salt);
            return Base64.encodeBytes(digest.digest(apiKeyString.getBytes()));
        } catch (NoSuchAlgorithmException e) {
            throw new EveManageSecurityException(e);
        }
    }
View Full Code Here

        try {
            Cipher cipher = Cipher.getInstance("RSA");
            cipher.init(Cipher.ENCRYPT_MODE, publicKey);
            return cipher.doFinal(data);
        } catch (Exception e) {
            throw new EveManageSecurityException(e);
        }
    }
View Full Code Here

        try {
            Cipher cipher = Cipher.getInstance("RSA");
            cipher.init(Cipher.DECRYPT_MODE, privateKey);
            return cipher.doFinal(data);
        } catch (Exception e) {
            throw new EveManageSecurityException(e);
        }
    }
View Full Code Here

    public PublicKeyProvider() {
        try {
            publicKey = readPublicKeyFromFile("/public.key");
        } catch (IOException e) {
            throw new EveManageSecurityException(e);
        }
    }
View Full Code Here

        X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(data);
        try {
            KeyFactory keyFactory = KeyFactory.getInstance("RSA");
            return keyFactory.generatePublic(publicKeySpec);
        } catch (NoSuchAlgorithmException e) {
            throw new EveManageSecurityException(e);
        } catch (InvalidKeySpecException e) {
            throw new EveManageSecurityException(e);
        }
    }
View Full Code Here

TOP

Related Classes of lv.odylab.evemanage.application.exception.EveManageSecurityException

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.