reader.next();
StringBuffer sb = null;
byte [] value = null;
CharSequence charSeq = ((XMLStreamReaderEx)reader).getPCDATA();
if(charSeq instanceof Base64Data){
Base64Data bd = (Base64Data) ((XMLStreamReaderEx)reader).getPCDATA();
value = bd.getExact();
modulus = new BigInteger(1,value);
if(canonWriter != null){
String ev = Base64.encode(value);
canonWriter.writeCharacters(ev);
}
}else {
sb = new StringBuffer();
while(reader.getEventType() == reader.CHARACTERS && reader.getEventType() != reader.END_ELEMENT){
charSeq = ((XMLStreamReaderEx)reader).getPCDATA();
for(int i=0;i<charSeq.length();i++){
if(charSeq.charAt(i)== '\n'){
continue;
}
sb.append(charSeq.charAt(i));
}
reader.next();
}
String dv = sb.toString();
if(canonWriter != null){
canonWriter.writeCharacters(dv);
}
try{
value = Base64.decode(dv);
}catch(Base64DecodingException dec){
logger.log(Level.SEVERE, LogStringsMessages.WSS_1606_ERROR_RSAKEYINFO_BASE_64_DECODING("EXPONENT"),dec);
throw new XWSSecurityException(LogStringsMessages.WSS_1606_ERROR_RSAKEYINFO_BASE_64_DECODING("EXPONENT"));
}
modulus = new BigInteger(1,value);
}
break;
}
case EXPONENT_ELEMENT :{
if(canonWriter != null){
StreamUtil.writeCurrentEvent(reader,canonWriter);
}
reader.next();
StringBuffer sb = null;
byte [] value = null;
CharSequence charSeq = ((XMLStreamReaderEx)reader).getPCDATA();
if(charSeq instanceof Base64Data){
Base64Data bd = (Base64Data) ((XMLStreamReaderEx)reader).getPCDATA();
value = bd.getExact();
exponent = new BigInteger(1,value);
if(canonWriter != null){
String ev = Base64.encode(value);
canonWriter.writeCharacters(ev);
}