Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
contents: read

env:
BORINGSSL_VERSION: 0.20260813.0
BORINGSSL_VERSION: 0.20260929.0

jobs:
boringssl_version_check:
Expand Down
26 changes: 26 additions & 0 deletions android-stub/src/main/java/android/compat/Compatibility.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package android.compat;

@SuppressWarnings({"unused", "DoNotCallSuggester"})
public final class Compatibility {
private Compatibility() {}

public static boolean isChangeEnabled(long changeId) {
throw new RuntimeException("Stub!");
}
}
26 changes: 26 additions & 0 deletions android-stub/src/main/java/android/compat/annotation/ChangeId.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package android.compat.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.SOURCE)
@Target({ElementType.FIELD})
public @interface ChangeId {}
30 changes: 30 additions & 0 deletions android-stub/src/main/java/javax/crypto/DecapsulateException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (C) 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package javax.crypto;

import java.security.GeneralSecurityException;

@SuppressWarnings({"unused", "DoNotCallSuggester"})
public class DecapsulateException extends GeneralSecurityException {

Check warning on line 22 in android-stub/src/main/java/javax/crypto/DecapsulateException.java

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04)

[serial] serializable class DecapsulateException has no definition of serialVersionUID

Check warning on line 22 in android-stub/src/main/java/javax/crypto/DecapsulateException.java

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04)

[serial] serializable class DecapsulateException has no definition of serialVersionUID

Check warning on line 22 in android-stub/src/main/java/javax/crypto/DecapsulateException.java

View workflow job for this annotation

GitHub Actions / android-test (26)

[serial] serializable class DecapsulateException has no definition of serialVersionUID

Check warning on line 22 in android-stub/src/main/java/javax/crypto/DecapsulateException.java

View workflow job for this annotation

GitHub Actions / android-test (26)

[serial] serializable class DecapsulateException has no definition of serialVersionUID

Check warning on line 22 in android-stub/src/main/java/javax/crypto/DecapsulateException.java

View workflow job for this annotation

GitHub Actions / android-test (30)

[serial] serializable class DecapsulateException has no definition of serialVersionUID

Check warning on line 22 in android-stub/src/main/java/javax/crypto/DecapsulateException.java

View workflow job for this annotation

GitHub Actions / android-test (34)

[serial] serializable class DecapsulateException has no definition of serialVersionUID

Check warning on line 22 in android-stub/src/main/java/javax/crypto/DecapsulateException.java

View workflow job for this annotation

GitHub Actions / android-test (34)

[serial] serializable class DecapsulateException has no definition of serialVersionUID

Check warning on line 22 in android-stub/src/main/java/javax/crypto/DecapsulateException.java

View workflow job for this annotation

GitHub Actions / android-test (30)

[serial] serializable class DecapsulateException has no definition of serialVersionUID
public DecapsulateException(String message) {
throw new UnsupportedOperationException("Stub!");
}

public DecapsulateException(String message, Throwable cause) {
throw new UnsupportedOperationException("Stub!");
}
}
80 changes: 80 additions & 0 deletions android-stub/src/main/java/javax/crypto/KDF.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Copyright (C) 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package javax.crypto;

import java.security.InvalidAlgorithmParameterException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Provider;
import java.security.spec.AlgorithmParameterSpec;

@SuppressWarnings({"unused", "DoNotCallSuggester"})
public final class KDF {
private KDF() {}

public static KDF getInstance(String algorithm) throws NoSuchAlgorithmException {
throw new UnsupportedOperationException("Stub!");
}

public static KDF getInstance(String algorithm, KDFParameters kdfParameters)
throws InvalidAlgorithmParameterException, NoSuchAlgorithmException {
throw new UnsupportedOperationException("Stub!");
}

public static KDF getInstance(String algorithm, Provider provider)
throws NoSuchAlgorithmException {
throw new UnsupportedOperationException("Stub!");
}

public static KDF getInstance(String algorithm, KDFParameters kdfParameters, Provider provider)
throws InvalidAlgorithmParameterException, NoSuchAlgorithmException {
throw new UnsupportedOperationException("Stub!");
}

public static KDF getInstance(String algorithm, String provider)
throws NoSuchAlgorithmException, NoSuchProviderException {
throw new UnsupportedOperationException("Stub!");
}

public static KDF getInstance(String algorithm, KDFParameters kdfParameters, String provider)
throws InvalidAlgorithmParameterException, NoSuchAlgorithmException,
NoSuchProviderException {
throw new UnsupportedOperationException("Stub!");
}

public String getAlgorithm() {
throw new UnsupportedOperationException("Stub!");
}

public Provider getProvider() {
throw new UnsupportedOperationException("Stub!");
}

public KDFParameters getParameters() {
throw new UnsupportedOperationException("Stub!");
}

public SecretKey deriveKey(String alg, AlgorithmParameterSpec derivationSpec)
throws InvalidAlgorithmParameterException, NoSuchAlgorithmException {
throw new UnsupportedOperationException("Stub!");
}

public byte[] deriveData(AlgorithmParameterSpec derivationSpec)
throws InvalidAlgorithmParameterException {
throw new UnsupportedOperationException("Stub!");
}
}
19 changes: 19 additions & 0 deletions android-stub/src/main/java/javax/crypto/KDFParameters.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (C) 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package javax.crypto;

