protected void engineInitSign( PrivateKey privateKey) throws InvalidKeyException { CipherParameters param = RSAUtil.generatePrivateKeyParameter((RSAPrivateKey)privateKey); signer.init(true, param); }
protected void engineInitSign( PrivateKey privateKey) throws InvalidKeyException { CipherParameters param = RSAUtil.generatePrivateKeyParameter((RSAPrivateKey)privateKey); signer.init(true, param); }
protected void engineInitSign( PrivateKey privateKey) throws InvalidKeyException { if (!(privateKey instanceof RSAPrivateKey)) { throw new InvalidKeyException("Supplied key is not a RSAPrivateKey instance"); } key = RSAUtil.generatePrivateKeyParameter((RSAPrivateKey)privateKey); pss = new org.bouncycastle.crypto.signers.PSSSigner(signer, contentDigest, mgfDigest, saltLength, trailer); pss.init(true, key); isInitState = true; }
protected void engineInitSign( PrivateKey privateKey) throws InvalidKeyException { if (!(privateKey instanceof RSAPrivateKey)) { throw new InvalidKeyException("Supplied key (" + getType(privateKey) + ") is not a RSAPrivateKey instance"); } CipherParameters param = RSAUtil.generatePrivateKeyParameter((RSAPrivateKey)privateKey); digest.reset(); cipher.init(true, param); }
protected void engineInitSign( PrivateKey privateKey, SecureRandom random) throws InvalidKeyException { if (!(privateKey instanceof RSAPrivateKey)) { throw new InvalidKeyException("Supplied key is not a RSAPrivateKey instance"); } key = RSAUtil.generatePrivateKeyParameter((RSAPrivateKey)privateKey); pss = new org.bouncycastle.crypto.signers.PSSSigner(signer, contentDigest, mgfDigest, saltLength, trailer); pss.init(true, new ParametersWithRandom(key, random)); isInitState = true; }
param = RSAUtil.generatePrivateKeyParameter((RSAPrivateKey)key);