Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d580b23 authored by Elliott Hughes's avatar Elliott Hughes Committed by Android (Google) Code Review
Browse files

Merge "Use deliberately public API rather than org.apache cruft."

parents e7d2295c 460c26e9
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -20,8 +20,6 @@ import android.os.Environment;
import android.os.FileUtils;
import android.os.Process;

import org.apache.harmony.luni.util.InputStreamHelper;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@@ -32,6 +30,8 @@ import java.security.SecureRandom;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;

import libcore.io.IoUtils;

/**
 *@hide
 */
@@ -117,13 +117,10 @@ public class SystemKeyStore {

    public byte[] retrieveKey(String keyName) throws IOException {
        File keyFile = getKeyFile(keyName);

        if (!keyFile.exists()) {
            return null;
        }

        FileInputStream fis = new FileInputStream(keyFile);
        return InputStreamHelper.readFullyAndClose(fis);
        return IoUtils.readFileAsByteArray(keyFile.toString());
    }

    public void deleteKey(String keyName) {