Package com.nimbusds.jose.crypto.impl
Class CipherHelper
java.lang.Object
com.nimbusds.jose.crypto.impl.CipherHelper
Helper utilities for instantiating ciphers.
- Version:
- 2014-01-22
- Author:
- Cedric Staub
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Cipher
getInstance
(String name, Provider provider) Instantiates a cipher with an (optional) JCA provider.
-
Constructor Details
-
CipherHelper
public CipherHelper()
-
-
Method Details
-
getInstance
public static Cipher getInstance(String name, Provider provider) throws NoSuchAlgorithmException, NoSuchPaddingException Instantiates a cipher with an (optional) JCA provider.- Parameters:
name
- The name of the cipher. Must not benull
.provider
- The JCA provider,null
to use the default.- Returns:
- The cipher.
- Throws:
NoSuchAlgorithmException
- On unsupported algorithm.NoSuchPaddingException
- On unsupported padding.
-