Examples of JoseException


Examples of com.nimbusds.jose.JOSEException

    byte[] plainText = decrypt(compositeKey.getAESKey(), iv, cipherText, ceProvider);

    if (! macCheckPassed) {

      throw new JOSEException("MAC check failed");
    }

    return plainText;
  }
View Full Code Here

Examples of com.nimbusds.jose.JOSEException

    byte[] mac = HMAC.compute(cik, macInput.getBytes(), macProvider);

    if (! ConstantTimeUtils.areEqual(authTag.decode(), mac)) {

      throw new JOSEException("HMAC integrity check failed");
    }

    return plainText;
  }
View Full Code Here

Examples of org.jose4j.lang.JoseException

            return byteArrayOutputStream.toByteArray();
        }
        catch (IOException e)
        {
            throw new JoseException("Problem decompressing data.", e);
        }
    }
View Full Code Here

Examples of org.jose4j.lang.JoseException

            signature.update(securedInputBytes);
            return signature.verify(signatureBytes);
        }
        catch (SignatureException e)
        {
            throw new JoseException("Problem verifying signature.", e);
        }
    }
View Full Code Here

Examples of org.jose4j.lang.JoseException

            signature.update(securedInputBytes);
            return signature.sign();
        }
        catch (SignatureException e)
        {
            throw new JoseException("Problem creating signature.", e);
        }
    }
View Full Code Here

Examples of org.jose4j.lang.JoseException

            }
            return signature;
        }
        catch (NoSuchAlgorithmException e)
        {
            throw new JoseException("Unable to get an implementation of algorithm name: " + getJavaAlgorithm(), e);
        }
        catch (InvalidAlgorithmParameterException e)
        {
            throw new JoseException("Invalid algorithm parameter ("+algorithmParameterSpec+") for: " + getJavaAlgorithm(), e);
        }
    }
View Full Code Here

Examples of org.jose4j.lang.JoseException

            JSONParser parser = new JSONParser();
            return (DupeKeyDisallowingLinkedHashMap)parser.parse(jsonString, CONTAINER_FACTORY);
        }
        catch (ParseException | IllegalArgumentException e)
        {
            throw new JoseException("Parsing error: " + e, e);
        }
    }
View Full Code Here

Examples of org.jose4j.lang.JoseException

            PublicKey publicKey = getKeyFactory().generatePublic(ecPublicKeySpec);
            return (ECPublicKey) publicKey;
        }
        catch (InvalidKeySpecException e)
        {
            throw new JoseException("Invalid key spec: " + e, e);
        }
    }
View Full Code Here

Examples of org.jose4j.lang.JoseException

            PrivateKey privateKey = getKeyFactory().generatePrivate(ecPrivateKeySpec);
            return (ECPrivateKey) privateKey;
        }
        catch (InvalidKeySpecException e)
        {
            throw new JoseException("Invalid key spec: " + e, e);
        }
    }
View Full Code Here

Examples of org.jose4j.lang.JoseException

            keyGenerator.initialize(spec);
            return keyGenerator.generateKeyPair();
        }
        catch (InvalidAlgorithmParameterException e)
        {
            throw new JoseException("Unable to create EC key pair with spec " + spec, e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.