HomeSort by relevance Sort by last modified time
    Searched refs:keySpec (Results 1 - 25 of 35) sorted by null

1 2

  /libcore/luni/src/main/java/java/security/
KeyFactorySpi.java 21 import java.security.spec.KeySpec;
35 * @param keySpec
39 * if the specified {@code keySpec} is invalid.
41 protected abstract PublicKey engineGeneratePublic(KeySpec keySpec)
48 * @param keySpec
52 * if the specified {@code keySpec} is invalid.
54 protected abstract PrivateKey engineGeneratePrivate(KeySpec keySpec)
62 * @param keySpec
    [all...]
KeyFactory.java 21 import java.security.spec.KeySpec;
163 * @param keySpec
167 * if the specified {@code keySpec} is invalid
169 public final PublicKey generatePublic(KeySpec keySpec)
171 return spiImpl.engineGeneratePublic(keySpec);
178 * @param keySpec
182 * if the specified {@code keySpec} is invalid.
184 public final PrivateKey generatePrivate(KeySpec keySpec)
    [all...]
  /external/bouncycastle/src/main/java/org/bouncycastle/jce/provider/
JDKKeyFactory.java 17 import java.security.spec.KeySpec;
60 KeySpec keySpec)
63 if (keySpec instanceof PKCS8EncodedKeySpec)
68 ((PKCS8EncodedKeySpec)keySpec).getEncoded());
76 throw new InvalidKeySpecException("Unknown KeySpec type: " + keySpec.getClass().getName());
80 KeySpec keySpec)
83 if (keySpec instanceof X509EncodedKeySpec
    [all...]
JCESecretKeyFactory.java 6 import java.security.spec.KeySpec;
37 KeySpec keySpec)
40 if (keySpec instanceof SecretKeySpec)
42 return (SecretKey)keySpec;
45 throw new InvalidKeySpecException("Invalid KeySpec");
48 protected KeySpec engineGetKeySpec(
50 Class keySpec)
53 if (keySpec == null)
55 throw new InvalidKeySpecException("keySpec parameter is null")
    [all...]
PBE.java 219 PBEKeySpec keySpec,
231 key = PBEParametersGenerator.PKCS12PasswordToBytes(keySpec.getPassword());
235 key = PBEParametersGenerator.PKCS5PasswordToBytes(keySpec.getPassword());
238 generator.init(key, keySpec.getSalt(), keySpec.getIterationCount());
263 PBEKeySpec keySpec,
274 key = PBEParametersGenerator.PKCS12PasswordToBytes(keySpec.getPassword());
278 key = PBEParametersGenerator.PKCS5PasswordToBytes(keySpec.getPassword());
281 generator.init(key, keySpec.getSalt(), keySpec.getIterationCount())
    [all...]
  /libcore/luni/src/main/java/org/apache/harmony/security/provider/crypto/
