Switch to HexEncoding from ByteStringUtils
Migration in preparation for deletion of ByteStringUtils.
Bug: 124232146
Test: build only
Change-Id: Iff3a6b11adb8bcc51417a2e96e42c2db8a2de257
(cherry picked from commit 6f34427eb2)
This commit is contained in:
@@ -20,10 +20,11 @@ import android.content.Context;
|
||||
import android.security.keystore.recovery.InternalRecoveryServiceException;
|
||||
import android.security.keystore.recovery.LockScreenRequiredException;
|
||||
import android.security.keystore.recovery.RecoveryController;
|
||||
import android.util.ByteStringUtils;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
|
||||
import libcore.util.HexEncoding;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
import java.security.UnrecoverableKeyException;
|
||||
import java.util.Optional;
|
||||
@@ -108,7 +109,7 @@ public class RecoverableKeyStoreSecondaryKeyManager {
|
||||
private String generateId() {
|
||||
byte[] id = new byte[BACKUP_KEY_SUFFIX_LENGTH_BITS / BITS_PER_BYTE];
|
||||
mSecureRandom.nextBytes(id);
|
||||
return BACKUP_KEY_ALIAS_PREFIX + ByteStringUtils.toHexString(id);
|
||||
return BACKUP_KEY_ALIAS_PREFIX + HexEncoding.encodeToString(id);
|
||||
}
|
||||
|
||||
/** Constructs a {@link RecoverableKeyStoreSecondaryKeyManager}. */
|
||||
|
||||
Reference in New Issue
Block a user