Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 jdk.crypto.ec.jmod - Crypto EC Module
JDK 17 jdk.crypto.ec.jmod is the JMOD file for JDK 17 Crypto EC module.
JDK 17 Crypto EC module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.crypto.ec.jmod.
JDK 17 Crypto EC module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Crypto EC module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.crypto.ec.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/security/ec/ParametersMap.java
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.security.ec;
import sun.security.util.ObjectIdentifier;
import sun.security.x509.AlgorithmId;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.NamedParameterSpec;
import java.util.Collections;
import java.util.Map;
import java.util.HashMap;
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Supplier;
public class ParametersMap<T> {
private Map<Integer, T> sizeMap = new HashMap<Integer, T>();
private Map<ObjectIdentifier, T> oidMap =
new HashMap<ObjectIdentifier, T>();
private Map<String, T> nameMap = new HashMap<String, T>();
public void fix() {
sizeMap = Collections.unmodifiableMap(sizeMap);
oidMap = Collections.unmodifiableMap(oidMap);
nameMap = Collections.unmodifiableMap(nameMap);
}
public void put(String name, ObjectIdentifier oid, int size, T params) {
nameMap.put(name.toLowerCase(), params);
oidMap.put(oid, params);
sizeMap.put(size, params);
}
public Optional<T> getByOid(ObjectIdentifier id) {
return Optional.ofNullable(oidMap.get(id));
}
public Optional<T> getBySize(int size) {
return Optional.ofNullable(sizeMap.get(size));
}
public Optional<T> getByName(String name) {
return Optional.ofNullable(nameMap.get(name.toLowerCase()));
}
// Utility method that is used by the methods below to handle exception
// suppliers
private static
<A, B> Supplier<B> apply(final Function<A, B> func, final A a) {
return new Supplier<B>() {
@Override
public B get() {
return func.apply(a);
}
};
}
/**
* Get parameters by key size, or throw an exception if no parameters are
* defined for the specified key size. This method is used in several
* contexts that should throw different exceptions when the parameters
* are not found. The first argument is a function that produces the
* desired exception.
*
* @param exception a function that produces an exception from a string
* @param size the desired key size
* @param <E> the type of exception that is thrown
* @return the parameters for the specified key size
* @throws T when suitable parameters do not exist
*/
public
<E extends Throwable>
T getBySize(Function<String, E> exception,
int size) throws E {
Optional<T> paramsOpt = getBySize(size);
return paramsOpt.orElseThrow(
apply(exception, "Unsupported size: " + size));
}
/**
* Get parameters by algorithm ID, or throw an exception if no
* parameters are defined for the specified ID. This method is used in
* several contexts that should throw different exceptions when the
* parameters are not found. The first argument is a function that produces
* the desired exception.
*
* @param exception a function that produces an exception from a string
* @param algId the algorithm ID
* @param <E> the type of exception that is thrown
* @return the parameters for the specified algorithm ID
* @throws E when suitable parameters do not exist
*/
public
<E extends Throwable>
T get(Function<String, E> exception,
AlgorithmId algId) throws E {
Optional<T> paramsOpt = getByOid(algId.getOID());
return paramsOpt.orElseThrow(
apply(exception, "Unsupported OID: " + algId.getOID()));
}
/**
* Get parameters by algorithm parameter spec, or throw an exception if no
* parameters are defined for the spec. This method is used in
* several contexts that should throw different exceptions when the
* parameters are not found. The first argument is a function that produces
* the desired exception.
*
* @param exception a function that produces an exception from a string
* @param params the algorithm parameters spec
* @param <E> the type of exception that is thrown
* @return the parameters for the spec
* @throws E when suitable parameters do not exist
*/
public
<E extends Throwable>
T get(Function<String, E> exception,
AlgorithmParameterSpec params) throws E {
if (params instanceof NamedParameterSpec) {
NamedParameterSpec namedParams = (NamedParameterSpec) params;
Optional<T> paramsOpt = getByName(namedParams.getName());
return paramsOpt.orElseThrow(
apply(exception, "Unsupported name: " + namedParams.getName()));
} else {
throw exception.apply("Only NamedParameterSpec is supported.");
}
}
}
⏎ sun/security/ec/ParametersMap.java
Or download all of them as a single archive file:
File name: jdk.crypto.ec-17.0.5-src.zip File size: 62834 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.dynalink.jmod - Dynamic Linking Module
2023-10-15, ∼8195🔥, 0💬
Popular Posts:
How to read XML document with XML Schema validation from socket connections with the socket\DelayedI...
What Is wstx-asl-3.2.8.jar? wstx-asl-3.2.8.jar is JAR file for the ASL component of Woodstox 3.2.8. ...
JDK 11 java.sql.jmod is the JMOD file for JDK 11 SQL (Structured Query Language) module. JDK 11 SQL ...
The Apache FontBox library is an open source Java tool to obtain low level information from font fil...
commons-io-1.4.jar is the JAR file for Commons IO 1.4, which is a library of utilities to assist wit...