// Path: plugin/src/main/java/com/android/apksigner/core/internal/util/Pair.java
// public final class Pair<A, B> {
//     private final A mFirst;
//     private final B mSecond;
// 
//     private Pair(A first, B second) {
//         mFirst = first;
//         mSecond = second;
//     }
// 
//     public static <A, B> Pair<A, B> of(A first, B second) {
//         return new Pair<A, B>(first, second);
//     }
// 
//     public A getFirst() {
//         return mFirst;
//     }
// 
//     public B getSecond() {
//         return mSecond;
//     }
// 
//     @Override
//     public int hashCode() {
//         final int prime = 31;
//         int result = 1;
//         result = prime * result + ((mFirst == null) ? 0 : mFirst.hashCode());
//         result = prime * result + ((mSecond == null) ? 0 : mSecond.hashCode());
//         return result;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         if (this == obj) {
//             return true;
//         }
//         if (obj == null) {
//             return false;
//         }
//         if (getClass() != obj.getClass()) {
//             return false;
//         }
//         @SuppressWarnings("rawtypes")
//         Pair other = (Pair) obj;
//         if (mFirst == null) {
//             if (other.mFirst != null) {
//                 return false;
//             }
//         } else if (!mFirst.equals(other.mFirst)) {
//             return false;
//         }
//         if (mSecond == null) {
//             if (other.mSecond != null) {
//                 return false;
//             }
//         } else if (!mSecond.equals(other.mSecond)) {
//             return false;
//         }
//         return true;
//     }
// }


import com.android.apksigner.core.internal.util.Pair;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.MGF1ParameterSpec;
import java.security.spec.PSSParameterSpec;
/*
 * Copyright (C) 2016 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 com.android.apksigner.core.internal.apk.v2;



/**
 * APK Signature Scheme v2 signature algorithm.
 */
public enum SignatureAlgorithm {
    /**
     * RSASSA-PSS with SHA2-256 digest, SHA2-256 MGF1, 32 bytes of salt, trailer: 0xbc, content
     * digested using SHA2-256 in 1 MB chunks.
     */
    RSA_PSS_WITH_SHA256(
            0x0101,
            ContentDigestAlgorithm.CHUNKED_SHA256,
            "RSA",
// Path: plugin/src/main/java/com/android/apksigner/core/internal/util/Pair.java
// public final class Pair<A, B> {
//     private final A mFirst;
//     private final B mSecond;
// 
//     private Pair(A first, B second) {
//         mFirst = first;
//         mSecond = second;
//     }
// 
//     public static <A, B> Pair<A, B> of(A first, B second) {
//         return new Pair<A, B>(first, second);
//     }
// 
//     public A getFirst() {
//         return mFirst;
//     }
// 
//     public B getSecond() {
//         return mSecond;
//     }
// 
//     @Override
//     public int hashCode() {
//         final int prime = 31;
//         int result = 1;
//         result = prime * result + ((mFirst == null) ? 0 : mFirst.hashCode());
//         result = prime * result + ((mSecond == null) ? 0 : mSecond.hashCode());
//         return result;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         if (this == obj) {
//             return true;
//         }
//         if (obj == null) {
//             return false;
//         }
//         if (getClass() != obj.getClass()) {
//             return false;
//         }
//         @SuppressWarnings("rawtypes")
//         Pair other = (Pair) obj;
//         if (mFirst == null) {
//             if (other.mFirst != null) {
//                 return false;
//             }
//         } else if (!mFirst.equals(other.mFirst)) {
//             return false;
//         }
//         if (mSecond == null) {
//             if (other.mSecond != null) {
//                 return false;
//             }
//         } else if (!mSecond.equals(other.mSecond)) {
//             return false;
//         }
//         return true;
//     }
// }


// Path: plugin/src/main/java/com/android/apksigner/core/internal/apk/v2/SignatureAlgorithm.java
import com.android.apksigner.core.internal.util.Pair;
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.MGF1ParameterSpec;
import java.security.spec.PSSParameterSpec;

/*
 * Copyright (C) 2016 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 com.android.apksigner.core.internal.apk.v2;



/**
 * APK Signature Scheme v2 signature algorithm.
 */
public enum SignatureAlgorithm {
    /**
     * RSASSA-PSS with SHA2-256 digest, SHA2-256 MGF1, 32 bytes of salt, trailer: 0xbc, content
     * digested using SHA2-256 in 1 MB chunks.
     */
    RSA_PSS_WITH_SHA256(
            0x0101,
            ContentDigestAlgorithm.CHUNKED_SHA256,
            "RSA",
            Pair.of("SHA256withRSA/PSS",