Searched refs:privateKey (Results 1 - 25 of 71) sorted by relevance

123

/openjdk7/jdk/src/share/classes/java/security/
H A DKeyPair.java45 private PrivateKey privateKey; field in class:KeyPair
57 * @param privateKey the private key.
59 public KeyPair(PublicKey publicKey, PrivateKey privateKey) { argument
61 this.privateKey = privateKey;
79 return privateKey;
H A DSigner.java57 private PrivateKey privateKey; field in class:Signer
110 return privateKey;
152 privateKey = priv;
158 if (publicKey != null && privateKey != null) {
/openjdk7/jdk/src/windows/classes/sun/security/mscapi/
H A DRSAKeyPair.java35 private final RSAPrivateKey privateKey; field in class:RSAKeyPair
44 privateKey = new RSAPrivateKey(hCryptProv, hCryptKey, keyLength);
49 return privateKey;
/openjdk7/jdk/test/sun/security/rsa/
H A DTestSignatures.java55 private static void testSignature(String algorithm, PrivateKey privateKey, PublicKey publicKey) throws Exception { argument
58 s.initSign(privateKey);
79 private static void test(PrivateKey privateKey, PublicKey publicKey) throws Exception { argument
80 testSignature("MD2withRSA", privateKey, publicKey);
81 testSignature("MD5withRSA", privateKey, publicKey);
82 testSignature("SHA1withRSA", privateKey, publicKey);
83 testSignature("SHA256withRSA", privateKey, publicKey);
87 testSignature("SHA384withRSA", privateKey, publicKey);
88 testSignature("SHA512withRSA", privateKey, publicKey);
103 PrivateKey privateKey
[all...]
H A DTestKeyPairGenerator.java45 private static void testSignature(String algorithm, PrivateKey privateKey, PublicKey publicKey) throws Exception { argument
48 s.initSign(privateKey);
59 private static void test(PrivateKey privateKey, PublicKey publicKey) throws Exception { argument
60 testSignature("MD2withRSA", privateKey, publicKey);
61 testSignature("MD5withRSA", privateKey, publicKey);
62 testSignature("SHA1withRSA", privateKey, publicKey);
63 testSignature("SHA256withRSA", privateKey, publicKey);
67 testSignature("SHA384withRSA", privateKey, publicKey);
68 testSignature("SHA512withRSA", privateKey, publicKey);
120 RSAPrivateCrtKey privateKey
[all...]
/openjdk7/jdk/test/sun/security/pkcs11/rsa/
H A DTestSignatures.java56 private static void testSignature(String algorithm, PrivateKey privateKey, PublicKey publicKey) throws Exception { argument
59 s.initSign(privateKey);
80 private static void test(PrivateKey privateKey, PublicKey publicKey) throws Exception { argument
81 testSignature("MD2withRSA", privateKey, publicKey);
82 testSignature("MD5withRSA", privateKey, publicKey);
83 testSignature("SHA1withRSA", privateKey, publicKey);
84 testSignature("SHA256withRSA", privateKey, publicKey);
88 testSignature("SHA384withRSA", privateKey, publicKey);
89 testSignature("SHA512withRSA", privateKey, publicKey);
108 PrivateKey privateKey
[all...]
H A DTestKeyPairGenerator.java46 private static void testSignature(String algorithm, PrivateKey privateKey, PublicKey publicKey) throws Exception { argument
49 s.initSign(privateKey);
60 private static void test(PrivateKey privateKey, PublicKey publicKey) throws Exception { argument
61 testSignature("MD2withRSA", privateKey, publicKey);
62 testSignature("MD5withRSA", privateKey, publicKey);
63 testSignature("SHA1withRSA", privateKey, publicKey);
64 testSignature("SHA256withRSA", privateKey, publicKey);
68 testSignature("SHA384withRSA", privateKey, publicKey);
69 testSignature("SHA512withRSA", privateKey, publicKey);
121 RSAPrivateCrtKey privateKey
[all...]
/openjdk7/jdk/test/sun/security/pkcs11/Signature/
H A DReinitSignature.java46 PrivateKey privateKey = kp.getPrivate();
51 sig.initSign(privateKey);
52 sig.initSign(privateKey);
54 sig.initSign(privateKey);
58 sig.initSign(privateKey);
62 sig.initSign(privateKey);
/openjdk7/jdk/src/share/classes/sun/security/ssl/
H A DECDHCrypt.java46 private PrivateKey privateKey; field in class:ECDHCrypt
52 ECDHCrypt(PrivateKey privateKey, PublicKey publicKey) { argument
53 this.privateKey = privateKey;
64 privateKey = kp.getPrivate();
77 privateKey = kp.getPrivate();
95 ka.init(privateKey);
H A DRSASignature.java116 protected void engineInitSign(PrivateKey privateKey) argument
118 engineInitSign(privateKey, null);
121 protected void engineInitSign(PrivateKey privateKey, SecureRandom random) argument
123 checkNull(privateKey);
125 rawRsa.initSign(privateKey, random);
/openjdk7/jdk/test/sun/security/pkcs11/Cipher/
H A DTestRSACipher.java55 PrivateKey privateKey = kp.getPrivate();
67 c1.init(Cipher.DECRYPT_MODE, privateKey);
70 c2.init(Cipher.DECRYPT_MODE, privateKey);
83 c1.init(Cipher.ENCRYPT_MODE, privateKey);
93 c1.init(Cipher.ENCRYPT_MODE, privateKey);
94 c1.init(Cipher.ENCRYPT_MODE, privateKey);
99 c1.init(Cipher.ENCRYPT_MODE, privateKey);
/openjdk7/jdk/test/sun/security/mscapi/
H A DSignUsingSHA2withRSA.java62 PrivateKey privateKey = null;
69 privateKey = (PrivateKey) ks.getKey(alias, null);
73 if (privateKey == null || publicKey == null) {
78 generatedSignatures.add(signUsing("SHA256withRSA", privateKey));
79 generatedSignatures.add(signUsing("SHA384withRSA", privateKey));
80 generatedSignatures.add(signUsing("SHA512withRSA", privateKey));
92 PrivateKey privateKey) throws Exception {
103 System.out.println("Using key: " + privateKey);
104 sig1.initSign(privateKey);
91 signUsing(String signAlgorithm, PrivateKey privateKey) argument
H A DRSAEncryptDecrypt.java45 Key privateKey = keyPair.getPrivate();
62 cipher.init(Cipher.DECRYPT_MODE, privateKey);
/openjdk7/jdk/src/share/classes/sun/security/ec/
H A DECDHKeyAgreement.java43 private ECPrivateKey privateKey; field in class:ECDHKeyAgreement
65 privateKey = (ECPrivateKey) ECKeyFactory.toECKey(key);
85 if (privateKey == null) {
118 if ((privateKey == null) || (publicValue == null)) {
122 byte[] s = privateKey.getS().toByteArray();
124 ECParameters.encodeParameters(privateKey.getParams()); // DER OID
H A DECDSASignature.java65 private ECPrivateKey privateKey; field in class:ECDSASignature
197 this.privateKey = null;
203 protected void engineInitSign(PrivateKey privateKey) argument
205 engineInitSign(privateKey, null);
210 protected void engineInitSign(PrivateKey privateKey, SecureRandom random) argument
212 this.privateKey = (ECPrivateKey) ECKeyFactory.toECKey(privateKey);
271 byte[] s = privateKey.getS().toByteArray();
272 ECParameterSpec params = privateKey.getParams();
/openjdk7/jdk/test/com/sun/crypto/provider/Cipher/RSA/
H A DTestOAEPWithParams.java43 private static PrivateKey privateKey; field in class:TestOAEPWithParams
63 privateKey = kp.getPrivate();
98 c.init(Cipher.DECRYPT_MODE, privateKey, spec1);
105 c.init(Cipher.DECRYPT_MODE, privateKey);
113 c.init(Cipher.DECRYPT_MODE, privateKey, spec2);
127 c.init(Cipher.DECRYPT_MODE, privateKey, params);
134 c.init(Cipher.DECRYPT_MODE, privateKey);
141 c.init(Cipher.DECRYPT_MODE, privateKey, spec2);
H A DTestRSA.java184 PrivateKey privateKey = kf.generatePrivate(privSpec);
187 testEncDec("RSA/ECB/PKCS1Padding", 96, publicKey, privateKey);
189 testEncDec("RSA/ECB/PKCS1Padding", 96, privateKey, publicKey);
191 testEncDec("RSA/ECB/NoPadding", 128, publicKey, privateKey);
192 testEncDec("RSA/ECB/NoPadding", 128, privateKey, publicKey);
196 testKat("RSA/ECB/PKCS1Padding", Cipher.DECRYPT_MODE, privateKey, out2, in2, true);
198 testKat("RSA/ECB/PKCS1Padding", Cipher.ENCRYPT_MODE, privateKey, in1, out1, true);
202 testKat("RSA/ECB/NoPadding", Cipher.DECRYPT_MODE, privateKey, rout1, rin1, true);
204 testKat("RSA/ECB/NoPadding", Cipher.ENCRYPT_MODE, privateKey, rin2, rout2, true);
210 testKat("RSA/ECB/PKCS1Padding", Cipher.DECRYPT_MODE, privateKey, rout
[all...]
H A DTestOAEP.java41 private static PrivateKey privateKey; field in class:TestOAEP
55 privateKey = kp.getPrivate();
128 c.init(Cipher.ENCRYPT_MODE, privateKey);
145 c.init(Cipher.DECRYPT_MODE, privateKey);
158 c.init(Cipher.DECRYPT_MODE, privateKey);
170 c.init(Cipher.DECRYPT_MODE, privateKey);
185 c.init(Cipher.DECRYPT_MODE, privateKey);
204 c.init(Cipher.DECRYPT_MODE, privateKey);
/openjdk7/jdk/test/sun/security/pkcs11/Secmod/
H A DGetPrivateKey.java57 PrivateKey privateKey = (PrivateKey)ks.getKey(keyAlias, password);
58 System.out.println(privateKey);
66 signature.initSign(privateKey);
H A DJksSetPrivateKey.java57 PrivateKey privateKey = (PrivateKey)ks.getKey(keyAlias, password);
58 System.out.println(privateKey);
66 jks.setKeyEntry("k1", privateKey, "changeit".toCharArray(), chain);
/openjdk7/jdk/src/share/classes/sun/security/pkcs11/
H A DP11ECDHKeyAgreement.java56 private P11Key privateKey; field in class:P11ECDHKeyAgreement
78 privateKey = P11KeyFactory.convertKey(token, key, "EC");
96 if (privateKey == null) {
119 if ((privateKey == null) || (publicValue == null)) {
134 new CK_MECHANISM(mechanism, ckParams), privateKey.keyID,
180 if ((privateKey == null) || (publicValue == null)) {
196 new CK_MECHANISM(mechanism, ckParams), privateKey.keyID,
/openjdk7/jdk/test/java/security/Provider/
H A DGetInstance.java74 PrivateKey privateKey = new FooPrivateKey();
78 sig.initSign(privateKey);
81 sig.initSign(privateKey);
84 sig.initSign(privateKey);
91 sig.initSign(privateKey);
94 sig.initSign(privateKey);
97 sig.initSign(privateKey);
192 protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException { argument
216 protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException { } argument
/openjdk7/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/implementations/
H A DSignatureBaseRSA.java150 protected void engineInitSign(Key privateKey, SecureRandom secureRandom) argument
153 if (!(privateKey instanceof PrivateKey)) {
154 String supplied = privateKey.getClass().getName();
164 ((PrivateKey) privateKey, secureRandom);
171 protected void engineInitSign(Key privateKey) throws XMLSignatureException { argument
173 if (!(privateKey instanceof PrivateKey)) {
174 String supplied = privateKey.getClass().getName();
183 this._signatureAlgorithm.initSign((PrivateKey) privateKey);
/openjdk7/jdk/src/share/classes/sun/security/rsa/
H A DRSASignature.java68 private RSAPrivateKey privateKey; field in class:RSASignature
93 this.privateKey = null;
99 protected void engineInitSign(PrivateKey privateKey) argument
101 engineInitSign(privateKey, null);
105 protected void engineInitSign(PrivateKey privateKey, SecureRandom random) argument
108 (RSAPrivateKey)RSAKeyFactory.toRSAKey(privateKey);
109 this.privateKey = rsaKey;
177 byte[] encrypted = RSACore.rsa(padded, privateKey);
/openjdk7/jdk/src/share/classes/sun/security/x509/
H A DCertAndKeyGen.java155 privateKey = pair.getPrivate();
205 return privateKey;
267 cert.sign(privateKey, this.sigAlg);
306 signature.initSign (privateKey);
326 private PrivateKey privateKey; field in class:CertAndKeyGen

Completed in 52 milliseconds

123