* preferred provider from Security.getProviders().
* @return
* A non-null instruction object containing encryption information
*/
public static EncryptionInstruction buildInstructionFromInstructionFile(S3Object instructionFile, EncryptionMaterials materials, Provider cryptoProvider) {
JSONObject instructionJSON = parseJSONInstruction(instructionFile);
try {
// Get fields from instruction object
byte[] encryptedSymmetricKeyBytes = instructionJSON.getString(Headers.CRYPTO_KEY).getBytes();
byte[] initVectorBytes = instructionJSON.getString(Headers.CRYPTO_IV).getBytes();
String materialsDescriptionString = instructionJSON.getString(Headers.MATERIALS_DESCRIPTION);
Map<String, String> materialsDescription = convertJSONToMap(materialsDescriptionString);
// Decode from Base 64 to standard binary bytes
encryptedSymmetricKeyBytes = Base64.decodeBase64(encryptedSymmetricKeyBytes);
initVectorBytes = Base64.decodeBase64(initVectorBytes);