GraniteKeyStore.java 1.08 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  org.apache.sling.api.resource.Resource
 */
package com.adobe.granite.keystore.internal;

import com.adobe.granite.crypto.CryptoException;
import com.adobe.granite.crypto.CryptoSupport;
import com.adobe.granite.keystore.internal.GraniteKeyStoreSpi;
import java.io.IOException;
import java.io.InputStream;
import java.security.KeyStore;
import java.security.KeyStoreSpi;
import java.security.NoSuchAlgorithmException;
import java.security.Provider;
import java.security.cert.CertificateException;
import org.apache.sling.api.resource.Resource;

public class GraniteKeyStore
extends KeyStore {
    protected GraniteKeyStore(Resource resource, KeyStore keyStore, String encryptedPassword, CryptoSupport cryptoSupport) throws IOException, NoSuchAlgorithmException, CertificateException, CryptoException {
        super(new GraniteKeyStoreSpi(resource, keyStore, encryptedPassword, cryptoSupport), keyStore.getProvider(), keyStore.getType());
        this.load(null, cryptoSupport.unprotect(encryptedPassword).toCharArray());
    }
}