Uses of Class
org.mozilla.jss.crypto.TokenException
Packages that use TokenException
Package
Description
Configuration and top-level operations of the JSS system.
Generic cryptographic operations, such as signing and key pair generation.
Encoding and decoding pkcs10 request
Creating and interpreting PKCS #12 blobs.
Creating and interpeting PKCS #7 blobs.
Encoding and decoding X.509 certificates and certificate extensions.
Creating and interpeting CMS blobs.
The PKIX CRMF protocol.
Frequently-used primitive ASN.1 types, such as AlgorithmIdentifier,
PrivateKeyInfo, and X.500 Name.
A facility for encrypting and decrypting small amounts of data with
a symmetric key.
-
Uses of TokenException in org.dogtagpki.jss.tomcat
Methods in org.dogtagpki.jss.tomcat that throw TokenException -
Uses of TokenException in org.mozilla.jss
Methods in org.mozilla.jss that throw TokenExceptionModifier and TypeMethodDescriptionCryptoManager.buildCertificateChain(X509Certificate leaf) Given a certificate, constructs its certificate chain.(package private) X509Certificate[]CryptoManager.buildCertificateChainNative(PK11Cert leaf) CryptoManager.findCertByIssuerAndSerialNumber(byte[] derIssuer, INTEGER serialNumber) Looks up a certificate by issuer and serial number.private X509CertificateCryptoManager.findCertByIssuerAndSerialNumberNative(byte[] derIssuer, byte[] serialNumber) CryptoManager.findCertByNickname(String nickname) Looks up a certificate given its nickname.protected X509CertificateCryptoManager.findCertByNicknameNative(String nickname) CryptoManager.findCertsByNickname(String nickname) Returns all certificates with the given nickname.protected X509Certificate[]CryptoManager.findCertsByNicknameNative(String nickname) CryptoManager.findPrivKeyByCert(X509Certificate cert) Looks up the PrivateKey matching the given certificate.protected PrivateKeyCryptoManager.findPrivKeyByCertNative(X509Certificate cert) CryptoManager.importCACertPackage(byte[] certPackage) Imports a chain of certificates, none of which is a user certificate.CryptoManager.importCertPackage(byte[] certPackage, String nickname) Imports a chain of certificates.private X509CertificateCryptoManager.importCertPackageNative(byte[] certPackage, String nickname, boolean noUser, boolean leafIsCA) CryptoManager.importCertToPerm(X509Certificate cert, String nickname) Imports a single certificate into the permanent certificate database.private X509CertificateCryptoManager.importCertToPermNative(X509Certificate cert, String nickname) voidImports a CRL, and stores it into the cert7.db Validate CRL then import it to the dbase.private voidCryptoManager.importCRLNative(byte[] crl, String url, int rl_type) Imports a CRL, and stores it into the cert7.dbCryptoManager.importUserCACertPackage(byte[] certPackage, String nickname) Imports a chain of certificates.booleanCryptoManager.isCertValid(byte[] certPackage, boolean checkSig, CryptoManager.CertUsage certUsage) Verify a certificate in memory.private booleanCryptoManager.verifyCertTempNative(byte[] certPackage, boolean checkSig, int cUsage) -
Uses of TokenException in org.mozilla.jss.crypto
Methods in org.mozilla.jss.crypto that throw TokenExceptionModifier and TypeMethodDescriptionvoidCryptoToken.changePassword(PasswordCallback oldpw, PasswordCallback newpw) Change the password of this token.KeyGenerator.clone(SymmetricKey key) Allows a SymmetricKey to be cloned on a different token.CryptoToken.cloneKey(SymmetricKey key) Clones a SymmetricKey from a different token onto this token.byte[]SecretDecoderRing.decrypt(byte[] ciphertext) Decrypts the given ciphertext with the Secret Decoder Ring key stored in the NSS key database.SecretDecoderRing.decryptToString(byte[] ciphertext) Decrypts the given ciphertext with the Secret Decoder Ring key stored in the NSS key database, returning the original plaintext string.voidCryptoStore.deleteCert(X509Certificate cert) Deletes a certificate and the corresponding keys.voidCryptoStore.deleteCertOnly(X509Certificate cert) Deletes a certificate without deleting the corresponding keys.voidCryptoStore.deletePrivateKey(PrivateKey privateKey) Permanently deletes a private key from the token.voidCryptoStore.deletePublicKey(PublicKey publicKey) Permanently deletes a public key from the token.SymmetricKeyDeriver.derive()abstract byte[]Cipher.doFinal()Completes an cipher operation.abstract byte[]Cipher.doFinal(byte[] bytes) Completes an cipher operation.abstract byte[]Cipher.doFinal(byte[] bytes, int offset, int length) Completes an cipher operation.byte[]SecretDecoderRing.encrypt(byte[] plaintext) Encrypts the given plaintext with the Secret Decoder Ring key stored in the NSS key database.byte[]Encrypts the given plaintext string with the Secret Decoder Ring key stored in the NSS key database.abstract voidSignatureSpi.engineInitSign(PrivateKey privateKey) abstract voidSignatureSpi.engineInitSign(PrivateKey privateKey, SecureRandom random) abstract voidSignatureSpi.engineInitVerify(PublicKey publicKey) abstract voidSignatureSpi.engineSetParameter(AlgorithmParameterSpec params) abstract byte[]SignatureSpi.engineSign()abstract intSignatureSpi.engineSign(byte[] outbuf, int offset, int len) abstract voidSignatureSpi.engineUpdate(byte b) abstract voidSignatureSpi.engineUpdate(byte[] b, int off, int len) abstract booleanSignatureSpi.engineVerify(byte[] sigBytes) CryptoStore.findCert(byte[] certBytes) Find a certificate in this token from its binary data.CryptoStore.findPublicKey(PrivateKey privateKey) Returns the public key corresponding to the private key.KeyGenerator.generate()Generates a symmetric key.CryptoToken.generateCertRequest(String subject, int keysize, String keyType, byte[] P, byte[] Q, byte[] G) Generates a b64 encoded PKCS10 blob used for making cert request.abstract KeyPairKeyPairGeneratorSpi.generateKeyPair()byte[]KeyGenerator.generatePBE_IV()Generates an Initialization Vector using a PBE algorithm.KeyPairGenerator.genKeyPair()Generates a new key pair.CryptoStore.getCertificates()Returns all user certificates stored on this token.CryptoToken.getCipherContext(EncryptionAlgorithm algorithm) Creates a Cipher object, which can be used for encryption and decryption.byte[]CryptoStore.getEncryptedPrivateKeyInfo(X509Certificate cert, PBEAlgorithm pbeAlg, Password pw, int iteration) Get an encrypted private key for the given cert.CryptoToken.getKeyGenerator(KeyGenAlgorithm algorithm) Creates a KeyGenerator object, which can be used to generate symmetric encryption keys.CryptoToken.getKeyPairGenerator(KeyPairAlgorithm algorithm) Creates a KeyPairGenerator object, which can be used to generate key pairs.CryptoToken.getKeyWrapper(KeyWrapAlgorithm algorithm) intCryptoToken.getLoginMode()Returns the login mode of this token: ONE_TIME, TIMEOUT, or EVERY_TIME.intCryptoToken.getLoginTimeoutMinutes()Returns the login timeout period.CryptoToken.getName()Obtain the nickname, or label, of this token.CryptoStore.getPrivateKeys()Returns all private keys stored on this token.CryptoStore.getPublicKeys()Returns all public keys stored on this token.CryptoToken.getSignatureContext(SignatureAlgorithm algorithm) Creates a Signature object, which can perform signing and signature verification.CryptoToken.getSymmetricKeyDeriver()CryptoStore.getSymmetricKeys()Returns all symmetric keys stored on this token.byte[]PrivateKey.getUniqueID()Returns the unique ID of this key.CryptoStore.importCert(byte[] certBytes, String nickname) Imports a certificate into this token.CryptoStore.importPrivateKey(byte[] key, PrivateKey.Type type) Imports a raw private key into this token (permanently).CryptoStore.importPrivateKey(byte[] key, PrivateKey.Type type, boolean temporary) Imports a raw private key into this token.voidCryptoToken.importPublicKey(PublicKey pubKey, boolean permanent) abstract voidCipher.initDecrypt(SymmetricKey key) Initializes a decryption context with a symmetric key.abstract voidCipher.initDecrypt(SymmetricKey key, AlgorithmParameterSpec parameters) Initializes a decryption context with a symmetric key and algorithm parameters.abstract voidCipher.initEncrypt(SymmetricKey key) Initializes a encryption context with a symmetric key.abstract voidCipher.initEncrypt(SymmetricKey key, AlgorithmParameterSpec parameters) Initializes an encryption context with a symmetric key and algorithm parameters.voidCryptoToken.initPassword(PasswordCallback securityOfficerPW, PasswordCallback userPW) Initialize the password of this token.voidSignature.initSign(PrivateKey privateKey) Initialize the signature context for signing.voidSignature.initVerify(PublicKey publicKey) Initialize the signature context for verifying.booleanCryptoToken.isLoggedIn()Find out if the token is currently logged in.voidCryptoToken.login(PasswordCallback pwcb) Login to the token.voidCryptoToken.logout()Logout of the token.booleanCryptoToken.needsLogin()returns true if this token needs to be logged into before it can be used.booleanCryptoToken.passwordIsInitialized()Determine whether the password has been initialized yet.voidCryptoToken.setLoginMode(int mode) Sets the login mode of this token.voidCryptoToken.setLoginTimeoutMinutes(int timeoutMinutes) Sets the timeout period for logging in.voidSignature.setParameter(AlgorithmParameterSpec params) Set parameters for the signing algorithm.byte[]Signature.sign()Finish a signing operation and return the signature.intSignature.sign(byte[] outbuf, int offset, int len) Finish a signing operation and store the signature in the provided buffer.KeyWrapper.unwrapPrivate(byte[] wrapped, PrivateKey.Type type, PublicKey publicKey) Unwraps a private key, creating a permanent private key object.KeyWrapper.unwrapSymmetric(byte[] wrapped, SymmetricKey.Type type, int keyLength) Unwraps a key and allows it to be used for all operations.KeyWrapper.unwrapSymmetric(byte[] wrapped, SymmetricKey.Type type, SymmetricKey.Usage usage, int keyLength) KeyWrapper.unwrapSymmetricPerm(byte[] wrapped, SymmetricKey.Type type, int keyLength) Unwraps a key and allows it to be used for all operations.KeyWrapper.unwrapSymmetricPerm(byte[] wrapped, SymmetricKey.Type type, SymmetricKey.Usage usage, int keyLength) KeyWrapper.unwrapTemporaryPrivate(byte[] wrapped, PrivateKey.Type type, PublicKey publicKey) Unwraps a private key, creating a temporary private key object.abstract byte[]Cipher.update(byte[] bytes) Updates the encryption context with additional input.abstract byte[]Cipher.update(byte[] bytes, int offset, int length) Updates the encryption context with additional plaintext.voidSignature.update(byte b) Provide more data for a signature or verification operation.voidSignature.update(byte[] data) Provide more data for a signature or verification operation.voidSignature.update(byte[] data, int off, int len) Provide more data for a signature or verification operation.booleanSignature.verify(byte[] signature) Finish a verification operation.byte[]KeyWrapper.wrap(PrivateKey toBeWrapped) byte[]KeyWrapper.wrap(SymmetricKey toBeWrapped) -
Uses of TokenException in org.mozilla.jss.pkcs10
Methods in org.mozilla.jss.pkcs10 that throw TokenExceptionModifier and TypeMethodDescriptionvoidCertificationRequest.verify()Verifies the signature on this CertificationRequest.voidVerifies the signature on this CertificationRequest, using the given public key.voidCertificationRequest.verify(PublicKey key, CryptoToken token) Verifies the signature on this CertificationRequest, using the given public key and CryptoToken.Constructors in org.mozilla.jss.pkcs10 that throw TokenExceptionModifierConstructorDescriptionCertificationRequest(CertificationRequestInfo info, PrivateKey privKey, SignatureAlgorithm signingAlg) Creates and signs an X.509 CertificationRequest. -
Uses of TokenException in org.mozilla.jss.pkcs11
Methods in org.mozilla.jss.pkcs11 that throw TokenExceptionModifier and TypeMethodDescriptionprivate PrivateKeyPK11KeyWrapper.baseUnwrapPrivate(byte[] wrapped, PrivateKey.Type type, PublicKey publicKey, boolean temporary) protected voidPK11Token.changePassword(byte[] oldPIN, byte[] newPIN) Change the password on the token from the old one to the new one.voidPK11Token.changePassword(PasswordCallback oldPINcb, PasswordCallback newPINcb) Change password.PK11KeyGenerator.clone(SymmetricKey key) Allows a SymmetricKey to be cloned on a different token.static SymmetricKeyPK11KeyGenerator.clone(SymmetricKey key, PK11Token token) Allows a SymmetricKey to be cloned on a different token.PK11Token.cloneKey(SymmetricKey key) Allows a SymmetricKey to be cloned on a different token.voidPK11Store.deleteCert(X509Certificate cert) Deletes the specified certificate and its associated private key from the store.voidPK11Store.deleteCertOnly(X509Certificate cert) Deletes the specified certificate from the store.voidPK11Store.deletePrivateKey(PrivateKey privateKey) voidPK11Store.deletePublicKey(PublicKey publicKey) PK11SymmetricKeyDeriver.derive()private SymmetricKeyPK11SymmetricKeyDeriver.deriveSymKey(SymmetricKey baseKey, SymmetricKey secondaryKey, long deriveMechanism, byte[] param, byte[] iv, long targetMechanism, long operation, long keySize) byte[]PK11Cipher.doFinal()Deprecated.isPadded() in EncryptionAlgorithm has been deprecatedbyte[]PK11Cipher.doFinal(byte[] bytes) Deprecated.isPadded() in EncryptionAlgorithm has been deprecatedbyte[]PK11Cipher.doFinal(byte[] bytes, int offset, int length) voidPK11Signature.engineInitSign(PrivateKey privateKey) voidPK11Signature.engineInitSign(PrivateKey privateKey, SecureRandom random) This is just here for JCA compliance, we don't take randoms this way.voidPK11Signature.engineInitVerify(PublicKey publicKey) private static byte[]PK11Signature.engineRawSignNative(PK11Token token, PrivateKey key, byte[] hash) Performs raw signing of the given hash with the given private key.protected static booleanPK11Signature.engineRawVerifyNative(PK11Token token, PublicKey key, byte[] hash, byte[] signature) Performs raw verification of the signature of a hash using the given public key, on the given token.voidPK11Signature.engineSetParameter(AlgorithmParameterSpec params) byte[]PK11Signature.engineSign()intPK11Signature.engineSign(byte[] outbuf, int offset, int len) private byte[]PK11Signature.engineSignNative()voidPK11Signature.engineUpdate(byte b) voidPK11Signature.engineUpdate(byte[] b, int off, int len) protected voidPK11Signature.engineUpdateNative(byte[] b, int off, int len) booleanPK11Signature.engineVerify(byte[] sigBytes) protected booleanPK11Signature.engineVerifyNative(byte[] sigBytes) private static byte[]PK11Cipher.finalizeContext(CipherContextProxy context, int blocksize, boolean padded) PK11Store.findCert(byte[] certBytes) PK11Store.findCertFromDERCertItem(byte[] certBytes) PK11Store.findPublicKey(PrivateKey privateKey) static PK11PrivKeyPK11PrivKey.fromPrivateKeyInfo(byte[] pki, CryptoToken token) Imports a PrivateKeyInfo, storing it as a temporary PrivateKey on the given token.static PK11PrivKeyPK11PrivKey.fromPrivateKeyInfo(byte[] pki, CryptoToken token, byte[] publicValue) Imports a PrivateKeyInfo, storing it as a temporary PrivateKey on the given token.static PK11PrivKeyPK11PrivKey.fromPrivateKeyInfo(PKCS8EncodedKeySpec spec, CryptoToken token) Imports a PrivateKeyInfo, storing it as a temporary PrivateKey on the given token.PK11KeyGenerator.generate()Generates the key.PK11Token.generateCertRequest(String subject, int keysize, String keyType, byte[] prime, byte[] subPrime, byte[] base) Generates a PKCS#10 certificate request including Begin/End bracketsprivate KeyPairPK11KeyPairGenerator.generateDSAKeyPair(PK11Token token, byte[] P, byte[] Q, byte[] G, boolean temporary, int sensitive, int extractable) Generates a DSA key pair with the given P, Q, and G values.private KeyPairPK11KeyPairGenerator.generateDSAKeyPairWithOpFlags(PK11Token token, byte[] P, byte[] Q, byte[] G, boolean temporary, int sensitive, int extractable, int op_flags, int op_flags_mask) Generates a DSA key pair with the given P, Q, and G values.private KeyPairPK11KeyPairGenerator.generateECKeyPair(PK11Token token, byte[] Curve, boolean temporary, int sensitive, int extractable) Generates a EC key pair with the given a curve.private KeyPairPK11KeyPairGenerator.generateECKeyPairWithOpFlags(PK11Token token, byte[] Curve, boolean temporary, int sensitive, int extractable, int op_flags, int op_flags_mask) Generates a EC key pair with the given a curve.private static SymmetricKeyPK11KeyGenerator.generateKBKDF(PK11Token token, PK11SymKey baseKeyObj, long algorithm, NativeProxy pointer, long pointer_size, long derivedKeyAlgorithm, int strength, int opFlags, boolean temporary, int sensitive) A native method to generate a key using KBKDF.PK11KeyPairGenerator.generateKeyPair()Generates a key pair on a token.private KeyPairPK11KeyPairGenerator.generateMLDSAKeyPair(PK11Token token, int size, boolean temporary, int sensitive, int extractable) Generates a ML-DSA key pair with the given security level.private KeyPairPK11KeyPairGenerator.generateMLDSAKeyPairWithOpFlags(PK11Token token, int size, boolean temporary, int sensitive, int extractable, int op_flags, int op_flags_mask) Generates a ML-DSA key pair with the given security level.private static SymmetricKeyPK11KeyGenerator.generateNormal(PK11Token token, KeyGenAlgorithm algorithm, int strength, int opFlags, boolean temporary, int sensitive) A native method to generate a non-PBE key.private static SymmetricKeyPK11KeyGenerator.generatePBE(PK11Token token, KeyGenAlgorithm algorithm, EncryptionAlgorithm encAlg, HMACAlgorithm hashAlg, byte[] pass, byte[] salt, int iterationCount) A native method to generate a PBE key.byte[]PK11KeyGenerator.generatePBE_IV()Generates an Initialization Vector using a PBE algorithm.private static byte[]PK11KeyGenerator.generatePBE_IV(KeyGenAlgorithm alg, byte[] password, byte[] salt, int iterations) A native method to generate an IV using a PBE algorithm.protected StringPK11Token.generatePK10(String subject, int keysize, String keyType, byte[] P, byte[] Q, byte[] G) private KeyPairPK11KeyPairGenerator.generateRSAKeyPair(PK11Token token, int keySize, long publicExponent, boolean temporary, int sensitive, int extractable) Generates an RSA key pair with the given size and public exponent.private KeyPairPK11KeyPairGenerator.generateRSAKeyPairWithOpFlags(PK11Token token, int keySize, long publicExponent, boolean temporary, int sensitive, int extractable, int op_flags, int op_flags_mask) Generates an RSA key pair with the given size and public exponent.PK11Store.getCertificates()PK11Token.getCipherContext(EncryptionAlgorithm algorithm) protected DSAParameterSpecPK11PrivKey.getDSAParams()private byte[][]PK11PrivKey.getDSAParamsNative()byte[]PK11Store.getEncryptedPrivateKeyInfo(X509Certificate cert, PBEAlgorithm pbeAlg, Password pw, int iteration) PK11Token.getKeyGenerator(KeyGenAlgorithm algorithm) PK11Token.getKeyPairGenerator(KeyPairAlgorithm algorithm) PK11Token.getKeyWrapper(KeyWrapAlgorithm algorithm) intPK11Token.getLoginMode()intPK11Token.getLoginTimeoutMinutes()PK11Store.getPrivateKeys()PK11Store.getPublicKeys()PK11Token.getRandomGenerator()PK11Token.getSignatureContext(SignatureAlgorithm algorithm) PK11Store.getSymmetricKeys()byte[]PK11PrivKey.getUniqueID()PK11Store.importCert(byte[] certBytes, String nickname) PK11Store.importPrivateKey(byte[] key, PrivateKey.Type type) Imports a raw private key into this token.PK11Store.importPrivateKey(byte[] key, PrivateKey.Type type, boolean temporary) voidPK11Token.importPublicKey(PublicKey pubKey, boolean permanent) private static CipherContextProxyPK11Cipher.initContext(boolean encrypt, SymmetricKey key, EncryptionAlgorithm alg, byte[] IV, boolean padded) private static CipherContextProxyPK11Cipher.initContextWithKeyBits(boolean encrypt, SymmetricKey key, EncryptionAlgorithm alg, byte[] IV, int keyBits, boolean padded) voidPK11Cipher.initDecrypt(SymmetricKey key) voidPK11Cipher.initDecrypt(SymmetricKey key, AlgorithmParameterSpec parameters) Deprecated.isPadded() in EncryptionAlgorithm has been deprecatedvoidPK11Cipher.initEncrypt(SymmetricKey key) voidPK11Cipher.initEncrypt(SymmetricKey key, AlgorithmParameterSpec parameters) Deprecated.isPadded() in EncryptionAlgorithm has been deprecatedprotected voidPK11Token.initPassword(byte[] ssopw, byte[] userpw) voidPK11Token.initPassword(PasswordCallback ssopwcb, PasswordCallback userpwcb) Initialize PIN.protected voidPK11Signature.initSigContext()Creates a signing context, initializes it, and sets the sigContext field.protected voidPK11Signature.initVfyContext()booleanPK11Token.isLoggedIn()protected voidPK11Store.loadPrivateKeys(Collection<PrivateKey> privateKeys) protected voidPK11Store.loadPublicKeys(Collection<PublicKey> privateKeys) voidPK11Token.login(PasswordCallback callback) Log into the token.voidPK11Token.logout()Log out of the token.private static SymmetricKeyPK11KeyGenerator.nativeClone(PK11Token token, SymmetricKey toBeCloned) protected voidPK11Token.nativeLogin(PasswordCallback callback) private static PrivateKeyPK11KeyWrapper.nativeUnwrapPrivWithSym(PK11Token token, SymmetricKey unwrappingKey, byte[] wrappedKey, KeyWrapAlgorithm alg, Algorithm type, byte[] publicValue, byte[] IV, boolean temporary) Unwrap a private with a symmetric.private static SymmetricKeyPK11KeyWrapper.nativeUnwrapSymWithPriv(PK11Token token, PrivateKey unwrappingKey, byte[] wrappedKey, KeyWrapAlgorithm alg, Algorithm type, int keyLen, NativeProxy params, long params_size, int usageEnum) Unwrap a symmetric with a private.private static SymmetricKeyPK11KeyWrapper.nativeUnwrapSymWithSym(PK11Token token, SymmetricKey unwrappingKey, byte[] wrappedKey, KeyWrapAlgorithm alg, Algorithm type, int keyLen, byte[] IV, int usageEnum, boolean temporary) Unwrap a symmetric with a symmetric.private static byte[]PK11KeyWrapper.nativeWrapPrivWithSym(PK11Token token, PrivateKey toBeWrapped, SymmetricKey wrappingKey, KeyWrapAlgorithm alg, byte[] IV) Wrap a private with a symmetricprivate static byte[]PK11KeyWrapper.nativeWrapSymWithPub(PK11Token token, SymmetricKey toBeWrapped, PublicKey wrappingKey, KeyWrapAlgorithm alg, NativeProxy params, long params_size) Wrap a symmetric with a publicprivate static byte[]PK11KeyWrapper.nativeWrapSymWithSym(PK11Token token, SymmetricKey toBeWrapped, SymmetricKey wrappingKey, KeyWrapAlgorithm alg, byte[] IV) Wrap a symmetric with a symmetricbooleanPK11Token.needsLogin()booleanPK11Token.passwordIsInitialized()Determine whether the token has been initialized yet.protected voidPK11Store.putCertsInVector(Vector<X509Certificate> certs) protected voidPK11Store.putSymKeysInVector(Vector<SymmetricKey> symKeys) protected booleanPK11Token.PWInitable()Make sure the PIN can be initialized.voidPK11Token.setLoginMode(int mode) voidPK11Token.setLoginTimeoutMinutes(int timeoutMinutes) protected booleanPK11Token.SSOPasswordIsCorrect(byte[] ssopw) PK11KeyWrapper.unwrapPrivate(byte[] wrapped, PrivateKey.Type type, PublicKey publicKey) Unwraps a private key, creating a permanent private key object.PK11KeyWrapper.unwrapSymmetric(byte[] wrapped, SymmetricKey.Type type, int keyLen) private SymmetricKeyPK11KeyWrapper.unwrapSymmetric(byte[] wrapped, SymmetricKey.Type type, int usageEnum, int keyLen) PK11KeyWrapper.unwrapSymmetric(byte[] wrapped, SymmetricKey.Type type, SymmetricKey.Usage usage, int keyLen) PK11KeyWrapper.unwrapSymmetricPerm(byte[] wrapped, SymmetricKey.Type type, int keyLen) private SymmetricKeyPK11KeyWrapper.unwrapSymmetricPerm(byte[] wrapped, SymmetricKey.Type type, int usageEnum, int keyLen) PK11KeyWrapper.unwrapSymmetricPerm(byte[] wrapped, SymmetricKey.Type type, SymmetricKey.Usage usage, int keyLen) PK11KeyWrapper.unwrapTemporaryPrivate(byte[] wrapped, PrivateKey.Type type, PublicKey publicKey) Unwraps a private key, creating a temporary private key object.byte[]PK11Cipher.update(byte[] bytes) byte[]PK11Cipher.update(byte[] bytes, int offset, int length) private static byte[]PK11Cipher.updateContext(CipherContextProxy context, byte[] input, int blocksize) protected booleanPK11Token.userPasswordIsCorrect(byte[] pw) Check the given password, return true if it's right, false if it's wrong.byte[]PK11KeyWrapper.wrap(PrivateKey toBeWrapped) byte[]PK11KeyWrapper.wrap(SymmetricKey toBeWrapped) Constructors in org.mozilla.jss.pkcs11 that throw TokenExceptionModifierConstructorDescriptionPK11KeyPairGenerator(PK11Token token, KeyPairAlgorithm algorithm) Constructor for PK11KeyPairGenerator.PK11Signature(PK11Token token, SignatureAlgorithm algorithm) -
Uses of TokenException in org.mozilla.jss.pkcs12
Methods in org.mozilla.jss.pkcs12 that throw TokenExceptionModifier and TypeMethodDescriptionvoidAuthenticatedSafes.addEncryptedSafeContents(PBEAlgorithm keyGenAlg, Password password, byte[] salt, int iterationCount, SEQUENCE safeContents) Encrypts a SafeContents and adds it to the AuthenticatedSafes.voidPFX.computeMacData(Password password, byte[] salt, int iterationCount) Computes the macData field and adds it to the PFX.static SafeBagSafeBag.createEncryptedPrivateKeyBag(PrivateKeyInfo privk, String friendlyName, byte[] localKeyID, Password password) Creates a SafeBag containing a PKCS-8ShroudedKeyBag, which is an EncryptedPrivateKeyInfo.AuthenticatedSafes.getSafeContentsAt(Password password, int index) Returns the SafeContents at the given index in the AuthenticatedSafes, decrypting it if necessary.Constructors in org.mozilla.jss.pkcs12 that throw TokenExceptionModifierConstructorDescriptionCreates a MacData by computing a HMAC on the given bytes.MacData(Password password, byte[] macSalt, int iterations, byte[] toBeMACed, AlgorithmIdentifier algID) Creates a MacData by computing a HMAC on the given bytes. -
Uses of TokenException in org.mozilla.jss.pkcs7
Methods in org.mozilla.jss.pkcs7 that throw TokenExceptionModifier and TypeMethodDescriptionstatic EncryptedContentInfoEncryptedContentInfo.createPBE(PBEAlgorithm pbeAlg, Password password, byte[] salt, int iterationCount, KeyGenerator.CharToByteConverter charToByteConverter, byte[] toBeEncrypted) Creates a new EncryptedContentInfo, where the data is encrypted with a password-based key.byte[]EncryptedContentInfo.decrypt(Password pass, KeyGenerator.CharToByteConverter charToByteConverter) Decrypts the content of an EncryptedContentInfo encrypted with a PBE key.voidSignerInfo.verify(byte[] messageDigest, OBJECT_IDENTIFIER contentType) Verifies that this SignerInfo contains a valid signature of the given message digest.voidSignerInfo.verify(byte[] messageDigest, OBJECT_IDENTIFIER contentType, PublicKey pubkey) Verifies that this SignerInfo contains a valid signature of the given message digest.private voidSignerInfo.verifyWithAuthenticatedAttributes(byte[] messageDigest, OBJECT_IDENTIFIER contentType, PublicKey pubkey) Verifies a SignerInfo with authenticated attributes.private voidSignerInfo.verifyWithoutAuthenticatedAttributes(byte[] messageDigest, OBJECT_IDENTIFIER contentType, PublicKey pubkey) Verifies that the message digest passed in, when encrypted with the given public key, matches the encrypted digest in the SignerInfo.Constructors in org.mozilla.jss.pkcs7 that throw TokenExceptionModifierConstructorDescriptionSignerInfo(IssuerAndSerialNumber issuerAndSerialNumber, SET authenticatedAttributes, SET unauthenticatedAttributes, OBJECT_IDENTIFIER contentType, byte[] messageDigest, SignatureAlgorithm signingAlg, PrivateKey signingKey) A constructor for creating a new SignerInfo from scratch. -
Uses of TokenException in org.mozilla.jss.pkix.cert
Constructors in org.mozilla.jss.pkix.cert that throw TokenExceptionModifierConstructorDescriptionCertificate(CertificateInfo info, PrivateKey privKey, SignatureAlgorithm signingAlg) Creates and signs an X.509 Certificate. -
Uses of TokenException in org.mozilla.jss.pkix.cms
Methods in org.mozilla.jss.pkix.cms that throw TokenExceptionModifier and TypeMethodDescriptionstatic EncryptedContentInfoEncryptedContentInfo.createPBE(PBEAlgorithm pbeAlg, Password password, byte[] salt, int iterationCount, KeyGenerator.CharToByteConverter charToByteConverter, byte[] toBeEncrypted) Creates a new EncryptedContentInfo, where the data is encrypted with a password-based key.byte[]EncryptedContentInfo.decrypt(Password pass, KeyGenerator.CharToByteConverter charToByteConverter) Decrypts the content of an EncryptedContentInfo encrypted with a PBE key.voidSignerInfo.verify(byte[] messageDigest, OBJECT_IDENTIFIER contentType) Verifies that this SignerInfo contains a valid signature of the given message digest.voidSignerInfo.verify(byte[] messageDigest, OBJECT_IDENTIFIER contentType, PublicKey pubkey) Verifies that this SignerInfo contains a valid signature of the given message digest.private voidSignerInfo.verifyWithoutSignedAttributes(byte[] messageDigest, OBJECT_IDENTIFIER contentType, PublicKey pubkey) Verifies that the message digest passed in, when encrypted with the given public key, matches the encrypted digest in the SignerInfo.private voidSignerInfo.verifyWithSignedAttributes(byte[] messageDigest, OBJECT_IDENTIFIER contentType, PublicKey pubkey) Verifies a SignerInfo with signed attributes.Constructors in org.mozilla.jss.pkix.cms that throw TokenExceptionModifierConstructorDescriptionSignerInfo(SignerIdentifier signerIdentifier, SET signedAttributes, SET unsignedAttributes, OBJECT_IDENTIFIER contentType, byte[] messageDigest, SignatureAlgorithm signingAlg, PrivateKey signingKey) A constructor for creating a new SignerInfo from scratch. -
Uses of TokenException in org.mozilla.jss.pkix.crmf
Methods in org.mozilla.jss.pkix.crmf that throw TokenExceptionModifier and TypeMethodDescriptionvoidCertReqMsg.verify()voidCertReqMsg.verify(CryptoToken token) -
Uses of TokenException in org.mozilla.jss.pkix.primitive
Methods in org.mozilla.jss.pkix.primitive that throw TokenExceptionModifier and TypeMethodDescriptionstatic EncryptedPrivateKeyInfoEncryptedPrivateKeyInfo.createPBE(PBEAlgorithm pbeAlg, Password password, byte[] salt, int iterationCount, KeyGenerator.CharToByteConverter charToByteConverter, PrivateKey pri, CryptoToken token) Creates a new EncryptedPrivateKeyInfo, where the data is encrypted with a password-based key- with wrapping/unwrapping happening on token.static EncryptedPrivateKeyInfoEncryptedPrivateKeyInfo.createPBE(PBEAlgorithm pbeAlg, Password password, byte[] salt, int iterationCount, KeyGenerator.CharToByteConverter charToByteConverter, PrivateKeyInfo pki) Creates a new EncryptedPrivateKeyInfo, where the data is encrypted with a password-based key.static EncryptedPrivateKeyInfoEncryptedPrivateKeyInfo.createPBES2(int saltLen, int kdfIterations, EncryptionAlgorithm encAlg, Password pwd, KeyGenerator.CharToByteConverter charToByteConverter, PrivateKeyInfo privateKeyInfo) Export a private key in PBES2 format, using a random PBKDF2 salt.EncryptedPrivateKeyInfo.decrypt(Password pass, KeyGenerator.CharToByteConverter charToByteConverter) Decrypts an EncryptedPrivateKeyInfo that was encrypted with a PBE algorithm. -
Uses of TokenException in org.mozilla.jss.provider.java.security
Methods in org.mozilla.jss.provider.java.security that throw TokenExceptionModifier and TypeMethodDescriptionprivate SignatureJSSSignatureSpi.getSigContext(PrivateKey privateKey) -
Uses of TokenException in org.mozilla.jss.provider.javax.crypto
Methods in org.mozilla.jss.provider.javax.crypto that throw TokenExceptionModifier and TypeMethodDescriptionprivate SecretKeyJSSSecretKeyFactorySpi.generateKeyFromBits(byte[] bits, SymmetricKey.Type keyType) -
Uses of TokenException in org.mozilla.jss.SecretDecoderRing
Methods in org.mozilla.jss.SecretDecoderRing that throw TokenExceptionModifier and TypeMethodDescriptionbyte[]Decryptor.decrypt(byte[] ciphertext) Decrypts the given ciphertext.voidKeyManager.deleteKey(byte[] keyID) Deletes the key with the given keyID from this token.voidDeletes this key from this token.private voidKeyManager.deleteKeyNative(CryptoToken token, SymmetricKey key) voidKeyManager.deleteUniqueNamedKey(String nickname) If it exists, delete the key with the specified nickname from this token.byte[]KeyManager.generateKey()Generates an SDR key with the default algorithm and key size.byte[]KeyManager.generateKey(KeyGenAlgorithm alg, int keySize) Generates an SDR key with the given algorithm and key size.byte[]KeyManager.generateUniqueNamedKey(String nickname) Generates an SDR key with the default algorithm and key size.byte[]KeyManager.generateUniqueNamedKey(KeyGenAlgorithm alg, int keySize, String nickname) Generates an SDR key with the given algorithm, key size, and nickname.private byte[]KeyManager.generateUnusedKeyID()Generates a key ID that is currently unused on this token.private booleanKeyManager.keyExists(byte[] keyid) KeyManager.lookupKey(EncryptionAlgorithm alg, byte[] keyid) Looks up the key on this token with the given algorithm and key ID.private SymmetricKeyKeyManager.lookupKeyNative(CryptoToken token, EncryptionAlgorithm alg, byte[] keyid) KeyManager.lookupUniqueNamedKey(EncryptionAlgorithm alg, String nickname) Looks up the key on this token with the given algorithm and nickname.private SymmetricKeyKeyManager.lookupUniqueNamedKeyNative(CryptoToken token, EncryptionAlgorithm alg, String nickname) booleanKeyManager.uniqueNamedKeyExists(String nickname) Constructors in org.mozilla.jss.SecretDecoderRing that throw TokenExceptionModifierConstructorDescriptionEncryptor(CryptoToken token, byte[] keyID, EncryptionAlgorithm alg) Creates an Encryptor on the given CryptoToken, using the key with the given keyID and algorithm