Package org.jose4j.lang

Examples of org.jose4j.lang.InvalidAlgorithmException


        switch (type)
        {
            case WHITELIST:
                if (!algorithms.contains(algorithm))
                {
                    throw new InvalidAlgorithmException("'" +algorithm + "' is not a whitelisted algorithm.");
                }
                break;
            case BLACKLIST:
                if (algorithms.contains(algorithm))
                {
                    throw new InvalidAlgorithmException("'" + algorithm + "' is a blacklisted algorithm.");
                }
                break;
        }
    }
View Full Code Here


    {
        A algo = algorithms.get(algorithmIdentifier);

        if (algo == null)
        {
            throw new InvalidAlgorithmException(algorithmIdentifier + " is an unknown, unsupported or unavailable "+parameterName
                    +" algorithm (not one of " + getSupportedAlgorithms() + ").");
        }
       
        return algo;
    }
View Full Code Here

    public JsonWebSignatureAlgorithm getAlgorithm() throws InvalidAlgorithmException
    {
        String algo = getAlgorithmHeaderValue();
        if (algo == null)
        {
            throw new InvalidAlgorithmException("Signature algorithm header ("+HeaderParameterNames.ALGORITHM+") not set.");
        }

        getAlgorithmConstraints().checkConstraint(algo);
        AlgorithmFactoryFactory factoryFactory = AlgorithmFactoryFactory.getInstance();
        AlgorithmFactory<JsonWebSignatureAlgorithm> jwsAlgorithmFactory = factoryFactory.getJwsAlgorithmFactory();
View Full Code Here

    public ContentEncryptionAlgorithm getContentEncryptionAlgorithm() throws InvalidAlgorithmException
    {
        String encValue = getEncryptionMethodHeaderParameter();
        if (encValue == null)
        {
            throw new InvalidAlgorithmException("Content encryption header ("+HeaderParameterNames.ENCRYPTION_METHOD+") not set.");
        }

        contentEncryptionAlgorithmConstraints.checkConstraint(encValue);
        AlgorithmFactoryFactory factoryFactory = AlgorithmFactoryFactory.getInstance();
        AlgorithmFactory<ContentEncryptionAlgorithm> factory = factoryFactory.getJweContentEncryptionAlgorithmFactory();
View Full Code Here

    public KeyManagementAlgorithm getKeyManagementModeAlgorithm() throws InvalidAlgorithmException
    {
        String algo = getAlgorithmHeaderValue();
        if (algo == null)
        {
            throw new InvalidAlgorithmException("Encryption key management algorithm header ("+HeaderParameterNames.ALGORITHM+") not set.");
        }

        getAlgorithmConstraints().checkConstraint(algo);
        AlgorithmFactoryFactory factoryFactory = AlgorithmFactoryFactory.getInstance();
        AlgorithmFactory<KeyManagementAlgorithm> factory = factoryFactory.getJweKeyManagementAlgorithmFactory();
View Full Code Here

TOP

Related Classes of org.jose4j.lang.InvalidAlgorithmException

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.