Home
last modified time | relevance | path

Searched refs:algorithm (Results 1 – 25 of 101) sorted by relevance

12345

/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
DSecretKeySpecTest.java45 String algorithm = "Algorithm"; in testSecretKeySpec1() local
48 new SecretKeySpec(new byte[] {}, algorithm); in testSecretKeySpec1()
55 new SecretKeySpec(null, algorithm); in testSecretKeySpec1()
68 SecretKeySpec ks = new SecretKeySpec(key, algorithm); in testSecretKeySpec1()
85 String algorithm = "Algorithm"; in testSecretKeySpec2() local
88 new SecretKeySpec(new byte[] {}, 0, 0, algorithm); in testSecretKeySpec2()
95 new SecretKeySpec(null, 0, 0, algorithm); in testSecretKeySpec2()
109 new SecretKeySpec(key, offset, key.length, algorithm); in testSecretKeySpec2()
116 new SecretKeySpec(key, 0, -1, algorithm); in testSecretKeySpec2()
124 SecretKeySpec ks = new SecretKeySpec(key, algorithm); in testSecretKeySpec2()
[all …]
/libcore/ojluni/src/main/java/javax/crypto/spec/
DSecretKeySpec.java66 private String algorithm; field in SecretKeySpec
91 public SecretKeySpec(byte[] key, String algorithm) { in SecretKeySpec() argument
92 if (key == null || algorithm == null) { in SecretKeySpec()
99 this.algorithm = algorithm; in SecretKeySpec()
140 public SecretKeySpec(byte[] key, int offset, int len, String algorithm) { in SecretKeySpec() argument
141 if (key == null || algorithm == null) { in SecretKeySpec()
156 this.algorithm = algorithm; in SecretKeySpec()
165 return this.algorithm; in getAlgorithm()
196 if (this.algorithm.equalsIgnoreCase("TripleDES")) in hashCode()
200 this.algorithm.toLowerCase(Locale.ENGLISH).hashCode()); in hashCode()
[all …]
/libcore/ojluni/src/main/java/java/security/
DAlgorithmParameterGenerator.java124 private String algorithm; field in AlgorithmParameterGenerator
135 String algorithm) { in AlgorithmParameterGenerator() argument
138 this.algorithm = algorithm; in AlgorithmParameterGenerator()
148 return this.algorithm; in getAlgorithm()
179 public static AlgorithmParameterGenerator getInstance(String algorithm) in getInstance() argument
182 Object[] objs = Security.getImpl(algorithm, in getInstance()
188 algorithm); in getInstance()
190 throw new NoSuchAlgorithmException(algorithm + " not found"); in getInstance()
229 public static AlgorithmParameterGenerator getInstance(String algorithm, in getInstance() argument
235 Object[] objs = Security.getImpl(algorithm, in getInstance()
[all …]
DAlgorithmParameters.java179 private String algorithm; field in AlgorithmParameters
192 Provider provider, String algorithm) in AlgorithmParameters() argument
196 this.algorithm = algorithm; in AlgorithmParameters()
205 return this.algorithm; in getAlgorithm()
238 public static AlgorithmParameters getInstance(String algorithm) in getInstance() argument
241 Object[] objs = Security.getImpl(algorithm, "AlgorithmParameters", in getInstance()
245 algorithm); in getInstance()
247 throw new NoSuchAlgorithmException(algorithm + " not found"); in getInstance()
288 public static AlgorithmParameters getInstance(String algorithm, in getInstance() argument
295 Providers.checkBouncyCastleDeprecation(provider, "AlgorithmParameters", algorithm); in getInstance()
[all …]
DKeyPairGenerator.java155 private final String algorithm; field in KeyPairGenerator
169 protected KeyPairGenerator(String algorithm) { in KeyPairGenerator() argument
170 this.algorithm = algorithm; in KeyPairGenerator()
183 return this.algorithm; in getAlgorithm()
187 String algorithm) { in getInstance() argument
193 kpg = new Delegate(spi, algorithm); in getInstance()
235 public static KeyPairGenerator getInstance(String algorithm) in getInstance() argument
238 GetInstance.getServices("KeyPairGenerator", algorithm); in getInstance()
242 (algorithm + " KeyPairGenerator not available"); in getInstance()
252 return getInstance(instance, algorithm); in getInstance()
[all …]
DKeyFactory.java125 private final String algorithm; field in KeyFactory
149 String algorithm) { in KeyFactory() argument
152 this.algorithm = algorithm; in KeyFactory()
155 private KeyFactory(String algorithm) throws NoSuchAlgorithmException { in KeyFactory() argument
156 this.algorithm = algorithm; in KeyFactory()
157 List<Service> list = GetInstance.getServices("KeyFactory", algorithm); in KeyFactory()
162 (algorithm + " KeyFactory not available"); in KeyFactory()
193 public static KeyFactory getInstance(String algorithm) in getInstance() argument
195 return new KeyFactory(algorithm); in getInstance()
232 public static KeyFactory getInstance(String algorithm, String provider) in getInstance() argument
[all …]
DMessageDigest.java143 private String algorithm; field in MessageDigest
162 protected MessageDigest(String algorithm) { in MessageDigest() argument
163 this.algorithm = algorithm; in MessageDigest()
193 public static MessageDigest getInstance(String algorithm) in getInstance() argument
197 Object[] objs = Security.getImpl(algorithm, "MessageDigest", in getInstance()
202 md = new Delegate((MessageDigestSpi)objs[0], algorithm); in getInstance()
217 throw new NoSuchAlgorithmException(algorithm + " not found"); in getInstance()
255 public static MessageDigest getInstance(String algorithm, String provider) in getInstance() argument
261 Providers.checkBouncyCastleDeprecation(provider, "MessageDigest", algorithm); in getInstance()
262 Object[] objs = Security.getImpl(algorithm, "MessageDigest", provider); in getInstance()
[all …]
DSecureRandom.java133 private String algorithm; field in SecureRandom
227 this.algorithm = prng; in getDefaultPRNG()
243 String algorithm) { in SecureRandom() argument
247 this.algorithm = algorithm; in SecureRandom()
295 public static SecureRandom getInstance(String algorithm) in getInstance() argument
298 SecureRandomSpi.class, algorithm); in getInstance()
300 instance.provider, algorithm); in getInstance()
346 public static SecureRandom getInstance(String algorithm, String provider) in getInstance() argument
349 SecureRandomSpi.class, algorithm, provider); in getInstance()
351 instance.provider, algorithm); in getInstance()
[all …]
DKeyRep.java96 private String algorithm; field in KeyRep
131 public KeyRep(Type type, String algorithm, in KeyRep() argument
134 if (type == null || algorithm == null || in KeyRep()
140 this.algorithm = algorithm; in KeyRep()
172 return new SecretKeySpec(encoded, algorithm); in readResolve()
174 KeyFactory f = KeyFactory.getInstance(algorithm); in readResolve()
177 KeyFactory f = KeyFactory.getInstance(algorithm); in readResolve()
190 "[" + algorithm + "] " + in readResolve()
DSignature.java268 private String algorithm; field in Signature
305 protected Signature(String algorithm) { in Signature() argument
306 this.algorithm = algorithm; in Signature()
353 public static Signature getInstance(String algorithm) in getInstance() argument
356 if (algorithm.equalsIgnoreCase(RSA_SIGNATURE)) { in getInstance()
359 list = GetInstance.getServices("Signature", algorithm); in getInstance()
364 (algorithm + " Signature not available"); in getInstance()
373 return new Delegate(algorithm); in getInstance()
379 return getInstance(instance, algorithm); in getInstance()
388 private static Signature getInstance(Instance instance, String algorithm) { in getInstance() argument
[all …]
/libcore/ojluni/src/main/java/javax/net/ssl/
DTrustManagerFactory.java66 private String algorithm; field in TrustManagerFactory
103 Provider provider, String algorithm) { in TrustManagerFactory() argument
106 this.algorithm = algorithm; in TrustManagerFactory()
121 return this.algorithm; in getAlgorithm()
152 public static final TrustManagerFactory getInstance(String algorithm) in getInstance() argument
156 algorithm); in getInstance()
158 instance.provider, algorithm); in getInstance()
195 public static final TrustManagerFactory getInstance(String algorithm, in getInstance() argument
200 algorithm, provider); in getInstance()
202 instance.provider, algorithm); in getInstance()
[all …]
DKeyManagerFactory.java66 private String algorithm; field in KeyManagerFactory
103 Provider provider, String algorithm) { in KeyManagerFactory() argument
106 this.algorithm = algorithm; in KeyManagerFactory()
119 return this.algorithm; in getAlgorithm()
150 public static final KeyManagerFactory getInstance(String algorithm) in getInstance() argument
154 algorithm); in getInstance()
156 instance.provider, algorithm); in getInstance()
193 public static final KeyManagerFactory getInstance(String algorithm, in getInstance() argument
198 algorithm, provider); in getInstance()
200 instance.provider, algorithm); in getInstance()
[all …]
/libcore/ojluni/src/main/java/sun/security/jca/
DGetInstance.java64 public static Service getService(String type, String algorithm) in getService() argument
67 Service s = list.getService(type, algorithm); in getService()
70 (algorithm + " " + type + " not available"); in getService()
75 public static Service getService(String type, String algorithm, in getService() argument
85 Service s = p.getService(type, algorithm); in getService()
88 + algorithm + " for provider " + provider); in getService()
93 public static Service getService(String type, String algorithm, in getService() argument
98 Service s = provider.getService(type, algorithm); in getService()
101 + algorithm + " for provider " + provider.getName()); in getService()
112 public static List<Service> getServices(String type, String algorithm) { in getServices() argument
[all …]
/libcore/ojluni/src/main/java/java/security/cert/
DCertPathValidator.java124 private final String algorithm; field in CertPathValidator
135 Provider provider, String algorithm) in CertPathValidator() argument
139 this.algorithm = algorithm; in CertPathValidator()
170 public static CertPathValidator getInstance(String algorithm) in getInstance() argument
173 CertPathValidatorSpi.class, algorithm); in getInstance()
175 instance.provider, algorithm); in getInstance()
213 public static CertPathValidator getInstance(String algorithm, in getInstance() argument
217 CertPathValidatorSpi.class, algorithm, provider); in getInstance()
219 instance.provider, algorithm); in getInstance()
251 public static CertPathValidator getInstance(String algorithm, in getInstance() argument
[all …]
DCertPathBuilder.java125 private final String algorithm; field in CertPathBuilder
136 String algorithm) in CertPathBuilder() argument
140 this.algorithm = algorithm; in CertPathBuilder()
171 public static CertPathBuilder getInstance(String algorithm) in getInstance() argument
174 CertPathBuilderSpi.class, algorithm); in getInstance()
176 instance.provider, algorithm); in getInstance()
214 public static CertPathBuilder getInstance(String algorithm, String provider) in getInstance() argument
217 CertPathBuilderSpi.class, algorithm, provider); in getInstance()
219 instance.provider, algorithm); in getInstance()
251 public static CertPathBuilder getInstance(String algorithm, in getInstance() argument
[all …]
/libcore/ojluni/src/main/java/javax/crypto/
DSecretKeyFactory.java273 private final String algorithm; field in SecretKeyFactory
293 Provider provider, String algorithm) { in SecretKeyFactory() argument
296 this.algorithm = algorithm; in SecretKeyFactory()
299 private SecretKeyFactory(String algorithm) throws NoSuchAlgorithmException { in SecretKeyFactory() argument
300 this.algorithm = algorithm; in SecretKeyFactory()
302 GetInstance.getServices("SecretKeyFactory", algorithm); in SecretKeyFactory()
307 (algorithm + " SecretKeyFactory not available"); in SecretKeyFactory()
342 public static final SecretKeyFactory getInstance(String algorithm) in getInstance() argument
344 return new SecretKeyFactory(algorithm); in getInstance()
385 public static final SecretKeyFactory getInstance(String algorithm, in getInstance() argument
[all …]
DKeyAgreement.java109 private final String algorithm; field in KeyAgreement
138 String algorithm) { in KeyAgreement() argument
141 this.algorithm = algorithm; in KeyAgreement()
146 private KeyAgreement(String algorithm) { in KeyAgreement() argument
147 this.algorithm = algorithm; in KeyAgreement()
161 return this.algorithm; in getAlgorithm()
195 public static final KeyAgreement getInstance(String algorithm) in getInstance() argument
198 GetInstance.getServices("KeyAgreement", algorithm); in getInstance()
208 return new KeyAgreement(algorithm); in getInstance()
211 ("Algorithm " + algorithm + " not available"); in getInstance()
[all …]
DMac.java174 private final String algorithm; field in Mac
205 protected Mac(MacSpi macSpi, Provider provider, String algorithm) { in Mac() argument
208 this.algorithm = algorithm; in Mac()
213 private Mac(String algorithm) { in Mac() argument
214 this.algorithm = algorithm; in Mac()
228 return this.algorithm; in getAlgorithm()
258 public static final Mac getInstance(String algorithm) in getInstance() argument
260 List<Service> services = GetInstance.getServices("Mac", algorithm); in getInstance()
270 return new Mac(algorithm); in getInstance()
273 ("Algorithm " + algorithm + " not available"); in getInstance()
[all …]
DKeyGenerator.java193 private final String algorithm; field in KeyGenerator
212 String algorithm) { in KeyGenerator() argument
215 this.algorithm = algorithm; in KeyGenerator()
226 private KeyGenerator(String algorithm) throws NoSuchAlgorithmException { in KeyGenerator() argument
227 this.algorithm = algorithm; in KeyGenerator()
229 GetInstance.getServices("KeyGenerator", algorithm); in KeyGenerator()
235 (algorithm + " KeyGenerator not available"); in KeyGenerator()
257 return this.algorithm; in getAlgorithm()
289 public static final KeyGenerator getInstance(String algorithm) in getInstance() argument
291 return new KeyGenerator(algorithm); in getInstance()
[all …]
/libcore/ojluni/src/main/java/sun/security/util/
DDisabledAlgorithmConstraints.java97 String algorithm, AlgorithmParameters parameters) { in permits() argument
104 return checkAlgorithm(disabledAlgorithms, algorithm, decomposer); in permits()
122 String algorithm, Key key, AlgorithmParameters parameters) { in permits() argument
124 if (algorithm == null || algorithm.length() == 0) { in permits()
128 return checkConstraints(primitives, algorithm, key, parameters); in permits()
165 String algorithm, Key key, AlgorithmParameters parameters) { in checkConstraints() argument
173 if (algorithm != null && algorithm.length() != 0) { in checkConstraints()
174 if (!permits(primitives, algorithm, parameters)) { in checkConstraints()
196 String algorithm = cert.getSigAlgName(); in checkConstraints() local
199 if (!permits(primitives, algorithm, null)) { in checkConstraints()
[all …]
DAlgorithmDecomposer.java41 private static Set<String> decomposeImpl(String algorithm) { in decomposeImpl() argument
44 String[] transTockens = transPattern.split(algorithm); in decomposeImpl()
79 public Set<String> decompose(String algorithm) { in decompose() argument
80 if (algorithm == null || algorithm.length() == 0) { in decompose()
84 Set<String> elements = decomposeImpl(algorithm); in decompose()
149 public static Set<String> decomposeOneHash(String algorithm) { in decomposeOneHash() argument
150 if (algorithm == null || algorithm.length() == 0) { in decomposeOneHash()
154 Set<String> elements = decomposeImpl(algorithm); in decomposeOneHash()
169 public static String hashName(String algorithm) { in hashName() argument
170 return algorithm.replace("-", ""); in hashName()
/libcore/tools/docs/crypto/
Dformat_supported_algorithm_table.py37 for algorithm in category['algorithms']:
38 if 'note' in algorithm:
90 for algorithm in algorithms:
91 name, mode, padding = algorithm['name'].split('/')
96 algorithm['supported_api_levels'],
97 'deprecated' in algorithm and algorithm['deprecated'],
98 algorithm.get('note', '')))
215 for algorithm in supported:
216 if 'deprecated' in algorithm and algorithm['deprecated']:
220 output.append(' <td>%s</td>' % nowrap(algorithm['name']))
[all …]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DMessageDigest2Test.java80 for (String algorithm : algorithms) { in test_constructor()
81 MessageDigestStub md = new MessageDigestStub(algorithm); in test_constructor()
82 assertEquals(algorithm, md.getAlgorithm()); in test_constructor()
94 for (String algorithm : e.getValue()) { in test_clone()
95 MessageDigest d1 = MessageDigest.getInstance(algorithm, e.getKey().getName()); in test_clone()
104 assertTrue("cloned hash differs from original for algorithm " + algorithm, in test_clone()
256 for (String algorithm : e.getValue()) { in test_digest$B()
257 MessageDigest digest = MessageDigest.getInstance(algorithm, e.getKey().getName()); in test_digest$B()
269 for (String algorithm : e.getValue()) { in test_digest$BII()
270 MessageDigest digest = MessageDigest.getInstance(algorithm, e.getKey().getName()); in test_digest$BII()
[all …]
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
DPublicKeyStub.java38 String algorithm = null; field in PublicKeyStub
45 public PublicKeyStub(String algorithm, String format, byte[] encoded) { in PublicKeyStub() argument
46 this.algorithm = algorithm; in PublicKeyStub()
55 return algorithm; in getAlgorithm()
DPrivateKeyStub.java35 String algorithm = null; field in PrivateKeyStub
47 public PrivateKeyStub(String algorithm, String format, byte[] encoded) { in PrivateKeyStub() argument
48 this.algorithm = algorithm; in PrivateKeyStub()
58 return algorithm; in getAlgorithm()

12345