retKey = stp.resolveReference(reader);
strPresent = true;
break;
}
case ENCRYPTED_KEY_ELEMENT :{
EncryptedKey ek = new EncryptedKey(reader,pc,null,true);
String dataEncAlgo = MessageConstants.AES_BLOCK_ENCRYPTION_128;
if (pc.getAlgorithmSuite() != null) {
dataEncAlgo = pc.getAlgorithmSuite().getEncryptionAlgorithm();
}
retKey = ek.getKey(dataEncAlgo);
break;
}
case KEY_VALUE_ELEMENT :{
if(canonWriter != null){
StreamUtil.writeCurrentEvent(reader,canonWriter);