public class JcaTemplate extends Object
protected Provider findBouncyCastle()
protected <T,R> R fallback(Class<T> clazz, CheckedFunction<T,R> callback) throws SecurityException
SecurityExceptionpublic <R> R withCipher(CheckedFunction<Cipher,R> fn) throws SecurityException
SecurityExceptionpublic <R> R withKeyFactory(CheckedFunction<KeyFactory,R> fn) throws SecurityException
SecurityExceptionpublic <R> R withSecretKeyFactory(CheckedFunction<SecretKeyFactory,R> fn) throws SecurityException
SecurityExceptionpublic <R> R withKeyGenerator(CheckedFunction<KeyGenerator,R> fn) throws SecurityException
SecurityExceptionpublic <R> R withKeyAgreement(CheckedFunction<KeyAgreement,R> fn) throws SecurityException
SecurityExceptionpublic <R> R withKeyPairGenerator(CheckedFunction<KeyPairGenerator,R> fn) throws SecurityException
SecurityExceptionpublic <R> R withMessageDigest(CheckedFunction<MessageDigest,R> fn) throws SecurityException
SecurityExceptionpublic <R> R withSignature(CheckedFunction<Signature,R> fn) throws SecurityException
SecurityExceptionpublic <R> R withMac(CheckedFunction<Mac,R> fn) throws SecurityException
SecurityExceptionpublic <R> R withAlgorithmParameters(CheckedFunction<AlgorithmParameters,R> fn) throws SecurityException
SecurityExceptionpublic <R> R withCertificateFactory(CheckedFunction<CertificateFactory,R> fn) throws SecurityException
SecurityExceptionpublic SecretKey generateSecretKey(int keyBitLength)
public KeyPair generateKeyPair()
public KeyPair generateKeyPair(int keyBitLength)
public KeyPair generateKeyPair(AlgorithmParameterSpec params)
protected boolean isJdk11()
protected PrivateKey generatePrivate(KeyFactory factory, KeySpec spec) throws InvalidKeySpecException
InvalidKeySpecExceptionpublic PrivateKey generatePrivate(KeySpec spec)
public X509Certificate generateX509Certificate(byte[] x509DerBytes)
Copyright © 2014–2024 jsonwebtoken.io. All rights reserved.