code
stringlengths
73
34.1k
label
stringclasses
1 value
@Override public boolean isApprovalNeeded(final Rollout rollout) { final UserDetails userDetails = this.getActor(rollout); final boolean approvalEnabled = this.tenantConfigurationManagement .getConfigurationValue(TenantConfigurationKey.ROLLOUT_APPROVAL_ENABLED, Boolean.class).getValu...
java
@Override protected Date handleUnparsableDateString(final String value) throws ConversionException { try { return durationFormat.parse(value); } catch (final ParseException e1) { try { return additionalFormat.parse("000000".substring(value.length() <= 6 ? v...
java
public void setDuration(@NotNull final Duration duration) { if (duration.compareTo(MAXIMUM_DURATION) > 0) { throw new IllegalArgumentException("The duaration has to be smaller than 23:59:59."); } super.setValue(durationToDate(duration)); }
java
public void setMinimumDuration(@NotNull final Duration minimumDuration) { if (minimumDuration.compareTo(MAXIMUM_DURATION) > 0) { throw new IllegalArgumentException("The minimum duaration has to be smaller than 23:59:59."); } this.minimumDuration = durationToDate(minimumDuration); ...
java
public void setMaximumDuration(@NotNull final Duration maximumDuration) { if (maximumDuration.compareTo(MAXIMUM_DURATION) > 0) { throw new IllegalArgumentException("The maximum duaration has to be smaller than 23:59:59."); } this.maximumDuration = durationToDate(maximumDuration); ...
java
private int compareTimeOfDates(final Date d1, final Date d2) { final LocalTime lt1 = LocalDateTime.ofInstant(d1.toInstant(), ZONEID_UTC).toLocalTime(); final LocalTime lt2 = LocalDateTime.ofInstant(d2.toInstant(), ZONEID_UTC).toLocalTime(); return lt1.compareTo(lt2); }
java
private void maxArtifactDetails() { final Boolean flag = (Boolean) maxMinButton.getData(); if (flag == null || Boolean.FALSE.equals(flag)) { // Clicked on max Button maximizedArtifactDetailsView(); } else { minimizedArtifactDetailsView(); } }
java
public void createMaxArtifactDetailsTable() { maxArtifactDetailsTable = createArtifactDetailsTable(); maxArtifactDetailsTable.setId(UIComponentIdProvider.UPLOAD_ARTIFACT_DETAILS_TABLE_MAX); maxArtifactDetailsTable.setContainerDataSource(artifactDetailsTable.getContainerDataSource()); add...
java
public void populateArtifactDetails(final SoftwareModule softwareModule) { if (softwareModule == null) { populateArtifactDetails(null, null); } else { populateArtifactDetails(softwareModule.getId(), HawkbitCommonUtil.getFormattedNameVersion(softwareModule.getN...
java
private void setTitleOfLayoutHeader() { titleOfArtifactDetails.setValue(HawkbitCommonUtil.getArtifactoryDetailsLabelId("", i18n)); titleOfArtifactDetails.setContentMode(ContentMode.HTML); }
java
public RolloutGroupConditionBuilder successCondition(final RolloutGroupSuccessCondition condition, final String expression) { conditions.setSuccessCondition(condition); conditions.setSuccessConditionExp(expression); return this; }
java
public RolloutGroupConditionBuilder successAction(final RolloutGroupSuccessAction action, final String expression) { conditions.setSuccessAction(action); conditions.setSuccessActionExp(expression); return this; }
java
public RolloutGroupConditionBuilder errorCondition(final RolloutGroupErrorCondition condition, final String expression) { conditions.setErrorCondition(condition); conditions.setErrorConditionExp(expression); return this; }
java
public RolloutGroupConditionBuilder errorAction(final RolloutGroupErrorAction action, final String expression) { conditions.setErrorAction(action); conditions.setErrorActionExp(expression); return this; }
java
public RolloutGroupConditionBuilder withDefaults() { successCondition(RolloutGroupSuccessCondition.THRESHOLD, "50"); successAction(RolloutGroupSuccessAction.NEXTGROUP, ""); errorCondition(RolloutGroupErrorCondition.THRESHOLD, "50"); errorAction(RolloutGroupErrorAction.PAUSE, ""); ...
java
@Override public AnonymousIpResponse anonymousIp(InetAddress ipAddress) throws IOException, GeoIp2Exception { return this.get(ipAddress, AnonymousIpResponse.class, "GeoIP2-Anonymous-IP"); }
java
@Override public AsnResponse asn(InetAddress ipAddress) throws IOException, GeoIp2Exception { return this.get(ipAddress, AsnResponse.class, "GeoLite2-ASN"); }
java
@Override public ConnectionTypeResponse connectionType(InetAddress ipAddress) throws IOException, GeoIp2Exception { return this.get(ipAddress, ConnectionTypeResponse.class, "GeoIP2-Connection-Type"); }
java
@Override public DomainResponse domain(InetAddress ipAddress) throws IOException, GeoIp2Exception { return this .get(ipAddress, DomainResponse.class, "GeoIP2-Domain"); }
java
@Override public EnterpriseResponse enterprise(InetAddress ipAddress) throws IOException, GeoIp2Exception { return this.get(ipAddress, EnterpriseResponse.class, "Enterprise"); }
java
@Override public IspResponse isp(InetAddress ipAddress) throws IOException, GeoIp2Exception { return this.get(ipAddress, IspResponse.class, "GeoIP2-ISP"); }
java
public void addListener(Listener listener, long listenerCheckMillis) { queue.add(listener); long newFrequency = Math.min(MINIMUM_CHECK_DELAY_MILLIS, listenerCheckMillis); //first listener if (currentScheduledFrequency.get() == -1) { if (currentScheduledFrequency.compareAndSet(-1, newFrequency)) ...
java
public void removeListener(Listener listener) { queue.remove(listener); if (queue.isEmpty()) { synchronized (queue) { if (currentScheduledFrequency.get() > 0 && queue.isEmpty()) { currentScheduledFrequency.set(-1); } } } }
java
public TraceObject put(TraceObject value) { String key = increment.incrementAndGet() + "- " + DateTimeFormatter.ISO_INSTANT.format(Instant.now()); return put(key, value); }
java
public synchronized String printStack() { StringBuilder sb = new StringBuilder(); Set<Map.Entry<String, TraceObject>> set = entrySet(); for (Map.Entry<String, TraceObject> entry : set) { TraceObject traceObj = entry.getValue(); String key = entry.getKey(); String indicator = ""; swi...
java
public synchronized void clearMemory() { Collection<TraceObject> traceObjects = values(); for (TraceObject traceObject : traceObjects) { traceObject.remove(); } this.clear(); }
java
private Object handleFailOver(SQLException qe, Method method, Object[] args, Protocol protocol) throws Throwable { HostAddress failHostAddress = null; boolean failIsMaster = true; if (protocol != null) { failHostAddress = protocol.getHostAddress(); failIsMaster = protocol.isMasterConnectio...
java
public boolean hasToHandleFailover(SQLException exception) { return exception.getSQLState() != null && (exception.getSQLState().startsWith("08") || (exception.getSQLState().equals("70100") && 1927 == exception.getErrorCode())); }
java
public void reconnect() throws SQLException { try { listener.reconnect(); } catch (SQLException e) { ExceptionMapper.throwException(e, null, null); } }
java
public String readStringNullEnd(final Charset charset) { int initialPosition = position; int cnt = 0; while (remaining() > 0 && (buf[position++] != 0)) { cnt++; } return new String(buf, initialPosition, cnt, charset); }
java
public byte[] readBytesNullEnd() { int initialPosition = position; int cnt = 0; while (remaining() > 0 && (buf[position++] != 0)) { cnt++; } final byte[] tmpArr = new byte[cnt]; System.arraycopy(buf, initialPosition, tmpArr, 0, cnt); return tmpArr; }
java
public String readStringLengthEncoded(final Charset charset) { int length = (int) getLengthEncodedNumeric(); String string = new String(buf, position, length, charset); position += length; return string; }
java
public String readString(final int numberOfBytes) { position += numberOfBytes; return new String(buf, position - numberOfBytes, numberOfBytes); }
java
public byte[] readRawBytes(final int numberOfBytes) { final byte[] tmpArr = new byte[numberOfBytes]; System.arraycopy(buf, position, tmpArr, 0, numberOfBytes); position += numberOfBytes; return tmpArr; }
java
public void skipLengthEncodedBytes() { int type = this.buf[this.position++] & 0xff; switch (type) { case 251: break; case 252: position += 2 + (0xffff & (((buf[position] & 0xff) + ((buf[position + 1] & 0xff) << 8)))); break; case 253: position += 3 + (0xffffff...
java
public byte[] getLengthEncodedBytes() { int type = this.buf[this.position++] & 0xff; int length; switch (type) { case 251: return null; case 252: length = 0xffff & readShort(); break; case 253: length = 0xffffff & read24bitword(); break; case 2...
java
public void writeStringSmallLength(byte[] value) { int length = value.length; while (remaining() < length + 1) { grow(); } buf[position++] = (byte) length; System.arraycopy(value, 0, buf, position, length); position += length; }
java
public void writeBytes(byte header, byte[] bytes) { int length = bytes.length; while (remaining() < length + 10) { grow(); } writeLength(length + 1); buf[position++] = header; System.arraycopy(bytes, 0, buf, position, length); position += length; }
java
public void writeLength(long length) { if (length < 251) { buf[position++] = (byte) length; } else if (length < 65536) { buf[position++] = (byte) 0xfc; buf[position++] = (byte) length; buf[position++] = (byte) (length >>> 8); } else if (length < 16777216) { buf[position++] = (b...
java
public static void writeCmd(final int statementId, final ParameterHolder[] parameters, final int parameterCount, ColumnType[] parameterTypeHeader, final PacketOutputStream pos, final byte cursorFlag) throws IOException { pos.write(Packet.COM_STMT_EXECUTE); pos.writeInt(statementId); pos.wr...
java
public static void send(final PacketOutputStream pos, final int statementId, final ParameterHolder[] parameters, final int parameterCount, ColumnType[] parameterTypeHeader, byte cursorFlag) throws IOException { pos.startPacket(0); writeCmd(statementId, parameters, parameterCount, parameterTyp...
java
private void execute(String command) throws XAException { try { connection.createStatement().execute(command); } catch (SQLException sqle) { throw mapXaException(sqle); } }
java
private String exWithQuery(String message, PrepareResult serverPrepareResult, ParameterHolder[] parameters) { if (options.dumpQueriesOnException) { StringBuilder sql = new StringBuilder(serverPrepareResult.getSql()); if (serverPrepareResult.getParamCount() > 0) { sql.append(", parameters [...
java
public byte[] getPacketArray(boolean reUsable) throws IOException { byte[] cachePacket = getNextCachePacket(); if (cachePacket != null) { return cachePacket; } //loop until having the whole packet do { //Read 7 byte header readBlocking(header, 7); int compressedLength = ...
java
public static void throwException(SQLException exception, MariaDbConnection connection, MariaDbStatement statement) throws SQLException { throw getException(exception, connection, statement, false); }
java
public static void checkConnectionException(SQLException exception, MariaDbConnection connection) { if (exception.getSQLState() != null) { SqlStates state = SqlStates.fromString(exception.getSQLState()); if (SqlStates.CONNECTION_EXCEPTION.equals(state)) { connection.setHostFailed(); ...
java
public static MariaDbConnection newConnection(UrlParser urlParser, GlobalStateInfo globalInfo) throws SQLException { if (urlParser.getOptions().pool) { return Pools.retrievePool(urlParser).getConnection(); } Protocol protocol = Utils.retrieveProxy(urlParser, globalInfo); return new MariaDbC...
java
@Deprecated public static String unquoteIdentifier(String string) { if (string != null && string.startsWith("`") && string.endsWith("`") && string.length() >= 2) { return string.substring(1, string.length() - 1).replace("``", "`"); } return string; }
java
public ClientSidePreparedStatement clientPrepareStatement(final String sql) throws SQLException { return new ClientSidePreparedStatement(this, sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, Statement.RETURN_GENERATED_KEYS); }
java
public ServerSidePreparedStatement serverPrepareStatement(final String sql) throws SQLException { return new ServerSidePreparedStatement(this, sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, Statement.RETURN_GENERATED_KEYS); }
java
public PreparedStatement prepareStatement(final String sql) throws SQLException { return internalPrepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, Statement.NO_GENERATED_KEYS); }
java
private PreparedStatement internalPrepareStatement(final String sql, final int resultSetScrollType, final int resultSetConcurrency, final int autoGeneratedKeys) throws SQLException { if (sql != null) { String sqlQuery = Utils.nativeSql(sql, protocol.noBackslashEscapes()); if (...
java
public void commit() throws SQLException { lock.lock(); try { if (protocol.inTransaction()) { try (Statement st = createStatement()) { st.execute("COMMIT"); } } } finally { lock.unlock(); } }
java
public void setReadOnly(final boolean readOnly) throws SQLException { try { logger.debug("conn={}({}) - set read-only to value {} {}", protocol.getServerThreadId(), protocol.isMasterConnection() ? "M" : "S", readOnly); stateFlag |= ConnectionState.STATE_READ_ONLY; pro...
java
public Properties getClientInfo() throws SQLException { checkConnection(); Properties properties = new Properties(); try (Statement statement = createStatement()) { try (ResultSet rs = statement .executeQuery("SELECT @ApplicationName, @ClientUser, @ClientHostname")) { if (rs.next()) ...
java
public void setNetworkTimeout(Executor executor, final int milliseconds) throws SQLException { if (this.isClosed()) { throw ExceptionMapper .getSqlException("Connection.setNetworkTimeout cannot be called on a closed connection"); } if (milliseconds < 0) { throw ExceptionMapper ...
java
public void reset() throws SQLException { boolean useComReset = options.useResetConnection && ((protocol.isServerMariaDb() && protocol.versionGreaterOrEqual(10, 2, 4)) || (!protocol.isServerMariaDb() && protocol.versionGreaterOrEqual(5, 7, 3))); if (useComReset) { protocol.reset(); } ...
java
public int getIndex(String name) throws SQLException { if (name == null) { throw new SQLException("Column name cannot be null"); } String lowerName = name.toLowerCase(Locale.ROOT); // The specs in JDBC 4.0 specify that ResultSet.findColumn and // ResultSet.getXXX(String name) should use column...
java
public long getPrecision() { switch (type) { case OLDDECIMAL: case DECIMAL: //DECIMAL and OLDDECIMAL are "exact" fixed-point number. //so : // - if can be signed, 1 byte is saved for sign // - if decimal > 0, one byte more for dot if (isSigned()) { retu...
java
public int getDisplaySize() { int vtype = type.getSqlType(); if (vtype == Types.VARCHAR || vtype == Types.CHAR) { int maxWidth = maxCharlen[charsetNumber & 0xff]; if (maxWidth == 0) { maxWidth = 1; } return (int) length / maxWidth; } return (int) length; }
java
public void addStats(long updateCount, long insertId, boolean moreResultAvailable) { if (cmdInformation == null) { if (batch) { cmdInformation = new CmdInformationBatch(expectedSize, autoIncrement); } else if (moreResultAvailable) { cmdInformation = new CmdInformationMultiple(expectedSiz...
java
public void addStatsError(boolean moreResultAvailable) { if (cmdInformation == null) { if (batch) { cmdInformation = new CmdInformationBatch(expectedSize, autoIncrement); } else if (moreResultAvailable) { cmdInformation = new CmdInformationMultiple(expectedSize, autoIncrement); } e...
java
public void addResultSet(SelectResultSet resultSet, boolean moreResultAvailable) { if (resultSet.isCallableResult()) { callableResultSet = resultSet; return; } if (executionResults == null) { executionResults = new ArrayDeque<>(); } executionResults.add(resultSet); if (cmdInfor...
java
public boolean isFullyLoaded(Protocol protocol) { if (fetchSize == 0 || resultSet == null) { return true; } return resultSet.isFullyLoaded() && executionResults.isEmpty() && !protocol.hasMoreResults(); }
java
public boolean getMoreResults(final int current, Protocol protocol) throws SQLException { if (fetchSize != 0 && resultSet != null) { protocol.getLock().lock(); try { //load current resultSet if (current == Statement.CLOSE_CURRENT_RESULT && resultSet != null) { resultSet.close(...
java
public String getDatabaseName() { if (database != null) { return database; } return (urlParser != null && urlParser.getDatabase() != null) ? urlParser.getDatabase() : ""; }
java
public String getUser() { if (user != null) { return user; } return urlParser != null ? urlParser.getUsername() : null; }
java
public int getPort() { if (port != null && port != 0) { return port; } return urlParser != null ? urlParser.getHostAddresses().get(0).port : 3306; }
java
public String getServerName() { if (hostname != null) { return hostname; } boolean hasHost = urlParser != null && this.urlParser.getHostAddresses().get(0).host != null; return (hasHost) ? this.urlParser.getHostAddresses().get(0).host : "localhost"; }
java
public static void send(final PacketOutputStream pos, final String database) throws IOException { pos.startPacket(0); pos.write(Packet.COM_INIT_DB); pos.write(database.getBytes("UTF-8")); pos.flush(); }
java
public static GssapiAuth getAuthenticationMethod() { try { //Waffle-jna has jna as dependency, so if not available on classpath, just use standard authentication if (Platform.isWindows()) { try { Class.forName("waffle.windows.auth.impl.WindowsAuthProviderImpl"); return new Wi...
java
public void writeTo(final PacketOutputStream pos) throws IOException { pos.write(BINARY_INTRODUCER); if (length == Long.MAX_VALUE) { pos.write(is, true, noBackslashEscapes); } else { pos.write(is, length, true, noBackslashEscapes); } pos.write(QUOTE); }
java
public void writeTo(final PacketOutputStream pos) throws IOException { pos.write(BINARY_INTRODUCER); pos.writeBytesEscaped(bytes, bytes.length, noBackslashEscapes); pos.write(QUOTE); }
java
@SuppressWarnings("unchecked") public static void init(boolean mustLog) { if ((hasToLog == null || hasToLog != mustLog) && mustLog) { synchronized (LoggerFactory.class) { if (hasToLog == null || hasToLog != mustLog) { try { Class.forName("org.slf4j.LoggerFactory"); ...
java
public static Logger getLogger(Class<?> clazz) { if (hasToLog != null && hasToLog) { return new Slf4JLogger(org.slf4j.LoggerFactory.getLogger(clazz)); } else { return NO_LOGGER; } }
java
public static Socket standardSocket(UrlParser urlParser, String host) throws IOException { SocketFactory socketFactory; String socketFactoryName = urlParser.getOptions().socketFactory; if (socketFactoryName != null) { try { @SuppressWarnings("unchecked") Class<? extends SocketFactory> ...
java
public static String escapeString(String value, boolean noBackslashEscapes) { if (!value.contains("'")) { if (noBackslashEscapes) { return value; } if (!value.contains("\\")) { return value; } } String escaped = value.replace("'", "''"); if (noBackslashEscapes) { ...
java
public static byte[] encryptPassword(final String password, final byte[] seed, String passwordCharacterEncoding) throws NoSuchAlgorithmException, UnsupportedEncodingException { if (password == null || password.isEmpty()) { return new byte[0]; } final MessageDigest messageDigest = Message...
java
public static byte[] copyWithLength(byte[] orig, int length) { // No need to initialize with zero bytes, because the bytes are already initialized with that byte[] result = new byte[length]; int howMuchToCopy = length < orig.length ? length : orig.length; System.arraycopy(orig, 0, result, 0, howMuchToCo...
java
public static byte[] copyRange(byte[] orig, int from, int to) { int length = to - from; byte[] result = new byte[length]; int howMuchToCopy = orig.length - from < length ? orig.length - from : length; System.arraycopy(orig, from, result, 0, howMuchToCopy); return result; }
java
public static Protocol retrieveProxy(final UrlParser urlParser, final GlobalStateInfo globalInfo) throws SQLException { final ReentrantLock lock = new ReentrantLock(); Protocol protocol; switch (urlParser.getHaMode()) { case AURORA: return getProxyLoggingIfNeeded(urlParser, (Protocol) Pr...
java
public static Socket createSocket(UrlParser urlParser, String host) throws IOException { return socketHandler.apply(urlParser, host); }
java
public static String parseSessionVariables(String sessionVariable) { StringBuilder out = new StringBuilder(); StringBuilder sb = new StringBuilder(); Parse state = Parse.Normal; boolean iskey = true; boolean singleQuotes = true; boolean first = true; String key = null; char[] chars = se...
java
public static int transactionFromString(String txIsolation) throws SQLException { switch (txIsolation) { //tx_isolation case "READ-UNCOMMITTED": return Connection.TRANSACTION_READ_UNCOMMITTED; case "READ-COMMITTED": return Connection.TRANSACTION_READ_COMMITTED; case "REPEATABLE-R...
java
private void validAllParameters() throws SQLException { setInputOutputParameterMap(); //Set value for OUT parameters for (int index = 0; index < params.size(); index++) { if (!params.get(index).isInput()) { super.setParameter(index + 1, new NullParameter()); } } validParameters(...
java
public static int equal(int b, int c) { int result = 0; int xor = b ^ c; for (int i = 0; i < 8; i++) { result |= xor >> i; } return (result ^ 0x01) & 0x01; }
java
public static String bytesToHex(byte[] raw) { if (raw == null) { return null; } final StringBuilder hex = new StringBuilder(2 * raw.length); for (final byte b : raw) { hex.append(Character.forDigit((b & 0xF0) >> 4, 16)) .append(Character.forDigit((b & 0x0F), 16)); } return ...
java
private HostAddress findClusterHostAddress(UrlParser urlParser) throws SQLException { List<HostAddress> hostAddresses = urlParser.getHostAddresses(); Matcher matcher; for (HostAddress hostAddress : hostAddresses) { matcher = auroraDnsPattern.matcher(hostAddress.host); if (matcher.find()) { ...
java
public void retrieveAllEndpointsAndSet(Protocol protocol) throws SQLException { // For a given cluster, same port for all endpoints and same end host address if (clusterDnsSuffix != null) { List<String> endpoints = getCurrentEndpointIdentifiers(protocol); setUrlParserFromEndpoints(endpoints, protoco...
java
private List<String> getCurrentEndpointIdentifiers(Protocol protocol) throws SQLException { List<String> endpoints = new ArrayList<>(); try { proxy.lock.lock(); try { // Deleted instance may remain in db for 24 hours so ignoring instances that have had no change // for 3 minutes ...
java
private void setUrlParserFromEndpoints(List<String> endpoints, int port) { List<HostAddress> addresses = new ArrayList<>(); for (String endpoint : endpoints) { HostAddress newHostAddress = new HostAddress(endpoint, port, null); addresses.add(newHostAddress); } synchronized (urlParser) { ...
java
public static org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement p2( final Curve curve, final FieldElement X, final FieldElement Y, final FieldElement Z) { return new org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement(curve, Represent...
java
public static org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement p1p1( final Curve curve, final FieldElement X, final FieldElement Y, final FieldElement Z, final FieldElement T) { return new org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupEl...
java
public static org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement precomp( final Curve curve, final FieldElement ypx, final FieldElement ymx, final FieldElement xy2d) { return new org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement(curve, ...
java
public static org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement cached( final Curve curve, final FieldElement YpX, final FieldElement YmX, final FieldElement Z, final FieldElement T2d) { return new org.mariadb.jdbc.internal.com.send.authentication.ed25519.math...
java
public byte[] toByteArray() { switch (this.repr) { case P2: case P3: FieldElement recip = Z.invert(); FieldElement x = X.multiply(recip); FieldElement y = Y.multiply(recip); byte[] s = y.toByteArray(); s[s.length - 1] |= (x.isNegative() ? (byte) 0x80 : 0); ...
java
public org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement toP2() { return toRep(Representation.P2); }
java
public org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement toP3() { return toRep(Representation.P3); }
java
public org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement toCached() { return toRep(Representation.CACHED); }
java
public boolean isOnCurve(Curve curve) { switch (repr) { case P2: case P3: FieldElement recip = Z.invert(); FieldElement x = X.multiply(recip); FieldElement y = Y.multiply(recip); FieldElement xx = x.square(); FieldElement yy = y.square(); FieldElement dxxy...
java