Class JSSCipherSpi
java.lang.Object
javax.crypto.CipherSpi
org.mozilla.jss.provider.javax.crypto.JSSCipherSpi
- Direct Known Subclasses:
JSSCipherSpi.AES,JSSCipherSpi.DES,JSSCipherSpi.DESede,JSSCipherSpi.RC2,JSSCipherSpi.RC4,JSSCipherSpi.RSA
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classprivate static classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate Stringprivate intprivate Cipherprivate intprivate static final JSSCipherSpi.NoAlgParamsprivate AlgorithmParameterSpec(package private) CryptoTokenprivate KeyWrapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]engineDoFinal(byte[] input, int inputOffset, int inputLen) intengineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) intbyte[]intengineGetKeySize(Key key) intengineGetOutputSize(int inputLen) voidengineInit(int opmode, Key key, AlgorithmParameters givenParams, SecureRandom random) voidengineInit(int opmode, Key key, SecureRandom random) voidengineInit(int opmode, Key key, AlgorithmParameterSpec givenParams, SecureRandom random) voidengineSetMode(String mode) voidengineSetPadding(String padding) engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) private KeyengineUnwrapPrivate(byte[] wrappedKey, String wrappedKeyAlg) private KeyengineUnwrapSecret(byte[] wrappedKey, String wrappedKeyAlg) byte[]engineUpdate(byte[] input, int inputOffset, int inputLen) intengineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) byte[]engineWrap(Key key) private AlgorithmParameterSpecgenerateAlgParams(Algorithm alg, int blockSize) private static SecretKeyMethods inherited from class javax.crypto.CipherSpi
engineDoFinal, engineUpdate, engineUpdateAAD, engineUpdateAAD
-
Field Details
-
algFamily
-
algMode
-
algPadding
-
token
CryptoToken token -
cipher
-
wrapper
-
params
-
blockSize
private int blockSize -
keyStrength
private int keyStrength -
noAlgParams
-
-
Constructor Details
-
JSSCipherSpi
-
-
Method Details
-
engineSetMode
- Specified by:
engineSetModein classCipherSpi
-
engineSetPadding
- Specified by:
engineSetPaddingin classCipherSpi
-
importKey
- Throws:
InvalidKeyException
-
engineInit
public void engineInit(int opmode, Key key, AlgorithmParameterSpec givenParams, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException - Specified by:
engineInitin classCipherSpi- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
engineInit
public void engineInit(int opmode, Key key, AlgorithmParameters givenParams, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException - Specified by:
engineInitin classCipherSpi- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
engineInit
- Specified by:
engineInitin classCipherSpi- Throws:
InvalidKeyException
-
generateAlgParams
-
engineGetBlockSize
public int engineGetBlockSize()- Specified by:
engineGetBlockSizein classCipherSpi
-
engineGetIV
public byte[] engineGetIV()- Specified by:
engineGetIVin classCipherSpi
-
engineGetParameters
- Specified by:
engineGetParametersin classCipherSpi
-
engineGetOutputSize
public int engineGetOutputSize(int inputLen) - Specified by:
engineGetOutputSizein classCipherSpi
-
engineUpdate
public byte[] engineUpdate(byte[] input, int inputOffset, int inputLen) - Specified by:
engineUpdatein classCipherSpi
-
engineUpdate
public int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException - Specified by:
engineUpdatein classCipherSpi- Throws:
ShortBufferException
-
engineDoFinal
public byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException - Specified by:
engineDoFinalin classCipherSpi- Throws:
IllegalBlockSizeExceptionBadPaddingException
-
engineDoFinal
public int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException - Specified by:
engineDoFinalin classCipherSpi- Throws:
ShortBufferExceptionIllegalBlockSizeExceptionBadPaddingException
-
engineWrap
- Overrides:
engineWrapin classCipherSpi- Throws:
IllegalBlockSizeExceptionInvalidKeyException
-
engineUnwrap
public Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException - Overrides:
engineUnwrapin classCipherSpi- Throws:
InvalidKeyExceptionNoSuchAlgorithmException
-
engineUnwrapSecret
private Key engineUnwrapSecret(byte[] wrappedKey, String wrappedKeyAlg) throws NoSuchAlgorithmException - Throws:
NoSuchAlgorithmException
-
engineUnwrapPrivate
private Key engineUnwrapPrivate(byte[] wrappedKey, String wrappedKeyAlg) throws NoSuchAlgorithmException - Throws:
NoSuchAlgorithmException
-
engineGetKeySize
- Overrides:
engineGetKeySizein classCipherSpi- Throws:
InvalidKeyException
-