@Singleton public class JCECrypto extends Object implements Crypto
| Constructor and Description |
|---|
JCECrypto() |
JCECrypto(Provider provider) |
| Modifier and Type | Method and Description |
|---|---|
CertificateFactory |
certFactory() |
Cipher |
cipher(String algorithm) |
Mac |
hmac(String algorithm,
byte[] key) |
Mac |
hmacSHA1(byte[] key) |
Mac |
hmacSHA256(byte[] key) |
KeyFactory |
rsaKeyFactory() |
KeyPairGenerator |
rsaKeyPairGenerator() |
@Inject
public JCECrypto()
throws NoSuchAlgorithmException,
CertificateException
public JCECrypto(@Nullable Provider provider) throws NoSuchAlgorithmException, CertificateException
public Mac hmac(String algorithm, byte[] key) throws NoSuchAlgorithmException, InvalidKeyException
hmac in interface CryptoNoSuchAlgorithmExceptionInvalidKeyExceptionpublic Cipher cipher(String algorithm) throws NoSuchAlgorithmException, NoSuchPaddingException
cipher in interface CryptoNoSuchAlgorithmExceptionNoSuchPaddingExceptionpublic Mac hmacSHA1(byte[] key) throws InvalidKeyException
hmacSHA1 in interface CryptoInvalidKeyExceptionpublic Mac hmacSHA256(byte[] key) throws InvalidKeyException
hmacSHA256 in interface CryptoInvalidKeyExceptionpublic CertificateFactory certFactory()
certFactory in interface Cryptopublic KeyFactory rsaKeyFactory()
rsaKeyFactory in interface Cryptopublic KeyPairGenerator rsaKeyPairGenerator()
rsaKeyPairGenerator in interface CryptoCopyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.