public interface KDFParameters {}
34 changes: 34 additions & 0 deletions android-stub/src/main/java/javax/crypto/KDFSpi.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (C) 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package javax.crypto;

import java.security.InvalidAlgorithmParameterException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.AlgorithmParameterSpec;

@SuppressWarnings({"unused", "DoNotCallSuggester"})
public abstract class KDFSpi {
protected KDFSpi(KDFParameters kdfParameters) throws InvalidAlgorithmParameterException {}

protected abstract KDFParameters engineGetParameters();

protected abstract SecretKey engineDeriveKey(String alg, AlgorithmParameterSpec derivationSpec)
throws InvalidAlgorithmParameterException, NoSuchAlgorithmException;

protected abstract byte[] engineDeriveData(AlgorithmParameterSpec derivationSpec)
throws InvalidAlgorithmParameterException;
}
145 changes: 145 additions & 0 deletions android-stub/src/main/java/javax/crypto/KEM.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
/*
* Copyright (C) 2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package javax.crypto;

import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.Provider;
import java.security.PublicKey;
import java.security.SecureRandom;
import java.security.spec.AlgorithmParameterSpec;

@SuppressWarnings({"unused", "DoNotCallSuggester"})
public final class KEM {
public static final class Encapsulated {
public Encapsulated(SecretKey key, byte[] encapsulation, byte[] params) {
throw new UnsupportedOperationException("Stub!");
}

public SecretKey key() {
throw new UnsupportedOperationException("Stub!");
}

public byte[] encapsulation() {
throw new UnsupportedOperationException("Stub!");
}

public byte[] params() {
throw new UnsupportedOperationException("Stub!");
}
}

public static final class Encapsulator {
private Encapsulator() {}

public String providerName() {
throw new UnsupportedOperationException("Stub!");
}

public Encapsulated encapsulate() {
throw new UnsupportedOperationException("Stub!");
}

public Encapsulated encapsulate(int from, int to, String algorithm) {
throw new UnsupportedOperationException("Stub!");
}

public int secretSize() {
throw new UnsupportedOperationException("Stub!");
}

public int encapsulationSize() {
throw new UnsupportedOperationException("Stub!");
}
}

public static final class Decapsulator {
private Decapsulator() {}

public String providerName() {
throw new UnsupportedOperationException("Stub!");
}

public SecretKey decapsulate(byte[] encapsulation) throws DecapsulateException {
throw new UnsupportedOperationException("Stub!");
}

public SecretKey decapsulate(byte[] encapsulation, int from, int to, String algorithm)
throws DecapsulateException {
throw new UnsupportedOperationException("Stub!");
}

public int secretSize() {
throw new UnsupportedOperationException("Stub!");
}

public int encapsulationSize() {
throw new UnsupportedOperationException("Stub!");
}
}

private KEM() {}

public static KEM getInstance(String algorithm) throws NoSuchAlgorithmException {
throw new UnsupportedOperationException("Stub!");
}

public static KEM getInstance(String algorithm, Provider provider)
throws NoSuchAlgorithmException {
throw new UnsupportedOperationException("Stub!");
}

public static KEM getInstance(String algorithm, String provider)
throws NoSuchAlgorithmException, NoSuchProviderException {
throw new UnsupportedOperationException("Stub!");
}

public String getAlgorithm() {
throw new UnsupportedOperationException("Stub!");
}

public Provider getProvider() {
throw new UnsupportedOperationException("Stub!");
}

public Encapsulator newEncapsulator(PublicKey publicKey) throws InvalidKeyException {
throw new UnsupportedOperationException("Stub!");
}

public Encapsulator newEncapsulator(PublicKey publicKey, SecureRandom secureRandom)
throws InvalidKeyException {
throw new UnsupportedOperationException("Stub!");
}

public Encapsulator newEncapsulator(PublicKey publicKey, AlgorithmParameterSpec spec,
SecureRandom secureRandom)
throws InvalidAlgorithmParameterException, InvalidKeyException {
throw new UnsupportedOperationException("Stub!");
}

public Decapsulator newDecapsulator(PrivateKey privateKey) throws InvalidKeyException {
throw new UnsupportedOperationException("Stub!");
}

public Decapsulator newDecapsulator(PrivateKey privateKey, AlgorithmParameterSpec spec)
throws InvalidAlgorithmParameterException, InvalidKeyException {
throw new UnsupportedOperationException("Stub!");
}
}
Loading
Loading