private final RSASha1SignatureService signatureService;
public XeroOAuthService(Reader reader) {
Security.addProvider(new BouncyCastleProvider());
try (PEMParser pemParser = new PEMParser(reader)) {
PEMKeyPair pair = (PEMKeyPair) pemParser.readObject();
byte[] encodedPrivateKey = pair.getPrivateKeyInfo().getEncoded();
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(encodedPrivateKey);
PrivateKey privateKey = keyFactory.generatePrivate(privateKeySpec);
signatureService = new RSASha1SignatureService(privateKey);
} catch(IOException e) {