resolved conflicts for merge of b9a9d46c to master
Change-Id: Ibec45f0f8f9618dd7bd1b34561dccbdd9599cdeb
This commit is contained in:
@@ -591,6 +591,14 @@ public abstract class KeyStoreKeyConstraints {
|
||||
/** Galois/Counter Mode (GCM) block mode. */
|
||||
public static final int GCM = 1 << 3;
|
||||
|
||||
/**
|
||||
* Set of block modes compatible with IND-CPA if used correctly.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final @BlockModeEnum int IND_CPA_COMPATIBLE_MODES =
|
||||
CBC | CTR | GCM;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@@ -667,6 +675,24 @@ public abstract class KeyStoreKeyConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static String allToString(@BlockModeEnum int modes) {
|
||||
StringBuilder result = new StringBuilder("[");
|
||||
boolean firstValue = true;
|
||||
for (@BlockModeEnum int mode : getSetFlags(modes)) {
|
||||
if (firstValue) {
|
||||
firstValue = false;
|
||||
} else {
|
||||
result.append(", ");
|
||||
}
|
||||
result.append(toString(mode));
|
||||
}
|
||||
result.append(']');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user