Package org.jclouds.encryption.internal
Class JCECrypto
- java.lang.Object
-
- org.jclouds.encryption.internal.JCECrypto
-
- All Implemented Interfaces:
Crypto
- Direct Known Subclasses:
BouncyCastleCrypto
@Singleton public class JCECrypto extends Object implements Crypto
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CertificateFactorycertFactory()Ciphercipher(String algorithm)Machmac(String algorithm, byte[] key)MachmacSHA1(byte[] key)MachmacSHA256(byte[] key)KeyFactoryrsaKeyFactory()KeyPairGeneratorrsaKeyPairGenerator()
-
-
-
Constructor Detail
-
JCECrypto
@Inject public JCECrypto() throws NoSuchAlgorithmException, CertificateException
-
JCECrypto
public JCECrypto(@Nullable Provider provider) throws NoSuchAlgorithmException, CertificateException
-
-
Method Detail
-
hmac
public Mac hmac(String algorithm, byte[] key) throws NoSuchAlgorithmException, InvalidKeyException
- Specified by:
hmacin interfaceCrypto- Throws:
NoSuchAlgorithmExceptionInvalidKeyException
-
cipher
public Cipher cipher(String algorithm) throws NoSuchAlgorithmException, NoSuchPaddingException
- Specified by:
cipherin interfaceCrypto- Throws:
NoSuchAlgorithmExceptionNoSuchPaddingException
-
hmacSHA1
public Mac hmacSHA1(byte[] key) throws InvalidKeyException
- Specified by:
hmacSHA1in interfaceCrypto- Throws:
InvalidKeyException
-
hmacSHA256
public Mac hmacSHA256(byte[] key) throws InvalidKeyException
- Specified by:
hmacSHA256in interfaceCrypto- Throws:
InvalidKeyException
-
certFactory
public CertificateFactory certFactory()
- Specified by:
certFactoryin interfaceCrypto
-
rsaKeyFactory
public KeyFactory rsaKeyFactory()
- Specified by:
rsaKeyFactoryin interfaceCrypto
-
rsaKeyPairGenerator
public KeyPairGenerator rsaKeyPairGenerator()
- Specified by:
rsaKeyPairGeneratorin interfaceCrypto
-
-