public static byte[] DecodeBase64(string base64String) { try { return Base64.Decode(GetBytes(base64String)); } catch (Exception e) { throw new XmpException("Invalid base64 string", XmpError.BADVALUE, e); } }