org.jclouds.encryption.internal
Class JCECrypto

java.lang.Object
  extended by org.jclouds.encryption.internal.JCECrypto
All Implemented Interfaces:
Crypto

@Singleton
public class JCECrypto
extends Object
implements Crypto

Author:
Adrian Cole

Constructor Summary
JCECrypto()
           
JCECrypto(Provider provider)
           
 
Method Summary
 CertificateFactory certFactory()
           
 Cipher cipher(String algorithm)
           
 Mac hmac(String algorithm, byte[] key)
           
 Mac hmacSHA1(byte[] key)
           
 Mac hmacSHA256(byte[] key)
           
 KeyFactory rsaKeyFactory()
           
 KeyPairGenerator rsaKeyPairGenerator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCECrypto

@Inject
public JCECrypto()
          throws NoSuchAlgorithmException,
                 CertificateException
Throws:
NoSuchAlgorithmException
CertificateException

JCECrypto

public JCECrypto(@Nullable
                 Provider provider)
          throws NoSuchAlgorithmException,
                 CertificateException
Throws:
NoSuchAlgorithmException
CertificateException
Method Detail

hmac

public Mac hmac(String algorithm,
                byte[] key)
         throws NoSuchAlgorithmException,
                InvalidKeyException
Specified by:
hmac in interface Crypto
Throws:
NoSuchAlgorithmException
InvalidKeyException

cipher

public Cipher cipher(String algorithm)
              throws NoSuchAlgorithmException,
                     NoSuchPaddingException
Specified by:
cipher in interface Crypto
Throws:
NoSuchAlgorithmException
NoSuchPaddingException

hmacSHA1

public Mac hmacSHA1(byte[] key)
             throws InvalidKeyException
Specified by:
hmacSHA1 in interface Crypto
Throws:
InvalidKeyException

hmacSHA256

public Mac hmacSHA256(byte[] key)
               throws InvalidKeyException
Specified by:
hmacSHA256 in interface Crypto
Throws:
InvalidKeyException

certFactory

public CertificateFactory certFactory()
Specified by:
certFactory in interface Crypto

rsaKeyFactory

public KeyFactory rsaKeyFactory()
Specified by:
rsaKeyFactory in interface Crypto

rsaKeyPairGenerator

public KeyPairGenerator rsaKeyPairGenerator()
Specified by:
rsaKeyPairGenerator in interface Crypto


Copyright © 2009-2013 jclouds. All Rights Reserved.