Lines Matching defs:algorithm
52 // algorithm name
53 private final String algorithm;
55 P11SecretKeyFactory(Token token, String algorithm) {
58 this.algorithm = algorithm;
89 static long getKeyType(String algorithm) {
90 Long l = keyTypes.get(algorithm);
92 algorithm = algorithm.toUpperCase(Locale.ENGLISH);
93 l = keyTypes.get(algorithm);
95 if (algorithm.startsWith("HMAC")) {
97 } else if (algorithm.startsWith("SSLMAC")) {
106 * Convert an arbitrary key of algorithm into a P11Key of provider.
115 * Convert an arbitrary key of algorithm w/ custom attributes into a
138 // ignore key algorithm for MACs
141 ("Key algorithm must be " + algo);
155 newKeyID, p11Key.algorithm, p11Key.keyLength,
189 String algorithm, long keyType, CK_ATTRIBUTE[] extraAttrs)
240 throw new InvalidKeyException("Unknown algorithm " +
241 algorithm);
244 throw new InvalidKeyException("Invalid key for " + algorithm,
267 (session, keyID, algorithm, keyLength, attributes);
285 Key key = convertKey(token, (SecretKey)keySpec, algorithm);
290 } else if (algorithm.equalsIgnoreCase("DES")) {
296 } else if (algorithm.equalsIgnoreCase("DESede")) {
330 return new SecretKeySpec(getKeyBytes(key), algorithm);
331 } else if (algorithm.equalsIgnoreCase("DES")) {
339 } else if (algorithm.equalsIgnoreCase("DESede")) {
355 return (SecretKey)convertKey(token, key, algorithm);