DSAKeyFactoryImpl.java 32 import java.security.spec.KeySpec;
42 * keySpec - the specification (key material) for the DSAPrivateKey.
48 * if "keySpec" is neither DSAPrivateKeySpec nor PKCS8EncodedKeySpec
50 protected PrivateKey engineGeneratePrivate(KeySpec keySpec)
53 if (keySpec != null) {
54 if (keySpec instanceof DSAPrivateKeySpec) {
56 return new DSAPrivateKeyImpl((DSAPrivateKeySpec) keySpec);
58 if (keySpec instanceof PKCS8EncodedKeySpec) {
60 return new DSAPrivateKeyImpl((PKCS8EncodedKeySpec) keySpec);
    [all...]
DSAPrivateKeyImpl.java 23 * in the below "DSAPrivateKeyImpl(PKCS8EncodedKeySpec keySpec)" constructor.
62 * @param keySpec - a DSAPrivateKeySpec object
64 public DSAPrivateKeyImpl(DSAPrivateKeySpec keySpec) {
70 g = keySpec.getG();
71 p = keySpec.getP();
72 q = keySpec.getQ();
80 x = keySpec.getX();
93 * @param keySpec - a XPKCS8EncodedKeySpec object
97 public DSAPrivateKeyImpl(PKCS8EncodedKeySpec keySpec)
107 byte[] encoding = keySpec.getEncoded()
    [all...]
DSAPublicKeyImpl.java 26 * in the below "DSAPublicKeyImpl(X509EncodedKeySpec keySpec)" constructor.
64 * @param keySpec - a DSAPublicKeySpec object
66 public DSAPublicKeyImpl(DSAPublicKeySpec keySpec) {
72 p = keySpec.getP();
73 q = keySpec.getQ();
74 g = keySpec.getG();
83 y = keySpec.getY();
95 * @param keySpec - a X509EncodedKeySpec object
99 public DSAPublicKeyImpl(X509EncodedKeySpec keySpec)
109 byte[] encoding = keySpec.getEncoded()
    [all...]
  /external/bouncycastle/src/main/java/org/bouncycastle/jce/provider/asymmetric/ec/
KeyFactory.java 10 import java.security.spec.KeySpec;
49 protected KeySpec engineGetKeySpec(
96 KeySpec keySpec)
99 if (keySpec instanceof PKCS8EncodedKeySpec)
104 ((PKCS8EncodedKeySpec)keySpec).getEncoded());
113 else if (keySpec instanceof ECPrivateKeySpec)
115 return new JCEECPrivateKey(algorithm, (ECPrivateKeySpec)keySpec);
117 else if (keySpec instanceof java.security.spec.ECPrivateKeySpec)
119 return new JCEECPrivateKey(algorithm, (java.security.spec.ECPrivateKeySpec)keySpec);
    [all...]
  /libcore/luni/src/main/java/javax/crypto/
SecretKeyFactorySpi.java 22 import java.security.spec.KeySpec;
39 * @param keySpec
46 protected abstract SecretKey engineGenerateSecret(KeySpec keySpec)
54 * @param keySpec
62 protected abstract KeySpec engineGetKeySpec(SecretKey key, Class keySpec)
SecretKeyFactory.java 26 import java.security.spec.KeySpec;
35 * <li>convert {@link SecretKey} objects to and from {@link KeySpec} objects</li>
177 * @param keySpec
184 public final SecretKey generateSecret(KeySpec keySpec)
186 return spiImpl.engineGenerateSecret(keySpec);
194 * @param keySpec
202 public final KeySpec getKeySpec(SecretKey key, Class keySpec)
204 return spiImpl.engineGetKeySpec(key, keySpec);
    [all...]
  /external/apache-harmony/crypto/src/test/support/common/java/org/apache/harmony/crypto/tests/support/
MySecretKeyFactorySpi.java 26 import java.security.spec.KeySpec;
39 protected SecretKey engineGenerateSecret(KeySpec keySpec)
46 protected KeySpec engineGetKeySpec(SecretKey key, Class keySpec)
  /libcore/luni/src/test/java/org/apache/harmony/crypto/tests/support/
MySecretKeyFactorySpi.java 27 import java.security.spec.KeySpec;
40 protected SecretKey engineGenerateSecret(KeySpec keySpec)
47 protected KeySpec engineGetKeySpec(SecretKey key, Class keySpec)
  /libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
KeyFactoryTest.java 19 import java.security.spec.KeySpec;
190 TestPublicKeySpec keySpec = new TestPublicKeySpec(key);
191 PublicKey publicKey = factory.generatePublic(keySpec);
198 KeySpec[] keySpecs = {
211 KeySpec keySpec = keySpecs[i];
213 (keySpec == null ? "null" : keySpec.toString()) + ")";
216 PublicKey generatePublic = factory.generatePublic(keySpec);
239 TestPrivateKeySpec keySpec = new TestPrivateKeySpec(key)
    [all...]
KeyFactorySpiTest.java 22 import java.security.spec.KeySpec;
43 KeySpec ks = new MyKeySpec();
44 KeySpec kss = new MyKeySpec();
56 protected PrivateKey engineGeneratePrivate(KeySpec keySpec){
59 protected PublicKey engineGeneratePublic(KeySpec keySpec){
62 protected KeySpec engineGetKeySpec(Key key, Class keySpec){
70 class MyKeySpec implements KeySpec {}
    [all...]
KeyFactory2Test.java 34 import java.security.spec.KeySpec;
113 // java.security.KeyFactory.generatePrivate(java.security.spec.KeySpec)
129 KeySpec privateKeySpec = fact.getKeySpec(keys.getPrivate(),
152 // java.security.KeyFactory.generatePublic(java.security.spec.KeySpec)
167 KeySpec publicKeySpec = fact.getKeySpec(keys.getPublic(),
275 // Test for method java.security.spec.KeySpec
293 KeySpec privateKeySpec = fact.getKeySpec(keys.getPrivate(),
295 KeySpec publicKeySpec = fact.getKeySpec(keys.getPublic(),
309 KeySpec encodedSpec = fact.getKeySpec(keys.getPublic(),
420 public PrivateKey engineGeneratePrivate(KeySpec keySpec)
    [all...]
  /libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
SecretKeyFactorySpiTest.java 27 import java.security.spec.KeySpec;
41 protected SecretKey engineGenerateSecret(KeySpec keySpec) throws InvalidKeySpecException {
42 return super.engineGenerateSecret(keySpec);
46 protected KeySpec engineGetKeySpec(SecretKey key, Class keySpec)
48 return super.engineGetKeySpec(key, keySpec);
67 KeySpec kspec = null;
CipherTest.java 349 DESedeKeySpec keySpec = new DESedeKeySpec(keyMaterial);
351 Key k = skf.generateSecret(keySpec);
407 DESedeKeySpec keySpec = new DESedeKeySpec(keyMaterial);
409 Key k = skf.generateSecret(keySpec);
    [all...]
  /external/bouncycastle/src/main/java/org/bouncycastle/jce/provider/symmetric/
DESede.java 5 import java.security.spec.KeySpec;
208 protected KeySpec engineGetKeySpec(
210 Class keySpec)
213 if (keySpec == null)
215 throw new InvalidKeySpecException("keySpec parameter is null");
222 if (SecretKeySpec.class.isAssignableFrom(keySpec))
226 else if (DESedeKeySpec.class.isAssignableFrom(keySpec))
252 throw new InvalidKeySpecException("Invalid KeySpec");
256 KeySpec keySpec)
    [all...]
  /libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
CipherPBEThread.java 42 PBEKeySpec keySpec = new PBEKeySpec("top sicret password".toCharArray());
44 SecretKey key = skf.generateSecret(keySpec);
  /external/bouncycastle/src/main/java/org/bouncycastle/openssl/
PEMReader.java 16 import java.security.spec.KeySpec;
430 KeySpec keySpec = new X509EncodedKeySpec(obj.getContent());
437 PublicKey pubKey = keyFact.generatePublic(keySpec);
478 RSAPublicKeySpec keySpec = new RSAPublicKeySpec(
485 return keyFact.generatePublic(keySpec);
714 PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(pInfo.getEncoded());
718 return keyFact.generatePrivate(keySpec);
734 PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(pInfo.getEncoded());
738 return keyFact.generatePrivate(keySpec);
    [all...]
  /libcore/luni/src/test/java/libcore/java/security/
SignatureTest.java 153 X509EncodedKeySpec keySpec = new X509EncodedKeySpec(PK_BYTES);
155 PublicKey pk = keyFactory.generatePublic(keySpec);
  /external/apache-harmony/crypto/src/test/impl/java/org/apache/harmony/crypto/tests/javax/crypto/
SecretKeyFactory_ImplTest.java 30 import java.security.spec.KeySpec;
83 KeySpec keySpec;
88 keySpec = skf.getKeySpec(null, null);
89 assertNull("getKeySpec method must return null", keySpec);
  /external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/
CipherTest.java 264 DESedeKeySpec keySpec = new DESedeKeySpec(keyMaterial);
266 Key k = skf.generateSecret(keySpec);
313 DESedeKeySpec keySpec = new DESedeKeySpec(keyMaterial);
315 Key k = skf.generateSecret(keySpec);
  /external/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/provider/crypto/
DSAKeyFactoryImplTest.java 37 import java.security.spec.KeySpec;
77 static KeySpec x509KeySpec;
92 static KeySpec pkcs8KeySpec;
125 x509KeySpec = (KeySpec) new X509EncodedKeySpec(publicEncoding);
140 pkcs8KeySpec = (KeySpec) new PKCS8EncodedKeySpec(privateEncoding);
257 * A test against the "generatePublic(KeySpec)" method.
276 * A test against the "generatePublic(KeySpec)" method.
287 * A test against the "generatePublic(KeySpec)" method.
293 KeySpec keySpec = (KeySpec) new DSAPublicKeySpec(publicY, publicP, publicQ, publicG)
    [all...]

Completed in 1450 milliseconds

1 2