").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery-1.10.2.min.map b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery-1.10.2.min.map
new file mode 100644
index 00000000..4dc4920b
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery-1.10.2.min.map
@@ -0,0 +1 @@
+{"version":3,"file":"jquery-1.10.2.min.js","sources":["jquery-1.10.2.js"],"names":["window","undefined","readyList","rootjQuery","core_strundefined","location","document","docElem","documentElement","_jQuery","jQuery","_$","$","class2type","core_deletedIds","core_version","core_concat","concat","core_push","push","core_slice","slice","core_indexOf","indexOf","core_toString","toString","core_hasOwn","hasOwnProperty","core_trim","trim","selector","context","fn","init","core_pnum","source","core_rnotwhite","rtrim","rquickExpr","rsingleTag","rvalidchars","rvalidbraces","rvalidescape","rvalidtokens","rmsPrefix","rdashAlpha","fcamelCase","all","letter","toUpperCase","completed","event","addEventListener","type","readyState","detach","ready","removeEventListener","detachEvent","prototype","jquery","constructor","match","elem","this","charAt","length","exec","find","merge","parseHTML","nodeType","ownerDocument","test","isPlainObject","isFunction","attr","getElementById","parentNode","id","makeArray","toArray","call","get","num","pushStack","elems","ret","prevObject","each","callback","args","promise","done","apply","arguments","first","eq","last","i","len","j","map","end","sort","splice","extend","src","copyIsArray","copy","name","options","clone","target","deep","isArray","expando","Math","random","replace","noConflict","isReady","readyWait","holdReady","hold","wait","body","setTimeout","resolveWith","trigger","off","obj","Array","isWindow","isNumeric","isNaN","parseFloat","isFinite","String","key","e","support","ownLast","isEmptyObject","error","msg","Error","data","keepScripts","parsed","scripts","createElement","buildFragment","remove","childNodes","parseJSON","JSON","parse","Function","parseXML","xml","tmp","DOMParser","parseFromString","ActiveXObject","async","loadXML","getElementsByTagName","noop","globalEval","execScript","camelCase","string","nodeName","toLowerCase","value","isArraylike","text","arr","results","Object","inArray","max","second","l","grep","inv","retVal","arg","guid","proxy","access","chainable","emptyGet","raw","bulk","now","Date","getTime","swap","old","style","Deferred","attachEvent","top","frameElement","doScroll","doScrollCheck","split","cachedruns","Expr","getText","isXML","compile","outermostContext","sortInput","setDocument","documentIsHTML","rbuggyQSA","rbuggyMatches","matches","contains","preferredDoc","dirruns","classCache","createCache","tokenCache","compilerCache","hasDuplicate","sortOrder","a","b","strundefined","MAX_NEGATIVE","hasOwn","pop","push_native","booleans","whitespace","characterEncoding","identifier","attributes","pseudos","RegExp","rcomma","rcombinators","rsibling","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rnative","rinputs","rheader","rescape","runescape","funescape","_","escaped","escapedWhitespace","high","fromCharCode","els","Sizzle","seed","m","groups","nid","newContext","newSelector","getElementsByClassName","qsa","tokenize","getAttribute","setAttribute","toSelector","join","querySelectorAll","qsaError","removeAttribute","select","keys","cache","cacheLength","shift","markFunction","assert","div","removeChild","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","node","doc","parent","defaultView","className","appendChild","createComment","innerHTML","firstChild","getById","getElementsByName","filter","attrId","getAttributeNode","tag","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","val","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","nodeValue","selectors","createPseudo","relative",">","dir"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","simple","forward","ofType","outerCache","nodeIndex","start","useCache","lastChild","pseudo","setFilters","idx","matched","not","matcher","unmatched","has","innerText","lang","elemLang","hash","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","dirkey","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","matcherCachedRuns","bySet","byElement","superMatcher","expandContext","setMatched","matchedCount","outermost","contextBackup","dirrunsUnique","group","contexts","token","div1","defaultValue","unique","isXMLDoc","optionsCache","createOptions","object","flag","Callbacks","firing","memory","fired","firingLength","firingIndex","firingStart","list","stack","once","fire","stopOnFalse","self","disable","add","index","lock","locked","fireWith","func","tuples","state","always","deferred","fail","then","fns","newDefer","tuple","action","returned","resolve","reject","progress","notify","pipe","stateString","when","subordinate","resolveValues","remaining","updateFunc","values","progressValues","notifyWith","progressContexts","resolveContexts","fragment","opt","eventName","isSupported","cssText","getSetAttribute","leadingWhitespace","tbody","htmlSerialize","hrefNormalized","opacity","cssFloat","checkOn","optSelected","enctype","html5Clone","cloneNode","outerHTML","inlineBlockNeedsLayout","shrinkWrapBlocks","pixelPosition","deleteExpando","noCloneEvent","reliableMarginRight","boxSizingReliable","noCloneChecked","optDisabled","radioValue","createDocumentFragment","appendChecked","checkClone","click","change","focusin","backgroundClip","clearCloneStyle","container","marginDiv","tds","divReset","offsetHeight","display","reliableHiddenOffsets","zoom","boxSizing","offsetWidth","getComputedStyle","width","marginRight","rbrace","rmultiDash","internalData","pvt","acceptData","thisCache","internalKey","isNode","toJSON","internalRemoveData","isEmptyDataObject","cleanData","noData","applet","embed","hasData","removeData","_data","_removeData","dataAttr","queue","dequeue","startLength","hooks","_queueHooks","next","stop","setter","delay","time","fx","speeds","timeout","clearTimeout","clearQueue","count","defer","nodeHook","boolHook","rclass","rreturn","rfocusable","rclickable","ruseDefault","getSetInput","removeAttr","prop","removeProp","propFix","addClass","classes","clazz","proceed","removeClass","toggleClass","stateVal","classNames","hasClass","valHooks","set","option","one","optionSet","nType","attrHooks","propName","attrNames","for","class","notxml","propHooks","tabindex","parseInt","getter","setAttributeNode","createAttribute","coords","contenteditable","rformElems","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","err","global","types","events","t","handleObjIn","special","eventHandle","handleObj","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","onlyHandlers","ontype","bubbleType","eventPath","Event","isTrigger","namespace_re","noBubble","parentWindow","isPropagationStopped","preventDefault","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","stopPropagation","postDispatch","sel","originalEvent","fixHook","fixHooks","mouseHooks","keyHooks","props","srcElement","metaKey","original","which","charCode","keyCode","eventDoc","fromElement","pageX","clientX","scrollLeft","clientLeft","pageY","clientY","scrollTop","clientTop","relatedTarget","toElement","load","blur","beforeunload","returnValue","simulate","bubble","isSimulated","defaultPrevented","getPreventDefault","timeStamp","cancelBubble","stopImmediatePropagation","mouseenter","mouseleave","orig","related","submitBubbles","form","_submit_bubble","changeBubbles","propertyName","_just_changed","focusinBubbles","attaches","on","origFn","triggerHandler","isSimple","rparentsprev","rneedsContext","guaranteedUnique","children","contents","prev","targets","winnow","is","closest","pos","prevAll","addBack","sibling","parents","parentsUntil","until","nextAll","nextUntil","prevUntil","siblings","contentDocument","contentWindow","reverse","n","r","qualifier","createSafeFragment","nodeNames","safeFrag","rinlinejQuery","rnoshimcache","rleadingWhitespace","rxhtmlTag","rtagName","rtbody","rhtml","rnoInnerhtml","manipulation_rcheckableType","rchecked","rscriptType","rscriptTypeMasked","rcleanScript","wrapMap","legend","area","param","thead","tr","col","td","safeFragment","fragmentDiv","optgroup","tfoot","colgroup","caption","th","append","createTextNode","domManip","manipulationTarget","prepend","insertBefore","before","after","keepData","getAll","setGlobalEval","dataAndEvents","deepDataAndEvents","html","replaceWith","allowIntersection","hasScripts","iNoClone","disableScript","restoreScript","_evalUrl","content","refElements","cloneCopyEvent","dest","oldData","curData","fixCloneNodeIssues","defaultChecked","defaultSelected","appendTo","prependTo","insertAfter","replaceAll","insert","found","fixDefaultChecked","destElements","srcElements","inPage","selection","wrap","safe","nodes","url","ajax","dataType","throws","wrapAll","wrapInner","unwrap","iframe","getStyles","curCSS","ralpha","ropacity","rposition","rdisplayswap","rmargin","rnumsplit","rnumnonpx","rrelNum","elemdisplay","BODY","cssShow","position","visibility","cssNormalTransform","letterSpacing","fontWeight","cssExpand","cssPrefixes","vendorPropName","capName","origName","isHidden","el","css","showHide","show","hidden","css_defaultDisplay","styles","hide","toggle","cssHooks","computed","cssNumber","columnCount","fillOpacity","lineHeight","order","orphans","widows","zIndex","cssProps","float","extra","_computed","minWidth","maxWidth","getPropertyValue","currentStyle","left","rs","rsLeft","runtimeStyle","pixelLeft","setPositiveNumber","subtract","augmentWidthOrHeight","isBorderBox","getWidthOrHeight","valueIsBorderBox","actualDisplay","write","close","$1","visible","margin","padding","border","prefix","suffix","expand","expanded","parts","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","serialize","serializeArray","traditional","s","encodeURIComponent","ajaxSettings","buildParams","v","hover","fnOver","fnOut","bind","unbind","delegate","undelegate","ajaxLocParts","ajaxLocation","ajax_nonce","ajax_rquery","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","_load","prefilters","transports","allTypes","addToPrefiltersOrTransports","structure","dataTypeExpression","dataTypes","inspectPrefiltersOrTransports","originalOptions","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","params","response","responseText","complete","status","active","lastModified","etag","isLocal","processData","contentType","accepts","*","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","cacheURL","responseHeadersString","timeoutTimer","fireGlobals","transport","responseHeaders","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","mimeType","code","abort","statusText","finalText","success","method","crossDomain","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","responses","isSuccess","modified","ajaxHandleResponses","ajaxConvert","rejectWith","getJSON","getScript","firstDataType","ct","finalDataType","conv2","current","conv","dataFilter","script","text script","head","scriptCharset","charset","onload","onreadystatechange","isAbort","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","xhrCallbacks","xhrSupported","xhrId","xhrOnUnloadAbort","createStandardXHR","XMLHttpRequest","createActiveXHR","xhr","cors","username","open","xhrFields","firefoxAccessException","unload","fxNow","timerId","rfxtypes","rfxnum","rrun","animationPrefilters","defaultPrefilter","tweeners","tween","createTween","unit","scale","maxIterations","createFxNow","animation","collection","Animation","properties","stopped","tick","currentTime","startTime","duration","percent","tweens","run","opts","specialEasing","originalProperties","Tween","easing","gotoEnd","propFilter","timer","anim","tweener","prefilter","oldfire","dataShow","unqueued","overflow","overflowX","overflowY","eased","step","cssFn","speed","animate","genFx","fadeTo","to","optall","doAnimation","finish","stopQueue","timers","includeWidth","height","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","linear","p","swing","cos","PI","interval","setInterval","clearInterval","slow","fast","animated","offset","setOffset","win","box","getBoundingClientRect","getWindow","pageYOffset","pageXOffset","curElem","curOffset","curCSSTop","curCSSLeft","calculatePosition","curPosition","curTop","curLeft","using","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","size","andSelf","module","exports","define","amd"],"mappings":";;;CAaA,SAAWA,EAAQC,GAOnB,GAECC,GAGAC,EAIAC,QAA2BH,GAG3BI,EAAWL,EAAOK,SAClBC,EAAWN,EAAOM,SAClBC,EAAUD,EAASE,gBAGnBC,EAAUT,EAAOU,OAGjBC,EAAKX,EAAOY,EAGZC,KAGAC,KAEAC,EAAe,SAGfC,EAAcF,EAAgBG,OAC9BC,EAAYJ,EAAgBK,KAC5BC,EAAaN,EAAgBO,MAC7BC,EAAeR,EAAgBS,QAC/BC,EAAgBX,EAAWY,SAC3BC,EAAcb,EAAWc,eACzBC,EAAYb,EAAac,KAGzBnB,EAAS,SAAUoB,EAAUC,GAE5B,MAAO,IAAIrB,GAAOsB,GAAGC,KAAMH,EAAUC,EAAS5B,IAI/C+B,EAAY,sCAAsCC,OAGlDC,EAAiB,OAGjBC,EAAQ,qCAKRC,EAAa,sCAGbC,EAAa,6BAGbC,EAAc,gBACdC,EAAe,uBACfC,EAAe,qCACfC,EAAe,kEAGfC,EAAY,QACZC,EAAa,eAGbC,EAAa,SAAUC,EAAKC,GAC3B,MAAOA,GAAOC,eAIfC,EAAY,SAAUC,IAGhB7C,EAAS8C,kBAAmC,SAAfD,EAAME,MAA2C,aAAxB/C,EAASgD,cACnEC,IACA7C,EAAO8C,UAITD,EAAS,WACHjD,EAAS8C,kBACb9C,EAASmD,oBAAqB,mBAAoBP,GAAW,GAC7DlD,EAAOyD,oBAAqB,OAAQP,GAAW,KAG/C5C,EAASoD,YAAa,qBAAsBR,GAC5ClD,EAAO0D,YAAa,SAAUR,IAIjCxC,GAAOsB,GAAKtB,EAAOiD,WAElBC,OAAQ7C,EAER8C,YAAanD,EACbuB,KAAM,SAAUH,EAAUC,EAAS5B,GAClC,GAAI2D,GAAOC,CAGX,KAAMjC,EACL,MAAOkC,KAIR,IAAyB,gBAAblC,GAAwB,CAUnC,GAPCgC,EAF2B,MAAvBhC,EAASmC,OAAO,IAAyD,MAA3CnC,EAASmC,OAAQnC,EAASoC,OAAS,IAAepC,EAASoC,QAAU,GAE7F,KAAMpC,EAAU,MAGlBQ,EAAW6B,KAAMrC,IAIrBgC,IAAUA,EAAM,IAAO/B,EAqDrB,OAAMA,GAAWA,EAAQ6B,QACtB7B,GAAW5B,GAAaiE,KAAMtC,GAKhCkC,KAAKH,YAAa9B,GAAUqC,KAAMtC,EAxDzC,IAAKgC,EAAM,GAAK,CAWf,GAVA/B,EAAUA,YAAmBrB,GAASqB,EAAQ,GAAKA,EAGnDrB,EAAO2D,MAAOL,KAAMtD,EAAO4D,UAC1BR,EAAM,GACN/B,GAAWA,EAAQwC,SAAWxC,EAAQyC,eAAiBzC,EAAUzB,GACjE,IAIIiC,EAAWkC,KAAMX,EAAM,KAAQpD,EAAOgE,cAAe3C,GACzD,IAAM+B,IAAS/B,GAETrB,EAAOiE,WAAYX,KAAMF,IAC7BE,KAAMF,GAAS/B,EAAS+B,IAIxBE,KAAKY,KAAMd,EAAO/B,EAAS+B,GAK9B,OAAOE,MAQP,GAJAD,EAAOzD,EAASuE,eAAgBf,EAAM,IAIjCC,GAAQA,EAAKe,WAAa,CAG9B,GAAKf,EAAKgB,KAAOjB,EAAM,GACtB,MAAO3D,GAAWiE,KAAMtC,EAIzBkC,MAAKE,OAAS,EACdF,KAAK,GAAKD,EAKX,MAFAC,MAAKjC,QAAUzB,EACf0D,KAAKlC,SAAWA,EACTkC,KAcH,MAAKlC,GAASyC,UACpBP,KAAKjC,QAAUiC,KAAK,GAAKlC,EACzBkC,KAAKE,OAAS,EACPF,MAIItD,EAAOiE,WAAY7C,GACvB3B,EAAWqD,MAAO1B,IAGrBA,EAASA,WAAa7B,IAC1B+D,KAAKlC,SAAWA,EAASA,SACzBkC,KAAKjC,QAAUD,EAASC,SAGlBrB,EAAOsE,UAAWlD,EAAUkC,QAIpClC,SAAU,GAGVoC,OAAQ,EAERe,QAAS,WACR,MAAO7D,GAAW8D,KAAMlB,OAKzBmB,IAAK,SAAUC,GACd,MAAc,OAAPA,EAGNpB,KAAKiB,UAGG,EAANG,EAAUpB,KAAMA,KAAKE,OAASkB,GAAQpB,KAAMoB,IAKhDC,UAAW,SAAUC,GAGpB,GAAIC,GAAM7E,EAAO2D,MAAOL,KAAKH,cAAeyB,EAO5C,OAJAC,GAAIC,WAAaxB,KACjBuB,EAAIxD,QAAUiC,KAAKjC,QAGZwD,GAMRE,KAAM,SAAUC,EAAUC,GACzB,MAAOjF,GAAO+E,KAAMzB,KAAM0B,EAAUC,IAGrCnC,MAAO,SAAUxB,GAIhB,MAFAtB,GAAO8C,MAAMoC,UAAUC,KAAM7D,GAEtBgC,MAGR3C,MAAO,WACN,MAAO2C,MAAKqB,UAAWjE,EAAW0E,MAAO9B,KAAM+B,aAGhDC,MAAO,WACN,MAAOhC,MAAKiC,GAAI,IAGjBC,KAAM,WACL,MAAOlC,MAAKiC,GAAI,KAGjBA,GAAI,SAAUE,GACb,GAAIC,GAAMpC,KAAKE,OACdmC,GAAKF,GAAU,EAAJA,EAAQC,EAAM,EAC1B,OAAOpC,MAAKqB,UAAWgB,GAAK,GAASD,EAAJC,GAAYrC,KAAKqC,SAGnDC,IAAK,SAAUZ,GACd,MAAO1B,MAAKqB,UAAW3E,EAAO4F,IAAItC,KAAM,SAAUD,EAAMoC,GACvD,MAAOT,GAASR,KAAMnB,EAAMoC,EAAGpC,OAIjCwC,IAAK,WACJ,MAAOvC,MAAKwB,YAAcxB,KAAKH,YAAY,OAK5C1C,KAAMD,EACNsF,QAASA,KACTC,UAAWA,QAIZ/F,EAAOsB,GAAGC,KAAK0B,UAAYjD,EAAOsB,GAElCtB,EAAOgG,OAAShG,EAAOsB,GAAG0E,OAAS,WAClC,GAAIC,GAAKC,EAAaC,EAAMC,EAAMC,EAASC,EAC1CC,EAASlB,UAAU,OACnBI,EAAI,EACJjC,EAAS6B,UAAU7B,OACnBgD,GAAO,CAqBR,KAlBuB,iBAAXD,KACXC,EAAOD,EACPA,EAASlB,UAAU,OAEnBI,EAAI,GAIkB,gBAAXc,IAAwBvG,EAAOiE,WAAWsC,KACrDA,MAII/C,IAAWiC,IACfc,EAASjD,OACPmC,GAGSjC,EAAJiC,EAAYA,IAEnB,GAAmC,OAA7BY,EAAUhB,UAAWI,IAE1B,IAAMW,IAAQC,GACbJ,EAAMM,EAAQH,GACdD,EAAOE,EAASD,GAGXG,IAAWJ,IAKXK,GAAQL,IAAUnG,EAAOgE,cAAcmC,KAAUD,EAAclG,EAAOyG,QAAQN,MAC7ED,GACJA,GAAc,EACdI,EAAQL,GAAOjG,EAAOyG,QAAQR,GAAOA,MAGrCK,EAAQL,GAAOjG,EAAOgE,cAAciC,GAAOA,KAI5CM,EAAQH,GAASpG,EAAOgG,OAAQQ,EAAMF,EAAOH,IAGlCA,IAAS5G,IACpBgH,EAAQH,GAASD,GAOrB,OAAOI,IAGRvG,EAAOgG,QAGNU,QAAS,UAAarG,EAAesG,KAAKC,UAAWC,QAAS,MAAO,IAErEC,WAAY,SAAUN,GASrB,MARKlH,GAAOY,IAAMF,IACjBV,EAAOY,EAAID,GAGPuG,GAAQlH,EAAOU,SAAWA,IAC9BV,EAAOU,OAASD,GAGVC,GAIR+G,SAAS,EAITC,UAAW,EAGXC,UAAW,SAAUC,GACfA,EACJlH,EAAOgH,YAEPhH,EAAO8C,OAAO,IAKhBA,MAAO,SAAUqE,GAGhB,GAAKA,KAAS,KAASnH,EAAOgH,WAAYhH,EAAO+G,QAAjD,CAKA,IAAMnH,EAASwH,KACd,MAAOC,YAAYrH,EAAO8C,MAI3B9C,GAAO+G,SAAU,EAGZI,KAAS,KAAUnH,EAAOgH,UAAY,IAK3CxH,EAAU8H,YAAa1H,GAAYI,IAG9BA,EAAOsB,GAAGiG,SACdvH,EAAQJ,GAAW2H,QAAQ,SAASC,IAAI,YAO1CvD,WAAY,SAAUwD,GACrB,MAA4B,aAArBzH,EAAO2C,KAAK8E,IAGpBhB,QAASiB,MAAMjB,SAAW,SAAUgB,GACnC,MAA4B,UAArBzH,EAAO2C,KAAK8E,IAGpBE,SAAU,SAAUF,GAEnB,MAAc,OAAPA,GAAeA,GAAOA,EAAInI,QAGlCsI,UAAW,SAAUH,GACpB,OAAQI,MAAOC,WAAWL,KAAUM,SAAUN,IAG/C9E,KAAM,SAAU8E,GACf,MAAY,OAAPA,EACWA,EAARO,GAEc,gBAARP,IAAmC,kBAARA,GACxCtH,EAAYW,EAAc0D,KAAKiD,KAAU,eAClCA,IAGTzD,cAAe,SAAUyD,GACxB,GAAIQ,EAKJ,KAAMR,GAA4B,WAArBzH,EAAO2C,KAAK8E,IAAqBA,EAAI5D,UAAY7D,EAAO2H,SAAUF,GAC9E,OAAO,CAGR,KAEC,GAAKA,EAAItE,cACPnC,EAAYwD,KAAKiD,EAAK,iBACtBzG,EAAYwD,KAAKiD,EAAItE,YAAYF,UAAW,iBAC7C,OAAO,EAEP,MAAQiF,GAET,OAAO,EAKR,GAAKlI,EAAOmI,QAAQC,QACnB,IAAMH,IAAOR,GACZ,MAAOzG,GAAYwD,KAAMiD,EAAKQ,EAMhC,KAAMA,IAAOR,IAEb,MAAOQ,KAAQ1I,GAAayB,EAAYwD,KAAMiD,EAAKQ,IAGpDI,cAAe,SAAUZ,GACxB,GAAIrB,EACJ,KAAMA,IAAQqB,GACb,OAAO,CAER,QAAO,GAGRa,MAAO,SAAUC,GAChB,KAAUC,OAAOD,IAMlB3E,UAAW,SAAU6E,EAAMpH,EAASqH,GACnC,IAAMD,GAAwB,gBAATA,GACpB,MAAO,KAEgB,kBAAZpH,KACXqH,EAAcrH,EACdA,GAAU,GAEXA,EAAUA,GAAWzB,CAErB,IAAI+I,GAAS9G,EAAW4B,KAAMgF,GAC7BG,GAAWF,KAGZ,OAAKC,IACKtH,EAAQwH,cAAeF,EAAO,MAGxCA,EAAS3I,EAAO8I,eAAiBL,GAAQpH,EAASuH,GAC7CA,GACJ5I,EAAQ4I,GAAUG,SAEZ/I,EAAO2D,SAAWgF,EAAOK,cAGjCC,UAAW,SAAUR,GAEpB,MAAKnJ,GAAO4J,MAAQ5J,EAAO4J,KAAKC,MACxB7J,EAAO4J,KAAKC,MAAOV,GAGb,OAATA,EACGA,EAGa,gBAATA,KAGXA,EAAOzI,EAAOmB,KAAMsH,GAEfA,GAGC3G,EAAYiC,KAAM0E,EAAK5B,QAAS7E,EAAc,KACjD6E,QAAS5E,EAAc,KACvB4E,QAAS9E,EAAc,MAEXqH,SAAU,UAAYX,MAKtCzI,EAAOsI,MAAO,iBAAmBG,GAAjCzI,IAIDqJ,SAAU,SAAUZ,GACnB,GAAIa,GAAKC,CACT,KAAMd,GAAwB,gBAATA,GACpB,MAAO,KAER,KACMnJ,EAAOkK,WACXD,EAAM,GAAIC,WACVF,EAAMC,EAAIE,gBAAiBhB,EAAO,cAElCa,EAAM,GAAII,eAAe,oBACzBJ,EAAIK,MAAQ,QACZL,EAAIM,QAASnB,IAEb,MAAOP,GACRoB,EAAM/J,EAKP,MAHM+J,IAAQA,EAAIxJ,kBAAmBwJ,EAAIO,qBAAsB,eAAgBrG,QAC9ExD,EAAOsI,MAAO,gBAAkBG,GAE1Ba,GAGRQ,KAAM,aAKNC,WAAY,SAAUtB,GAChBA,GAAQzI,EAAOmB,KAAMsH,KAIvBnJ,EAAO0K,YAAc,SAAUvB,GAChCnJ,EAAe,KAAEkF,KAAMlF,EAAQmJ,KAC3BA,IAMPwB,UAAW,SAAUC,GACpB,MAAOA,GAAOrD,QAAS3E,EAAW,OAAQ2E,QAAS1E,EAAYC,IAGhE+H,SAAU,SAAU9G,EAAM+C,GACzB,MAAO/C,GAAK8G,UAAY9G,EAAK8G,SAASC,gBAAkBhE,EAAKgE,eAI9DrF,KAAM,SAAU0C,EAAKzC,EAAUC,GAC9B,GAAIoF,GACH5E,EAAI,EACJjC,EAASiE,EAAIjE,OACbiD,EAAU6D,EAAa7C,EAExB,IAAKxC,GACJ,GAAKwB,GACJ,KAAYjD,EAAJiC,EAAYA,IAGnB,GAFA4E,EAAQrF,EAASI,MAAOqC,EAAKhC,GAAKR,GAE7BoF,KAAU,EACd,UAIF,KAAM5E,IAAKgC,GAGV,GAFA4C,EAAQrF,EAASI,MAAOqC,EAAKhC,GAAKR,GAE7BoF,KAAU,EACd,UAOH,IAAK5D,GACJ,KAAYjD,EAAJiC,EAAYA,IAGnB,GAFA4E,EAAQrF,EAASR,KAAMiD,EAAKhC,GAAKA,EAAGgC,EAAKhC,IAEpC4E,KAAU,EACd,UAIF,KAAM5E,IAAKgC,GAGV,GAFA4C,EAAQrF,EAASR,KAAMiD,EAAKhC,GAAKA,EAAGgC,EAAKhC,IAEpC4E,KAAU,EACd,KAMJ,OAAO5C,IAIRtG,KAAMD,IAAcA,EAAUsD,KAAK,gBAClC,SAAU+F,GACT,MAAe,OAARA,EACN,GACArJ,EAAUsD,KAAM+F,IAIlB,SAAUA,GACT,MAAe,OAARA,EACN,IACEA,EAAO,IAAK1D,QAASlF,EAAO,KAIjC2C,UAAW,SAAUkG,EAAKC,GACzB,GAAI5F,GAAM4F,KAaV,OAXY,OAAPD,IACCF,EAAaI,OAAOF,IACxBxK,EAAO2D,MAAOkB,EACE,gBAAR2F,IACLA,GAAQA,GAGXhK,EAAUgE,KAAMK,EAAK2F,IAIhB3F,GAGR8F,QAAS,SAAUtH,EAAMmH,EAAK/E,GAC7B,GAAIC,EAEJ,IAAK8E,EAAM,CACV,GAAK5J,EACJ,MAAOA,GAAa4D,KAAMgG,EAAKnH,EAAMoC,EAMtC,KAHAC,EAAM8E,EAAIhH,OACViC,EAAIA,EAAQ,EAAJA,EAAQkB,KAAKiE,IAAK,EAAGlF,EAAMD,GAAMA,EAAI,EAEjCC,EAAJD,EAASA,IAEhB,GAAKA,IAAK+E,IAAOA,EAAK/E,KAAQpC,EAC7B,MAAOoC,GAKV,MAAO,IAGR9B,MAAO,SAAU2B,EAAOuF,GACvB,GAAIC,GAAID,EAAOrH,OACdiC,EAAIH,EAAM9B,OACVmC,EAAI,CAEL,IAAkB,gBAANmF,GACX,KAAYA,EAAJnF,EAAOA,IACdL,EAAOG,KAAQoF,EAAQlF,OAGxB,OAAQkF,EAAOlF,KAAOpG,EACrB+F,EAAOG,KAAQoF,EAAQlF,IAMzB,OAFAL,GAAM9B,OAASiC,EAERH,GAGRyF,KAAM,SAAUnG,EAAOI,EAAUgG,GAChC,GAAIC,GACHpG,KACAY,EAAI,EACJjC,EAASoB,EAAMpB,MAKhB,KAJAwH,IAAQA,EAIIxH,EAAJiC,EAAYA,IACnBwF,IAAWjG,EAAUJ,EAAOa,GAAKA,GAC5BuF,IAAQC,GACZpG,EAAIpE,KAAMmE,EAAOa,GAInB,OAAOZ,IAIRe,IAAK,SAAUhB,EAAOI,EAAUkG,GAC/B,GAAIb,GACH5E,EAAI,EACJjC,EAASoB,EAAMpB,OACfiD,EAAU6D,EAAa1F,GACvBC,IAGD,IAAK4B,EACJ,KAAYjD,EAAJiC,EAAYA,IACnB4E,EAAQrF,EAAUJ,EAAOa,GAAKA,EAAGyF,GAEnB,MAATb,IACJxF,EAAKA,EAAIrB,QAAW6G,OAMtB,KAAM5E,IAAKb,GACVyF,EAAQrF,EAAUJ,EAAOa,GAAKA,EAAGyF,GAEnB,MAATb,IACJxF,EAAKA,EAAIrB,QAAW6G,EAMvB,OAAO/J,GAAY8E,SAAWP,IAI/BsG,KAAM,EAINC,MAAO,SAAU9J,EAAID,GACpB,GAAI4D,GAAMmG,EAAO7B,CAUjB,OARwB,gBAAZlI,KACXkI,EAAMjI,EAAID,GACVA,EAAUC,EACVA,EAAKiI,GAKAvJ,EAAOiE,WAAY3C,IAKzB2D,EAAOvE,EAAW8D,KAAMa,UAAW,GACnC+F,EAAQ,WACP,MAAO9J,GAAG8D,MAAO/D,GAAWiC,KAAM2B,EAAK1E,OAAQG,EAAW8D,KAAMa,cAIjE+F,EAAMD,KAAO7J,EAAG6J,KAAO7J,EAAG6J,MAAQnL,EAAOmL,OAElCC,GAZC7L,GAiBT8L,OAAQ,SAAUzG,EAAOtD,EAAI2G,EAAKoC,EAAOiB,EAAWC,EAAUC,GAC7D,GAAI/F,GAAI,EACPjC,EAASoB,EAAMpB,OACfiI,EAAc,MAAPxD,CAGR,IAA4B,WAAvBjI,EAAO2C,KAAMsF,GAAqB,CACtCqD,GAAY,CACZ,KAAM7F,IAAKwC,GACVjI,EAAOqL,OAAQzG,EAAOtD,EAAImE,EAAGwC,EAAIxC,IAAI,EAAM8F,EAAUC,OAIhD,IAAKnB,IAAU9K,IACrB+L,GAAY,EAENtL,EAAOiE,WAAYoG,KACxBmB,GAAM,GAGFC,IAECD,GACJlK,EAAGkD,KAAMI,EAAOyF,GAChB/I,EAAK,OAILmK,EAAOnK,EACPA,EAAK,SAAU+B,EAAM4E,EAAKoC,GACzB,MAAOoB,GAAKjH,KAAMxE,EAAQqD,GAAQgH,MAKhC/I,GACJ,KAAYkC,EAAJiC,EAAYA,IACnBnE,EAAIsD,EAAMa,GAAIwC,EAAKuD,EAAMnB,EAAQA,EAAM7F,KAAMI,EAAMa,GAAIA,EAAGnE,EAAIsD,EAAMa,GAAIwC,IAK3E,OAAOqD,GACN1G,EAGA6G,EACCnK,EAAGkD,KAAMI,GACTpB,EAASlC,EAAIsD,EAAM,GAAIqD,GAAQsD,GAGlCG,IAAK,WACJ,OAAO,GAAMC,OAASC,WAMvBC,KAAM,SAAUxI,EAAMgD,EAASrB,EAAUC,GACxC,GAAIJ,GAAKuB,EACR0F,IAGD,KAAM1F,IAAQC,GACbyF,EAAK1F,GAAS/C,EAAK0I,MAAO3F,GAC1B/C,EAAK0I,MAAO3F,GAASC,EAASD,EAG/BvB,GAAMG,EAASI,MAAO/B,EAAM4B,MAG5B,KAAMmB,IAAQC,GACbhD,EAAK0I,MAAO3F,GAAS0F,EAAK1F,EAG3B,OAAOvB,MAIT7E,EAAO8C,MAAMoC,QAAU,SAAUuC,GAChC,IAAMjI,EAOL,GALAA,EAAYQ,EAAOgM,WAKU,aAAxBpM,EAASgD,WAEbyE,WAAYrH,EAAO8C,WAGb,IAAKlD,EAAS8C,iBAEpB9C,EAAS8C,iBAAkB,mBAAoBF,GAAW,GAG1DlD,EAAOoD,iBAAkB,OAAQF,GAAW,OAGtC,CAEN5C,EAASqM,YAAa,qBAAsBzJ,GAG5ClD,EAAO2M,YAAa,SAAUzJ,EAI9B,IAAI0J,IAAM,CAEV,KACCA,EAA6B,MAAvB5M,EAAO6M,cAAwBvM,EAASE,gBAC7C,MAAMoI,IAEHgE,GAAOA,EAAIE,UACf,QAAUC,KACT,IAAMrM,EAAO+G,QAAU,CAEtB,IAGCmF,EAAIE,SAAS,QACZ,MAAMlE,GACP,MAAOb,YAAYgF,EAAe,IAInCxJ,IAGA7C,EAAO8C,YAMZ,MAAOtD,GAAU0F,QAASuC,IAI3BzH,EAAO+E,KAAK,gEAAgEuH,MAAM,KAAM,SAAS7G,EAAGW,GACnGjG,EAAY,WAAaiG,EAAO,KAAQA,EAAKgE,eAG9C,SAASE,GAAa7C,GACrB,GAAIjE,GAASiE,EAAIjE,OAChBb,EAAO3C,EAAO2C,KAAM8E,EAErB,OAAKzH,GAAO2H,SAAUF,IACd,EAGc,IAAjBA,EAAI5D,UAAkBL,GACnB,EAGQ,UAATb,GAA6B,aAATA,IACb,IAAXa,GACgB,gBAAXA,IAAuBA,EAAS,GAAOA,EAAS,IAAOiE,IAIhEhI,EAAaO,EAAOJ,GAWpB,SAAWN,EAAQC,GAEnB,GAAIkG,GACH0C,EACAoE,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGAC,EACAlN,EACAC,EACAkN,EACAC,EACAC,EACAC,EACAC,EAGAzG,EAAU,UAAY,GAAKiF,MAC3ByB,EAAe9N,EAAOM,SACtByN,EAAU,EACVlI,EAAO,EACPmI,EAAaC,KACbC,EAAaD,KACbE,EAAgBF,KAChBG,GAAe,EACfC,EAAY,SAAUC,EAAGC,GACxB,MAAKD,KAAMC,GACVH,GAAe,EACR,GAED,GAIRI,QAAsBvO,GACtBwO,EAAe,GAAK,GAGpBC,KAAc/M,eACduJ,KACAyD,EAAMzD,EAAIyD,IACVC,EAAc1D,EAAI/J,KAClBA,EAAO+J,EAAI/J,KACXE,EAAQ6J,EAAI7J,MAEZE,EAAU2J,EAAI3J,SAAW,SAAUwC,GAClC,GAAIoC,GAAI,EACPC,EAAMpC,KAAKE,MACZ,MAAYkC,EAAJD,EAASA,IAChB,GAAKnC,KAAKmC,KAAOpC,EAChB,MAAOoC,EAGT,OAAO,IAGR0I,EAAW,6HAKXC,EAAa,sBAEbC,EAAoB,mCAKpBC,EAAaD,EAAkBxH,QAAS,IAAK,MAG7C0H,EAAa,MAAQH,EAAa,KAAOC,EAAoB,IAAMD,EAClE,mBAAqBA,EAAa,wCAA0CE,EAAa,QAAUF,EAAa,OAQjHI,EAAU,KAAOH,EAAoB,mEAAqEE,EAAW1H,QAAS,EAAG,GAAM,eAGvIlF,EAAY8M,OAAQ,IAAML,EAAa,8BAAgCA,EAAa,KAAM,KAE1FM,EAAaD,OAAQ,IAAML,EAAa,KAAOA,EAAa,KAC5DO,EAAmBF,OAAQ,IAAML,EAAa,WAAaA,EAAa,IAAMA,EAAa,KAE3FQ,EAAeH,OAAQL,EAAa,SACpCS,EAAuBJ,OAAQ,IAAML,EAAa,gBAAkBA,EAAa,OAAQ,KAEzFU,EAAcL,OAAQD,GACtBO,EAAkBN,OAAQ,IAAMH,EAAa,KAE7CU,GACCC,GAAUR,OAAQ,MAAQJ,EAAoB,KAC9Ca,MAAaT,OAAQ,QAAUJ,EAAoB,KACnDc,IAAWV,OAAQ,KAAOJ,EAAkBxH,QAAS,IAAK,MAAS,KACnEuI,KAAYX,OAAQ,IAAMF,GAC1Bc,OAAcZ,OAAQ,IAAMD,GAC5Bc,MAAab,OAAQ,yDAA2DL,EAC/E,+BAAiCA,EAAa,cAAgBA,EAC9D,aAAeA,EAAa,SAAU,KACvCmB,KAAYd,OAAQ,OAASN,EAAW,KAAM,KAG9CqB,aAAoBf,OAAQ,IAAML,EAAa,mDAC9CA,EAAa,mBAAqBA,EAAa,mBAAoB,MAGrEqB,EAAU,yBAGV7N,EAAa,mCAEb8N,GAAU,sCACVC,GAAU,SAEVC,GAAU,QAGVC,GAAgBpB,OAAQ,qBAAuBL,EAAa,MAAQA,EAAa,OAAQ,MACzF0B,GAAY,SAAUC,EAAGC,EAASC,GACjC,GAAIC,GAAO,KAAOF,EAAU,KAI5B,OAAOE,KAASA,GAAQD,EACvBD,EAEO,EAAPE,EACClI,OAAOmI,aAAcD,EAAO,OAE5BlI,OAAOmI,aAA2B,MAAbD,GAAQ,GAA4B,MAAR,KAAPA,GAI9C,KACCzP,EAAK2E,MACHoF,EAAM7J,EAAM6D,KAAM4I,EAAapE,YAChCoE,EAAapE,YAIdwB,EAAK4C,EAAapE,WAAWxF,QAASK,SACrC,MAAQqE,IACTzH,GAAS2E,MAAOoF,EAAIhH,OAGnB,SAAU+C,EAAQ6J,GACjBlC,EAAY9I,MAAOmB,EAAQ5F,EAAM6D,KAAK4L,KAKvC,SAAU7J,EAAQ6J,GACjB,GAAIzK,GAAIY,EAAO/C,OACdiC,EAAI,CAEL,OAASc,EAAOZ,KAAOyK,EAAI3K,MAC3Bc,EAAO/C,OAASmC,EAAI,IAKvB,QAAS0K,IAAQjP,EAAUC,EAASoJ,EAAS6F,GAC5C,GAAIlN,GAAOC,EAAMkN,EAAG1M,EAEnB4B,EAAG+K,EAAQ1E,EAAK2E,EAAKC,EAAYC,CASlC,KAPOtP,EAAUA,EAAQyC,eAAiBzC,EAAU+L,KAAmBxN,GACtEkN,EAAazL,GAGdA,EAAUA,GAAWzB,EACrB6K,EAAUA,OAEJrJ,GAAgC,gBAAbA,GACxB,MAAOqJ,EAGR,IAAuC,KAAjC5G,EAAWxC,EAAQwC,WAAgC,IAAbA,EAC3C,QAGD,IAAKkJ,IAAmBuD,EAAO,CAG9B,GAAMlN,EAAQxB,EAAW6B,KAAMrC,GAE9B,GAAMmP,EAAInN,EAAM,IACf,GAAkB,IAAbS,EAAiB,CAIrB,GAHAR,EAAOhC,EAAQ8C,eAAgBoM,IAG1BlN,IAAQA,EAAKe,WAQjB,MAAOqG,EALP,IAAKpH,EAAKgB,KAAOkM,EAEhB,MADA9F,GAAQhK,KAAM4C,GACPoH,MAOT,IAAKpJ,EAAQyC,gBAAkBT,EAAOhC,EAAQyC,cAAcK,eAAgBoM,KAC3EpD,EAAU9L,EAASgC,IAAUA,EAAKgB,KAAOkM,EAEzC,MADA9F,GAAQhK,KAAM4C,GACPoH,MAKH,CAAA,GAAKrH,EAAM,GAEjB,MADA3C,GAAK2E,MAAOqF,EAASpJ,EAAQwI,qBAAsBzI,IAC5CqJ,CAGD,KAAM8F,EAAInN,EAAM,KAAO+E,EAAQyI,wBAA0BvP,EAAQuP,uBAEvE,MADAnQ,GAAK2E,MAAOqF,EAASpJ,EAAQuP,uBAAwBL,IAC9C9F,EAKT,GAAKtC,EAAQ0I,OAAS7D,IAAcA,EAAUjJ,KAAM3C,IAAc,CASjE,GARAqP,EAAM3E,EAAMpF,EACZgK,EAAarP,EACbsP,EAA2B,IAAb9M,GAAkBzC,EAMd,IAAbyC,GAAqD,WAAnCxC,EAAQ8I,SAASC,cAA6B,CACpEoG,EAASM,GAAU1P,IAEb0K,EAAMzK,EAAQ0P,aAAa,OAChCN,EAAM3E,EAAIjF,QAAS+I,GAAS,QAE5BvO,EAAQ2P,aAAc,KAAMP,GAE7BA,EAAM,QAAUA,EAAM,MAEtBhL,EAAI+K,EAAOhN,MACX,OAAQiC,IACP+K,EAAO/K,GAAKgL,EAAMQ,GAAYT,EAAO/K,GAEtCiL,GAAa9B,EAAS7K,KAAM3C,IAAcC,EAAQ+C,YAAc/C,EAChEsP,EAAcH,EAAOU,KAAK,KAG3B,GAAKP,EACJ,IAIC,MAHAlQ,GAAK2E,MAAOqF,EACXiG,EAAWS,iBAAkBR,IAEvBlG,EACN,MAAM2G,IACN,QACKtF,GACLzK,EAAQgQ,gBAAgB,QAQ7B,MAAOC,IAAQlQ,EAASyF,QAASlF,EAAO,MAAQN,EAASoJ,EAAS6F,GASnE,QAAS/C,MACR,GAAIgE,KAEJ,SAASC,GAAOvJ,EAAKoC,GAMpB,MAJKkH,GAAK9Q,KAAMwH,GAAO,KAAQuE,EAAKiF,mBAE5BD,GAAOD,EAAKG,SAEZF,EAAOvJ,GAAQoC,EAExB,MAAOmH,GAOR,QAASG,IAAcrQ,GAEtB,MADAA,GAAIoF,IAAY,EACTpF,EAOR,QAASsQ,IAAQtQ,GAChB,GAAIuQ,GAAMjS,EAASiJ,cAAc,MAEjC,KACC,QAASvH,EAAIuQ,GACZ,MAAO3J,GACR,OAAO,EACN,QAEI2J,EAAIzN,YACRyN,EAAIzN,WAAW0N,YAAaD,GAG7BA,EAAM,MASR,QAASE,IAAWC,EAAOC,GAC1B,GAAIzH,GAAMwH,EAAM1F,MAAM,KACrB7G,EAAIuM,EAAMxO,MAEX,OAAQiC,IACP+G,EAAK0F,WAAY1H,EAAI/E,IAAOwM,EAU9B,QAASE,IAAcvE,EAAGC,GACzB,GAAIuE,GAAMvE,GAAKD,EACdyE,EAAOD,GAAsB,IAAfxE,EAAE/J,UAAiC,IAAfgK,EAAEhK,YAChCgK,EAAEyE,aAAevE,KACjBH,EAAE0E,aAAevE,EAGtB,IAAKsE,EACJ,MAAOA,EAIR,IAAKD,EACJ,MAASA,EAAMA,EAAIG,YAClB,GAAKH,IAAQvE,EACZ,MAAO,EAKV,OAAOD,GAAI,EAAI,GAOhB,QAAS4E,IAAmB7P,GAC3B,MAAO,UAAUU,GAChB,GAAI+C,GAAO/C,EAAK8G,SAASC,aACzB,OAAgB,UAAThE,GAAoB/C,EAAKV,OAASA,GAQ3C,QAAS8P,IAAoB9P,GAC5B,MAAO,UAAUU,GAChB,GAAI+C,GAAO/C,EAAK8G,SAASC,aACzB,QAAiB,UAAThE,GAA6B,WAATA,IAAsB/C,EAAKV,OAASA,GAQlE,QAAS+P,IAAwBpR,GAChC,MAAOqQ,IAAa,SAAUgB,GAE7B,MADAA,IAAYA,EACLhB,GAAa,SAAUrB,EAAMpD,GACnC,GAAIvH,GACHiN,EAAetR,KAAQgP,EAAK9M,OAAQmP,GACpClN,EAAImN,EAAapP,MAGlB,OAAQiC,IACF6K,EAAO3K,EAAIiN,EAAanN,MAC5B6K,EAAK3K,KAAOuH,EAAQvH,GAAK2K,EAAK3K,SAWnC+G,EAAQ2D,GAAO3D,MAAQ,SAAUrJ,GAGhC,GAAIvD,GAAkBuD,IAASA,EAAKS,eAAiBT,GAAMvD,eAC3D,OAAOA,GAA+C,SAA7BA,EAAgBqK,UAAsB,GAIhEhC,EAAUkI,GAAOlI,WAOjB2E,EAAcuD,GAAOvD,YAAc,SAAU+F,GAC5C,GAAIC,GAAMD,EAAOA,EAAK/O,eAAiB+O,EAAOzF,EAC7C2F,EAASD,EAAIE,WAGd,OAAKF,KAAQlT,GAA6B,IAAjBkT,EAAIjP,UAAmBiP,EAAIhT,iBAKpDF,EAAWkT,EACXjT,EAAUiT,EAAIhT,gBAGdiN,GAAkBL,EAAOoG,GAMpBC,GAAUA,EAAO9G,aAAe8G,IAAWA,EAAO7G,KACtD6G,EAAO9G,YAAa,iBAAkB,WACrCa,MASF3E,EAAQoG,WAAaqD,GAAO,SAAUC,GAErC,MADAA,GAAIoB,UAAY,KACRpB,EAAId,aAAa,eAO1B5I,EAAQ0B,qBAAuB+H,GAAO,SAAUC,GAE/C,MADAA,GAAIqB,YAAaJ,EAAIK,cAAc,MAC3BtB,EAAIhI,qBAAqB,KAAKrG,SAIvC2E,EAAQyI,uBAAyBgB,GAAO,SAAUC,GAQjD,MAPAA,GAAIuB,UAAY,+CAIhBvB,EAAIwB,WAAWJ,UAAY,IAGuB,IAA3CpB,EAAIjB,uBAAuB,KAAKpN,SAOxC2E,EAAQmL,QAAU1B,GAAO,SAAUC,GAElC,MADAhS,GAAQqT,YAAarB,GAAMxN,GAAKqC,GACxBoM,EAAIS,oBAAsBT,EAAIS,kBAAmB7M,GAAUlD,SAI/D2E,EAAQmL,SACZ9G,EAAK9I,KAAS,GAAI,SAAUW,EAAIhD,GAC/B,SAAYA,GAAQ8C,iBAAmB2J,GAAgBf,EAAiB,CACvE,GAAIwD,GAAIlP,EAAQ8C,eAAgBE,EAGhC,OAAOkM,IAAKA,EAAEnM,YAAcmM,QAG9B/D,EAAKgH,OAAW,GAAI,SAAUnP,GAC7B,GAAIoP,GAASpP,EAAGwC,QAASgJ,GAAWC,GACpC,OAAO,UAAUzM,GAChB,MAAOA,GAAK0N,aAAa,QAAU0C,YAM9BjH,GAAK9I,KAAS,GAErB8I,EAAKgH,OAAW,GAAK,SAAUnP,GAC9B,GAAIoP,GAASpP,EAAGwC,QAASgJ,GAAWC,GACpC,OAAO,UAAUzM,GAChB,GAAIwP,SAAcxP,GAAKqQ,mBAAqB5F,GAAgBzK,EAAKqQ,iBAAiB,KAClF,OAAOb,IAAQA,EAAKxI,QAAUoJ,KAMjCjH,EAAK9I,KAAU,IAAIyE,EAAQ0B,qBAC1B,SAAU8J,EAAKtS,GACd,aAAYA,GAAQwI,uBAAyBiE,EACrCzM,EAAQwI,qBAAsB8J,GADtC,GAID,SAAUA,EAAKtS,GACd,GAAIgC,GACHkG,KACA9D,EAAI,EACJgF,EAAUpJ,EAAQwI,qBAAsB8J,EAGzC,IAAa,MAARA,EAAc,CAClB,MAAStQ,EAAOoH,EAAQhF,KACA,IAAlBpC,EAAKQ,UACT0F,EAAI9I,KAAM4C,EAIZ,OAAOkG,GAER,MAAOkB,IAIT+B,EAAK9I,KAAY,MAAIyE,EAAQyI,wBAA0B,SAAUqC,EAAW5R,GAC3E,aAAYA,GAAQuP,yBAA2B9C,GAAgBf,EACvD1L,EAAQuP,uBAAwBqC,GADxC,GAWDhG,KAOAD,MAEM7E,EAAQ0I,IAAMpB,EAAQ1L,KAAM+O,EAAI3B,qBAGrCS,GAAO,SAAUC,GAMhBA,EAAIuB,UAAY,iDAIVvB,EAAIV,iBAAiB,cAAc3N,QACxCwJ,EAAUvM,KAAM,MAAQ2N,EAAa,aAAeD,EAAW,KAM1D0D,EAAIV,iBAAiB,YAAY3N,QACtCwJ,EAAUvM,KAAK,cAIjBmR,GAAO,SAAUC,GAOhB,GAAI+B,GAAQd,EAAIjK,cAAc,QAC9B+K,GAAM5C,aAAc,OAAQ,UAC5Ba,EAAIqB,YAAaU,GAAQ5C,aAAc,IAAK,IAEvCa,EAAIV,iBAAiB,WAAW3N,QACpCwJ,EAAUvM,KAAM,SAAW2N,EAAa,gBAKnCyD,EAAIV,iBAAiB,YAAY3N,QACtCwJ,EAAUvM,KAAM,WAAY,aAI7BoR,EAAIV,iBAAiB,QACrBnE,EAAUvM,KAAK,YAIX0H,EAAQ0L,gBAAkBpE,EAAQ1L,KAAOmJ,EAAUrN,EAAQiU,uBAChEjU,EAAQkU,oBACRlU,EAAQmU,kBACRnU,EAAQoU,qBAERrC,GAAO,SAAUC,GAGhB1J,EAAQ+L,kBAAoBhH,EAAQ1I,KAAMqN,EAAK,OAI/C3E,EAAQ1I,KAAMqN,EAAK,aACnB5E,EAAcxM,KAAM,KAAM+N,KAI5BxB,EAAYA,EAAUxJ,QAAciL,OAAQzB,EAAUkE,KAAK,MAC3DjE,EAAgBA,EAAczJ,QAAciL,OAAQxB,EAAciE,KAAK,MAQvE/D,EAAWsC,EAAQ1L,KAAMlE,EAAQsN,WAActN,EAAQsU,wBACtD,SAAUvG,EAAGC,GACZ,GAAIuG,GAAuB,IAAfxG,EAAE/J,SAAiB+J,EAAE9N,gBAAkB8N,EAClDyG,EAAMxG,GAAKA,EAAEzJ,UACd,OAAOwJ,KAAMyG,MAAWA,GAAwB,IAAjBA,EAAIxQ,YAClCuQ,EAAMjH,SACLiH,EAAMjH,SAAUkH,GAChBzG,EAAEuG,yBAA8D,GAAnCvG,EAAEuG,wBAAyBE,MAG3D,SAAUzG,EAAGC,GACZ,GAAKA,EACJ,MAASA,EAAIA,EAAEzJ,WACd,GAAKyJ,IAAMD,EACV,OAAO,CAIV,QAAO,GAOTD,EAAY9N,EAAQsU,wBACpB,SAAUvG,EAAGC,GAGZ,GAAKD,IAAMC,EAEV,MADAH,IAAe,EACR,CAGR,IAAI4G,GAAUzG,EAAEsG,yBAA2BvG,EAAEuG,yBAA2BvG,EAAEuG,wBAAyBtG,EAEnG,OAAKyG,GAEW,EAAVA,IACFnM,EAAQoM,cAAgB1G,EAAEsG,wBAAyBvG,KAAQ0G,EAGxD1G,IAAMkF,GAAO3F,EAASC,EAAcQ,GACjC,GAEHC,IAAMiF,GAAO3F,EAASC,EAAcS,GACjC,EAIDhB,EACJhM,EAAQ2D,KAAMqI,EAAWe,GAAM/M,EAAQ2D,KAAMqI,EAAWgB,GAC1D,EAGe,EAAVyG,EAAc,GAAK,EAIpB1G,EAAEuG,wBAA0B,GAAK,GAEzC,SAAUvG,EAAGC,GACZ,GAAIuE,GACH3M,EAAI,EACJ+O,EAAM5G,EAAExJ,WACRiQ,EAAMxG,EAAEzJ,WACRqQ,GAAO7G,GACP8G,GAAO7G,EAGR,IAAKD,IAAMC,EAEV,MADAH,IAAe,EACR,CAGD,KAAM8G,IAAQH,EACpB,MAAOzG,KAAMkF,EAAM,GAClBjF,IAAMiF,EAAM,EACZ0B,EAAM,GACNH,EAAM,EACNxH,EACEhM,EAAQ2D,KAAMqI,EAAWe,GAAM/M,EAAQ2D,KAAMqI,EAAWgB,GAC1D,CAGK,IAAK2G,IAAQH,EACnB,MAAOlC,IAAcvE,EAAGC,EAIzBuE,GAAMxE,CACN,OAASwE,EAAMA,EAAIhO,WAClBqQ,EAAGE,QAASvC,EAEbA,GAAMvE,CACN,OAASuE,EAAMA,EAAIhO,WAClBsQ,EAAGC,QAASvC,EAIb,OAAQqC,EAAGhP,KAAOiP,EAAGjP,GACpBA,GAGD,OAAOA,GAEN0M,GAAcsC,EAAGhP,GAAIiP,EAAGjP,IAGxBgP,EAAGhP,KAAO2H,EAAe,GACzBsH,EAAGjP,KAAO2H,EAAe,EACzB,GAGK0F,GA1UClT,GA6UTyQ,GAAOnD,QAAU,SAAU0H,EAAMC,GAChC,MAAOxE,IAAQuE,EAAM,KAAM,KAAMC,IAGlCxE,GAAOwD,gBAAkB,SAAUxQ,EAAMuR,GASxC,IAPOvR,EAAKS,eAAiBT,KAAWzD,GACvCkN,EAAazJ,GAIduR,EAAOA,EAAK/N,QAASgI,EAAkB,aAElC1G,EAAQ0L,kBAAmB9G,GAC5BE,GAAkBA,EAAclJ,KAAM6Q,IACtC5H,GAAkBA,EAAUjJ,KAAM6Q,IAErC,IACC,GAAI/P,GAAMqI,EAAQ1I,KAAMnB,EAAMuR,EAG9B,IAAK/P,GAAOsD,EAAQ+L,mBAGlB7Q,EAAKzD,UAAuC,KAA3ByD,EAAKzD,SAASiE,SAChC,MAAOgB,GAEP,MAAMqD,IAGT,MAAOmI,IAAQuE,EAAMhV,EAAU,MAAOyD,IAAQG,OAAS,GAGxD6M,GAAOlD,SAAW,SAAU9L,EAASgC,GAKpC,OAHOhC,EAAQyC,eAAiBzC,KAAczB,GAC7CkN,EAAazL,GAEP8L,EAAU9L,EAASgC,IAG3BgN,GAAOnM,KAAO,SAAUb,EAAM+C,IAEtB/C,EAAKS,eAAiBT,KAAWzD,GACvCkN,EAAazJ,EAGd,IAAI/B,GAAKkL,EAAK0F,WAAY9L,EAAKgE,eAE9B0K,EAAMxT,GAAM0M,EAAOxJ,KAAMgI,EAAK0F,WAAY9L,EAAKgE,eAC9C9I,EAAI+B,EAAM+C,GAAO2G,GACjBxN,CAEF,OAAOuV,KAAQvV,EACd4I,EAAQoG,aAAexB,EACtB1J,EAAK0N,aAAc3K,IAClB0O,EAAMzR,EAAKqQ,iBAAiBtN,KAAU0O,EAAIC,UAC1CD,EAAIzK,MACJ,KACFyK,GAGFzE,GAAO/H,MAAQ,SAAUC,GACxB,KAAUC,OAAO,0CAA4CD,IAO9D8H,GAAO2E,WAAa,SAAUvK,GAC7B,GAAIpH,GACH4R,KACAtP,EAAI,EACJF,EAAI,CAOL,IAJAiI,GAAgBvF,EAAQ+M,iBACxBrI,GAAa1E,EAAQgN,YAAc1K,EAAQ9J,MAAO,GAClD8J,EAAQ3E,KAAM6H,GAETD,EAAe,CACnB,MAASrK,EAAOoH,EAAQhF,KAClBpC,IAASoH,EAAShF,KACtBE,EAAIsP,EAAWxU,KAAMgF,GAGvB,OAAQE,IACP8E,EAAQ1E,OAAQkP,EAAYtP,GAAK,GAInC,MAAO8E,IAORgC,EAAU4D,GAAO5D,QAAU,SAAUpJ,GACpC,GAAIwP,GACHhO,EAAM,GACNY,EAAI,EACJ5B,EAAWR,EAAKQ,QAEjB,IAAMA,GAMC,GAAkB,IAAbA,GAA+B,IAAbA,GAA+B,KAAbA,EAAkB,CAGjE,GAAiC,gBAArBR,GAAK+R,YAChB,MAAO/R,GAAK+R,WAGZ,KAAM/R,EAAOA,EAAKgQ,WAAYhQ,EAAMA,EAAOA,EAAKkP,YAC/C1N,GAAO4H,EAASpJ,OAGZ,IAAkB,IAAbQ,GAA+B,IAAbA,EAC7B,MAAOR,GAAKgS,cAhBZ,MAASxC,EAAOxP,EAAKoC,GAAKA,IAEzBZ,GAAO4H,EAASoG,EAkBlB,OAAOhO,IAGR2H,EAAO6D,GAAOiF,WAGb7D,YAAa,GAEb8D,aAAc5D,GAEdvO,MAAO4L,EAEPkD,cAEAxO,QAEA8R,UACCC,KAAOC,IAAK,aAAcpQ,OAAO,GACjCqQ,KAAOD,IAAK,cACZE,KAAOF,IAAK,kBAAmBpQ,OAAO,GACtCuQ,KAAOH,IAAK,oBAGbI,WACC1G,KAAQ,SAAUhM,GAUjB,MATAA,GAAM,GAAKA,EAAM,GAAGyD,QAASgJ,GAAWC,IAGxC1M,EAAM,IAAOA,EAAM,IAAMA,EAAM,IAAM,IAAKyD,QAASgJ,GAAWC,IAE5C,OAAb1M,EAAM,KACVA,EAAM,GAAK,IAAMA,EAAM,GAAK,KAGtBA,EAAMzC,MAAO,EAAG,IAGxB2O,MAAS,SAAUlM,GA6BlB,MAlBAA,GAAM,GAAKA,EAAM,GAAGgH,cAEY,QAA3BhH,EAAM,GAAGzC,MAAO,EAAG,IAEjByC,EAAM,IACXiN,GAAO/H,MAAOlF,EAAM,IAKrBA,EAAM,KAAQA,EAAM,GAAKA,EAAM,IAAMA,EAAM,IAAM,GAAK,GAAmB,SAAbA,EAAM,IAA8B,QAAbA,EAAM,KACzFA,EAAM,KAAUA,EAAM,GAAKA,EAAM,IAAqB,QAAbA,EAAM,KAGpCA,EAAM,IACjBiN,GAAO/H,MAAOlF,EAAM,IAGdA,GAGRiM,OAAU,SAAUjM,GACnB,GAAI2S,GACHC,GAAY5S,EAAM,IAAMA,EAAM,EAE/B,OAAK4L,GAAiB,MAAEjL,KAAMX,EAAM,IAC5B,MAIHA,EAAM,IAAMA,EAAM,KAAO7D,EAC7B6D,EAAM,GAAKA,EAAM,GAGN4S,GAAYlH,EAAQ/K,KAAMiS,KAEpCD,EAASjF,GAAUkF,GAAU,MAE7BD,EAASC,EAASnV,QAAS,IAAKmV,EAASxS,OAASuS,GAAWC,EAASxS,UAGvEJ,EAAM,GAAKA,EAAM,GAAGzC,MAAO,EAAGoV,GAC9B3S,EAAM,GAAK4S,EAASrV,MAAO,EAAGoV,IAIxB3S,EAAMzC,MAAO,EAAG,MAIzB6S,QAECrE,IAAO,SAAU8G,GAChB,GAAI9L,GAAW8L,EAAiBpP,QAASgJ,GAAWC,IAAY1F,aAChE,OAA4B,MAArB6L,EACN,WAAa,OAAO,GACpB,SAAU5S,GACT,MAAOA,GAAK8G,UAAY9G,EAAK8G,SAASC,gBAAkBD,IAI3D+E,MAAS,SAAU+D,GAClB,GAAIiD,GAAU5I,EAAY2F,EAAY,IAEtC,OAAOiD,KACLA,EAAczH,OAAQ,MAAQL,EAAa,IAAM6E,EAAY,IAAM7E,EAAa,SACjFd,EAAY2F,EAAW,SAAU5P,GAChC,MAAO6S,GAAQnS,KAAgC,gBAAnBV,GAAK4P,WAA0B5P,EAAK4P,iBAAoB5P,GAAK0N,eAAiBjD,GAAgBzK,EAAK0N,aAAa,UAAY,OAI3J3B,KAAQ,SAAUhJ,EAAM+P,EAAUC,GACjC,MAAO,UAAU/S,GAChB,GAAIgT,GAAShG,GAAOnM,KAAMb,EAAM+C,EAEhC,OAAe,OAAViQ,EACgB,OAAbF,EAEFA,GAINE,GAAU,GAEU,MAAbF,EAAmBE,IAAWD,EACvB,OAAbD,EAAoBE,IAAWD,EAClB,OAAbD,EAAoBC,GAAqC,IAA5BC,EAAOxV,QAASuV,GAChC,OAAbD,EAAoBC,GAASC,EAAOxV,QAASuV,GAAU,GAC1C,OAAbD,EAAoBC,GAASC,EAAO1V,OAAQyV,EAAM5S,UAAa4S,EAClD,OAAbD,GAAsB,IAAME,EAAS,KAAMxV,QAASuV,GAAU,GACjD,OAAbD,EAAoBE,IAAWD,GAASC,EAAO1V,MAAO,EAAGyV,EAAM5S,OAAS,KAAQ4S,EAAQ,KACxF,IAZO,IAgBV9G,MAAS,SAAU3M,EAAM2T,EAAM3D,EAAUrN,EAAOE,GAC/C,GAAI+Q,GAAgC,QAAvB5T,EAAKhC,MAAO,EAAG,GAC3B6V,EAA+B,SAArB7T,EAAKhC,MAAO,IACtB8V,EAAkB,YAATH,CAEV,OAAiB,KAAVhR,GAAwB,IAATE,EAGrB,SAAUnC,GACT,QAASA,EAAKe,YAGf,SAAUf,EAAMhC,EAASiI,GACxB,GAAIkI,GAAOkF,EAAY7D,EAAMR,EAAMsE,EAAWC,EAC7ClB,EAAMa,IAAWC,EAAU,cAAgB,kBAC3CzD,EAAS1P,EAAKe,WACdgC,EAAOqQ,GAAUpT,EAAK8G,SAASC,cAC/ByM,GAAYvN,IAAQmN,CAErB,IAAK1D,EAAS,CAGb,GAAKwD,EAAS,CACb,MAAQb,EAAM,CACb7C,EAAOxP,CACP,OAASwP,EAAOA,EAAM6C,GACrB,GAAKe,EAAS5D,EAAK1I,SAASC,gBAAkBhE,EAAyB,IAAlByM,EAAKhP,SACzD,OAAO,CAIT+S,GAAQlB,EAAe,SAAT/S,IAAoBiU,GAAS,cAE5C,OAAO,EAMR,GAHAA,GAAUJ,EAAUzD,EAAOM,WAAaN,EAAO+D,WAG1CN,GAAWK,EAAW,CAE1BH,EAAa3D,EAAQrM,KAAcqM,EAAQrM,OAC3C8K,EAAQkF,EAAY/T,OACpBgU,EAAYnF,EAAM,KAAOnE,GAAWmE,EAAM,GAC1Ca,EAAOb,EAAM,KAAOnE,GAAWmE,EAAM,GACrCqB,EAAO8D,GAAa5D,EAAO/J,WAAY2N,EAEvC,OAAS9D,IAAS8D,GAAa9D,GAAQA,EAAM6C,KAG3CrD,EAAOsE,EAAY,IAAMC,EAAM3I,MAGhC,GAAuB,IAAlB4E,EAAKhP,YAAoBwO,GAAQQ,IAASxP,EAAO,CACrDqT,EAAY/T,IAAW0K,EAASsJ,EAAWtE,EAC3C,YAKI,IAAKwE,IAAarF,GAASnO,EAAMqD,KAAcrD,EAAMqD,QAAkB/D,KAAW6O,EAAM,KAAOnE,EACrGgF,EAAOb,EAAM,OAKb,OAASqB,IAAS8D,GAAa9D,GAAQA,EAAM6C,KAC3CrD,EAAOsE,EAAY,IAAMC,EAAM3I,MAEhC,IAAOwI,EAAS5D,EAAK1I,SAASC,gBAAkBhE,EAAyB,IAAlByM,EAAKhP,aAAsBwO,IAE5EwE,KACHhE,EAAMnM,KAAcmM,EAAMnM,QAAkB/D,IAAW0K,EAASgF,IAG7DQ,IAASxP,GACb,KAQJ,OADAgP,IAAQ7M,EACD6M,IAAS/M,GAA4B,IAAjB+M,EAAO/M,GAAe+M,EAAO/M,GAAS,KAKrE+J,OAAU,SAAU0H,EAAQpE,GAK3B,GAAI1N,GACH3D,EAAKkL,EAAKgC,QAASuI,IAAYvK,EAAKwK,WAAYD,EAAO3M,gBACtDiG,GAAO/H,MAAO,uBAAyByO,EAKzC,OAAKzV,GAAIoF,GACDpF,EAAIqR,GAIPrR,EAAGkC,OAAS,GAChByB,GAAS8R,EAAQA,EAAQ,GAAIpE,GACtBnG,EAAKwK,WAAW/V,eAAgB8V,EAAO3M,eAC7CuH,GAAa,SAAUrB,EAAMpD,GAC5B,GAAI+J,GACHC,EAAU5V,EAAIgP,EAAMqC,GACpBlN,EAAIyR,EAAQ1T,MACb,OAAQiC,IACPwR,EAAMpW,EAAQ2D,KAAM8L,EAAM4G,EAAQzR,IAClC6K,EAAM2G,KAAW/J,EAAS+J,GAAQC,EAAQzR,MAG5C,SAAUpC,GACT,MAAO/B,GAAI+B,EAAM,EAAG4B,KAIhB3D,IAITkN,SAEC2I,IAAOxF,GAAa,SAAUvQ,GAI7B,GAAIwS,MACHnJ,KACA2M,EAAUzK,EAASvL,EAASyF,QAASlF,EAAO,MAE7C,OAAOyV,GAAS1Q,GACfiL,GAAa,SAAUrB,EAAMpD,EAAS7L,EAASiI,GAC9C,GAAIjG,GACHgU,EAAYD,EAAS9G,EAAM,KAAMhH,MACjC7D,EAAI6K,EAAK9M,MAGV,OAAQiC,KACDpC,EAAOgU,EAAU5R,MACtB6K,EAAK7K,KAAOyH,EAAQzH,GAAKpC,MAI5B,SAAUA,EAAMhC,EAASiI,GAGxB,MAFAsK,GAAM,GAAKvQ,EACX+T,EAASxD,EAAO,KAAMtK,EAAKmB,IACnBA,EAAQwD,SAInBqJ,IAAO3F,GAAa,SAAUvQ,GAC7B,MAAO,UAAUiC,GAChB,MAAOgN,IAAQjP,EAAUiC,GAAOG,OAAS,KAI3C2J,SAAYwE,GAAa,SAAUpH,GAClC,MAAO,UAAUlH,GAChB,OAASA,EAAK+R,aAAe/R,EAAKkU,WAAa9K,EAASpJ,IAASxC,QAAS0J,GAAS,MAWrFiN,KAAQ7F,GAAc,SAAU6F,GAM/B,MAJMzI,GAAYhL,KAAKyT,GAAQ,KAC9BnH,GAAO/H,MAAO,qBAAuBkP,GAEtCA,EAAOA,EAAK3Q,QAASgJ,GAAWC,IAAY1F,cACrC,SAAU/G,GAChB,GAAIoU,EACJ,GACC,IAAMA,EAAW1K,EAChB1J,EAAKmU,KACLnU,EAAK0N,aAAa,aAAe1N,EAAK0N,aAAa,QAGnD,MADA0G,GAAWA,EAASrN,cACbqN,IAAaD,GAA2C,IAAnCC,EAAS5W,QAAS2W,EAAO,YAE5CnU,EAAOA,EAAKe,aAAiC,IAAlBf,EAAKQ,SAC3C,QAAO,KAKT0C,OAAU,SAAUlD,GACnB,GAAIqU,GAAOpY,EAAOK,UAAYL,EAAOK,SAAS+X,IAC9C,OAAOA,IAAQA,EAAK/W,MAAO,KAAQ0C,EAAKgB,IAGzCsT,KAAQ,SAAUtU,GACjB,MAAOA,KAASxD,GAGjB+X,MAAS,SAAUvU,GAClB,MAAOA,KAASzD,EAASiY,iBAAmBjY,EAASkY,UAAYlY,EAASkY,gBAAkBzU,EAAKV,MAAQU,EAAK0U,OAAS1U,EAAK2U,WAI7HC,QAAW,SAAU5U,GACpB,MAAOA,GAAK6U,YAAa,GAG1BA,SAAY,SAAU7U,GACrB,MAAOA,GAAK6U,YAAa,GAG1BC,QAAW,SAAU9U,GAGpB,GAAI8G,GAAW9G,EAAK8G,SAASC,aAC7B,OAAqB,UAAbD,KAA0B9G,EAAK8U,SAA0B,WAAbhO,KAA2B9G,EAAK+U,UAGrFA,SAAY,SAAU/U,GAOrB,MAJKA,GAAKe,YACTf,EAAKe,WAAWiU,cAGVhV,EAAK+U,YAAa,GAI1BE,MAAS,SAAUjV,GAMlB,IAAMA,EAAOA,EAAKgQ,WAAYhQ,EAAMA,EAAOA,EAAKkP,YAC/C,GAAKlP,EAAK8G,SAAW,KAAyB,IAAlB9G,EAAKQ,UAAoC,IAAlBR,EAAKQ,SACvD,OAAO,CAGT,QAAO,GAGRkP,OAAU,SAAU1P,GACnB,OAAQmJ,EAAKgC,QAAe,MAAGnL,IAIhCkV,OAAU,SAAUlV,GACnB,MAAOsM,IAAQ5L,KAAMV,EAAK8G,WAG3ByJ,MAAS,SAAUvQ,GAClB,MAAOqM,IAAQ3L,KAAMV,EAAK8G,WAG3BqO,OAAU,SAAUnV,GACnB,GAAI+C,GAAO/C,EAAK8G,SAASC,aACzB,OAAgB,UAAThE,GAAkC,WAAd/C,EAAKV,MAA8B,WAATyD,GAGtDmE,KAAQ,SAAUlH,GACjB,GAAIa,EAGJ,OAAuC,UAAhCb,EAAK8G,SAASC,eACN,SAAd/G,EAAKV,OACmC,OAArCuB,EAAOb,EAAK0N,aAAa,UAAoB7M,EAAKkG,gBAAkB/G,EAAKV,OAI9E2C,MAASoN,GAAuB,WAC/B,OAAS,KAGVlN,KAAQkN,GAAuB,SAAUE,EAAcpP,GACtD,OAASA,EAAS,KAGnB+B,GAAMmN,GAAuB,SAAUE,EAAcpP,EAAQmP,GAC5D,OAAoB,EAAXA,EAAeA,EAAWnP,EAASmP,KAG7C8F,KAAQ/F,GAAuB,SAAUE,EAAcpP,GACtD,GAAIiC,GAAI,CACR,MAAYjC,EAAJiC,EAAYA,GAAK,EACxBmN,EAAanS,KAAMgF,EAEpB,OAAOmN,KAGR8F,IAAOhG,GAAuB,SAAUE,EAAcpP,GACrD,GAAIiC,GAAI,CACR,MAAYjC,EAAJiC,EAAYA,GAAK,EACxBmN,EAAanS,KAAMgF,EAEpB,OAAOmN,KAGR+F,GAAMjG,GAAuB,SAAUE,EAAcpP,EAAQmP,GAC5D,GAAIlN,GAAe,EAAXkN,EAAeA,EAAWnP,EAASmP,CAC3C,QAAUlN,GAAK,GACdmN,EAAanS,KAAMgF,EAEpB,OAAOmN,KAGRgG,GAAMlG,GAAuB,SAAUE,EAAcpP,EAAQmP,GAC5D,GAAIlN,GAAe,EAAXkN,EAAeA,EAAWnP,EAASmP,CAC3C,MAAcnP,IAAJiC,GACTmN,EAAanS,KAAMgF,EAEpB,OAAOmN,OAKVpG,EAAKgC,QAAa,IAAIhC,EAAKgC,QAAY,EAGvC,KAAM/I,KAAOoT,OAAO,EAAMC,UAAU,EAAMC,MAAM,EAAMC,UAAU,EAAMC,OAAO,GAC5EzM,EAAKgC,QAAS/I,GAAM+M,GAAmB/M,EAExC,KAAMA,KAAOyT,QAAQ,EAAMC,OAAO,GACjC3M,EAAKgC,QAAS/I,GAAMgN,GAAoBhN,EAIzC,SAASuR,OACTA,GAAW/T,UAAYuJ,EAAK4M,QAAU5M,EAAKgC,QAC3ChC,EAAKwK,WAAa,GAAIA,GAEtB,SAASlG,IAAU1P,EAAUiY,GAC5B,GAAInC,GAAS9T,EAAOkW,EAAQ3W,EAC3B4W,EAAO/I,EAAQgJ,EACfC,EAASjM,EAAYpM,EAAW,IAEjC,IAAKqY,EACJ,MAAOJ,GAAY,EAAII,EAAO9Y,MAAO,EAGtC4Y,GAAQnY,EACRoP,KACAgJ,EAAahN,EAAKsJ,SAElB,OAAQyD,EAAQ,GAGTrC,IAAY9T,EAAQsL,EAAOjL,KAAM8V,OACjCnW,IAEJmW,EAAQA,EAAM5Y,MAAOyC,EAAM,GAAGI,SAAY+V,GAE3C/I,EAAO/P,KAAM6Y,OAGdpC,GAAU,GAGJ9T,EAAQuL,EAAalL,KAAM8V,MAChCrC,EAAU9T,EAAMsO,QAChB4H,EAAO7Y,MACN4J,MAAO6M,EAEPvU,KAAMS,EAAM,GAAGyD,QAASlF,EAAO,OAEhC4X,EAAQA,EAAM5Y,MAAOuW,EAAQ1T,QAI9B,KAAMb,IAAQ6J,GAAKgH,SACZpQ,EAAQ4L,EAAWrM,GAAOc,KAAM8V,KAAcC,EAAY7W,MAC9DS,EAAQoW,EAAY7W,GAAQS,MAC7B8T,EAAU9T,EAAMsO,QAChB4H,EAAO7Y,MACN4J,MAAO6M,EACPvU,KAAMA,EACNuK,QAAS9J,IAEVmW,EAAQA,EAAM5Y,MAAOuW,EAAQ1T,QAI/B,KAAM0T,EACL,MAOF,MAAOmC,GACNE,EAAM/V,OACN+V,EACClJ,GAAO/H,MAAOlH,GAEdoM,EAAYpM,EAAUoP,GAAS7P,MAAO,GAGzC,QAASsQ,IAAYqI,GACpB,GAAI7T,GAAI,EACPC,EAAM4T,EAAO9V,OACbpC,EAAW,EACZ,MAAYsE,EAAJD,EAASA,IAChBrE,GAAYkY,EAAO7T,GAAG4E,KAEvB,OAAOjJ,GAGR,QAASsY,IAAetC,EAASuC,EAAYC,GAC5C,GAAIlE,GAAMiE,EAAWjE,IACpBmE,EAAmBD,GAAgB,eAARlE,EAC3BoE,EAAW3U,GAEZ,OAAOwU,GAAWrU,MAEjB,SAAUjC,EAAMhC,EAASiI,GACxB,MAASjG,EAAOA,EAAMqS,GACrB,GAAuB,IAAlBrS,EAAKQ,UAAkBgW,EAC3B,MAAOzC,GAAS/T,EAAMhC,EAASiI,IAMlC,SAAUjG,EAAMhC,EAASiI,GACxB,GAAIb,GAAM+I,EAAOkF,EAChBqD,EAAS1M,EAAU,IAAMyM,CAG1B,IAAKxQ,GACJ,MAASjG,EAAOA,EAAMqS,GACrB,IAAuB,IAAlBrS,EAAKQ,UAAkBgW,IACtBzC,EAAS/T,EAAMhC,EAASiI,GAC5B,OAAO,MAKV,OAASjG,EAAOA,EAAMqS,GACrB,GAAuB,IAAlBrS,EAAKQ,UAAkBgW,EAE3B,GADAnD,EAAarT,EAAMqD,KAAcrD,EAAMqD,QACjC8K,EAAQkF,EAAYhB,KAAUlE,EAAM,KAAOuI,GAChD,IAAMtR,EAAO+I,EAAM,OAAQ,GAAQ/I,IAAS8D,EAC3C,MAAO9D,MAAS,MAKjB,IAFA+I,EAAQkF,EAAYhB,IAAUqE,GAC9BvI,EAAM,GAAK4F,EAAS/T,EAAMhC,EAASiI,IAASiD,EACvCiF,EAAM,MAAO,EACjB,OAAO,GASf,QAASwI,IAAgBC,GACxB,MAAOA,GAASzW,OAAS,EACxB,SAAUH,EAAMhC,EAASiI,GACxB,GAAI7D,GAAIwU,EAASzW,MACjB,OAAQiC,IACP,IAAMwU,EAASxU,GAAIpC,EAAMhC,EAASiI,GACjC,OAAO,CAGT,QAAO,GAER2Q,EAAS,GAGX,QAASC,IAAU7C,EAAWzR,EAAK4N,EAAQnS,EAASiI,GACnD,GAAIjG,GACH8W,KACA1U,EAAI,EACJC,EAAM2R,EAAU7T,OAChB4W,EAAgB,MAAPxU,CAEV,MAAYF,EAAJD,EAASA,KACVpC,EAAOgU,EAAU5R,OAChB+N,GAAUA,EAAQnQ,EAAMhC,EAASiI,MACtC6Q,EAAa1Z,KAAM4C,GACd+W,GACJxU,EAAInF,KAAMgF,GAMd,OAAO0U,GAGR,QAASE,IAAYvE,EAAW1U,EAAUgW,EAASkD,EAAYC,EAAYC,GAO1E,MANKF,KAAeA,EAAY5T,KAC/B4T,EAAaD,GAAYC,IAErBC,IAAeA,EAAY7T,KAC/B6T,EAAaF,GAAYE,EAAYC,IAE/B7I,GAAa,SAAUrB,EAAM7F,EAASpJ,EAASiI,GACrD,GAAImR,GAAMhV,EAAGpC,EACZqX,KACAC,KACAC,EAAcnQ,EAAQjH,OAGtBoB,EAAQ0L,GAAQuK,GAAkBzZ,GAAY,IAAKC,EAAQwC,UAAaxC,GAAYA,MAGpFyZ,GAAYhF,IAAexF,GAASlP,EAEnCwD,EADAsV,GAAUtV,EAAO8V,EAAQ5E,EAAWzU,EAASiI,GAG9CyR,EAAa3D,EAEZmD,IAAgBjK,EAAOwF,EAAY8E,GAAeN,MAMjD7P,EACDqQ,CAQF,IALK1D,GACJA,EAAS0D,EAAWC,EAAY1Z,EAASiI,GAIrCgR,EAAa,CACjBG,EAAOP,GAAUa,EAAYJ,GAC7BL,EAAYG,KAAUpZ,EAASiI,GAG/B7D,EAAIgV,EAAKjX,MACT,OAAQiC,KACDpC,EAAOoX,EAAKhV,MACjBsV,EAAYJ,EAAQlV,MAASqV,EAAWH,EAAQlV,IAAOpC,IAK1D,GAAKiN,GACJ,GAAKiK,GAAczE,EAAY,CAC9B,GAAKyE,EAAa,CAEjBE,KACAhV,EAAIsV,EAAWvX,MACf,OAAQiC,KACDpC,EAAO0X,EAAWtV,KAEvBgV,EAAKha,KAAOqa,EAAUrV,GAAKpC,EAG7BkX,GAAY,KAAOQ,KAAkBN,EAAMnR,GAI5C7D,EAAIsV,EAAWvX,MACf,OAAQiC,KACDpC,EAAO0X,EAAWtV,MACtBgV,EAAOF,EAAa1Z,EAAQ2D,KAAM8L,EAAMjN,GAASqX,EAAOjV,IAAM,KAE/D6K,EAAKmK,KAAUhQ,EAAQgQ,GAAQpX,SAOlC0X,GAAab,GACZa,IAAetQ,EACdsQ,EAAWhV,OAAQ6U,EAAaG,EAAWvX,QAC3CuX,GAEGR,EACJA,EAAY,KAAM9P,EAASsQ,EAAYzR,GAEvC7I,EAAK2E,MAAOqF,EAASsQ,KAMzB,QAASC,IAAmB1B,GAC3B,GAAI2B,GAAc7D,EAASzR,EAC1BD,EAAM4T,EAAO9V,OACb0X,EAAkB1O,EAAKgJ,SAAU8D,EAAO,GAAG3W,MAC3CwY,EAAmBD,GAAmB1O,EAAKgJ,SAAS,KACpD/P,EAAIyV,EAAkB,EAAI,EAG1BE,EAAe1B,GAAe,SAAUrW,GACvC,MAAOA,KAAS4X,GACdE,GAAkB,GACrBE,EAAkB3B,GAAe,SAAUrW,GAC1C,MAAOxC,GAAQ2D,KAAMyW,EAAc5X,GAAS,IAC1C8X,GAAkB,GACrBlB,GAAa,SAAU5W,EAAMhC,EAASiI,GACrC,OAAU4R,IAAqB5R,GAAOjI,IAAYuL,MAChDqO,EAAe5Z,GAASwC,SACxBuX,EAAc/X,EAAMhC,EAASiI,GAC7B+R,EAAiBhY,EAAMhC,EAASiI,KAGpC,MAAY5D,EAAJD,EAASA,IAChB,GAAM2R,EAAU5K,EAAKgJ,SAAU8D,EAAO7T,GAAG9C,MACxCsX,GAAaP,GAAcM,GAAgBC,GAAY7C,QACjD,CAIN,GAHAA,EAAU5K,EAAKgH,OAAQ8F,EAAO7T,GAAG9C,MAAOyC,MAAO,KAAMkU,EAAO7T,GAAGyH,SAG1DkK,EAAS1Q,GAAY,CAGzB,IADAf,IAAMF,EACMC,EAAJC,EAASA,IAChB,GAAK6G,EAAKgJ,SAAU8D,EAAO3T,GAAGhD,MAC7B,KAGF,OAAO0X,IACN5U,EAAI,GAAKuU,GAAgBC,GACzBxU,EAAI,GAAKwL,GAERqI,EAAO3Y,MAAO,EAAG8E,EAAI,GAAIlF,QAAS8J,MAAgC,MAAzBiP,EAAQ7T,EAAI,GAAI9C,KAAe,IAAM,MAC7EkE,QAASlF,EAAO,MAClByV,EACIzR,EAAJF,GAASuV,GAAmB1B,EAAO3Y,MAAO8E,EAAGE,IACzCD,EAAJC,GAAWqV,GAAoB1B,EAASA,EAAO3Y,MAAOgF,IAClDD,EAAJC,GAAWsL,GAAYqI,IAGzBW,EAASxZ,KAAM2W,GAIjB,MAAO4C,IAAgBC,GAGxB,QAASqB,IAA0BC,EAAiBC,GAEnD,GAAIC,GAAoB,EACvBC,EAAQF,EAAYhY,OAAS,EAC7BmY,EAAYJ,EAAgB/X,OAAS,EACrCoY,EAAe,SAAUtL,EAAMjP,EAASiI,EAAKmB,EAASoR,GACrD,GAAIxY,GAAMsC,EAAGyR,EACZ0E,KACAC,EAAe,EACftW,EAAI,IACJ4R,EAAY/G,MACZ0L,EAA6B,MAAjBH,EACZI,EAAgBrP,EAEhBhI,EAAQ0L,GAAQqL,GAAanP,EAAK9I,KAAU,IAAG,IAAKmY,GAAiBxa,EAAQ+C,YAAc/C,GAE3F6a,EAAiB7O,GAA4B,MAAjB4O,EAAwB,EAAItV,KAAKC,UAAY,EAS1E,KAPKoV,IACJpP,EAAmBvL,IAAYzB,GAAYyB,EAC3CkL,EAAakP,GAKe,OAApBpY,EAAOuB,EAAMa,IAAaA,IAAM,CACxC,GAAKkW,GAAatY,EAAO,CACxBsC,EAAI,CACJ,OAASyR,EAAUmE,EAAgB5V,KAClC,GAAKyR,EAAS/T,EAAMhC,EAASiI,GAAQ,CACpCmB,EAAQhK,KAAM4C,EACd,OAGG2Y,IACJ3O,EAAU6O,EACV3P,IAAekP,GAKZC,KAEErY,GAAQ+T,GAAW/T,IACxB0Y,IAIIzL,GACJ+G,EAAU5W,KAAM4C,IAOnB,GADA0Y,GAAgBtW,EACXiW,GAASjW,IAAMsW,EAAe,CAClCpW,EAAI,CACJ,OAASyR,EAAUoE,EAAY7V,KAC9ByR,EAASC,EAAWyE,EAAYza,EAASiI,EAG1C,IAAKgH,EAAO,CAEX,GAAKyL,EAAe,EACnB,MAAQtW,IACA4R,EAAU5R,IAAMqW,EAAWrW,KACjCqW,EAAWrW,GAAKwI,EAAIzJ,KAAMiG,GAM7BqR,GAAa5B,GAAU4B,GAIxBrb,EAAK2E,MAAOqF,EAASqR,GAGhBE,IAAc1L,GAAQwL,EAAWtY,OAAS,GAC5CuY,EAAeP,EAAYhY,OAAW,GAExC6M,GAAO2E,WAAYvK,GAUrB,MALKuR,KACJ3O,EAAU6O,EACVtP,EAAmBqP,GAGb5E,EAGT,OAAOqE,GACN/J,GAAciK,GACdA,EAGFjP,EAAU0D,GAAO1D,QAAU,SAAUvL,EAAU+a,GAC9C,GAAI1W,GACH+V,KACAD,KACA9B,EAAShM,EAAerM,EAAW,IAEpC,KAAMqY,EAAS,CAER0C,IACLA,EAAQrL,GAAU1P,IAEnBqE,EAAI0W,EAAM3Y,MACV,OAAQiC,IACPgU,EAASuB,GAAmBmB,EAAM1W,IAC7BgU,EAAQ/S,GACZ8U,EAAY/a,KAAMgZ,GAElB8B,EAAgB9a,KAAMgZ,EAKxBA,GAAShM,EAAerM,EAAUka,GAA0BC,EAAiBC,IAE9E,MAAO/B,GAGR,SAASoB,IAAkBzZ,EAAUgb,EAAU3R,GAC9C,GAAIhF,GAAI,EACPC,EAAM0W,EAAS5Y,MAChB,MAAYkC,EAAJD,EAASA,IAChB4K,GAAQjP,EAAUgb,EAAS3W,GAAIgF,EAEhC,OAAOA,GAGR,QAAS6G,IAAQlQ,EAAUC,EAASoJ,EAAS6F,GAC5C,GAAI7K,GAAG6T,EAAQ+C,EAAO1Z,EAAMe,EAC3BN,EAAQ0N,GAAU1P,EAEnB,KAAMkP,GAEiB,IAAjBlN,EAAMI,OAAe,CAIzB,GADA8V,EAASlW,EAAM,GAAKA,EAAM,GAAGzC,MAAO,GAC/B2Y,EAAO9V,OAAS,GAAkC,QAA5B6Y,EAAQ/C,EAAO,IAAI3W,MAC5CwF,EAAQmL,SAAgC,IAArBjS,EAAQwC,UAAkBkJ,GAC7CP,EAAKgJ,SAAU8D,EAAO,GAAG3W,MAAS,CAGnC,GADAtB,GAAYmL,EAAK9I,KAAS,GAAG2Y,EAAMnP,QAAQ,GAAGrG,QAAQgJ,GAAWC,IAAYzO,QAAkB,IACzFA,EACL,MAAOoJ,EAERrJ,GAAWA,EAAST,MAAO2Y,EAAO5H,QAAQrH,MAAM7G,QAIjDiC,EAAIuJ,EAAwB,aAAEjL,KAAM3C,GAAa,EAAIkY,EAAO9V,MAC5D,OAAQiC,IAAM,CAIb,GAHA4W,EAAQ/C,EAAO7T,GAGV+G,EAAKgJ,SAAW7S,EAAO0Z,EAAM1Z,MACjC,KAED,KAAMe,EAAO8I,EAAK9I,KAAMf,MAEjB2N,EAAO5M,EACZ2Y,EAAMnP,QAAQ,GAAGrG,QAASgJ,GAAWC,IACrClB,EAAS7K,KAAMuV,EAAO,GAAG3W,OAAUtB,EAAQ+C,YAAc/C,IACrD,CAKJ,GAFAiY,EAAOvT,OAAQN,EAAG,GAClBrE,EAAWkP,EAAK9M,QAAUyN,GAAYqI,IAChClY,EAEL,MADAX,GAAK2E,MAAOqF,EAAS6F,GACd7F,CAGR,SAgBL,MAPAkC,GAASvL,EAAUgC,GAClBkN,EACAjP,GACC0L,EACDtC,EACAmE,EAAS7K,KAAM3C,IAETqJ,EAMRtC,EAAQgN,WAAazO,EAAQ4F,MAAM,IAAIxG,KAAM6H,GAAYuD,KAAK,MAAQxK,EAItEyB,EAAQ+M,iBAAmBxH,EAG3BZ,IAIA3E,EAAQoM,aAAe3C,GAAO,SAAU0K,GAEvC,MAAuE,GAAhEA,EAAKnI,wBAAyBvU,EAASiJ,cAAc,UAMvD+I,GAAO,SAAUC,GAEtB,MADAA,GAAIuB,UAAY,mBAC+B,MAAxCvB,EAAIwB,WAAWtC,aAAa,WAEnCgB,GAAW,yBAA0B,SAAU1O,EAAM+C,EAAMsG,GAC1D,MAAMA,GAAN,EACQrJ,EAAK0N,aAAc3K,EAA6B,SAAvBA,EAAKgE,cAA2B,EAAI,KAOjEjC,EAAQoG,YAAeqD,GAAO,SAAUC,GAG7C,MAFAA,GAAIuB,UAAY,WAChBvB,EAAIwB,WAAWrC,aAAc,QAAS,IACY,KAA3Ca,EAAIwB,WAAWtC,aAAc,YAEpCgB,GAAW,QAAS,SAAU1O,EAAM+C,EAAMsG,GACzC,MAAMA,IAAyC,UAAhCrJ,EAAK8G,SAASC,cAA7B,EACQ/G,EAAKkZ,eAOT3K,GAAO,SAAUC,GACtB,MAAuC,OAAhCA,EAAId,aAAa,eAExBgB,GAAW5D,EAAU,SAAU9K,EAAM+C,EAAMsG,GAC1C,GAAIoI,EACJ,OAAMpI,GAAN,GACSoI,EAAMzR,EAAKqQ,iBAAkBtN,KAAW0O,EAAIC,UACnDD,EAAIzK,MACJhH,EAAM+C,MAAW,EAAOA,EAAKgE,cAAgB,OAKjDpK,EAAO0D,KAAO2M,GACdrQ,EAAO4U,KAAOvE,GAAOiF,UACrBtV,EAAO4U,KAAK,KAAO5U,EAAO4U,KAAKpG,QAC/BxO,EAAOwc,OAASnM,GAAO2E,WACvBhV,EAAOuK,KAAO8F,GAAO5D,QACrBzM,EAAOyc,SAAWpM,GAAO3D,MACzB1M,EAAOmN,SAAWkD,GAAOlD,UAGrB7N,EAEJ,IAAIod,KAGJ,SAASC,GAAetW,GACvB,GAAIuW,GAASF,EAAcrW,KAI3B,OAHArG,GAAO+E,KAAMsB,EAAQjD,MAAO1B,OAAwB,SAAUqO,EAAG8M,GAChED,EAAQC,IAAS,IAEXD,EAyBR5c,EAAO8c,UAAY,SAAUzW,GAI5BA,EAA6B,gBAAZA,GACdqW,EAAcrW,IAAasW,EAAetW,GAC5CrG,EAAOgG,UAAYK,EAEpB,IACC0W,GAEAC,EAEAC,EAEAC,EAEAC,EAEAC,EAEAC,KAEAC,GAASjX,EAAQkX,SAEjBC,EAAO,SAAU/U,GAOhB,IANAuU,EAAS3W,EAAQ2W,QAAUvU,EAC3BwU,GAAQ,EACRE,EAAcC,GAAe,EAC7BA,EAAc,EACdF,EAAeG,EAAK7Z,OACpBuZ,GAAS,EACDM,GAAsBH,EAAdC,EAA4BA,IAC3C,GAAKE,EAAMF,GAAc/X,MAAOqD,EAAM,GAAKA,EAAM,OAAU,GAASpC,EAAQoX,YAAc,CACzFT,GAAS,CACT,OAGFD,GAAS,EACJM,IACCC,EACCA,EAAM9Z,QACVga,EAAMF,EAAM5L,SAEFsL,EACXK,KAEAK,EAAKC,YAKRD,GAECE,IAAK,WACJ,GAAKP,EAAO,CAEX,GAAIzG,GAAQyG,EAAK7Z,QACjB,QAAUoa,GAAK3Y,GACdjF,EAAO+E,KAAME,EAAM,SAAU8K,EAAG7E,GAC/B,GAAIvI,GAAO3C,EAAO2C,KAAMuI,EACV,cAATvI,EACE0D,EAAQmW,QAAWkB,EAAKpG,IAAKpM,IAClCmS,EAAK5c,KAAMyK,GAEDA,GAAOA,EAAI1H,QAAmB,WAATb,GAEhCib,EAAK1S,OAGJ7F,WAGC0X,EACJG,EAAeG,EAAK7Z,OAGTwZ,IACXI,EAAcxG,EACd4G,EAAMR,IAGR,MAAO1Z,OAGRyF,OAAQ,WAkBP,MAjBKsU,IACJrd,EAAO+E,KAAMM,UAAW,SAAU0K,EAAG7E,GACpC,GAAI2S,EACJ,QAASA,EAAQ7d,EAAO2K,QAASO,EAAKmS,EAAMQ,IAAY,GACvDR,EAAKtX,OAAQ8X,EAAO,GAEfd,IACUG,GAATW,GACJX,IAEaC,GAATU,GACJV,OAME7Z,MAIRgU,IAAK,SAAUhW,GACd,MAAOA,GAAKtB,EAAO2K,QAASrJ,EAAI+b,GAAS,MAASA,IAAQA,EAAK7Z,SAGhE8U,MAAO,WAGN,MAFA+E,MACAH,EAAe,EACR5Z,MAGRqa,QAAS,WAER,MADAN,GAAOC,EAAQN,EAASzd,EACjB+D,MAGR4U,SAAU,WACT,OAAQmF,GAGTS,KAAM,WAKL,MAJAR,GAAQ/d,EACFyd,GACLU,EAAKC,UAECra,MAGRya,OAAQ,WACP,OAAQT,GAGTU,SAAU,SAAU3c,EAAS4D,GAU5B,OATKoY,GAAWJ,IAASK,IACxBrY,EAAOA,MACPA,GAAS5D,EAAS4D,EAAKtE,MAAQsE,EAAKtE,QAAUsE,GACzC8X,EACJO,EAAM7c,KAAMwE,GAEZuY,EAAMvY,IAGD3B,MAGRka,KAAM,WAEL,MADAE,GAAKM,SAAU1a,KAAM+B,WACd/B,MAGR2Z,MAAO,WACN,QAASA,GAIZ,OAAOS,IAER1d,EAAOgG,QAENgG,SAAU,SAAUiS,GACnB,GAAIC,KAEA,UAAW,OAAQle,EAAO8c,UAAU,eAAgB,aACpD,SAAU,OAAQ9c,EAAO8c,UAAU,eAAgB,aACnD,SAAU,WAAY9c,EAAO8c,UAAU,YAE1CqB,EAAQ,UACRjZ,GACCiZ,MAAO,WACN,MAAOA,IAERC,OAAQ,WAEP,MADAC,GAASlZ,KAAME,WAAYiZ,KAAMjZ,WAC1B/B,MAERib,KAAM,WACL,GAAIC,GAAMnZ,SACV,OAAOrF,GAAOgM,SAAS,SAAUyS,GAChCze,EAAO+E,KAAMmZ,EAAQ,SAAUzY,EAAGiZ,GACjC,GAAIC,GAASD,EAAO,GACnBpd,EAAKtB,EAAOiE,WAAYua,EAAK/Y,KAAS+Y,EAAK/Y,EAE5C4Y,GAAUK,EAAM,IAAK,WACpB,GAAIE,GAAWtd,GAAMA,EAAG8D,MAAO9B,KAAM+B,UAChCuZ,IAAY5e,EAAOiE,WAAY2a,EAAS1Z,SAC5C0Z,EAAS1Z,UACPC,KAAMsZ,EAASI,SACfP,KAAMG,EAASK,QACfC,SAAUN,EAASO,QAErBP,EAAUE,EAAS,QAAUrb,OAAS4B,EAAUuZ,EAASvZ,UAAY5B,KAAMhC,GAAOsd,GAAavZ,eAIlGmZ,EAAM,OACJtZ,WAIJA,QAAS,SAAUuC,GAClB,MAAc,OAAPA,EAAczH,EAAOgG,OAAQyB,EAAKvC,GAAYA,IAGvDmZ,IAwCD,OArCAnZ,GAAQ+Z,KAAO/Z,EAAQqZ,KAGvBve,EAAO+E,KAAMmZ,EAAQ,SAAUzY,EAAGiZ,GACjC,GAAIrB,GAAOqB,EAAO,GACjBQ,EAAcR,EAAO,EAGtBxZ,GAASwZ,EAAM,IAAOrB,EAAKO,IAGtBsB,GACJ7B,EAAKO,IAAI,WAERO,EAAQe,GAGNhB,EAAY,EAAJzY,GAAS,GAAIkY,QAASO,EAAQ,GAAK,GAAIJ,MAInDO,EAAUK,EAAM,IAAO,WAEtB,MADAL,GAAUK,EAAM,GAAK,QAAUpb,OAAS+a,EAAWnZ,EAAU5B,KAAM+B,WAC5D/B,MAER+a,EAAUK,EAAM,GAAK,QAAWrB,EAAKW,WAItC9Y,EAAQA,QAASmZ,GAGZJ,GACJA,EAAKzZ,KAAM6Z,EAAUA,GAIfA,GAIRc,KAAM,SAAUC,GACf,GAAI3Z,GAAI,EACP4Z,EAAgB3e,EAAW8D,KAAMa,WACjC7B,EAAS6b,EAAc7b,OAGvB8b,EAAuB,IAAX9b,GAAkB4b,GAAepf,EAAOiE,WAAYmb,EAAYla,SAAc1B,EAAS,EAGnG6a,EAAyB,IAAdiB,EAAkBF,EAAcpf,EAAOgM,WAGlDuT,EAAa,SAAU9Z,EAAG2W,EAAUoD,GACnC,MAAO,UAAUnV,GAChB+R,EAAU3W,GAAMnC,KAChBkc,EAAQ/Z,GAAMJ,UAAU7B,OAAS,EAAI9C,EAAW8D,KAAMa,WAAcgF,EAChEmV,IAAWC,EACdpB,EAASqB,WAAYtD,EAAUoD,KACfF,GAChBjB,EAAS/W,YAAa8U,EAAUoD,KAKnCC,EAAgBE,EAAkBC,CAGnC,IAAKpc,EAAS,EAIb,IAHAic,EAAqB/X,MAAOlE,GAC5Bmc,EAAuBjY,MAAOlE,GAC9Boc,EAAsBlY,MAAOlE,GACjBA,EAAJiC,EAAYA,IACd4Z,EAAe5Z,IAAOzF,EAAOiE,WAAYob,EAAe5Z,GAAIP,SAChEma,EAAe5Z,GAAIP,UACjBC,KAAMoa,EAAY9Z,EAAGma,EAAiBP,IACtCf,KAAMD,EAASS,QACfC,SAAUQ,EAAY9Z,EAAGka,EAAkBF,MAE3CH,CAUL,OAJMA,IACLjB,EAAS/W,YAAasY,EAAiBP,GAGjChB,EAASnZ,aAGlBlF,EAAOmI,QAAU,SAAWA,GAE3B,GAAI9F,GAAKuL,EAAGgG,EAAOtC,EAAQuO,EAAUC,EAAKC,EAAWC,EAAava,EACjEoM,EAAMjS,EAASiJ,cAAc,MAS9B,IANAgJ,EAAIb,aAAc,YAAa,KAC/Ba,EAAIuB,UAAY,qEAGhB/Q,EAAMwP,EAAIhI,qBAAqB,SAC/B+D,EAAIiE,EAAIhI,qBAAqB,KAAM,IAC7B+D,IAAMA,EAAE7B,QAAU1J,EAAImB,OAC3B,MAAO2E,EAIRmJ,GAAS1R,EAASiJ,cAAc,UAChCiX,EAAMxO,EAAO4B,YAAatT,EAASiJ,cAAc,WACjD+K,EAAQ/B,EAAIhI,qBAAqB,SAAU,GAE3C+D,EAAE7B,MAAMkU,QAAU,gCAGlB9X,EAAQ+X,gBAAoC,MAAlBrO,EAAIoB,UAG9B9K,EAAQgY,kBAAgD,IAA5BtO,EAAIwB,WAAWxP,SAI3CsE,EAAQiY,OAASvO,EAAIhI,qBAAqB,SAASrG,OAInD2E,EAAQkY,gBAAkBxO,EAAIhI,qBAAqB,QAAQrG,OAI3D2E,EAAQ4D,MAAQ,MAAMhI,KAAM6J,EAAEmD,aAAa,UAI3C5I,EAAQmY,eAA4C,OAA3B1S,EAAEmD,aAAa,QAKxC5I,EAAQoY,QAAU,OAAOxc,KAAM6J,EAAE7B,MAAMwU,SAIvCpY,EAAQqY,WAAa5S,EAAE7B,MAAMyU,SAG7BrY,EAAQsY,UAAY7M,EAAMvJ,MAI1BlC,EAAQuY,YAAcZ,EAAI1H,SAG1BjQ,EAAQwY,UAAY/gB,EAASiJ,cAAc,QAAQ8X,QAInDxY,EAAQyY,WAA2E,kBAA9DhhB,EAASiJ,cAAc,OAAOgY,WAAW,GAAOC,UAGrE3Y,EAAQ4Y,wBAAyB,EACjC5Y,EAAQ6Y,kBAAmB,EAC3B7Y,EAAQ8Y,eAAgB,EACxB9Y,EAAQ+Y,eAAgB,EACxB/Y,EAAQgZ,cAAe,EACvBhZ,EAAQiZ,qBAAsB,EAC9BjZ,EAAQkZ,mBAAoB,EAG5BzN,EAAMuE,SAAU,EAChBhQ,EAAQmZ,eAAiB1N,EAAMiN,WAAW,GAAO1I,QAIjD7G,EAAO4G,UAAW,EAClB/P,EAAQoZ,aAAezB,EAAI5H,QAG3B,WACQrG,GAAI9N,KACV,MAAOmE,GACRC,EAAQ+Y,eAAgB,EAIzBtN,EAAQhU,EAASiJ,cAAc,SAC/B+K,EAAM5C,aAAc,QAAS,IAC7B7I,EAAQyL,MAA0C,KAAlCA,EAAM7C,aAAc,SAGpC6C,EAAMvJ,MAAQ,IACduJ,EAAM5C,aAAc,OAAQ,SAC5B7I,EAAQqZ,WAA6B,MAAhB5N,EAAMvJ,MAG3BuJ,EAAM5C,aAAc,UAAW,KAC/B4C,EAAM5C,aAAc,OAAQ,KAE5B6O,EAAWjgB,EAAS6hB,yBACpB5B,EAAS3M,YAAaU,GAItBzL,EAAQuZ,cAAgB9N,EAAMuE,QAG9BhQ,EAAQwZ,WAAa9B,EAASgB,WAAW,GAAOA,WAAW,GAAO/J,UAAUqB,QAKvEtG,EAAI5F,cACR4F,EAAI5F,YAAa,UAAW,WAC3B9D,EAAQgZ,cAAe,IAGxBtP,EAAIgP,WAAW,GAAOe,QAKvB,KAAMnc,KAAOyT,QAAQ,EAAM2I,QAAQ,EAAMC,SAAS,GACjDjQ,EAAIb,aAAc+O,EAAY,KAAOta,EAAG,KAExC0C,EAAS1C,EAAI,WAAcsa,IAAazgB,IAAUuS,EAAItD,WAAYwR,GAAYrZ,WAAY,CAG3FmL,GAAI9F,MAAMgW,eAAiB,cAC3BlQ,EAAIgP,WAAW,GAAO9U,MAAMgW,eAAiB,GAC7C5Z,EAAQ6Z,gBAA+C,gBAA7BnQ,EAAI9F,MAAMgW,cAIpC,KAAMtc,IAAKzF,GAAQmI,GAClB,KAoGD,OAlGAA,GAAQC,QAAgB,MAAN3C,EAGlBzF,EAAO,WACN,GAAIiiB,GAAWC,EAAWC,EACzBC,EAAW,+HACXhb,EAAOxH,EAASiK,qBAAqB,QAAQ,EAExCzC,KAKN6a,EAAYriB,EAASiJ,cAAc,OACnCoZ,EAAUlW,MAAMkU,QAAU,gFAE1B7Y,EAAK8L,YAAa+O,GAAY/O,YAAarB,GAS3CA,EAAIuB,UAAY,8CAChB+O,EAAMtQ,EAAIhI,qBAAqB,MAC/BsY,EAAK,GAAIpW,MAAMkU,QAAU,2CACzBD,EAA0C,IAA1BmC,EAAK,GAAIE,aAEzBF,EAAK,GAAIpW,MAAMuW,QAAU,GACzBH,EAAK,GAAIpW,MAAMuW,QAAU,OAIzBna,EAAQoa,sBAAwBvC,GAA2C,IAA1BmC,EAAK,GAAIE,aAG1DxQ,EAAIuB,UAAY,GAChBvB,EAAI9F,MAAMkU,QAAU,wKAIpBjgB,EAAO6L,KAAMzE,EAAyB,MAAnBA,EAAK2E,MAAMyW,MAAiBA,KAAM,MAAU,WAC9Dra,EAAQsa,UAAgC,IAApB5Q,EAAI6Q,cAIpBpjB,EAAOqjB,mBACXxa,EAAQ8Y,cAAuE,QAArD3hB,EAAOqjB,iBAAkB9Q,EAAK,WAAe3F,IACvE/D,EAAQkZ,kBAA2F,SAArE/hB,EAAOqjB,iBAAkB9Q,EAAK,QAAY+Q,MAAO,QAAUA,MAMzFV,EAAYrQ,EAAIqB,YAAatT,EAASiJ,cAAc,QACpDqZ,EAAUnW,MAAMkU,QAAUpO,EAAI9F,MAAMkU,QAAUmC,EAC9CF,EAAUnW,MAAM8W,YAAcX,EAAUnW,MAAM6W,MAAQ,IACtD/Q,EAAI9F,MAAM6W,MAAQ,MAElBza,EAAQiZ,qBACNtZ,YAAcxI,EAAOqjB,iBAAkBT,EAAW,WAAeW,oBAGxDhR,GAAI9F,MAAMyW,OAAS9iB,IAK9BmS,EAAIuB,UAAY,GAChBvB,EAAI9F,MAAMkU,QAAUmC,EAAW,8CAC/Bja,EAAQ4Y,uBAA+C,IAApBlP,EAAI6Q,YAIvC7Q,EAAI9F,MAAMuW,QAAU,QACpBzQ,EAAIuB,UAAY,cAChBvB,EAAIwB,WAAWtH,MAAM6W,MAAQ,MAC7Bza,EAAQ6Y,iBAAyC,IAApBnP,EAAI6Q,YAE5Bva,EAAQ4Y,yBAIZ3Z,EAAK2E,MAAMyW,KAAO,IAIpBpb,EAAK0K,YAAamQ,GAGlBA,EAAYpQ,EAAMsQ,EAAMD,EAAY,QAIrC7f,EAAMiP,EAASuO,EAAWC,EAAMlS,EAAIgG,EAAQ,KAErCzL;KAGR,IAAI2a,GAAS,+BACZC,EAAa,UAEd,SAASC,GAAc3f,EAAM+C,EAAMqC,EAAMwa,GACxC,GAAMjjB,EAAOkjB,WAAY7f,GAAzB,CAIA,GAAIwB,GAAKse,EACRC,EAAcpjB,EAAO0G,QAIrB2c,EAAShgB,EAAKQ,SAId2N,EAAQ6R,EAASrjB,EAAOwR,MAAQnO,EAIhCgB,EAAKgf,EAAShgB,EAAM+f,GAAgB/f,EAAM+f,IAAiBA,CAI5D,IAAO/e,GAAOmN,EAAMnN,KAAS4e,GAAQzR,EAAMnN,GAAIoE,OAAUA,IAASlJ,GAA6B,gBAAT6G,GAgEtF,MA5DM/B,KAIJA,EADIgf,EACChgB,EAAM+f,GAAgBhjB,EAAgB6N,OAASjO,EAAOmL,OAEtDiY,GAID5R,EAAOnN,KAGZmN,EAAOnN,GAAOgf,MAAgBC,OAAQtjB,EAAO8J,QAKzB,gBAAT1D,IAAqC,kBAATA,MAClC6c,EACJzR,EAAOnN,GAAOrE,EAAOgG,OAAQwL,EAAOnN,GAAM+B,GAE1CoL,EAAOnN,GAAKoE,KAAOzI,EAAOgG,OAAQwL,EAAOnN,GAAKoE,KAAMrC,IAItD+c,EAAY3R,EAAOnN,GAKb4e,IACCE,EAAU1a,OACf0a,EAAU1a,SAGX0a,EAAYA,EAAU1a,MAGlBA,IAASlJ,IACb4jB,EAAWnjB,EAAOiK,UAAW7D,IAAWqC,GAKpB,gBAATrC,IAGXvB,EAAMse,EAAW/c,GAGL,MAAPvB,IAGJA,EAAMse,EAAWnjB,EAAOiK,UAAW7D,MAGpCvB,EAAMse,EAGAte,GAGR,QAAS0e,GAAoBlgB,EAAM+C,EAAM6c,GACxC,GAAMjjB,EAAOkjB,WAAY7f,GAAzB,CAIA,GAAI8f,GAAW1d,EACd4d,EAAShgB,EAAKQ,SAGd2N,EAAQ6R,EAASrjB,EAAOwR,MAAQnO,EAChCgB,EAAKgf,EAAShgB,EAAMrD,EAAO0G,SAAY1G,EAAO0G,OAI/C,IAAM8K,EAAOnN,GAAb,CAIA,GAAK+B,IAEJ+c,EAAYF,EAAMzR,EAAOnN,GAAOmN,EAAOnN,GAAKoE,MAE3B,CAGVzI,EAAOyG,QAASL,GAsBrBA,EAAOA,EAAK7F,OAAQP,EAAO4F,IAAKQ,EAAMpG,EAAOiK,YAnBxC7D,IAAQ+c,GACZ/c,GAASA,IAITA,EAAOpG,EAAOiK,UAAW7D,GAExBA,EADIA,IAAQ+c,IACH/c,GAEFA,EAAKkG,MAAM,MAarB7G,EAAIW,EAAK5C,MACT,OAAQiC,UACA0d,GAAW/c,EAAKX,GAKxB,IAAKwd,GAAOO,EAAkBL,IAAcnjB,EAAOqI,cAAc8a,GAChE,QAMGF,UACEzR,GAAOnN,GAAKoE,KAIb+a,EAAmBhS,EAAOnN,QAM5Bgf,EACJrjB,EAAOyjB,WAAapgB,IAAQ,GAIjBrD,EAAOmI,QAAQ+Y,eAAiB1P,GAASA,EAAMlS,aAEnDkS,GAAOnN,GAIdmN,EAAOnN,GAAO,QAIhBrE,EAAOgG,QACNwL,SAIAkS,QACCC,QAAU,EACVC,OAAS,EAEThH,OAAU,8CAGXiH,QAAS,SAAUxgB,GAElB,MADAA,GAAOA,EAAKQ,SAAW7D,EAAOwR,MAAOnO,EAAKrD,EAAO0G,UAAarD,EAAMrD,EAAO0G,WAClErD,IAASmgB,EAAmBngB,IAGtCoF,KAAM,SAAUpF,EAAM+C,EAAMqC,GAC3B,MAAOua,GAAc3f,EAAM+C,EAAMqC,IAGlCqb,WAAY,SAAUzgB,EAAM+C,GAC3B,MAAOmd,GAAoBlgB,EAAM+C,IAIlC2d,MAAO,SAAU1gB,EAAM+C,EAAMqC,GAC5B,MAAOua,GAAc3f,EAAM+C,EAAMqC,GAAM,IAGxCub,YAAa,SAAU3gB,EAAM+C,GAC5B,MAAOmd,GAAoBlgB,EAAM+C,GAAM,IAIxC8c,WAAY,SAAU7f,GAErB,GAAKA,EAAKQ,UAA8B,IAAlBR,EAAKQ,UAAoC,IAAlBR,EAAKQ,SACjD,OAAO,CAGR,IAAI6f,GAASrgB,EAAK8G,UAAYnK,EAAO0jB,OAAQrgB,EAAK8G,SAASC,cAG3D,QAAQsZ,GAAUA,KAAW,GAAQrgB,EAAK0N,aAAa,aAAe2S,KAIxE1jB,EAAOsB,GAAG0E,QACTyC,KAAM,SAAUR,EAAKoC,GACpB,GAAI2H,GAAO5L,EACVqC,EAAO,KACPhD,EAAI,EACJpC,EAAOC,KAAK,EAMb,IAAK2E,IAAQ1I,EAAY,CACxB,GAAK+D,KAAKE,SACTiF,EAAOzI,EAAOyI,KAAMpF,GAEG,IAAlBA,EAAKQ,WAAmB7D,EAAO+jB,MAAO1gB,EAAM,gBAAkB,CAElE,IADA2O,EAAQ3O,EAAKkL,WACDyD,EAAMxO,OAAViC,EAAkBA,IACzBW,EAAO4L,EAAMvM,GAAGW,KAEe,IAA1BA,EAAKvF,QAAQ,WACjBuF,EAAOpG,EAAOiK,UAAW7D,EAAKzF,MAAM,IAEpCsjB,EAAU5gB,EAAM+C,EAAMqC,EAAMrC,IAG9BpG,GAAO+jB,MAAO1gB,EAAM,eAAe,GAIrC,MAAOoF,GAIR,MAAoB,gBAARR,GACJ3E,KAAKyB,KAAK,WAChB/E,EAAOyI,KAAMnF,KAAM2E,KAId5C,UAAU7B,OAAS,EAGzBF,KAAKyB,KAAK,WACT/E,EAAOyI,KAAMnF,KAAM2E,EAAKoC,KAKzBhH,EAAO4gB,EAAU5gB,EAAM4E,EAAKjI,EAAOyI,KAAMpF,EAAM4E,IAAU,MAG3D6b,WAAY,SAAU7b,GACrB,MAAO3E,MAAKyB,KAAK,WAChB/E,EAAO8jB,WAAYxgB,KAAM2E,OAK5B,SAASgc,GAAU5gB,EAAM4E,EAAKQ,GAG7B,GAAKA,IAASlJ,GAA+B,IAAlB8D,EAAKQ,SAAiB,CAEhD,GAAIuC,GAAO,QAAU6B,EAAIpB,QAASkc,EAAY,OAAQ3Y,aAItD,IAFA3B,EAAOpF,EAAK0N,aAAc3K,GAEL,gBAATqC,GAAoB,CAC/B,IACCA,EAAgB,SAATA,GAAkB,EACf,UAATA,GAAmB,EACV,SAATA,EAAkB,MAEjBA,EAAO,KAAOA,GAAQA,EACvBqa,EAAO/e,KAAM0E,GAASzI,EAAOiJ,UAAWR,GACvCA,EACD,MAAOP,IAGTlI,EAAOyI,KAAMpF,EAAM4E,EAAKQ,OAGxBA,GAAOlJ,EAIT,MAAOkJ,GAIR,QAAS+a,GAAmB/b,GAC3B,GAAIrB,EACJ,KAAMA,IAAQqB,GAGb,IAAc,SAATrB,IAAmBpG,EAAOqI,cAAeZ,EAAIrB,MAGpC,WAATA,EACJ,OAAO,CAIT,QAAO,EAERpG,EAAOgG,QACNke,MAAO,SAAU7gB,EAAMV,EAAM8F,GAC5B,GAAIyb,EAEJ,OAAK7gB,IACJV,GAASA,GAAQ,MAAS,QAC1BuhB,EAAQlkB,EAAO+jB,MAAO1gB,EAAMV,GAGvB8F,KACEyb,GAASlkB,EAAOyG,QAAQgC,GAC7Byb,EAAQlkB,EAAO+jB,MAAO1gB,EAAMV,EAAM3C,EAAOsE,UAAUmE,IAEnDyb,EAAMzjB,KAAMgI,IAGPyb,OAZR,GAgBDC,QAAS,SAAU9gB,EAAMV,GACxBA,EAAOA,GAAQ,IAEf,IAAIuhB,GAAQlkB,EAAOkkB,MAAO7gB,EAAMV,GAC/ByhB,EAAcF,EAAM1gB,OACpBlC,EAAK4iB,EAAMxS,QACX2S,EAAQrkB,EAAOskB,YAAajhB,EAAMV,GAClC4hB,EAAO,WACNvkB,EAAOmkB,QAAS9gB,EAAMV,GAIZ,gBAAPrB,IACJA,EAAK4iB,EAAMxS,QACX0S,KAGI9iB,IAIU,OAATqB,GACJuhB,EAAMvP,QAAS,oBAIT0P,GAAMG,KACbljB,EAAGkD,KAAMnB,EAAMkhB,EAAMF,KAGhBD,GAAeC,GACpBA,EAAM/L,MAAMkF,QAKd8G,YAAa,SAAUjhB,EAAMV,GAC5B,GAAIsF,GAAMtF,EAAO,YACjB,OAAO3C,GAAO+jB,MAAO1gB,EAAM4E,IAASjI,EAAO+jB,MAAO1gB,EAAM4E,GACvDqQ,MAAOtY,EAAO8c,UAAU,eAAec,IAAI,WAC1C5d,EAAOgkB,YAAa3gB,EAAMV,EAAO,SACjC3C,EAAOgkB,YAAa3gB,EAAM4E,UAM9BjI,EAAOsB,GAAG0E,QACTke,MAAO,SAAUvhB,EAAM8F,GACtB,GAAIgc,GAAS,CAQb,OANqB,gBAAT9hB,KACX8F,EAAO9F,EACPA,EAAO,KACP8hB,KAGuBA,EAAnBpf,UAAU7B,OACPxD,EAAOkkB,MAAO5gB,KAAK,GAAIX,GAGxB8F,IAASlJ,EACf+D,KACAA,KAAKyB,KAAK,WACT,GAAImf,GAAQlkB,EAAOkkB,MAAO5gB,KAAMX,EAAM8F,EAGtCzI,GAAOskB,YAAahhB,KAAMX,GAEZ,OAATA,GAA8B,eAAbuhB,EAAM,IAC3BlkB,EAAOmkB,QAAS7gB,KAAMX,MAI1BwhB,QAAS,SAAUxhB,GAClB,MAAOW,MAAKyB,KAAK,WAChB/E,EAAOmkB,QAAS7gB,KAAMX,MAKxB+hB,MAAO,SAAUC,EAAMhiB,GAItB,MAHAgiB,GAAO3kB,EAAO4kB,GAAK5kB,EAAO4kB,GAAGC,OAAQF,IAAUA,EAAOA,EACtDhiB,EAAOA,GAAQ,KAERW,KAAK4gB,MAAOvhB,EAAM,SAAU4hB,EAAMF,GACxC,GAAIS,GAAUzd,WAAYkd,EAAMI,EAChCN,GAAMG,KAAO,WACZO,aAAcD,OAIjBE,WAAY,SAAUriB,GACrB,MAAOW,MAAK4gB,MAAOvhB,GAAQ,UAI5BuC,QAAS,SAAUvC,EAAM8E,GACxB,GAAI8B,GACH0b,EAAQ,EACRC,EAAQllB,EAAOgM,WACf6I,EAAWvR,KACXmC,EAAInC,KAAKE,OACTqb,EAAU,aACCoG,GACTC,EAAM5d,YAAauN,GAAYA,IAIb,iBAATlS,KACX8E,EAAM9E,EACNA,EAAOpD,GAERoD,EAAOA,GAAQ,IAEf,OAAO8C,IACN8D,EAAMvJ,EAAO+jB,MAAOlP,EAAUpP,GAAK9C,EAAO,cACrC4G,GAAOA,EAAI+O,QACf2M,IACA1b,EAAI+O,MAAMsF,IAAKiB,GAIjB,OADAA,KACOqG,EAAMhgB,QAASuC,KAGxB,IAAI0d,GAAUC,EACbC,EAAS,cACTC,EAAU,MACVC,EAAa,6CACbC,EAAa,gBACbC,EAAc,0BACdvF,EAAkBlgB,EAAOmI,QAAQ+X,gBACjCwF,EAAc1lB,EAAOmI,QAAQyL,KAE9B5T,GAAOsB,GAAG0E,QACT9B,KAAM,SAAUkC,EAAMiE,GACrB,MAAOrK,GAAOqL,OAAQ/H,KAAMtD,EAAOkE,KAAMkC,EAAMiE,EAAOhF,UAAU7B,OAAS,IAG1EmiB,WAAY,SAAUvf,GACrB,MAAO9C,MAAKyB,KAAK,WAChB/E,EAAO2lB,WAAYriB,KAAM8C,MAI3Bwf,KAAM,SAAUxf,EAAMiE,GACrB,MAAOrK,GAAOqL,OAAQ/H,KAAMtD,EAAO4lB,KAAMxf,EAAMiE,EAAOhF,UAAU7B,OAAS,IAG1EqiB,WAAY,SAAUzf,GAErB,MADAA,GAAOpG,EAAO8lB,QAAS1f,IAAUA,EAC1B9C,KAAKyB,KAAK,WAEhB,IACCzB,KAAM8C,GAAS7G,QACR+D,MAAM8C,GACZ,MAAO8B,QAIX6d,SAAU,SAAU1b,GACnB,GAAI2b,GAAS3iB,EAAM+O,EAAK6T,EAAOtgB,EAC9BF,EAAI,EACJC,EAAMpC,KAAKE,OACX0iB,EAA2B,gBAAV7b,IAAsBA,CAExC,IAAKrK,EAAOiE,WAAYoG,GACvB,MAAO/G,MAAKyB,KAAK,SAAUY,GAC1B3F,EAAQsD,MAAOyiB,SAAU1b,EAAM7F,KAAMlB,KAAMqC,EAAGrC,KAAK2P,aAIrD,IAAKiT,EAIJ,IAFAF,GAAY3b,GAAS,IAAKjH,MAAO1B,OAErBgE,EAAJD,EAASA,IAOhB,GANApC,EAAOC,KAAMmC,GACb2M,EAAwB,IAAlB/O,EAAKQ,WAAoBR,EAAK4P,WACjC,IAAM5P,EAAK4P,UAAY,KAAMpM,QAASwe,EAAQ,KAChD,KAGU,CACV1f,EAAI,CACJ,OAASsgB,EAAQD,EAAQrgB,KACgB,EAAnCyM,EAAIvR,QAAS,IAAMolB,EAAQ,OAC/B7T,GAAO6T,EAAQ,IAGjB5iB,GAAK4P,UAAYjT,EAAOmB,KAAMiR,GAMjC,MAAO9O,OAGR6iB,YAAa,SAAU9b,GACtB,GAAI2b,GAAS3iB,EAAM+O,EAAK6T,EAAOtgB,EAC9BF,EAAI,EACJC,EAAMpC,KAAKE,OACX0iB,EAA+B,IAArB7gB,UAAU7B,QAAiC,gBAAV6G,IAAsBA,CAElE,IAAKrK,EAAOiE,WAAYoG,GACvB,MAAO/G,MAAKyB,KAAK,SAAUY,GAC1B3F,EAAQsD,MAAO6iB,YAAa9b,EAAM7F,KAAMlB,KAAMqC,EAAGrC,KAAK2P,aAGxD,IAAKiT,EAGJ,IAFAF,GAAY3b,GAAS,IAAKjH,MAAO1B,OAErBgE,EAAJD,EAASA,IAQhB,GAPApC,EAAOC,KAAMmC,GAEb2M,EAAwB,IAAlB/O,EAAKQ,WAAoBR,EAAK4P,WACjC,IAAM5P,EAAK4P,UAAY,KAAMpM,QAASwe,EAAQ,KAChD,IAGU,CACV1f,EAAI,CACJ,OAASsgB,EAAQD,EAAQrgB,KAExB,MAAQyM,EAAIvR,QAAS,IAAMolB,EAAQ,MAAS,EAC3C7T,EAAMA,EAAIvL,QAAS,IAAMof,EAAQ,IAAK,IAGxC5iB,GAAK4P,UAAY5I,EAAQrK,EAAOmB,KAAMiR,GAAQ,GAKjD,MAAO9O,OAGR8iB,YAAa,SAAU/b,EAAOgc,GAC7B,GAAI1jB,SAAc0H,EAElB,OAAyB,iBAAbgc,IAAmC,WAAT1jB,EAC9B0jB,EAAW/iB,KAAKyiB,SAAU1b,GAAU/G,KAAK6iB,YAAa9b,GAGzDrK,EAAOiE,WAAYoG,GAChB/G,KAAKyB,KAAK,SAAUU,GAC1BzF,EAAQsD,MAAO8iB,YAAa/b,EAAM7F,KAAKlB,KAAMmC,EAAGnC,KAAK2P,UAAWoT,GAAWA,KAItE/iB,KAAKyB,KAAK,WAChB,GAAc,WAATpC,EAAoB,CAExB,GAAIsQ,GACHxN,EAAI,EACJiY,EAAO1d,EAAQsD,MACfgjB,EAAajc,EAAMjH,MAAO1B,MAE3B,OAASuR,EAAYqT,EAAY7gB,KAE3BiY,EAAK6I,SAAUtT,GACnByK,EAAKyI,YAAalT,GAElByK,EAAKqI,SAAU9S,QAKNtQ,IAASjD,GAA8B,YAATiD,KACpCW,KAAK2P,WAETjT,EAAO+jB,MAAOzgB,KAAM,gBAAiBA,KAAK2P,WAO3C3P,KAAK2P,UAAY3P,KAAK2P,WAAa5I,KAAU,EAAQ,GAAKrK,EAAO+jB,MAAOzgB,KAAM,kBAAqB,OAKtGijB,SAAU,SAAUnlB,GACnB,GAAI6R,GAAY,IAAM7R,EAAW,IAChCqE,EAAI,EACJqF,EAAIxH,KAAKE,MACV,MAAYsH,EAAJrF,EAAOA,IACd,GAA0B,IAArBnC,KAAKmC,GAAG5B,WAAmB,IAAMP,KAAKmC,GAAGwN,UAAY,KAAKpM,QAAQwe,EAAQ,KAAKxkB,QAASoS,IAAe,EAC3G,OAAO,CAIT,QAAO,GAGR6B,IAAK,SAAUzK,GACd,GAAIxF,GAAKwf,EAAOpgB,EACfZ,EAAOC,KAAK,EAEb,EAAA,GAAM+B,UAAU7B,OAsBhB,MAFAS,GAAajE,EAAOiE,WAAYoG,GAEzB/G,KAAKyB,KAAK,SAAUU,GAC1B,GAAIqP,EAEmB,KAAlBxR,KAAKO,WAKTiR,EADI7Q,EACEoG,EAAM7F,KAAMlB,KAAMmC,EAAGzF,EAAQsD,MAAOwR,OAEpCzK,EAIK,MAAPyK,EACJA,EAAM,GACoB,gBAARA,GAClBA,GAAO,GACI9U,EAAOyG,QAASqO,KAC3BA,EAAM9U,EAAO4F,IAAIkP,EAAK,SAAWzK,GAChC,MAAgB,OAATA,EAAgB,GAAKA,EAAQ,MAItCga,EAAQrkB,EAAOwmB,SAAUljB,KAAKX,OAAU3C,EAAOwmB,SAAUljB,KAAK6G,SAASC,eAGjEia,GAAW,OAASA,IAAUA,EAAMoC,IAAKnjB,KAAMwR,EAAK,WAAcvV,IACvE+D,KAAK+G,MAAQyK,KAjDd,IAAKzR,EAGJ,MAFAghB,GAAQrkB,EAAOwmB,SAAUnjB,EAAKV,OAAU3C,EAAOwmB,SAAUnjB,EAAK8G,SAASC,eAElEia,GAAS,OAASA,KAAUxf,EAAMwf,EAAM5f,IAAKpB,EAAM,YAAe9D,EAC/DsF,GAGRA,EAAMxB,EAAKgH,MAEW,gBAARxF,GAEbA,EAAIgC,QAAQye,EAAS,IAEd,MAAPzgB,EAAc,GAAKA,OA0CxB7E,EAAOgG,QACNwgB,UACCE,QACCjiB,IAAK,SAAUpB,GAEd,GAAIyR,GAAM9U,EAAO0D,KAAKQ,KAAMb,EAAM,QAClC,OAAc,OAAPyR,EACNA,EACAzR,EAAKkH,OAGR+G,QACC7M,IAAK,SAAUpB,GACd,GAAIgH,GAAOqc,EACVrgB,EAAUhD,EAAKgD,QACfwX,EAAQxa,EAAKgV,cACbsO,EAAoB,eAAdtjB,EAAKV,MAAiC,EAARkb,EACpC2B,EAASmH,EAAM,QACf/b,EAAM+b,EAAM9I,EAAQ,EAAIxX,EAAQ7C,OAChCiC,EAAY,EAARoY,EACHjT,EACA+b,EAAM9I,EAAQ,CAGhB,MAAYjT,EAAJnF,EAASA,IAIhB,GAHAihB,EAASrgB,EAASZ,MAGXihB,EAAOtO,UAAY3S,IAAMoY,IAE5B7d,EAAOmI,QAAQoZ,YAAemF,EAAOxO,SAA+C,OAApCwO,EAAO3V,aAAa,cACnE2V,EAAOtiB,WAAW8T,UAAalY,EAAOmK,SAAUuc,EAAOtiB,WAAY,aAAiB,CAMxF,GAHAiG,EAAQrK,EAAQ0mB,GAAS5R,MAGpB6R,EACJ,MAAOtc,EAIRmV,GAAO/e,KAAM4J,GAIf,MAAOmV,IAGRiH,IAAK,SAAUpjB,EAAMgH,GACpB,GAAIuc,GAAWF,EACdrgB,EAAUhD,EAAKgD,QACfmZ,EAASxf,EAAOsE,UAAW+F,GAC3B5E,EAAIY,EAAQ7C,MAEb,OAAQiC,IACPihB,EAASrgB,EAASZ,IACZihB,EAAOtO,SAAWpY,EAAO2K,QAAS3K,EAAO0mB,GAAQ5R,MAAO0K,IAAY,KACzEoH,GAAY,EAQd,OAHMA,KACLvjB,EAAKgV,cAAgB,IAEfmH,KAKVtb,KAAM,SAAUb,EAAM+C,EAAMiE,GAC3B,GAAIga,GAAOxf,EACVgiB,EAAQxjB,EAAKQ,QAGd,IAAMR,GAAkB,IAAVwjB,GAAyB,IAAVA,GAAyB,IAAVA,EAK5C,aAAYxjB,GAAK0N,eAAiBrR,EAC1BM,EAAO4lB,KAAMviB,EAAM+C,EAAMiE,IAKlB,IAAVwc,GAAgB7mB,EAAOyc,SAAUpZ,KACrC+C,EAAOA,EAAKgE,cACZia,EAAQrkB,EAAO8mB,UAAW1gB,KACvBpG,EAAO4U,KAAKxR,MAAMmM,KAAKxL,KAAMqC,GAASgf,EAAWD,IAGhD9a,IAAU9K,EAaH8kB,GAAS,OAASA,IAA6C,QAAnCxf,EAAMwf,EAAM5f,IAAKpB,EAAM+C,IACvDvB,GAGPA,EAAM7E,EAAO0D,KAAKQ,KAAMb,EAAM+C,GAGhB,MAAPvB,EACNtF,EACAsF,GApBc,OAAVwF,EAGOga,GAAS,OAASA,KAAUxf,EAAMwf,EAAMoC,IAAKpjB,EAAMgH,EAAOjE,MAAY7G,EAC1EsF,GAGPxB,EAAK2N,aAAc5K,EAAMiE,EAAQ,IAC1BA,IAPPrK,EAAO2lB,WAAYtiB,EAAM+C,GAAzBpG,KAuBH2lB,WAAY,SAAUtiB,EAAMgH,GAC3B,GAAIjE,GAAM2gB,EACTthB,EAAI,EACJuhB,EAAY3c,GAASA,EAAMjH,MAAO1B,EAEnC,IAAKslB,GAA+B,IAAlB3jB,EAAKQ,SACtB,MAASuC,EAAO4gB,EAAUvhB,KACzBshB,EAAW/mB,EAAO8lB,QAAS1f,IAAUA,EAGhCpG,EAAO4U,KAAKxR,MAAMmM,KAAKxL,KAAMqC,GAE5Bsf,GAAexF,IAAoBuF,EAAY1hB,KAAMqC,GACzD/C,EAAM0jB,IAAa,EAInB1jB,EAAMrD,EAAOiK,UAAW,WAAa7D,IACpC/C,EAAM0jB,IAAa,EAKrB/mB,EAAOkE,KAAMb,EAAM+C,EAAM,IAG1B/C,EAAKgO,gBAAiB6O,EAAkB9Z,EAAO2gB,IAKlDD,WACCnkB,MACC8jB,IAAK,SAAUpjB,EAAMgH,GACpB,IAAMrK,EAAOmI,QAAQqZ,YAAwB,UAAVnX,GAAqBrK,EAAOmK,SAAS9G,EAAM,SAAW,CAGxF,GAAIyR,GAAMzR,EAAKgH,KAKf,OAJAhH,GAAK2N,aAAc,OAAQ3G,GACtByK,IACJzR,EAAKgH,MAAQyK,GAEPzK,MAMXyb,SACCmB,MAAO,UACPC,QAAS,aAGVtB,KAAM,SAAUviB,EAAM+C,EAAMiE,GAC3B,GAAIxF,GAAKwf,EAAO8C,EACfN,EAAQxjB,EAAKQ,QAGd,IAAMR,GAAkB,IAAVwjB,GAAyB,IAAVA,GAAyB,IAAVA,EAY5C,MARAM,GAAmB,IAAVN,IAAgB7mB,EAAOyc,SAAUpZ,GAErC8jB,IAEJ/gB,EAAOpG,EAAO8lB,QAAS1f,IAAUA,EACjCie,EAAQrkB,EAAOonB,UAAWhhB,IAGtBiE,IAAU9K,EACP8kB,GAAS,OAASA,KAAUxf,EAAMwf,EAAMoC,IAAKpjB,EAAMgH,EAAOjE,MAAY7G,EAC5EsF,EACExB,EAAM+C,GAASiE,EAGXga,GAAS,OAASA,IAA6C,QAAnCxf,EAAMwf,EAAM5f,IAAKpB,EAAM+C,IACzDvB,EACAxB,EAAM+C,IAITghB,WACCpP,UACCvT,IAAK,SAAUpB,GAId,GAAIgkB,GAAWrnB,EAAO0D,KAAKQ,KAAMb,EAAM,WAEvC,OAAOgkB,GACNC,SAAUD,EAAU,IACpB9B,EAAWxhB,KAAMV,EAAK8G,WAAcqb,EAAWzhB,KAAMV,EAAK8G,WAAc9G,EAAK0U,KAC5E,EACA,QAONqN,GACCqB,IAAK,SAAUpjB,EAAMgH,EAAOjE,GAa3B,MAZKiE,MAAU,EAEdrK,EAAO2lB,WAAYtiB,EAAM+C,GACdsf,GAAexF,IAAoBuF,EAAY1hB,KAAMqC,GAEhE/C,EAAK2N,cAAekP,GAAmBlgB,EAAO8lB,QAAS1f,IAAUA,EAAMA,GAIvE/C,EAAMrD,EAAOiK,UAAW,WAAa7D,IAAW/C,EAAM+C,IAAS,EAGzDA,IAGTpG,EAAO+E,KAAM/E,EAAO4U,KAAKxR,MAAMmM,KAAK9N,OAAO2B,MAAO,QAAU,SAAUqC,EAAGW,GACxE,GAAImhB,GAASvnB,EAAO4U,KAAK1C,WAAY9L,IAAUpG,EAAO0D,KAAKQ,IAE3DlE,GAAO4U,KAAK1C,WAAY9L,GAASsf,GAAexF,IAAoBuF,EAAY1hB,KAAMqC,GACrF,SAAU/C,EAAM+C,EAAMsG,GACrB,GAAIpL,GAAKtB,EAAO4U,KAAK1C,WAAY9L,GAChCvB,EAAM6H,EACLnN,GAECS,EAAO4U,KAAK1C,WAAY9L,GAAS7G,IACjCgoB,EAAQlkB,EAAM+C,EAAMsG,GAEpBtG,EAAKgE,cACL,IAEH,OADApK,GAAO4U,KAAK1C,WAAY9L,GAAS9E,EAC1BuD,GAER,SAAUxB,EAAM+C,EAAMsG,GACrB,MAAOA,GACNnN,EACA8D,EAAMrD,EAAOiK,UAAW,WAAa7D,IACpCA,EAAKgE,cACL,QAKCsb,GAAgBxF,IACrBlgB,EAAO8mB,UAAUzc,OAChBoc,IAAK,SAAUpjB,EAAMgH,EAAOjE,GAC3B,MAAKpG,GAAOmK,SAAU9G,EAAM,UAE3BA,EAAKkZ,aAAelS,EAApBhH,GAGO8hB,GAAYA,EAASsB,IAAKpjB,EAAMgH,EAAOjE,MAO5C8Z,IAILiF,GACCsB,IAAK,SAAUpjB,EAAMgH,EAAOjE,GAE3B,GAAIvB,GAAMxB,EAAKqQ,iBAAkBtN,EAUjC,OATMvB,IACLxB,EAAKmkB,iBACH3iB,EAAMxB,EAAKS,cAAc2jB,gBAAiBrhB,IAI7CvB,EAAIwF,MAAQA,GAAS,GAGL,UAATjE,GAAoBiE,IAAUhH,EAAK0N,aAAc3K,GACvDiE,EACA9K,IAGHS,EAAO4U,KAAK1C,WAAW7N,GAAKrE,EAAO4U,KAAK1C,WAAW9L,KAAOpG,EAAO4U,KAAK1C,WAAWwV,OAEhF,SAAUrkB,EAAM+C,EAAMsG,GACrB,GAAI7H,EACJ,OAAO6H,GACNnN,GACCsF,EAAMxB,EAAKqQ,iBAAkBtN,KAAyB,KAAdvB,EAAIwF,MAC5CxF,EAAIwF,MACJ,MAEJrK,EAAOwmB,SAAShO,QACf/T,IAAK,SAAUpB,EAAM+C,GACpB,GAAIvB,GAAMxB,EAAKqQ,iBAAkBtN,EACjC,OAAOvB,IAAOA,EAAIkQ,UACjBlQ,EAAIwF,MACJ9K,GAEFknB,IAAKtB,EAASsB,KAKfzmB,EAAO8mB,UAAUa,iBAChBlB,IAAK,SAAUpjB,EAAMgH,EAAOjE,GAC3B+e,EAASsB,IAAKpjB,EAAgB,KAAVgH,GAAe,EAAQA,EAAOjE,KAMpDpG,EAAO+E,MAAO,QAAS,UAAY,SAAUU,EAAGW,GAC/CpG,EAAO8mB,UAAW1gB,IACjBqgB,IAAK,SAAUpjB,EAAMgH,GACpB,MAAe,KAAVA,GACJhH,EAAK2N,aAAc5K,EAAM,QAClBiE,GAFR,OAYErK,EAAOmI,QAAQmY,gBAEpBtgB,EAAO+E,MAAO,OAAQ,OAAS,SAAUU,EAAGW,GAC3CpG,EAAOonB,UAAWhhB,IACjB3B,IAAK,SAAUpB,GACd,MAAOA,GAAK0N,aAAc3K,EAAM,OAM9BpG,EAAOmI,QAAQ4D,QACpB/L,EAAO8mB,UAAU/a,OAChBtH,IAAK,SAAUpB,GAId,MAAOA,GAAK0I,MAAMkU,SAAW1gB,GAE9BknB,IAAK,SAAUpjB,EAAMgH,GACpB,MAAShH,GAAK0I,MAAMkU,QAAU5V,EAAQ,MAOnCrK,EAAOmI,QAAQuY,cACpB1gB,EAAOonB,UAAUhP,UAChB3T,IAAK,SAAUpB,GACd,GAAI0P,GAAS1P,EAAKe,UAUlB,OARK2O,KACJA,EAAOsF,cAGFtF,EAAO3O,YACX2O,EAAO3O,WAAWiU,eAGb,QAKVrY,EAAO+E,MACN,WACA,WACA,YACA,cACA,cACA,UACA,UACA,SACA,cACA,mBACE,WACF/E,EAAO8lB,QAASxiB,KAAK8G,eAAkB9G,OAIlCtD,EAAOmI,QAAQwY,UACpB3gB,EAAO8lB,QAAQnF,QAAU,YAI1B3gB,EAAO+E,MAAO,QAAS,YAAc,WACpC/E,EAAOwmB,SAAUljB,OAChBmjB,IAAK,SAAUpjB,EAAMgH,GACpB,MAAKrK,GAAOyG,QAAS4D,GACXhH,EAAK8U,QAAUnY,EAAO2K,QAAS3K,EAAOqD,GAAMyR,MAAOzK,IAAW,EADxE,IAKIrK,EAAOmI,QAAQsY,UACpBzgB,EAAOwmB,SAAUljB,MAAOmB,IAAM,SAAUpB,GAGvC,MAAsC,QAA/BA,EAAK0N,aAAa,SAAoB,KAAO1N,EAAKgH,SAI5D,IAAIud,GAAa,+BAChBC,GAAY,OACZC,GAAc,+BACdC,GAAc,kCACdC,GAAiB,sBAElB,SAASC,MACR,OAAO,EAGR,QAASC,MACR,OAAO,EAGR,QAASC,MACR,IACC,MAAOvoB,GAASiY,cACf,MAAQuQ,KAOXpoB,EAAOyC,OAEN4lB,UAEAzK,IAAK,SAAUva,EAAMilB,EAAOrW,EAASxJ,EAAMrH,GAC1C,GAAImI,GAAKgf,EAAQC,EAAGC,EACnBC,EAASC,EAAaC,EACtBC,EAAUlmB,EAAMmmB,EAAYC,EAC5BC,EAAWhpB,EAAO+jB,MAAO1gB,EAG1B,IAAM2lB,EAAN,CAKK/W,EAAQA,UACZwW,EAAcxW,EACdA,EAAUwW,EAAYxW,QACtB7Q,EAAWqnB,EAAYrnB,UAIlB6Q,EAAQ9G,OACb8G,EAAQ9G,KAAOnL,EAAOmL,SAIhBod,EAASS,EAAST,UACxBA,EAASS,EAAST,YAEZI,EAAcK,EAASC,UAC7BN,EAAcK,EAASC,OAAS,SAAU/gB,GAGzC,aAAclI,KAAWN,GAAuBwI,GAAKlI,EAAOyC,MAAMymB,YAAchhB,EAAEvF,KAEjFpD,EADAS,EAAOyC,MAAM0mB,SAAS/jB,MAAOujB,EAAYtlB,KAAMgC,YAIjDsjB,EAAYtlB,KAAOA,GAIpBilB,GAAUA,GAAS,IAAKllB,MAAO1B,KAAqB,IACpD8mB,EAAIF,EAAM9kB,MACV,OAAQglB,IACPjf,EAAMye,GAAevkB,KAAM6kB,EAAME,QACjC7lB,EAAOomB,EAAWxf,EAAI,GACtBuf,GAAevf,EAAI,IAAM,IAAK+C,MAAO,KAAMxG,OAGrCnD,IAKN+lB,EAAU1oB,EAAOyC,MAAMimB,QAAS/lB,OAGhCA,GAASvB,EAAWsnB,EAAQU,aAAeV,EAAQW,WAAc1mB,EAGjE+lB,EAAU1oB,EAAOyC,MAAMimB,QAAS/lB,OAGhCimB,EAAY5oB,EAAOgG,QAClBrD,KAAMA,EACNomB,SAAUA,EACVtgB,KAAMA,EACNwJ,QAASA,EACT9G,KAAM8G,EAAQ9G,KACd/J,SAAUA,EACVoO,aAAcpO,GAAYpB,EAAO4U,KAAKxR,MAAMoM,aAAazL,KAAM3C,GAC/DkoB,UAAWR,EAAW5X,KAAK,MACzBuX,IAGII,EAAWN,EAAQ5lB,MACzBkmB,EAAWN,EAAQ5lB,MACnBkmB,EAASU,cAAgB,EAGnBb,EAAQc,OAASd,EAAQc,MAAMhlB,KAAMnB,EAAMoF,EAAMqgB,EAAYH,MAAkB,IAE/EtlB,EAAKX,iBACTW,EAAKX,iBAAkBC,EAAMgmB,GAAa,GAE/BtlB,EAAK4I,aAChB5I,EAAK4I,YAAa,KAAOtJ,EAAMgmB,KAK7BD,EAAQ9K,MACZ8K,EAAQ9K,IAAIpZ,KAAMnB,EAAMulB,GAElBA,EAAU3W,QAAQ9G,OACvByd,EAAU3W,QAAQ9G,KAAO8G,EAAQ9G,OAK9B/J,EACJynB,EAAS9iB,OAAQ8iB,EAASU,gBAAiB,EAAGX,GAE9CC,EAASpoB,KAAMmoB,GAIhB5oB,EAAOyC,MAAM4lB,OAAQ1lB,IAAS,EAI/BU,GAAO,OAIR0F,OAAQ,SAAU1F,EAAMilB,EAAOrW,EAAS7Q,EAAUqoB,GACjD,GAAI9jB,GAAGijB,EAAWrf,EACjBmgB,EAAWlB,EAAGD,EACdG,EAASG,EAAUlmB,EACnBmmB,EAAYC,EACZC,EAAWhpB,EAAO6jB,QAASxgB,IAAUrD,EAAO+jB,MAAO1gB,EAEpD,IAAM2lB,IAAcT,EAASS,EAAST,QAAtC,CAKAD,GAAUA,GAAS,IAAKllB,MAAO1B,KAAqB,IACpD8mB,EAAIF,EAAM9kB,MACV,OAAQglB,IAMP,GALAjf,EAAMye,GAAevkB,KAAM6kB,EAAME,QACjC7lB,EAAOomB,EAAWxf,EAAI,GACtBuf,GAAevf,EAAI,IAAM,IAAK+C,MAAO,KAAMxG,OAGrCnD,EAAN,CAOA+lB,EAAU1oB,EAAOyC,MAAMimB,QAAS/lB,OAChCA,GAASvB,EAAWsnB,EAAQU,aAAeV,EAAQW,WAAc1mB,EACjEkmB,EAAWN,EAAQ5lB,OACnB4G,EAAMA,EAAI,IAAUkF,OAAQ,UAAYqa,EAAW5X,KAAK,iBAAmB,WAG3EwY,EAAY/jB,EAAIkjB,EAASrlB,MACzB,OAAQmC,IACPijB,EAAYC,EAAUljB,IAEf8jB,GAAeV,IAAaH,EAAUG,UACzC9W,GAAWA,EAAQ9G,OAASyd,EAAUzd,MACtC5B,IAAOA,EAAIxF,KAAM6kB,EAAUU,YAC3BloB,GAAYA,IAAawnB,EAAUxnB,WAAyB,OAAbA,IAAqBwnB,EAAUxnB,YACjFynB,EAAS9iB,OAAQJ,EAAG,GAEfijB,EAAUxnB,UACdynB,EAASU,gBAELb,EAAQ3f,QACZ2f,EAAQ3f,OAAOvE,KAAMnB,EAAMulB,GAOzBc,KAAcb,EAASrlB,SACrBklB,EAAQiB,UAAYjB,EAAQiB,SAASnlB,KAAMnB,EAAMylB,EAAYE,EAASC,WAAa,GACxFjpB,EAAO4pB,YAAavmB,EAAMV,EAAMqmB,EAASC,cAGnCV,GAAQ5lB,QAtCf,KAAMA,IAAQ4lB,GACbvoB,EAAOyC,MAAMsG,OAAQ1F,EAAMV,EAAO2lB,EAAOE,GAAKvW,EAAS7Q,GAAU,EA0C/DpB,GAAOqI,cAAekgB,WACnBS,GAASC,OAIhBjpB,EAAOgkB,YAAa3gB,EAAM,aAI5BkE,QAAS,SAAU9E,EAAOgG,EAAMpF,EAAMwmB,GACrC,GAAIZ,GAAQa,EAAQ1X,EACnB2X,EAAYrB,EAASnf,EAAK9D,EAC1BukB,GAAc3mB,GAAQzD,GACtB+C,EAAO3B,EAAYwD,KAAM/B,EAAO,QAAWA,EAAME,KAAOF,EACxDqmB,EAAa9nB,EAAYwD,KAAM/B,EAAO,aAAgBA,EAAM6mB,UAAUhd,MAAM,OAK7E,IAHA8F,EAAM7I,EAAMlG,EAAOA,GAAQzD,EAGJ,IAAlByD,EAAKQ,UAAoC,IAAlBR,EAAKQ,WAK5BkkB,GAAYhkB,KAAMpB,EAAO3C,EAAOyC,MAAMymB,aAItCvmB,EAAK9B,QAAQ,MAAQ,IAEzBioB,EAAanmB,EAAK2J,MAAM,KACxB3J,EAAOmmB,EAAWpX,QAClBoX,EAAWhjB,QAEZgkB,EAA6B,EAApBnnB,EAAK9B,QAAQ,MAAY,KAAO8B,EAGzCF,EAAQA,EAAOzC,EAAO0G,SACrBjE,EACA,GAAIzC,GAAOiqB,MAAOtnB,EAAuB,gBAAVF,IAAsBA,GAGtDA,EAAMynB,UAAYL,EAAe,EAAI,EACrCpnB,EAAM6mB,UAAYR,EAAW5X,KAAK,KAClCzO,EAAM0nB,aAAe1nB,EAAM6mB,UACtB7a,OAAQ,UAAYqa,EAAW5X,KAAK,iBAAmB,WAC3D,KAGDzO,EAAM4T,OAAS9W,EACTkD,EAAM8D,SACX9D,EAAM8D,OAASlD,GAIhBoF,EAAe,MAARA,GACJhG,GACFzC,EAAOsE,UAAWmE,GAAQhG,IAG3BimB,EAAU1oB,EAAOyC,MAAMimB,QAAS/lB,OAC1BknB,IAAgBnB,EAAQnhB,SAAWmhB,EAAQnhB,QAAQnC,MAAO/B,EAAMoF,MAAW,GAAjF,CAMA,IAAMohB,IAAiBnB,EAAQ0B,WAAapqB,EAAO2H,SAAUtE,GAAS,CAMrE,IAJA0mB,EAAarB,EAAQU,cAAgBzmB,EAC/BolB,GAAYhkB,KAAMgmB,EAAapnB,KACpCyP,EAAMA,EAAIhO,YAEHgO,EAAKA,EAAMA,EAAIhO,WACtB4lB,EAAUvpB,KAAM2R,GAChB7I,EAAM6I,CAIF7I,MAASlG,EAAKS,eAAiBlE,IACnCoqB,EAAUvpB,KAAM8I,EAAIyJ,aAAezJ,EAAI8gB,cAAgB/qB,GAKzDmG,EAAI,CACJ,QAAS2M,EAAM4X,EAAUvkB,QAAUhD,EAAM6nB,uBAExC7nB,EAAME,KAAO8C,EAAI,EAChBskB,EACArB,EAAQW,UAAY1mB,EAGrBsmB,GAAWjpB,EAAO+jB,MAAO3R,EAAK,eAAoB3P,EAAME,OAAU3C,EAAO+jB,MAAO3R,EAAK,UAChF6W,GACJA,EAAO7jB,MAAOgN,EAAK3J,GAIpBwgB,EAASa,GAAU1X,EAAK0X,GACnBb,GAAUjpB,EAAOkjB,WAAY9Q,IAAS6W,EAAO7jB,OAAS6jB,EAAO7jB,MAAOgN,EAAK3J,MAAW,GACxFhG,EAAM8nB,gBAMR,IAHA9nB,EAAME,KAAOA,GAGPknB,IAAiBpnB,EAAM+nB,wBAErB9B,EAAQ+B,UAAY/B,EAAQ+B,SAASrlB,MAAO4kB,EAAU/b,MAAOxF,MAAW,IAC9EzI,EAAOkjB,WAAY7f,IAKdymB,GAAUzmB,EAAMV,KAAW3C,EAAO2H,SAAUtE,GAAS,CAGzDkG,EAAMlG,EAAMymB,GAEPvgB,IACJlG,EAAMymB,GAAW,MAIlB9pB,EAAOyC,MAAMymB,UAAYvmB,CACzB,KACCU,EAAMV,KACL,MAAQuF,IAIVlI,EAAOyC,MAAMymB,UAAY3pB,EAEpBgK,IACJlG,EAAMymB,GAAWvgB,GAMrB,MAAO9G,GAAM4T,SAGd8S,SAAU,SAAU1mB,GAGnBA,EAAQzC,EAAOyC,MAAMioB,IAAKjoB,EAE1B,IAAIgD,GAAGZ,EAAK+jB,EAAW1R,EAASvR,EAC/BglB,KACA1lB,EAAOvE,EAAW8D,KAAMa,WACxBwjB,GAAa7oB,EAAO+jB,MAAOzgB,KAAM,eAAoBb,EAAME,UAC3D+lB,EAAU1oB,EAAOyC,MAAMimB,QAASjmB,EAAME,SAOvC,IAJAsC,EAAK,GAAKxC,EACVA,EAAMmoB,eAAiBtnB,MAGlBolB,EAAQmC,aAAenC,EAAQmC,YAAYrmB,KAAMlB,KAAMb,MAAY,EAAxE,CAKAkoB,EAAe3qB,EAAOyC,MAAMomB,SAASrkB,KAAMlB,KAAMb,EAAOomB,GAGxDpjB,EAAI,CACJ,QAASyR,EAAUyT,EAAcllB,QAAWhD,EAAM6nB,uBAAyB,CAC1E7nB,EAAMqoB,cAAgB5T,EAAQ7T,KAE9BsC,EAAI,CACJ,QAASijB,EAAY1R,EAAQ2R,SAAUljB,QAAWlD,EAAMsoB,kCAIjDtoB,EAAM0nB,cAAgB1nB,EAAM0nB,aAAapmB,KAAM6kB,EAAUU,cAE9D7mB,EAAMmmB,UAAYA,EAClBnmB,EAAMgG,KAAOmgB,EAAUngB,KAEvB5D,IAAS7E,EAAOyC,MAAMimB,QAASE,EAAUG,eAAkBE,QAAUL,EAAU3W,SAC5E7M,MAAO8R,EAAQ7T,KAAM4B,GAEnBJ,IAAQtF,IACNkD,EAAM4T,OAASxR,MAAS,IAC7BpC,EAAM8nB,iBACN9nB,EAAMuoB,oBAYX,MAJKtC,GAAQuC,cACZvC,EAAQuC,aAAazmB,KAAMlB,KAAMb,GAG3BA,EAAM4T,SAGdwS,SAAU,SAAUpmB,EAAOomB,GAC1B,GAAIqC,GAAKtC,EAAW1b,EAASzH,EAC5BklB,KACApB,EAAgBV,EAASU,cACzBnX,EAAM3P,EAAM8D,MAKb,IAAKgjB,GAAiBnX,EAAIvO,YAAcpB,EAAM+V,QAAyB,UAAf/V,EAAME,MAG7D,KAAQyP,GAAO9O,KAAM8O,EAAMA,EAAIhO,YAAcd,KAK5C,GAAsB,IAAjB8O,EAAIvO,WAAmBuO,EAAI8F,YAAa,GAAuB,UAAfzV,EAAME,MAAoB,CAE9E,IADAuK,KACMzH,EAAI,EAAO8jB,EAAJ9jB,EAAmBA,IAC/BmjB,EAAYC,EAAUpjB,GAGtBylB,EAAMtC,EAAUxnB,SAAW,IAEtB8L,EAASge,KAAU3rB,IACvB2N,EAASge,GAAQtC,EAAUpZ,aAC1BxP,EAAQkrB,EAAK5nB,MAAOua,MAAOzL,IAAS,EACpCpS,EAAO0D,KAAMwnB,EAAK5nB,KAAM,MAAQ8O,IAAQ5O,QAErC0J,EAASge,IACbhe,EAAQzM,KAAMmoB,EAGX1b,GAAQ1J,QACZmnB,EAAalqB,MAAO4C,KAAM+O,EAAKyW,SAAU3b,IAW7C,MAJqB2b,GAASrlB,OAAzB+lB,GACJoB,EAAalqB,MAAO4C,KAAMC,KAAMulB,SAAUA,EAASloB,MAAO4oB,KAGpDoB,GAGRD,IAAK,SAAUjoB,GACd,GAAKA,EAAOzC,EAAO0G,SAClB,MAAOjE,EAIR,IAAIgD,GAAGmgB,EAAMzf,EACZxD,EAAOF,EAAME,KACbwoB,EAAgB1oB,EAChB2oB,EAAU9nB,KAAK+nB,SAAU1oB,EAEpByoB,KACL9nB,KAAK+nB,SAAU1oB,GAASyoB,EACvBtD,GAAY/jB,KAAMpB,GAASW,KAAKgoB,WAChCzD,GAAU9jB,KAAMpB,GAASW,KAAKioB,aAGhCplB,EAAOilB,EAAQI,MAAQloB,KAAKkoB,MAAMjrB,OAAQ6qB,EAAQI,OAAUloB,KAAKkoB,MAEjE/oB,EAAQ,GAAIzC,GAAOiqB,MAAOkB,GAE1B1lB,EAAIU,EAAK3C,MACT,OAAQiC,IACPmgB,EAAOzf,EAAMV,GACbhD,EAAOmjB,GAASuF,EAAevF,EAmBhC,OAdMnjB,GAAM8D,SACX9D,EAAM8D,OAAS4kB,EAAcM,YAAc7rB,GAKb,IAA1B6C,EAAM8D,OAAO1C,WACjBpB,EAAM8D,OAAS9D,EAAM8D,OAAOnC,YAK7B3B,EAAMipB,UAAYjpB,EAAMipB,QAEjBN,EAAQ5X,OAAS4X,EAAQ5X,OAAQ/Q,EAAO0oB,GAAkB1oB,GAIlE+oB,MAAO,wHAAwHlf,MAAM,KAErI+e,YAEAE,UACCC,MAAO,4BAA4Blf,MAAM,KACzCkH,OAAQ,SAAU/Q,EAAOkpB,GAOxB,MAJoB,OAAflpB,EAAMmpB,QACVnpB,EAAMmpB,MAA6B,MAArBD,EAASE,SAAmBF,EAASE,SAAWF,EAASG,SAGjErpB,IAIT6oB,YACCE,MAAO,mGAAmGlf,MAAM,KAChHkH,OAAQ,SAAU/Q,EAAOkpB,GACxB,GAAIvkB,GAAM2kB,EAAUjZ,EACnB0F,EAASmT,EAASnT,OAClBwT,EAAcL,EAASK,WAuBxB,OApBoB,OAAfvpB,EAAMwpB,OAAqC,MAApBN,EAASO,UACpCH,EAAWtpB,EAAM8D,OAAOzC,eAAiBlE,EACzCkT,EAAMiZ,EAASjsB,gBACfsH,EAAO2kB,EAAS3kB,KAEhB3E,EAAMwpB,MAAQN,EAASO,SAAYpZ,GAAOA,EAAIqZ,YAAc/kB,GAAQA,EAAK+kB,YAAc,IAAQrZ,GAAOA,EAAIsZ,YAAchlB,GAAQA,EAAKglB,YAAc,GACnJ3pB,EAAM4pB,MAAQV,EAASW,SAAYxZ,GAAOA,EAAIyZ,WAAcnlB,GAAQA,EAAKmlB,WAAc,IAAQzZ,GAAOA,EAAI0Z,WAAcplB,GAAQA,EAAKolB,WAAc,KAI9I/pB,EAAMgqB,eAAiBT,IAC5BvpB,EAAMgqB,cAAgBT,IAAgBvpB,EAAM8D,OAASolB,EAASe,UAAYV,GAKrEvpB,EAAMmpB,OAASpT,IAAWjZ,IAC/BkD,EAAMmpB,MAAmB,EAATpT,EAAa,EAAe,EAATA,EAAa,EAAe,EAATA,EAAa,EAAI,GAGjE/V,IAITimB,SACCiE,MAECvC,UAAU,GAEXxS,OAECrQ,QAAS,WACR,GAAKjE,OAAS6kB,MAAuB7kB,KAAKsU,MACzC,IAEC,MADAtU,MAAKsU,SACE,EACN,MAAQ1P,MAOZkhB,aAAc,WAEfwD,MACCrlB,QAAS,WACR,MAAKjE,QAAS6kB,MAAuB7kB,KAAKspB,MACzCtpB,KAAKspB,QACE,GAFR,GAKDxD,aAAc,YAEfxH,OAECra,QAAS,WACR,MAAKvH,GAAOmK,SAAU7G,KAAM,UAA2B,aAAdA,KAAKX,MAAuBW,KAAKse,OACzEte,KAAKse,SACE,GAFR,GAOD6I,SAAU,SAAUhoB,GACnB,MAAOzC,GAAOmK,SAAU1H,EAAM8D,OAAQ,OAIxCsmB,cACC5B,aAAc,SAAUxoB,GAGlBA,EAAM4T,SAAW9W,IACrBkD,EAAM0oB,cAAc2B,YAAcrqB,EAAM4T,WAM5C0W,SAAU,SAAUpqB,EAAMU,EAAMZ,EAAOuqB,GAItC,GAAI9kB,GAAIlI,EAAOgG,OACd,GAAIhG,GAAOiqB,MACXxnB,GAECE,KAAMA,EACNsqB,aAAa,EACb9B,kBAGG6B,GACJhtB,EAAOyC,MAAM8E,QAASW,EAAG,KAAM7E,GAE/BrD,EAAOyC,MAAM0mB,SAAS3kB,KAAMnB,EAAM6E,GAE9BA,EAAEsiB,sBACN/nB,EAAM8nB,mBAKTvqB,EAAO4pB,YAAchqB,EAASmD,oBAC7B,SAAUM,EAAMV,EAAMsmB,GAChB5lB,EAAKN,qBACTM,EAAKN,oBAAqBJ,EAAMsmB,GAAQ,IAG1C,SAAU5lB,EAAMV,EAAMsmB,GACrB,GAAI7iB,GAAO,KAAOzD,CAEbU,GAAKL,oBAIGK,GAAM+C,KAAW1G,IAC5B2D,EAAM+C,GAAS,MAGhB/C,EAAKL,YAAaoD,EAAM6iB,KAI3BjpB,EAAOiqB,MAAQ,SAAUhkB,EAAKulB,GAE7B,MAAOloB,gBAAgBtD,GAAOiqB,OAKzBhkB,GAAOA,EAAItD,MACfW,KAAK6nB,cAAgBllB,EACrB3C,KAAKX,KAAOsD,EAAItD,KAIhBW,KAAKknB,mBAAuBvkB,EAAIinB,kBAAoBjnB,EAAI6mB,eAAgB,GACvE7mB,EAAIknB,mBAAqBlnB,EAAIknB,oBAAwBlF,GAAaC,IAInE5kB,KAAKX,KAAOsD,EAIRulB,GACJxrB,EAAOgG,OAAQ1C,KAAMkoB,GAItBloB,KAAK8pB,UAAYnnB,GAAOA,EAAImnB,WAAaptB,EAAO0L,MAGhDpI,KAAMtD,EAAO0G,UAAY,EAvBzB,GAJQ,GAAI1G,GAAOiqB,MAAOhkB,EAAKulB,IAgChCxrB,EAAOiqB,MAAMhnB,WACZunB,mBAAoBtC,GACpBoC,qBAAsBpC,GACtB6C,8BAA+B7C,GAE/BqC,eAAgB,WACf,GAAIriB,GAAI5E,KAAK6nB,aAEb7nB,MAAKknB,mBAAqBvC,GACpB/f,IAKDA,EAAEqiB,eACNriB,EAAEqiB,iBAKFriB,EAAE4kB,aAAc,IAGlB9B,gBAAiB,WAChB,GAAI9iB,GAAI5E,KAAK6nB,aAEb7nB,MAAKgnB,qBAAuBrC,GACtB/f,IAIDA,EAAE8iB,iBACN9iB,EAAE8iB,kBAKH9iB,EAAEmlB,cAAe,IAElBC,yBAA0B,WACzBhqB,KAAKynB,8BAAgC9C,GACrC3kB,KAAK0nB,oBAKPhrB,EAAO+E,MACNwoB,WAAY,YACZC,WAAY,YACV,SAAUC,EAAM/C,GAClB1qB,EAAOyC,MAAMimB,QAAS+E,IACrBrE,aAAcsB,EACdrB,SAAUqB,EAEVzB,OAAQ,SAAUxmB,GACjB,GAAIoC,GACH0B,EAASjD,KACToqB,EAAUjrB,EAAMgqB,cAChB7D,EAAYnmB,EAAMmmB,SASnB,SALM8E,GAAYA,IAAYnnB,IAAWvG,EAAOmN,SAAU5G,EAAQmnB,MACjEjrB,EAAME,KAAOimB,EAAUG,SACvBlkB,EAAM+jB,EAAU3W,QAAQ7M,MAAO9B,KAAM+B,WACrC5C,EAAME,KAAO+nB,GAEP7lB,MAMJ7E,EAAOmI,QAAQwlB,gBAEpB3tB,EAAOyC,MAAMimB,QAAQxP,QACpBsQ,MAAO,WAEN,MAAKxpB,GAAOmK,SAAU7G,KAAM,SACpB,GAIRtD,EAAOyC,MAAMmb,IAAKta,KAAM,iCAAkC,SAAU4E,GAEnE,GAAI7E,GAAO6E,EAAE3B,OACZqnB,EAAO5tB,EAAOmK,SAAU9G,EAAM,UAAarD,EAAOmK,SAAU9G,EAAM,UAAaA,EAAKuqB,KAAOruB,CACvFquB,KAAS5tB,EAAO+jB,MAAO6J,EAAM,mBACjC5tB,EAAOyC,MAAMmb,IAAKgQ,EAAM,iBAAkB,SAAUnrB,GACnDA,EAAMorB,gBAAiB,IAExB7tB,EAAO+jB,MAAO6J,EAAM,iBAAiB,MARvC5tB,IAcDirB,aAAc,SAAUxoB,GAElBA,EAAMorB,uBACHprB,GAAMorB,eACRvqB,KAAKc,aAAe3B,EAAMynB,WAC9BlqB,EAAOyC,MAAMsqB,SAAU,SAAUzpB,KAAKc,WAAY3B,GAAO,KAK5DknB,SAAU,WAET,MAAK3pB,GAAOmK,SAAU7G,KAAM,SACpB,GAIRtD,EAAOyC,MAAMsG,OAAQzF,KAAM,YAA3BtD,MAMGA,EAAOmI,QAAQ2lB,gBAEpB9tB,EAAOyC,MAAMimB,QAAQ7G,QAEpB2H,MAAO,WAEN,MAAK5B,GAAW7jB,KAAMT,KAAK6G,YAIP,aAAd7G,KAAKX,MAAqC,UAAdW,KAAKX,QACrC3C,EAAOyC,MAAMmb,IAAKta,KAAM,yBAA0B,SAAUb,GACjB,YAArCA,EAAM0oB,cAAc4C,eACxBzqB,KAAK0qB,eAAgB,KAGvBhuB,EAAOyC,MAAMmb,IAAKta,KAAM,gBAAiB,SAAUb,GAC7Ca,KAAK0qB,gBAAkBvrB,EAAMynB,YACjC5mB,KAAK0qB,eAAgB,GAGtBhuB,EAAOyC,MAAMsqB,SAAU,SAAUzpB,KAAMb,GAAO,OAGzC,IAGRzC,EAAOyC,MAAMmb,IAAKta,KAAM,yBAA0B,SAAU4E,GAC3D,GAAI7E,GAAO6E,EAAE3B,MAERqhB,GAAW7jB,KAAMV,EAAK8G,YAAenK,EAAO+jB,MAAO1gB,EAAM,mBAC7DrD,EAAOyC,MAAMmb,IAAKva,EAAM,iBAAkB,SAAUZ,IAC9Ca,KAAKc,YAAe3B,EAAMwqB,aAAgBxqB,EAAMynB,WACpDlqB,EAAOyC,MAAMsqB,SAAU,SAAUzpB,KAAKc,WAAY3B,GAAO,KAG3DzC,EAAO+jB,MAAO1gB,EAAM,iBAAiB,MATvCrD,IAcDipB,OAAQ,SAAUxmB,GACjB,GAAIY,GAAOZ,EAAM8D,MAGjB,OAAKjD,QAASD,GAAQZ,EAAMwqB,aAAexqB,EAAMynB,WAA4B,UAAd7mB,EAAKV,MAAkC,aAAdU,EAAKV,KACrFF,EAAMmmB,UAAU3W,QAAQ7M,MAAO9B,KAAM+B,WAD7C,GAKDskB,SAAU,WAGT,MAFA3pB,GAAOyC,MAAMsG,OAAQzF,KAAM,aAEnBskB,EAAW7jB,KAAMT,KAAK6G,aAM3BnK,EAAOmI,QAAQ8lB,gBACpBjuB,EAAO+E,MAAO6S,MAAO,UAAWgV,KAAM,YAAc,SAAUa,EAAM/C,GAGnE,GAAIwD,GAAW,EACdjc,EAAU,SAAUxP,GACnBzC,EAAOyC,MAAMsqB,SAAUrC,EAAKjoB,EAAM8D,OAAQvG,EAAOyC,MAAMioB,IAAKjoB,IAAS,GAGvEzC,GAAOyC,MAAMimB,QAASgC,IACrBlB,MAAO,WACc,IAAf0E,KACJtuB,EAAS8C,iBAAkB+qB,EAAMxb,GAAS,IAG5C0X,SAAU,WACW,MAAbuE,GACNtuB,EAASmD,oBAAqB0qB,EAAMxb,GAAS,OAOlDjS,EAAOsB,GAAG0E,QAETmoB,GAAI,SAAU7F,EAAOlnB,EAAUqH,EAAMnH,EAAiBqlB,GACrD,GAAIhkB,GAAMyrB,CAGV,IAAsB,gBAAV9F,GAAqB,CAEP,gBAAblnB,KAEXqH,EAAOA,GAAQrH,EACfA,EAAW7B,EAEZ,KAAMoD,IAAQ2lB,GACbhlB,KAAK6qB,GAAIxrB,EAAMvB,EAAUqH,EAAM6f,EAAO3lB,GAAQgkB,EAE/C,OAAOrjB,MAmBR,GAhBa,MAARmF,GAAsB,MAANnH,GAEpBA,EAAKF,EACLqH,EAAOrH,EAAW7B,GACD,MAAN+B,IACc,gBAAbF,IAEXE,EAAKmH,EACLA,EAAOlJ,IAGP+B,EAAKmH,EACLA,EAAOrH,EACPA,EAAW7B,IAGR+B,KAAO,EACXA,EAAK4mB,OACC,KAAM5mB,EACZ,MAAOgC,KAaR,OAVa,KAARqjB,IACJyH,EAAS9sB,EACTA,EAAK,SAAUmB,GAGd,MADAzC,KAASwH,IAAK/E,GACP2rB,EAAOhpB,MAAO9B,KAAM+B,YAG5B/D,EAAG6J,KAAOijB,EAAOjjB,OAAUijB,EAAOjjB,KAAOnL,EAAOmL,SAE1C7H,KAAKyB,KAAM,WACjB/E,EAAOyC,MAAMmb,IAAKta,KAAMglB,EAAOhnB,EAAImH,EAAMrH,MAG3CulB,IAAK,SAAU2B,EAAOlnB,EAAUqH,EAAMnH,GACrC,MAAOgC,MAAK6qB,GAAI7F,EAAOlnB,EAAUqH,EAAMnH,EAAI,IAE5CkG,IAAK,SAAU8gB,EAAOlnB,EAAUE,GAC/B,GAAIsnB,GAAWjmB,CACf,IAAK2lB,GAASA,EAAMiC,gBAAkBjC,EAAMM,UAQ3C,MANAA,GAAYN,EAAMM,UAClB5oB,EAAQsoB,EAAMsC,gBAAiBpjB,IAC9BohB,EAAUU,UAAYV,EAAUG,SAAW,IAAMH,EAAUU,UAAYV,EAAUG,SACjFH,EAAUxnB,SACVwnB,EAAU3W,SAEJ3O,IAER,IAAsB,gBAAVglB,GAAqB,CAEhC,IAAM3lB,IAAQ2lB,GACbhlB,KAAKkE,IAAK7E,EAAMvB,EAAUknB,EAAO3lB,GAElC,OAAOW,MAUR,OARKlC,KAAa,GAA6B,kBAAbA,MAEjCE,EAAKF,EACLA,EAAW7B,GAEP+B,KAAO,IACXA,EAAK4mB,IAEC5kB,KAAKyB,KAAK,WAChB/E,EAAOyC,MAAMsG,OAAQzF,KAAMglB,EAAOhnB,EAAIF,MAIxCmG,QAAS,SAAU5E,EAAM8F,GACxB,MAAOnF,MAAKyB,KAAK,WAChB/E,EAAOyC,MAAM8E,QAAS5E,EAAM8F,EAAMnF,SAGpC+qB,eAAgB,SAAU1rB,EAAM8F,GAC/B,GAAIpF,GAAOC,KAAK,EAChB,OAAKD,GACGrD,EAAOyC,MAAM8E,QAAS5E,EAAM8F,EAAMpF,GAAM,GADhD,IAKF,IAAIirB,IAAW,iBACdC,GAAe,iCACfC,GAAgBxuB,EAAO4U,KAAKxR,MAAMoM,aAElCif,IACCC,UAAU,EACVC,UAAU,EACVpK,MAAM,EACNqK,MAAM,EAGR5uB,GAAOsB,GAAG0E,QACTtC,KAAM,SAAUtC,GACf,GAAIqE,GACHZ,KACA6Y,EAAOpa,KACPoC,EAAMgY,EAAKla,MAEZ,IAAyB,gBAAbpC,GACX,MAAOkC,MAAKqB,UAAW3E,EAAQoB,GAAWoS,OAAO,WAChD,IAAM/N,EAAI,EAAOC,EAAJD,EAASA,IACrB,GAAKzF,EAAOmN,SAAUuQ,EAAMjY,GAAKnC,MAChC,OAAO,IAMX,KAAMmC,EAAI,EAAOC,EAAJD,EAASA,IACrBzF,EAAO0D,KAAMtC,EAAUsc,EAAMjY,GAAKZ,EAMnC,OAFAA,GAAMvB,KAAKqB,UAAWe,EAAM,EAAI1F,EAAOwc,OAAQ3X,GAAQA,GACvDA,EAAIzD,SAAWkC,KAAKlC,SAAWkC,KAAKlC,SAAW,IAAMA,EAAWA,EACzDyD,GAGRyS,IAAK,SAAU/Q,GACd,GAAId,GACHopB,EAAU7uB,EAAQuG,EAAQjD,MAC1BoC,EAAMmpB,EAAQrrB,MAEf,OAAOF,MAAKkQ,OAAO,WAClB,IAAM/N,EAAI,EAAOC,EAAJD,EAASA,IACrB,GAAKzF,EAAOmN,SAAU7J,KAAMurB,EAAQppB,IACnC,OAAO,KAMX0R,IAAK,SAAU/V,GACd,MAAOkC,MAAKqB,UAAWmqB,GAAOxrB,KAAMlC,OAAgB,KAGrDoS,OAAQ,SAAUpS,GACjB,MAAOkC,MAAKqB,UAAWmqB,GAAOxrB,KAAMlC,OAAgB,KAGrD2tB,GAAI,SAAU3tB,GACb,QAAS0tB,GACRxrB,KAIoB,gBAAblC,IAAyBotB,GAAczqB,KAAM3C,GACnDpB,EAAQoB,GACRA,OACD,GACCoC,QAGHwrB,QAAS,SAAU1Z,EAAWjU,GAC7B,GAAI+Q,GACH3M,EAAI,EACJqF,EAAIxH,KAAKE,OACTqB,KACAoqB,EAAMT,GAAczqB,KAAMuR,IAAoC,gBAAdA,GAC/CtV,EAAQsV,EAAWjU,GAAWiC,KAAKjC,SACnC,CAEF,MAAYyJ,EAAJrF,EAAOA,IACd,IAAM2M,EAAM9O,KAAKmC,GAAI2M,GAAOA,IAAQ/Q,EAAS+Q,EAAMA,EAAIhO,WAEtD,GAAoB,GAAfgO,EAAIvO,WAAkBorB,EAC1BA,EAAIpR,MAAMzL,GAAO,GAGA,IAAjBA,EAAIvO,UACH7D,EAAO0D,KAAKmQ,gBAAgBzB,EAAKkD,IAAc,CAEhDlD,EAAMvN,EAAIpE,KAAM2R,EAChB,OAKH,MAAO9O,MAAKqB,UAAWE,EAAIrB,OAAS,EAAIxD,EAAOwc,OAAQ3X,GAAQA,IAKhEgZ,MAAO,SAAUxa,GAGhB,MAAMA,GAKe,gBAATA,GACJrD,EAAO2K,QAASrH,KAAK,GAAItD,EAAQqD,IAIlCrD,EAAO2K,QAEbtH,EAAKH,OAASG,EAAK,GAAKA,EAAMC,MAXrBA,KAAK,IAAMA,KAAK,GAAGc,WAAed,KAAKgC,QAAQ4pB,UAAU1rB,OAAS,IAc7Eoa,IAAK,SAAUxc,EAAUC,GACxB,GAAIolB,GAA0B,gBAAbrlB,GACfpB,EAAQoB,EAAUC,GAClBrB,EAAOsE,UAAWlD,GAAYA,EAASyC,UAAazC,GAAaA,GAClEiB,EAAMrC,EAAO2D,MAAOL,KAAKmB,MAAOgiB,EAEjC,OAAOnjB,MAAKqB,UAAW3E,EAAOwc,OAAOna,KAGtC8sB,QAAS,SAAU/tB,GAClB,MAAOkC,MAAKsa,IAAiB,MAAZxc,EAChBkC,KAAKwB,WAAaxB,KAAKwB,WAAW0O,OAAOpS,MAK5C,SAASguB,IAAShd,EAAKsD,GACtB,EACCtD,GAAMA,EAAKsD,SACFtD,GAAwB,IAAjBA,EAAIvO,SAErB,OAAOuO,GAGRpS,EAAO+E,MACNgO,OAAQ,SAAU1P,GACjB,GAAI0P,GAAS1P,EAAKe,UAClB,OAAO2O,IAA8B,KAApBA,EAAOlP,SAAkBkP,EAAS,MAEpDsc,QAAS,SAAUhsB,GAClB,MAAOrD,GAAO0V,IAAKrS,EAAM,eAE1BisB,aAAc,SAAUjsB,EAAMoC,EAAG8pB,GAChC,MAAOvvB,GAAO0V,IAAKrS,EAAM,aAAcksB,IAExChL,KAAM,SAAUlhB,GACf,MAAO+rB,IAAS/rB,EAAM,gBAEvBurB,KAAM,SAAUvrB,GACf,MAAO+rB,IAAS/rB,EAAM,oBAEvBmsB,QAAS,SAAUnsB,GAClB,MAAOrD,GAAO0V,IAAKrS,EAAM,gBAE1B6rB,QAAS,SAAU7rB,GAClB,MAAOrD,GAAO0V,IAAKrS,EAAM,oBAE1BosB,UAAW,SAAUpsB,EAAMoC,EAAG8pB,GAC7B,MAAOvvB,GAAO0V,IAAKrS,EAAM,cAAeksB,IAEzCG,UAAW,SAAUrsB,EAAMoC,EAAG8pB,GAC7B,MAAOvvB,GAAO0V,IAAKrS,EAAM,kBAAmBksB,IAE7CI,SAAU,SAAUtsB,GACnB,MAAOrD,GAAOovB,SAAW/rB,EAAKe,gBAAmBiP,WAAYhQ,IAE9DqrB,SAAU,SAAUrrB,GACnB,MAAOrD,GAAOovB,QAAS/rB,EAAKgQ,aAE7Bsb,SAAU,SAAUtrB,GACnB,MAAOrD,GAAOmK,SAAU9G,EAAM,UAC7BA,EAAKusB,iBAAmBvsB,EAAKwsB,cAAcjwB,SAC3CI,EAAO2D,SAAWN,EAAK2F,cAEvB,SAAU5C,EAAM9E,GAClBtB,EAAOsB,GAAI8E,GAAS,SAAUmpB,EAAOnuB,GACpC,GAAIyD,GAAM7E,EAAO4F,IAAKtC,KAAMhC,EAAIiuB,EAsBhC,OApB0B,UAArBnpB,EAAKzF,MAAO,MAChBS,EAAWmuB,GAGPnuB,GAAgC,gBAAbA,KACvByD,EAAM7E,EAAOwT,OAAQpS,EAAUyD,IAG3BvB,KAAKE,OAAS,IAEZirB,GAAkBroB,KACvBvB,EAAM7E,EAAOwc,OAAQ3X,IAIjB0pB,GAAaxqB,KAAMqC,KACvBvB,EAAMA,EAAIirB,YAILxsB,KAAKqB,UAAWE,MAIzB7E,EAAOgG,QACNwN,OAAQ,SAAUoB,EAAMhQ,EAAOuS,GAC9B,GAAI9T,GAAOuB,EAAO,EAMlB,OAJKuS,KACJvC,EAAO,QAAUA,EAAO,KAGD,IAAjBhQ,EAAMpB,QAAkC,IAAlBH,EAAKQ,SACjC7D,EAAO0D,KAAKmQ,gBAAiBxQ,EAAMuR,IAAWvR,MAC9CrD,EAAO0D,KAAKwJ,QAAS0H,EAAM5U,EAAO+K,KAAMnG,EAAO,SAAUvB,GACxD,MAAyB,KAAlBA,EAAKQ,aAIf6R,IAAK,SAAUrS,EAAMqS,EAAK6Z,GACzB,GAAIrY,MACH9E,EAAM/O,EAAMqS,EAEb,OAAQtD,GAAwB,IAAjBA,EAAIvO,WAAmB0rB,IAAUhwB,GAA8B,IAAjB6S,EAAIvO,WAAmB7D,EAAQoS,GAAM2c,GAAIQ,IAC/E,IAAjBnd,EAAIvO,UACRqT,EAAQzW,KAAM2R,GAEfA,EAAMA,EAAIsD,EAEX,OAAOwB,IAGRkY,QAAS,SAAUW,EAAG1sB,GACrB,GAAI2sB,KAEJ,MAAQD,EAAGA,EAAIA,EAAExd,YACI,IAAfwd,EAAElsB,UAAkBksB,IAAM1sB,GAC9B2sB,EAAEvvB,KAAMsvB,EAIV,OAAOC,KAKT,SAASlB,IAAQja,EAAUob,EAAW9Y,GACrC,GAAKnX,EAAOiE,WAAYgsB,GACvB,MAAOjwB,GAAO+K,KAAM8J,EAAU,SAAUxR,EAAMoC,GAE7C,QAASwqB,EAAUzrB,KAAMnB,EAAMoC,EAAGpC,KAAW8T,GAK/C,IAAK8Y,EAAUpsB,SACd,MAAO7D,GAAO+K,KAAM8J,EAAU,SAAUxR,GACvC,MAASA,KAAS4sB,IAAgB9Y,GAKpC,IAA0B,gBAAd8Y,GAAyB,CACpC,GAAK3B,GAASvqB,KAAMksB,GACnB,MAAOjwB,GAAOwT,OAAQyc,EAAWpb,EAAUsC,EAG5C8Y,GAAYjwB,EAAOwT,OAAQyc,EAAWpb,GAGvC,MAAO7U,GAAO+K,KAAM8J,EAAU,SAAUxR,GACvC,MAASrD,GAAO2K,QAAStH,EAAM4sB,IAAe,IAAQ9Y,IAGxD,QAAS+Y,IAAoBtwB,GAC5B,GAAIyd,GAAO8S,GAAU7jB,MAAO,KAC3B8jB,EAAWxwB,EAAS6hB,wBAErB,IAAK2O,EAASvnB,cACb,MAAQwU,EAAK7Z,OACZ4sB,EAASvnB,cACRwU,EAAKpP,MAIR,OAAOmiB,GAGR,GAAID,IAAY,6JAEfE,GAAgB,6BAChBC,GAAmB7hB,OAAO,OAAS0hB,GAAY,WAAY,KAC3DI,GAAqB,OACrBC,GAAY,0EACZC,GAAW,YACXC,GAAS,UACTC,GAAQ,YACRC,GAAe,0BACfC,GAA8B,wBAE9BC,GAAW,oCACXC,GAAc,4BACdC,GAAoB,cACpBC,GAAe,2CAGfC,IACCxK,QAAU,EAAG,+BAAgC,aAC7CyK,QAAU,EAAG,aAAc,eAC3BC,MAAQ,EAAG,QAAS,UACpBC,OAAS,EAAG,WAAY,aACxBC,OAAS,EAAG,UAAW,YACvBC,IAAM,EAAG,iBAAkB,oBAC3BC,KAAO,EAAG,mCAAoC,uBAC9CC,IAAM,EAAG,qBAAsB,yBAI/BhH,SAAUzqB,EAAOmI,QAAQkY,eAAkB,EAAG,GAAI,KAAS,EAAG,SAAU,WAEzEqR,GAAexB,GAAoBtwB,GACnC+xB,GAAcD,GAAaxe,YAAatT,EAASiJ,cAAc,OAEhEqoB,IAAQU,SAAWV,GAAQxK,OAC3BwK,GAAQ9Q,MAAQ8Q,GAAQW,MAAQX,GAAQY,SAAWZ,GAAQa,QAAUb,GAAQI,MAC7EJ,GAAQc,GAAKd,GAAQO,GAErBzxB,EAAOsB,GAAG0E,QACTuE,KAAM,SAAUF,GACf,MAAOrK,GAAOqL,OAAQ/H,KAAM,SAAU+G,GACrC,MAAOA,KAAU9K,EAChBS,EAAOuK,KAAMjH,MACbA,KAAKgV,QAAQ2Z,QAAU3uB,KAAK,IAAMA,KAAK,GAAGQ,eAAiBlE,GAAWsyB,eAAgB7nB,KACrF,KAAMA,EAAOhF,UAAU7B,SAG3ByuB,OAAQ,WACP,MAAO3uB,MAAK6uB,SAAU9sB,UAAW,SAAUhC,GAC1C,GAAuB,IAAlBC,KAAKO,UAAoC,KAAlBP,KAAKO,UAAqC,IAAlBP,KAAKO,SAAiB,CACzE,GAAI0C,GAAS6rB,GAAoB9uB,KAAMD,EACvCkD,GAAO2M,YAAa7P,OAKvBgvB,QAAS,WACR,MAAO/uB,MAAK6uB,SAAU9sB,UAAW,SAAUhC,GAC1C,GAAuB,IAAlBC,KAAKO,UAAoC,KAAlBP,KAAKO,UAAqC,IAAlBP,KAAKO,SAAiB,CACzE,GAAI0C,GAAS6rB,GAAoB9uB,KAAMD,EACvCkD,GAAO+rB,aAAcjvB,EAAMkD,EAAO8M,gBAKrCkf,OAAQ,WACP,MAAOjvB,MAAK6uB,SAAU9sB,UAAW,SAAUhC,GACrCC,KAAKc,YACTd,KAAKc,WAAWkuB,aAAcjvB,EAAMC,SAKvCkvB,MAAO,WACN,MAAOlvB,MAAK6uB,SAAU9sB,UAAW,SAAUhC,GACrCC,KAAKc,YACTd,KAAKc,WAAWkuB,aAAcjvB,EAAMC,KAAKiP,gBAM5CxJ,OAAQ,SAAU3H,EAAUqxB,GAC3B,GAAIpvB,GACHuB,EAAQxD,EAAWpB,EAAOwT,OAAQpS,EAAUkC,MAASA,KACrDmC,EAAI,CAEL,MAA6B,OAApBpC,EAAOuB,EAAMa,IAAaA,IAE5BgtB,GAA8B,IAAlBpvB,EAAKQ,UACtB7D,EAAOyjB,UAAWiP,GAAQrvB,IAGtBA,EAAKe,aACJquB,GAAYzyB,EAAOmN,SAAU9J,EAAKS,cAAeT,IACrDsvB,GAAeD,GAAQrvB,EAAM,WAE9BA,EAAKe,WAAW0N,YAAazO,GAI/B,OAAOC,OAGRgV,MAAO,WACN,GAAIjV,GACHoC,EAAI,CAEL,MAA4B,OAAnBpC,EAAOC,KAAKmC,IAAaA,IAAM,CAEhB,IAAlBpC,EAAKQ,UACT7D,EAAOyjB,UAAWiP,GAAQrvB,GAAM,GAIjC,OAAQA,EAAKgQ,WACZhQ,EAAKyO,YAAazO,EAAKgQ,WAKnBhQ,GAAKgD,SAAWrG,EAAOmK,SAAU9G,EAAM,YAC3CA,EAAKgD,QAAQ7C,OAAS,GAIxB,MAAOF,OAGRgD,MAAO,SAAUssB,EAAeC,GAI/B,MAHAD,GAAiC,MAAjBA,GAAwB,EAAQA,EAChDC,EAAyC,MAArBA,EAA4BD,EAAgBC,EAEzDvvB,KAAKsC,IAAK,WAChB,MAAO5F,GAAOsG,MAAOhD,KAAMsvB,EAAeC,MAI5CC,KAAM,SAAUzoB,GACf,MAAOrK,GAAOqL,OAAQ/H,KAAM,SAAU+G,GACrC,GAAIhH,GAAOC,KAAK,OACfmC,EAAI,EACJqF,EAAIxH,KAAKE,MAEV,IAAK6G,IAAU9K,EACd,MAAyB,KAAlB8D,EAAKQ,SACXR,EAAK+P,UAAUvM,QAASwpB,GAAe,IACvC9wB,CAIF,MAAsB,gBAAV8K,IAAuBumB,GAAa7sB,KAAMsG,KACnDrK,EAAOmI,QAAQkY,eAAkBiQ,GAAavsB,KAAMsG,KACpDrK,EAAOmI,QAAQgY,mBAAsBoQ,GAAmBxsB,KAAMsG,IAC/D6mB,IAAWT,GAAShtB,KAAM4G,KAAY,GAAI,KAAM,GAAGD,gBAAkB,CAEtEC,EAAQA,EAAMxD,QAAS2pB,GAAW,YAElC,KACC,KAAW1lB,EAAJrF,EAAOA,IAEbpC,EAAOC,KAAKmC,OACW,IAAlBpC,EAAKQ,WACT7D,EAAOyjB,UAAWiP,GAAQrvB,GAAM,IAChCA,EAAK+P,UAAY/I,EAInBhH,GAAO,EAGN,MAAM6E,KAGJ7E,GACJC,KAAKgV,QAAQ2Z,OAAQ5nB,IAEpB,KAAMA,EAAOhF,UAAU7B,SAG3BuvB,YAAa,WACZ,GAEC9tB,GAAOjF,EAAO4F,IAAKtC,KAAM,SAAUD,GAClC,OAASA,EAAKkP,YAAalP,EAAKe,cAEjCqB,EAAI,CAmBL,OAhBAnC,MAAK6uB,SAAU9sB,UAAW,SAAUhC,GACnC,GAAIkhB,GAAOtf,EAAMQ,KAChBsN,EAAS9N,EAAMQ,IAEXsN,KAECwR,GAAQA,EAAKngB,aAAe2O,IAChCwR,EAAOjhB,KAAKiP,aAEbvS,EAAQsD,MAAOyF,SACfgK,EAAOuf,aAAcjvB,EAAMkhB,MAG1B,GAGI9e,EAAInC,KAAOA,KAAKyF,UAGxBlG,OAAQ,SAAUzB,GACjB,MAAOkC,MAAKyF,OAAQ3H,GAAU,IAG/B+wB,SAAU,SAAUltB,EAAMD,EAAUguB,GAGnC/tB,EAAO3E,EAAY8E,SAAWH,EAE9B,IAAIK,GAAOuN,EAAMogB,EAChBrqB,EAASkK,EAAK+M,EACdpa,EAAI,EACJqF,EAAIxH,KAAKE,OACTijB,EAAMnjB,KACN4vB,EAAWpoB,EAAI,EACfT,EAAQpF,EAAK,GACbhB,EAAajE,EAAOiE,WAAYoG,EAGjC,IAAKpG,KAAsB,GAAL6G,GAA2B,gBAAVT,IAAsBrK,EAAOmI,QAAQwZ,aAAemP,GAAS/sB,KAAMsG,GACzG,MAAO/G,MAAKyB,KAAK,SAAU8Y,GAC1B,GAAIH,GAAO+I,EAAIlhB,GAAIsY,EACd5Z,KACJgB,EAAK,GAAKoF,EAAM7F,KAAMlB,KAAMua,EAAOH,EAAKoV,SAEzCpV,EAAKyU,SAAUltB,EAAMD,EAAUguB,IAIjC,IAAKloB,IACJ+U,EAAW7f,EAAO8I,cAAe7D,EAAM3B,KAAM,GAAIQ,eAAe,GAAQkvB,GAAqB1vB,MAC7FgC,EAAQua,EAASxM,WAEmB,IAA/BwM,EAAS7W,WAAWxF,SACxBqc,EAAWva,GAGPA,GAAQ,CAMZ,IALAsD,EAAU5I,EAAO4F,IAAK8sB,GAAQ7S,EAAU,UAAYsT,IACpDF,EAAarqB,EAAQpF,OAITsH,EAAJrF,EAAOA,IACdoN,EAAOgN,EAEFpa,IAAMytB,IACVrgB,EAAO7S,EAAOsG,MAAOuM,GAAM,GAAM,GAG5BogB,GACJjzB,EAAO2D,MAAOiF,EAAS8pB,GAAQ7f,EAAM,YAIvC7N,EAASR,KAAMlB,KAAKmC,GAAIoN,EAAMpN,EAG/B,IAAKwtB,EAOJ,IANAngB,EAAMlK,EAASA,EAAQpF,OAAS,GAAIM,cAGpC9D,EAAO4F,IAAKgD,EAASwqB,IAGf3tB,EAAI,EAAOwtB,EAAJxtB,EAAgBA,IAC5BoN,EAAOjK,EAASnD,GACXsrB,GAAYhtB,KAAM8O,EAAKlQ,MAAQ,MAClC3C,EAAO+jB,MAAOlR,EAAM,eAAkB7S,EAAOmN,SAAU2F,EAAKD,KAExDA,EAAK5M,IAETjG,EAAOqzB,SAAUxgB,EAAK5M,KAEtBjG,EAAO+J,YAAc8I,EAAKtI,MAAQsI,EAAKuC,aAAevC,EAAKO,WAAa,IAAKvM,QAASoqB,GAAc,KAOxGpR,GAAWva,EAAQ,KAIrB,MAAOhC,QAMT,SAAS8uB,IAAoB/uB,EAAMiwB,GAClC,MAAOtzB,GAAOmK,SAAU9G,EAAM,UAC7BrD,EAAOmK,SAA+B,IAArBmpB,EAAQzvB,SAAiByvB,EAAUA,EAAQjgB,WAAY,MAExEhQ,EAAKwG,qBAAqB,SAAS,IAClCxG,EAAK6P,YAAa7P,EAAKS,cAAc+E,cAAc,UACpDxF,EAIF,QAAS8vB,IAAe9vB,GAEvB,MADAA,GAAKV,MAA6C,OAArC3C,EAAO0D,KAAKQ,KAAMb,EAAM,SAAqB,IAAMA,EAAKV,KAC9DU,EAER,QAAS+vB,IAAe/vB,GACvB,GAAID,GAAQ4tB,GAAkBvtB,KAAMJ,EAAKV,KAMzC,OALKS,GACJC,EAAKV,KAAOS,EAAM,GAElBC,EAAKgO,gBAAgB,QAEfhO,EAIR,QAASsvB,IAAe/tB,EAAO2uB,GAC9B,GAAIlwB,GACHoC,EAAI,CACL,MAA6B,OAApBpC,EAAOuB,EAAMa,IAAaA,IAClCzF,EAAO+jB,MAAO1gB,EAAM,cAAekwB,GAAevzB,EAAO+jB,MAAOwP,EAAY9tB,GAAI,eAIlF,QAAS+tB,IAAgBvtB,EAAKwtB,GAE7B,GAAuB,IAAlBA,EAAK5vB,UAAmB7D,EAAO6jB,QAAS5d,GAA7C,CAIA,GAAItD,GAAM8C,EAAGqF,EACZ4oB,EAAU1zB,EAAO+jB,MAAO9d,GACxB0tB,EAAU3zB,EAAO+jB,MAAO0P,EAAMC,GAC9BnL,EAASmL,EAAQnL,MAElB,IAAKA,EAAS,OACNoL,GAAQ1K,OACf0K,EAAQpL,SAER,KAAM5lB,IAAQ4lB,GACb,IAAM9iB,EAAI,EAAGqF,EAAIyd,EAAQ5lB,GAAOa,OAAYsH,EAAJrF,EAAOA,IAC9CzF,EAAOyC,MAAMmb,IAAK6V,EAAM9wB,EAAM4lB,EAAQ5lB,GAAQ8C,IAM5CkuB,EAAQlrB,OACZkrB,EAAQlrB,KAAOzI,EAAOgG,UAAY2tB,EAAQlrB,QAI5C,QAASmrB,IAAoB3tB,EAAKwtB,GACjC,GAAItpB,GAAUjC,EAAGO,CAGjB,IAAuB,IAAlBgrB,EAAK5vB,SAAV,CAOA,GAHAsG,EAAWspB,EAAKtpB,SAASC,eAGnBpK,EAAOmI,QAAQgZ,cAAgBsS,EAAMzzB,EAAO0G,SAAY,CAC7D+B,EAAOzI,EAAO+jB,MAAO0P,EAErB,KAAMvrB,IAAKO,GAAK8f,OACfvoB,EAAO4pB,YAAa6J,EAAMvrB,EAAGO,EAAKwgB,OAInCwK,GAAKpiB,gBAAiBrR,EAAO0G,SAIZ,WAAbyD,GAAyBspB,EAAKlpB,OAAStE,EAAIsE,MAC/C4oB,GAAeM,GAAOlpB,KAAOtE,EAAIsE,KACjC6oB,GAAeK,IAIS,WAAbtpB,GACNspB,EAAKrvB,aACTqvB,EAAK3S,UAAY7a,EAAI6a,WAOjB9gB,EAAOmI,QAAQyY,YAAgB3a,EAAImN,YAAcpT,EAAOmB,KAAKsyB,EAAKrgB,aACtEqgB,EAAKrgB,UAAYnN,EAAImN,YAGE,UAAbjJ,GAAwB0mB,GAA4B9sB,KAAMkC,EAAItD,OAKzE8wB,EAAKI,eAAiBJ,EAAKtb,QAAUlS,EAAIkS,QAIpCsb,EAAKppB,QAAUpE,EAAIoE,QACvBopB,EAAKppB,MAAQpE,EAAIoE,QAKM,WAAbF,EACXspB,EAAKK,gBAAkBL,EAAKrb,SAAWnS,EAAI6tB,iBAInB,UAAb3pB,GAAqC,aAAbA,KACnCspB,EAAKlX,aAAetW,EAAIsW,eAI1Bvc,EAAO+E,MACNgvB,SAAU,SACVC,UAAW,UACX1B,aAAc,SACd2B,YAAa,QACbC,WAAY,eACV,SAAU9tB,EAAMulB,GAClB3rB,EAAOsB,GAAI8E,GAAS,SAAUhF,GAC7B,GAAIwD,GACHa,EAAI,EACJZ,KACAsvB,EAASn0B,EAAQoB,GACjBoE,EAAO2uB,EAAO3wB,OAAS,CAExB,MAAagC,GAALC,EAAWA,IAClBb,EAAQa,IAAMD,EAAOlC,KAAOA,KAAKgD,OAAM,GACvCtG,EAAQm0B,EAAO1uB,IAAMkmB,GAAY/mB,GAGjCpE,EAAU4E,MAAOP,EAAKD,EAAMH,MAG7B,OAAOnB,MAAKqB,UAAWE,KAIzB,SAAS6tB,IAAQrxB,EAASsS,GACzB,GAAI/O,GAAOvB,EACVoC,EAAI,EACJ2uB,QAAe/yB,GAAQwI,uBAAyBnK,EAAoB2B,EAAQwI,qBAAsB8J,GAAO,WACjGtS,GAAQ8P,mBAAqBzR,EAAoB2B,EAAQ8P,iBAAkBwC,GAAO,KACzFpU,CAEF,KAAM60B,EACL,IAAMA,KAAYxvB,EAAQvD,EAAQ2H,YAAc3H,EAA8B,OAApBgC,EAAOuB,EAAMa,IAAaA,KAC7EkO,GAAO3T,EAAOmK,SAAU9G,EAAMsQ,GACnCygB,EAAM3zB,KAAM4C,GAEZrD,EAAO2D,MAAOywB,EAAO1B,GAAQrvB,EAAMsQ,GAKtC,OAAOA,KAAQpU,GAAaoU,GAAO3T,EAAOmK,SAAU9I,EAASsS,GAC5D3T,EAAO2D,OAAStC,GAAW+yB,GAC3BA,EAIF,QAASC,IAAmBhxB,GACtBwtB,GAA4B9sB,KAAMV,EAAKV,QAC3CU,EAAKwwB,eAAiBxwB,EAAK8U,SAI7BnY,EAAOgG,QACNM,MAAO,SAAUjD,EAAMuvB,EAAeC,GACrC,GAAIyB,GAAczhB,EAAMvM,EAAOb,EAAG8uB,EACjCC,EAASx0B,EAAOmN,SAAU9J,EAAKS,cAAeT,EAW/C,IATKrD,EAAOmI,QAAQyY,YAAc5gB,EAAOyc,SAASpZ,KAAUitB,GAAavsB,KAAM,IAAMV,EAAK8G,SAAW,KACpG7D,EAAQjD,EAAKwd,WAAW,IAIxB8Q,GAAYve,UAAY/P,EAAKyd,UAC7B6Q,GAAY7f,YAAaxL,EAAQqrB,GAAYte,eAGvCrT,EAAOmI,QAAQgZ,cAAiBnhB,EAAOmI,QAAQmZ,gBACjC,IAAlBje,EAAKQ,UAAoC,KAAlBR,EAAKQ,UAAqB7D,EAAOyc,SAASpZ,IAOnE,IAJAixB,EAAe5B,GAAQpsB,GACvBiuB,EAAc7B,GAAQrvB,GAGhBoC,EAAI,EAA8B,OAA1BoN,EAAO0hB,EAAY9uB,MAAeA,EAE1C6uB,EAAa7uB,IACjBmuB,GAAoB/gB,EAAMyhB,EAAa7uB,GAM1C,IAAKmtB,EACJ,GAAKC,EAIJ,IAHA0B,EAAcA,GAAe7B,GAAQrvB,GACrCixB,EAAeA,GAAgB5B,GAAQpsB,GAEjCb,EAAI,EAA8B,OAA1BoN,EAAO0hB,EAAY9uB,IAAaA,IAC7C+tB,GAAgB3gB,EAAMyhB,EAAa7uB,QAGpC+tB,IAAgBnwB,EAAMiD,EAaxB,OARAguB,GAAe5B,GAAQpsB,EAAO,UACzBguB,EAAa9wB,OAAS,GAC1BmvB,GAAe2B,GAAeE,GAAU9B,GAAQrvB,EAAM,WAGvDixB,EAAeC,EAAc1hB,EAAO,KAG7BvM,GAGRwC,cAAe,SAAUlE,EAAOvD,EAASuH,EAAS6rB,GACjD,GAAI9uB,GAAGtC,EAAM8J,EACZ5D,EAAKoK,EAAKyM,EAAOsU,EACjB5pB,EAAIlG,EAAMpB,OAGVmxB,EAAOzE,GAAoB7uB,GAE3BuzB,KACAnvB,EAAI,CAEL,MAAYqF,EAAJrF,EAAOA,IAGd,GAFApC,EAAOuB,EAAOa,GAETpC,GAAiB,IAATA,EAGZ,GAA6B,WAAxBrD,EAAO2C,KAAMU,GACjBrD,EAAO2D,MAAOixB,EAAOvxB,EAAKQ,UAAaR,GAASA,OAG1C,IAAMstB,GAAM5sB,KAAMV,GAIlB,CACNkG,EAAMA,GAAOorB,EAAKzhB,YAAa7R,EAAQwH,cAAc,QAGrD8K,GAAQ8c,GAAShtB,KAAMJ,KAAW,GAAI,KAAM,GAAG+G,cAC/CsqB,EAAOxD,GAASvd,IAASud,GAAQzG,SAEjClhB,EAAI6J,UAAYshB,EAAK,GAAKrxB,EAAKwD,QAAS2pB,GAAW,aAAgBkE,EAAK,GAGxE/uB,EAAI+uB,EAAK,EACT,OAAQ/uB,IACP4D,EAAMA,EAAIuN,SASX,KALM9W,EAAOmI,QAAQgY,mBAAqBoQ,GAAmBxsB,KAAMV,IAClEuxB,EAAMn0B,KAAMY,EAAQ6wB,eAAgB3B,GAAmB9sB,KAAMJ,GAAO,MAI/DrD,EAAOmI,QAAQiY,MAAQ,CAG5B/c,EAAe,UAARsQ,GAAoB+c,GAAO3sB,KAAMV,GAI3B,YAAZqxB,EAAK,IAAqBhE,GAAO3sB,KAAMV,GAEtC,EADAkG,EAJDA,EAAI8J,WAOL1N,EAAItC,GAAQA,EAAK2F,WAAWxF,MAC5B,OAAQmC,IACF3F,EAAOmK,SAAWiW,EAAQ/c,EAAK2F,WAAWrD,GAAK,WAAcya,EAAMpX,WAAWxF,QAClFH,EAAKyO,YAAasO,GAKrBpgB,EAAO2D,MAAOixB,EAAOrrB,EAAIP,YAGzBO,EAAI6L,YAAc,EAGlB,OAAQ7L,EAAI8J,WACX9J,EAAIuI,YAAavI,EAAI8J,WAItB9J,GAAMorB,EAAK7d,cAtDX8d,GAAMn0B,KAAMY,EAAQ6wB,eAAgB7uB,GA4DlCkG,IACJorB,EAAK7iB,YAAavI,GAKbvJ,EAAOmI,QAAQuZ,eACpB1hB,EAAO+K,KAAM2nB,GAAQkC,EAAO,SAAWP,IAGxC5uB,EAAI,CACJ,OAASpC,EAAOuxB,EAAOnvB,KAItB,KAAKgvB,GAAmD,KAAtCz0B,EAAO2K,QAAStH,EAAMoxB,MAIxCtnB,EAAWnN,EAAOmN,SAAU9J,EAAKS,cAAeT,GAGhDkG,EAAMmpB,GAAQiC,EAAKzhB,YAAa7P,GAAQ,UAGnC8J,GACJwlB,GAAeppB,GAIXX,GAAU,CACdjD,EAAI,CACJ,OAAStC,EAAOkG,EAAK5D,KACforB,GAAYhtB,KAAMV,EAAKV,MAAQ,KACnCiG,EAAQnI,KAAM4C,GAQlB,MAFAkG,GAAM,KAECorB,GAGRlR,UAAW,SAAU7e,EAAsBse,GAC1C,GAAI7f,GAAMV,EAAM0B,EAAIoE,EACnBhD,EAAI,EACJ2d,EAAcpjB,EAAO0G,QACrB8K,EAAQxR,EAAOwR,MACf0P,EAAgBlhB,EAAOmI,QAAQ+Y,cAC/BwH,EAAU1oB,EAAOyC,MAAMimB,OAExB,MAA6B,OAApBrlB,EAAOuB,EAAMa,IAAaA,IAElC,IAAKyd,GAAcljB,EAAOkjB,WAAY7f,MAErCgB,EAAKhB,EAAM+f,GACX3a,EAAOpE,GAAMmN,EAAOnN,IAER,CACX,GAAKoE,EAAK8f,OACT,IAAM5lB,IAAQ8F,GAAK8f,OACbG,EAAS/lB,GACb3C,EAAOyC,MAAMsG,OAAQ1F,EAAMV,GAI3B3C,EAAO4pB,YAAavmB,EAAMV,EAAM8F,EAAKwgB,OAMnCzX;EAAOnN,WAEJmN,GAAOnN,GAKT6c,QACG7d,GAAM+f,SAEK/f,GAAKgO,kBAAoB3R,EAC3C2D,EAAKgO,gBAAiB+R,GAGtB/f,EAAM+f,GAAgB,KAGvBhjB,EAAgBK,KAAM4D,MAO3BgvB,SAAU,SAAUwB,GACnB,MAAO70B,GAAO80B,MACbD,IAAKA,EACLlyB,KAAM,MACNoyB,SAAU,SACVprB,OAAO,EACP0e,QAAQ,EACR2M,UAAU,OAIbh1B,EAAOsB,GAAG0E,QACTivB,QAAS,SAAUnC,GAClB,GAAK9yB,EAAOiE,WAAY6uB,GACvB,MAAOxvB,MAAKyB,KAAK,SAASU,GACzBzF,EAAOsD,MAAM2xB,QAASnC,EAAKtuB,KAAKlB,KAAMmC,KAIxC,IAAKnC,KAAK,GAAK,CAEd,GAAIoxB,GAAO10B,EAAQ8yB,EAAMxvB,KAAK,GAAGQ,eAAgByB,GAAG,GAAGe,OAAM,EAExDhD,MAAK,GAAGc,YACZswB,EAAKpC,aAAchvB,KAAK,IAGzBoxB,EAAK9uB,IAAI,WACR,GAAIvC,GAAOC,IAEX,OAAQD,EAAKgQ,YAA2C,IAA7BhQ,EAAKgQ,WAAWxP,SAC1CR,EAAOA,EAAKgQ,UAGb,OAAOhQ,KACL4uB,OAAQ3uB,MAGZ,MAAOA,OAGR4xB,UAAW,SAAUpC,GACpB,MAAK9yB,GAAOiE,WAAY6uB,GAChBxvB,KAAKyB,KAAK,SAASU,GACzBzF,EAAOsD,MAAM4xB,UAAWpC,EAAKtuB,KAAKlB,KAAMmC,MAInCnC,KAAKyB,KAAK,WAChB,GAAI2Y,GAAO1d,EAAQsD,MAClBqrB,EAAWjR,EAAKiR,UAEZA,GAASnrB,OACbmrB,EAASsG,QAASnC,GAGlBpV,EAAKuU,OAAQa,MAKhB4B,KAAM,SAAU5B,GACf,GAAI7uB,GAAajE,EAAOiE,WAAY6uB,EAEpC,OAAOxvB,MAAKyB,KAAK,SAASU,GACzBzF,EAAQsD,MAAO2xB,QAAShxB,EAAa6uB,EAAKtuB,KAAKlB,KAAMmC,GAAKqtB,MAI5DqC,OAAQ,WACP,MAAO7xB,MAAKyP,SAAShO,KAAK,WACnB/E,EAAOmK,SAAU7G,KAAM,SAC5BtD,EAAQsD,MAAOyvB,YAAazvB,KAAK0F,cAEhCnD,QAGL,IAAIuvB,IAAQC,GAAWC,GACtBC,GAAS,kBACTC,GAAW,wBACXC,GAAY,4BAGZC,GAAe,4BACfC,GAAU,UACVC,GAAgBnnB,OAAQ,KAAOjN,EAAY,SAAU,KACrDq0B,GAAgBpnB,OAAQ,KAAOjN,EAAY,kBAAmB,KAC9Ds0B,GAAcrnB,OAAQ,YAAcjN,EAAY,IAAK,KACrDu0B,IAAgBC,KAAM,SAEtBC,IAAYC,SAAU,WAAYC,WAAY,SAAU7T,QAAS,SACjE8T,IACCC,cAAe,EACfC,WAAY,KAGbC,IAAc,MAAO,QAAS,SAAU,QACxCC,IAAgB,SAAU,IAAK,MAAO,KAGvC,SAASC,IAAgB1qB,EAAO3F,GAG/B,GAAKA,IAAQ2F,GACZ,MAAO3F,EAIR,IAAIswB,GAAUtwB,EAAK7C,OAAO,GAAGhB,cAAgB6D,EAAKzF,MAAM,GACvDg2B,EAAWvwB,EACXX,EAAI+wB,GAAYhzB,MAEjB,OAAQiC,IAEP,GADAW,EAAOowB,GAAa/wB,GAAMixB,EACrBtwB,IAAQ2F,GACZ,MAAO3F,EAIT,OAAOuwB,GAGR,QAASC,IAAUvzB,EAAMwzB,GAIxB,MADAxzB,GAAOwzB,GAAMxzB,EAC4B,SAAlCrD,EAAO82B,IAAKzzB,EAAM,aAA2BrD,EAAOmN,SAAU9J,EAAKS,cAAeT,GAG1F,QAAS0zB,IAAUliB,EAAUmiB,GAC5B,GAAI1U,GAASjf,EAAM4zB,EAClBzX,KACA3B,EAAQ,EACRra,EAASqR,EAASrR,MAEnB,MAAgBA,EAARqa,EAAgBA,IACvBxa,EAAOwR,EAAUgJ,GACXxa,EAAK0I,QAIXyT,EAAQ3B,GAAU7d,EAAO+jB,MAAO1gB,EAAM,cACtCif,EAAUjf,EAAK0I,MAAMuW,QAChB0U,GAGExX,EAAQ3B,IAAuB,SAAZyE,IACxBjf,EAAK0I,MAAMuW,QAAU,IAMM,KAAvBjf,EAAK0I,MAAMuW,SAAkBsU,GAAUvzB,KAC3Cmc,EAAQ3B,GAAU7d,EAAO+jB,MAAO1gB,EAAM,aAAc6zB,GAAmB7zB,EAAK8G,aAIvEqV,EAAQ3B,KACboZ,EAASL,GAAUvzB,IAEdif,GAAuB,SAAZA,IAAuB2U,IACtCj3B,EAAO+jB,MAAO1gB,EAAM,aAAc4zB,EAAS3U,EAAUtiB,EAAO82B,IAAKzzB,EAAM,aAQ3E,KAAMwa,EAAQ,EAAWra,EAARqa,EAAgBA,IAChCxa,EAAOwR,EAAUgJ,GACXxa,EAAK0I,QAGLirB,GAA+B,SAAvB3zB,EAAK0I,MAAMuW,SAA6C,KAAvBjf,EAAK0I,MAAMuW,UACzDjf,EAAK0I,MAAMuW,QAAU0U,EAAOxX,EAAQ3B,IAAW,GAAK,QAItD,OAAOhJ,GAGR7U,EAAOsB,GAAG0E,QACT8wB,IAAK,SAAU1wB,EAAMiE,GACpB,MAAOrK,GAAOqL,OAAQ/H,KAAM,SAAUD,EAAM+C,EAAMiE,GACjD,GAAI3E,GAAKyxB,EACRvxB,KACAH,EAAI,CAEL,IAAKzF,EAAOyG,QAASL,GAAS,CAI7B,IAHA+wB,EAAS9B,GAAWhyB,GACpBqC,EAAMU,EAAK5C,OAECkC,EAAJD,EAASA,IAChBG,EAAKQ,EAAMX,IAAQzF,EAAO82B,IAAKzzB,EAAM+C,EAAMX,IAAK,EAAO0xB,EAGxD,OAAOvxB,GAGR,MAAOyE,KAAU9K,EAChBS,EAAO+L,MAAO1I,EAAM+C,EAAMiE,GAC1BrK,EAAO82B,IAAKzzB,EAAM+C,IACjBA,EAAMiE,EAAOhF,UAAU7B,OAAS,IAEpCwzB,KAAM,WACL,MAAOD,IAAUzzB,MAAM,IAExB8zB,KAAM,WACL,MAAOL,IAAUzzB,OAElB+zB,OAAQ,SAAUlZ,GACjB,MAAsB,iBAAVA,GACJA,EAAQ7a,KAAK0zB,OAAS1zB,KAAK8zB,OAG5B9zB,KAAKyB,KAAK,WACX6xB,GAAUtzB,MACdtD,EAAQsD,MAAO0zB,OAEfh3B,EAAQsD,MAAO8zB,YAMnBp3B,EAAOgG,QAGNsxB,UACC/W,SACC9b,IAAK,SAAUpB,EAAMk0B,GACpB,GAAKA,EAAW,CAEf,GAAI1yB,GAAMywB,GAAQjyB,EAAM,UACxB,OAAe,KAARwB,EAAa,IAAMA,MAO9B2yB,WACCC,aAAe,EACfC,aAAe,EACfpB,YAAc,EACdqB,YAAc,EACdpX,SAAW,EACXqX,OAAS,EACTC,SAAW,EACXC,QAAU,EACVC,QAAU,EACVvV,MAAQ,GAKTwV,UAECC,QAASj4B,EAAOmI,QAAQqY,SAAW,WAAa,cAIjDzU,MAAO,SAAU1I,EAAM+C,EAAMiE,EAAO6tB,GAEnC,GAAM70B,GAA0B,IAAlBA,EAAKQ,UAAoC,IAAlBR,EAAKQ,UAAmBR,EAAK0I,MAAlE,CAKA,GAAIlH,GAAKlC,EAAM0hB,EACdsS,EAAW32B,EAAOiK,UAAW7D,GAC7B2F,EAAQ1I,EAAK0I,KASd,IAPA3F,EAAOpG,EAAOg4B,SAAUrB,KAAgB32B,EAAOg4B,SAAUrB,GAAaF,GAAgB1qB,EAAO4qB,IAI7FtS,EAAQrkB,EAAOs3B,SAAUlxB,IAAUpG,EAAOs3B,SAAUX,GAG/CtsB,IAAU9K,EAsCd,MAAK8kB,IAAS,OAASA,KAAUxf,EAAMwf,EAAM5f,IAAKpB,GAAM,EAAO60B,MAAa34B,EACpEsF,EAIDkH,EAAO3F,EAhCd,IAVAzD,QAAc0H,GAGA,WAAT1H,IAAsBkC,EAAMixB,GAAQryB,KAAM4G,MAC9CA,GAAUxF,EAAI,GAAK,GAAMA,EAAI,GAAKiD,WAAY9H,EAAO82B,IAAKzzB,EAAM+C,IAEhEzD,EAAO,YAIM,MAAT0H,GAA0B,WAAT1H,GAAqBkF,MAAOwC,KAKpC,WAAT1H,GAAsB3C,EAAOw3B,UAAWb,KAC5CtsB,GAAS,MAKJrK,EAAOmI,QAAQ6Z,iBAA6B,KAAV3X,GAA+C,IAA/BjE,EAAKvF,QAAQ,gBACpEkL,EAAO3F,GAAS,WAIXie,GAAW,OAASA,KAAWha,EAAQga,EAAMoC,IAAKpjB,EAAMgH,EAAO6tB,MAAa34B,IAIjF,IACCwM,EAAO3F,GAASiE,EACf,MAAMnC,OAcX4uB,IAAK,SAAUzzB,EAAM+C,EAAM8xB,EAAOf,GACjC,GAAIzyB,GAAKoQ,EAAKuP,EACbsS,EAAW32B,EAAOiK,UAAW7D,EAyB9B,OAtBAA,GAAOpG,EAAOg4B,SAAUrB,KAAgB32B,EAAOg4B,SAAUrB,GAAaF,GAAgBpzB,EAAK0I,MAAO4qB,IAIlGtS,EAAQrkB,EAAOs3B,SAAUlxB,IAAUpG,EAAOs3B,SAAUX,GAG/CtS,GAAS,OAASA,KACtBvP,EAAMuP,EAAM5f,IAAKpB,GAAM,EAAM60B,IAIzBpjB,IAAQvV,IACZuV,EAAMwgB,GAAQjyB,EAAM+C,EAAM+wB,IAId,WAARriB,GAAoB1O,IAAQgwB,MAChCthB,EAAMshB,GAAoBhwB,IAIZ,KAAV8xB,GAAgBA,GACpBxzB,EAAMoD,WAAYgN,GACXojB,KAAU,GAAQl4B,EAAO4H,UAAWlD,GAAQA,GAAO,EAAIoQ,GAExDA,KAMJxV,EAAOqjB,kBACX0S,GAAY,SAAUhyB,GACrB,MAAO/D,GAAOqjB,iBAAkBtf,EAAM,OAGvCiyB,GAAS,SAAUjyB,EAAM+C,EAAM+xB,GAC9B,GAAIvV,GAAOwV,EAAUC,EACpBd,EAAWY,GAAa9C,GAAWhyB,GAGnCwB,EAAM0yB,EAAWA,EAASe,iBAAkBlyB,IAAUmxB,EAAUnxB,GAAS7G,EACzEwM,EAAQ1I,EAAK0I,KA8Bd,OA5BKwrB,KAES,KAAR1yB,GAAe7E,EAAOmN,SAAU9J,EAAKS,cAAeT,KACxDwB,EAAM7E,EAAO+L,MAAO1I,EAAM+C,IAOtByvB,GAAU9xB,KAAMc,IAAS8wB,GAAQ5xB,KAAMqC,KAG3Cwc,EAAQ7W,EAAM6W,MACdwV,EAAWrsB,EAAMqsB,SACjBC,EAAWtsB,EAAMssB,SAGjBtsB,EAAMqsB,SAAWrsB,EAAMssB,SAAWtsB,EAAM6W,MAAQ/d,EAChDA,EAAM0yB,EAAS3U,MAGf7W,EAAM6W,MAAQA,EACd7W,EAAMqsB,SAAWA,EACjBrsB,EAAMssB,SAAWA,IAIZxzB,IAEGjF,EAASE,gBAAgBy4B,eACpClD,GAAY,SAAUhyB,GACrB,MAAOA,GAAKk1B,cAGbjD,GAAS,SAAUjyB,EAAM+C,EAAM+xB,GAC9B,GAAIK,GAAMC,EAAIC,EACbnB,EAAWY,GAAa9C,GAAWhyB,GACnCwB,EAAM0yB,EAAWA,EAAUnxB,GAAS7G,EACpCwM,EAAQ1I,EAAK0I,KAoCd,OAhCY,OAAPlH,GAAekH,GAASA,EAAO3F,KACnCvB,EAAMkH,EAAO3F,IAUTyvB,GAAU9xB,KAAMc,KAAU4wB,GAAU1xB,KAAMqC,KAG9CoyB,EAAOzsB,EAAMysB,KACbC,EAAKp1B,EAAKs1B,aACVD,EAASD,GAAMA,EAAGD,KAGbE,IACJD,EAAGD,KAAOn1B,EAAKk1B,aAAaC,MAE7BzsB,EAAMysB,KAAgB,aAATpyB,EAAsB,MAAQvB,EAC3CA,EAAMkH,EAAM6sB,UAAY,KAGxB7sB,EAAMysB,KAAOA,EACRE,IACJD,EAAGD,KAAOE,IAIG,KAAR7zB,EAAa,OAASA,GAI/B,SAASg0B,IAAmBx1B,EAAMgH,EAAOyuB,GACxC,GAAI5rB,GAAU0oB,GAAUnyB,KAAM4G,EAC9B,OAAO6C,GAENvG,KAAKiE,IAAK,EAAGsC,EAAS,IAAQ4rB,GAAY,KAAU5rB,EAAS,IAAO,MACpE7C,EAGF,QAAS0uB,IAAsB11B,EAAM+C,EAAM8xB,EAAOc,EAAa7B,GAC9D,GAAI1xB,GAAIyyB,KAAYc,EAAc,SAAW,WAE5C,EAES,UAAT5yB,EAAmB,EAAI,EAEvB0O,EAAM,CAEP,MAAY,EAAJrP,EAAOA,GAAK,EAEJ,WAAVyyB,IACJpjB,GAAO9U,EAAO82B,IAAKzzB,EAAM60B,EAAQ3B,GAAW9wB,IAAK,EAAM0xB,IAGnD6B,GAEW,YAAVd,IACJpjB,GAAO9U,EAAO82B,IAAKzzB,EAAM,UAAYkzB,GAAW9wB,IAAK,EAAM0xB,IAI7C,WAAVe,IACJpjB,GAAO9U,EAAO82B,IAAKzzB,EAAM,SAAWkzB,GAAW9wB,GAAM,SAAS,EAAM0xB,MAIrEriB,GAAO9U,EAAO82B,IAAKzzB,EAAM,UAAYkzB,GAAW9wB,IAAK,EAAM0xB,GAG5C,YAAVe,IACJpjB,GAAO9U,EAAO82B,IAAKzzB,EAAM,SAAWkzB,GAAW9wB,GAAM,SAAS,EAAM0xB,IAKvE,OAAOriB,GAGR,QAASmkB,IAAkB51B,EAAM+C,EAAM8xB,GAGtC,GAAIgB,IAAmB,EACtBpkB,EAAe,UAAT1O,EAAmB/C,EAAKqf,YAAcrf,EAAKgf,aACjD8U,EAAS9B,GAAWhyB,GACpB21B,EAAch5B,EAAOmI,QAAQsa,WAAgE,eAAnDziB,EAAO82B,IAAKzzB,EAAM,aAAa,EAAO8zB,EAKjF,IAAY,GAAPriB,GAAmB,MAAPA,EAAc,CAQ9B,GANAA,EAAMwgB,GAAQjyB,EAAM+C,EAAM+wB,IACf,EAANriB,GAAkB,MAAPA,KACfA,EAAMzR,EAAK0I,MAAO3F,IAIdyvB,GAAU9xB,KAAK+Q,GACnB,MAAOA,EAKRokB,GAAmBF,IAAiBh5B,EAAOmI,QAAQkZ,mBAAqBvM,IAAQzR,EAAK0I,MAAO3F,IAG5F0O,EAAMhN,WAAYgN,IAAS,EAI5B,MAASA,GACRikB,GACC11B,EACA+C,EACA8xB,IAAWc,EAAc,SAAW,WACpCE,EACA/B,GAEE,KAIL,QAASD,IAAoB/sB,GAC5B,GAAI2I,GAAMlT,EACT0iB,EAAUyT,GAAa5rB,EA0BxB,OAxBMmY,KACLA,EAAU6W,GAAehvB,EAAU2I,GAGlB,SAAZwP,GAAuBA,IAE3B8S,IAAWA,IACVp1B,EAAO,kDACN82B,IAAK,UAAW,6BAChB/C,SAAUjhB,EAAIhT,iBAGhBgT,GAAQsiB,GAAO,GAAGvF,eAAiBuF,GAAO,GAAGxF,iBAAkBhwB,SAC/DkT,EAAIsmB,MAAM,+BACVtmB,EAAIumB,QAEJ/W,EAAU6W,GAAehvB,EAAU2I,GACnCsiB,GAAOvyB,UAIRkzB,GAAa5rB,GAAamY,GAGpBA,EAIR,QAAS6W,IAAe/yB,EAAM0M,GAC7B,GAAIzP,GAAOrD,EAAQ8S,EAAIjK,cAAezC,IAAS2tB,SAAUjhB,EAAI1L,MAC5Dkb,EAAUtiB,EAAO82B,IAAKzzB,EAAK,GAAI,UAEhC,OADAA,GAAK0F,SACEuZ,EAGRtiB,EAAO+E,MAAO,SAAU,SAAW,SAAUU,EAAGW,GAC/CpG,EAAOs3B,SAAUlxB,IAChB3B,IAAK,SAAUpB,EAAMk0B,EAAUW,GAC9B,MAAKX,GAGwB,IAArBl0B,EAAKqf,aAAqBgT,GAAa3xB,KAAM/D,EAAO82B,IAAKzzB,EAAM,YACrErD,EAAO6L,KAAMxI,EAAM4yB,GAAS,WAC3B,MAAOgD,IAAkB51B,EAAM+C,EAAM8xB,KAEtCe,GAAkB51B,EAAM+C,EAAM8xB,GAPhC,GAWDzR,IAAK,SAAUpjB,EAAMgH,EAAO6tB,GAC3B,GAAIf,GAASe,GAAS7C,GAAWhyB,EACjC,OAAOw1B,IAAmBx1B,EAAMgH,EAAO6tB,EACtCa,GACC11B,EACA+C,EACA8xB,EACAl4B,EAAOmI,QAAQsa,WAAgE,eAAnDziB,EAAO82B,IAAKzzB,EAAM,aAAa,EAAO8zB,GAClEA,GACG,OAMFn3B,EAAOmI,QAAQoY,UACpBvgB,EAAOs3B,SAAS/W,SACf9b,IAAK,SAAUpB,EAAMk0B,GAEpB,MAAO/B,IAASzxB,MAAOwzB,GAAYl0B,EAAKk1B,aAAel1B,EAAKk1B,aAAa/kB,OAASnQ,EAAK0I,MAAMyH,SAAW,IACrG,IAAO1L,WAAY2G,OAAO6qB,IAAS,GACrC/B,EAAW,IAAM,IAGnB9Q,IAAK,SAAUpjB,EAAMgH,GACpB,GAAI0B,GAAQ1I,EAAK0I,MAChBwsB,EAAel1B,EAAKk1B,aACpBhY,EAAUvgB,EAAO4H,UAAWyC,GAAU,iBAA2B,IAARA,EAAc,IAAM,GAC7EmJ,EAAS+kB,GAAgBA,EAAa/kB,QAAUzH,EAAMyH,QAAU,EAIjEzH,GAAMyW,KAAO,GAINnY,GAAS,GAAe,KAAVA,IAC6B,KAAhDrK,EAAOmB,KAAMqS,EAAO3M,QAAS0uB,GAAQ,MACrCxpB,EAAMsF,kBAKPtF,EAAMsF,gBAAiB,UAGR,KAAVhH,GAAgBkuB,IAAiBA,EAAa/kB,UAMpDzH,EAAMyH,OAAS+hB,GAAOxxB,KAAMyP,GAC3BA,EAAO3M,QAAS0uB,GAAQhV,GACxB/M,EAAS,IAAM+M,MAOnBvgB,EAAO,WACAA,EAAOmI,QAAQiZ,sBACpBphB,EAAOs3B,SAASzU,aACfpe,IAAK,SAAUpB,EAAMk0B,GACpB,MAAKA,GAGGv3B,EAAO6L,KAAMxI,GAAQif,QAAW,gBACtCgT,IAAUjyB,EAAM,gBAJlB,MAaGrD,EAAOmI,QAAQ8Y,eAAiBjhB,EAAOsB,GAAG40B,UAC/Cl2B,EAAO+E,MAAQ,MAAO,QAAU,SAAUU,EAAGmgB,GAC5C5lB,EAAOs3B,SAAU1R,IAChBnhB,IAAK,SAAUpB,EAAMk0B,GACpB,MAAKA,IACJA,EAAWjC,GAAQjyB,EAAMuiB,GAElBiQ,GAAU9xB,KAAMwzB,GACtBv3B,EAAQqD,GAAO6yB,WAAYtQ,GAAS,KACpC2R,GALF,QAcAv3B,EAAO4U,MAAQ5U,EAAO4U,KAAKwE,UAC/BpZ,EAAO4U,KAAKwE,QAAQ6d,OAAS,SAAU5zB,GAGtC,MAA2B,IAApBA,EAAKqf,aAAyC,GAArBrf,EAAKgf,eAClCriB,EAAOmI,QAAQoa,uBAAmG,UAAxElf,EAAK0I,OAAS1I,EAAK0I,MAAMuW,SAAYtiB,EAAO82B,IAAKzzB,EAAM,aAGrGrD,EAAO4U,KAAKwE,QAAQmgB,QAAU,SAAUl2B,GACvC,OAAQrD,EAAO4U,KAAKwE,QAAQ6d,OAAQ5zB,KAKtCrD,EAAO+E,MACNy0B,OAAQ,GACRC,QAAS,GACTC,OAAQ,SACN,SAAUC,EAAQC,GACpB55B,EAAOs3B,SAAUqC,EAASC,IACzBC,OAAQ,SAAUxvB,GACjB,GAAI5E,GAAI,EACPq0B,KAGAC,EAAyB,gBAAV1vB,GAAqBA,EAAMiC,MAAM,MAASjC,EAE1D,MAAY,EAAJ5E,EAAOA,IACdq0B,EAAUH,EAASpD,GAAW9wB,GAAMm0B,GACnCG,EAAOt0B,IAAOs0B,EAAOt0B,EAAI,IAAOs0B,EAAO,EAGzC,OAAOD,KAIHnE,GAAQ5xB,KAAM41B,KACnB35B,EAAOs3B,SAAUqC,EAASC,GAASnT,IAAMoS,KAG3C,IAAImB,IAAM,OACTC,GAAW,QACXC,GAAQ,SACRC,GAAkB,wCAClBC,GAAe,oCAEhBp6B,GAAOsB,GAAG0E,QACTq0B,UAAW,WACV,MAAOr6B,GAAOqxB,MAAO/tB,KAAKg3B,mBAE3BA,eAAgB,WACf,MAAOh3B,MAAKsC,IAAI,WAEf,GAAIiP,GAAW7U,EAAO4lB,KAAMtiB,KAAM,WAClC,OAAOuR,GAAW7U,EAAOsE,UAAWuQ,GAAavR,OAEjDkQ,OAAO,WACP,GAAI7Q,GAAOW,KAAKX,IAEhB,OAAOW,MAAK8C,OAASpG,EAAQsD,MAAOyrB,GAAI,cACvCqL,GAAar2B,KAAMT,KAAK6G,YAAegwB,GAAgBp2B,KAAMpB,KAC3DW,KAAK6U,UAAY0Y,GAA4B9sB,KAAMpB,MAEtDiD,IAAI,SAAUH,EAAGpC,GACjB,GAAIyR,GAAM9U,EAAQsD,MAAOwR,KAEzB,OAAc,OAAPA,EACN,KACA9U,EAAOyG,QAASqO,GACf9U,EAAO4F,IAAKkP,EAAK,SAAUA,GAC1B,OAAS1O,KAAM/C,EAAK+C,KAAMiE,MAAOyK,EAAIjO,QAASqzB,GAAO,YAEpD9zB,KAAM/C,EAAK+C,KAAMiE,MAAOyK,EAAIjO,QAASqzB,GAAO,WAC9Cz1B,SAMLzE,EAAOqxB,MAAQ,SAAUzjB,EAAG2sB,GAC3B,GAAIZ,GACHa,KACA5c,EAAM,SAAU3V,EAAKoC,GAEpBA,EAAQrK,EAAOiE,WAAYoG,GAAUA,IAAqB,MAATA,EAAgB,GAAKA,EACtEmwB,EAAGA,EAAEh3B,QAAWi3B,mBAAoBxyB,GAAQ,IAAMwyB,mBAAoBpwB,GASxE,IALKkwB,IAAgBh7B,IACpBg7B,EAAcv6B,EAAO06B,cAAgB16B,EAAO06B,aAAaH,aAIrDv6B,EAAOyG,QAASmH,IAASA,EAAE1K,SAAWlD,EAAOgE,cAAe4J,GAEhE5N,EAAO+E,KAAM6I,EAAG,WACfgQ,EAAKta,KAAK8C,KAAM9C,KAAK+G,aAMtB,KAAMsvB,IAAU/rB,GACf+sB,GAAahB,EAAQ/rB,EAAG+rB,GAAUY,EAAa3c,EAKjD,OAAO4c,GAAEtpB,KAAM,KAAMrK,QAASmzB,GAAK,KAGpC,SAASW,IAAahB,EAAQlyB,EAAK8yB,EAAa3c,GAC/C,GAAIxX,EAEJ,IAAKpG,EAAOyG,QAASgB,GAEpBzH,EAAO+E,KAAM0C,EAAK,SAAUhC,EAAGm1B,GACzBL,GAAeN,GAASl2B,KAAM41B,GAElC/b,EAAK+b,EAAQiB,GAIbD,GAAahB,EAAS,KAAqB,gBAANiB,GAAiBn1B,EAAI,IAAO,IAAKm1B,EAAGL,EAAa3c,SAIlF,IAAM2c,GAAsC,WAAvBv6B,EAAO2C,KAAM8E,GAQxCmW,EAAK+b,EAAQlyB,OANb,KAAMrB,IAAQqB,GACbkzB,GAAahB,EAAS,IAAMvzB,EAAO,IAAKqB,EAAKrB,GAAQm0B,EAAa3c,GAQrE5d,EAAO+E,KAAM,0MAEqDuH,MAAM,KAAM,SAAU7G,EAAGW,GAG1FpG,EAAOsB,GAAI8E,GAAS,SAAUqC,EAAMnH,GACnC,MAAO+D,WAAU7B,OAAS,EACzBF,KAAK6qB,GAAI/nB,EAAM,KAAMqC,EAAMnH,GAC3BgC,KAAKiE,QAASnB,MAIjBpG,EAAOsB,GAAG0E,QACT60B,MAAO,SAAUC,EAAQC,GACxB,MAAOz3B,MAAKiqB,WAAYuN,GAAStN,WAAYuN,GAASD,IAGvDE,KAAM,SAAU1S,EAAO7f,EAAMnH,GAC5B,MAAOgC,MAAK6qB,GAAI7F,EAAO,KAAM7f,EAAMnH,IAEpC25B,OAAQ,SAAU3S,EAAOhnB,GACxB,MAAOgC,MAAKkE,IAAK8gB,EAAO,KAAMhnB,IAG/B45B,SAAU,SAAU95B,EAAUknB,EAAO7f,EAAMnH,GAC1C,MAAOgC,MAAK6qB,GAAI7F,EAAOlnB,EAAUqH,EAAMnH,IAExC65B,WAAY,SAAU/5B,EAAUknB,EAAOhnB,GAEtC,MAA4B,KAArB+D,UAAU7B,OAAeF,KAAKkE,IAAKpG,EAAU,MAASkC,KAAKkE,IAAK8gB,EAAOlnB,GAAY,KAAME,KAGlG,IAEC85B,IACAC,GACAC,GAAat7B,EAAO0L,MAEpB6vB,GAAc,KACdC,GAAQ,OACRC,GAAM,gBACNC,GAAW,gCAEXC,GAAiB,4DACjBC,GAAa,iBACbC,GAAY,QACZC,GAAO,8CAGPC,GAAQ/7B,EAAOsB,GAAGqrB,KAWlBqP,MAOAC,MAGAC,GAAW,KAAK37B,OAAO,IAIxB,KACC86B,GAAe17B,EAASoY,KACvB,MAAO7P,IAGRmzB,GAAez7B,EAASiJ,cAAe,KACvCwyB,GAAatjB,KAAO,GACpBsjB,GAAeA,GAAatjB,KAI7BqjB,GAAeU,GAAKr4B,KAAM43B,GAAajxB,kBAGvC,SAAS+xB,IAA6BC,GAGrC,MAAO,UAAUC,EAAoBpe,GAED,gBAAvBoe,KACXpe,EAAOoe,EACPA,EAAqB,IAGtB,IAAItH,GACHtvB,EAAI,EACJ62B,EAAYD,EAAmBjyB,cAAchH,MAAO1B,MAErD,IAAK1B,EAAOiE,WAAYga,GAEvB,MAAS8W,EAAWuH,EAAU72B,KAER,MAAhBsvB,EAAS,IACbA,EAAWA,EAASp0B,MAAO,IAAO,KACjCy7B,EAAWrH,GAAaqH,EAAWrH,QAAkBpgB,QAASsJ,KAI9Dme,EAAWrH,GAAaqH,EAAWrH,QAAkBt0B,KAAMwd,IAQjE,QAASse,IAA+BH,EAAW/1B,EAASm2B,EAAiBC,GAE5E,GAAIC,MACHC,EAAqBP,IAAcH,EAEpC,SAASW,GAAS7H,GACjB,GAAI3c,EAYJ,OAXAskB,GAAW3H,IAAa,EACxB/0B,EAAO+E,KAAMq3B,EAAWrH,OAAkB,SAAUhlB,EAAG8sB,GACtD,GAAIC,GAAsBD,EAAoBx2B,EAASm2B,EAAiBC,EACxE,OAAmC,gBAAxBK,IAAqCH,GAAqBD,EAAWI,GAIpEH,IACDvkB,EAAW0kB,GADf,GAHNz2B,EAAQi2B,UAAU3nB,QAASmoB,GAC3BF,EAASE,IACF,KAKF1kB,EAGR,MAAOwkB,GAASv2B,EAAQi2B,UAAW,MAAUI,EAAW,MAASE,EAAS,KAM3E,QAASG,IAAYx2B,EAAQN,GAC5B,GAAIO,GAAMyB,EACT+0B,EAAch9B,EAAO06B,aAAasC,eAEnC,KAAM/0B,IAAOhC,GACPA,EAAKgC,KAAU1I,KACjBy9B,EAAa/0B,GAAQ1B,EAAWC,IAASA,OAAgByB,GAAQhC,EAAKgC,GAO1E,OAJKzB,IACJxG,EAAOgG,QAAQ,EAAMO,EAAQC,GAGvBD,EAGRvG,EAAOsB,GAAGqrB,KAAO,SAAUkI,EAAKoI,EAAQj4B,GACvC,GAAoB,gBAAR6vB,IAAoBkH,GAC/B,MAAOA,IAAM32B,MAAO9B,KAAM+B,UAG3B,IAAIjE,GAAU87B,EAAUv6B,EACvB+a,EAAOpa,KACPkE,EAAMqtB,EAAIh0B,QAAQ,IA+CnB,OA7CK2G,IAAO,IACXpG,EAAWyzB,EAAIl0B,MAAO6G,EAAKqtB,EAAIrxB,QAC/BqxB,EAAMA,EAAIl0B,MAAO,EAAG6G,IAIhBxH,EAAOiE,WAAYg5B,IAGvBj4B,EAAWi4B,EACXA,EAAS19B,GAGE09B,GAA4B,gBAAXA,KAC5Bt6B,EAAO,QAIH+a,EAAKla,OAAS,GAClBxD,EAAO80B,MACND,IAAKA,EAGLlyB,KAAMA,EACNoyB,SAAU,OACVtsB,KAAMw0B,IACJ93B,KAAK,SAAUg4B,GAGjBD,EAAW73B,UAEXqY,EAAKoV,KAAM1xB,EAIVpB,EAAO,SAASiyB,OAAQjyB,EAAO4D,UAAWu5B,IAAiBz5B,KAAMtC,GAGjE+7B,KAECC,SAAUp4B,GAAY,SAAUy3B,EAAOY,GACzC3f,EAAK3Y,KAAMC,EAAUk4B,IAAcT,EAAMU,aAAcE,EAAQZ,MAI1Dn5B,MAIRtD,EAAO+E,MAAQ,YAAa,WAAY,eAAgB,YAAa,cAAe,YAAc,SAAUU,EAAG9C,GAC9G3C,EAAOsB,GAAIqB,GAAS,SAAUrB,GAC7B,MAAOgC,MAAK6qB,GAAIxrB,EAAMrB,MAIxBtB,EAAOgG,QAGNs3B,OAAQ,EAGRC,gBACAC,QAEA9C,cACC7F,IAAKwG,GACL14B,KAAM,MACN86B,QAAS9B,GAAe53B,KAAMq3B,GAAc,IAC5C/S,QAAQ,EACRqV,aAAa,EACb/zB,OAAO,EACPg0B,YAAa,mDAabC,SACCC,IAAK3B,GACL3xB,KAAM,aACNuoB,KAAM,YACNxpB,IAAK,4BACLw0B,KAAM,qCAGPnP,UACCrlB,IAAK,MACLwpB,KAAM,OACNgL,KAAM,QAGPC,gBACCz0B,IAAK,cACLiB,KAAM,eACNuzB,KAAM,gBAKPE,YAGCC,SAAUj2B,OAGVk2B,aAAa,EAGbC,YAAan+B,EAAOiJ,UAGpBm1B,WAAYp+B,EAAOqJ,UAOpB2zB,aACCnI,KAAK,EACLxzB,SAAS,IAOXg9B,UAAW,SAAU93B,EAAQ+3B,GAC5B,MAAOA,GAGNvB,GAAYA,GAAYx2B,EAAQvG,EAAO06B,cAAgB4D,GAGvDvB,GAAY/8B,EAAO06B,aAAcn0B,IAGnCg4B,cAAepC,GAA6BH,IAC5CwC,cAAerC,GAA6BF,IAG5CnH,KAAM,SAAUD,EAAKxuB,GAGA,gBAARwuB,KACXxuB,EAAUwuB,EACVA,EAAMt1B,GAIP8G,EAAUA,KAEV,IACC0zB,GAEAt0B,EAEAg5B,EAEAC,EAEAC,EAGAC,EAEAC,EAEAC,EAEAtE,EAAIx6B,EAAOq+B,aAAeh4B,GAE1B04B,EAAkBvE,EAAEn5B,SAAWm5B,EAE/BwE,EAAqBxE,EAAEn5B,UAAa09B,EAAgBl7B,UAAYk7B,EAAgB77B,QAC/ElD,EAAQ++B,GACR/+B,EAAOyC,MAER4b,EAAWre,EAAOgM,WAClBizB,EAAmBj/B,EAAO8c,UAAU,eAEpCoiB,EAAa1E,EAAE0E,eAEfC,KACAC,KAEAjhB,EAAQ,EAERkhB,EAAW,WAEX5C,GACC75B,WAAY,EAGZ08B,kBAAmB,SAAUr3B,GAC5B,GAAI7E,EACJ,IAAe,IAAV+a,EAAc,CAClB,IAAM2gB,EAAkB,CACvBA,IACA,OAAS17B,EAAQs4B,GAASj4B,KAAMi7B,GAC/BI,EAAiB17B,EAAM,GAAGgH,eAAkBhH,EAAO,GAGrDA,EAAQ07B,EAAiB72B,EAAImC,eAE9B,MAAgB,OAAThH,EAAgB,KAAOA,GAI/Bm8B,sBAAuB,WACtB,MAAiB,KAAVphB,EAAcugB,EAAwB,MAI9Cc,iBAAkB,SAAUp5B,EAAMiE,GACjC,GAAIo1B,GAAQr5B,EAAKgE,aAKjB,OAJM+T,KACL/X,EAAOg5B,EAAqBK,GAAUL,EAAqBK,IAAWr5B,EACtE+4B,EAAgB/4B,GAASiE,GAEnB/G,MAIRo8B,iBAAkB,SAAU/8B,GAI3B,MAHMwb,KACLqc,EAAEmF,SAAWh9B,GAEPW,MAIR47B,WAAY,SAAUt5B,GACrB,GAAIg6B,EACJ,IAAKh6B,EACJ,GAAa,EAARuY,EACJ,IAAMyhB,IAAQh6B,GAEbs5B,EAAYU,IAAWV,EAAYU,GAAQh6B,EAAKg6B,QAIjDnD,GAAMre,OAAQxY,EAAK62B,EAAMY,QAG3B,OAAO/5B,OAIRu8B,MAAO,SAAUC,GAChB,GAAIC,GAAYD,GAAcT,CAK9B,OAJKR,IACJA,EAAUgB,MAAOE,GAElB56B,EAAM,EAAG46B,GACFz8B,MAwCV,IAnCA+a,EAASnZ,QAASu3B,GAAQW,SAAW6B,EAAiBrhB,IACtD6e,EAAMuD,QAAUvD,EAAMt3B,KACtBs3B,EAAMn0B,MAAQm0B,EAAMne,KAMpBkc,EAAE3F,MAAUA,GAAO2F,EAAE3F,KAAOwG,IAAiB,IAAKx0B,QAAS20B,GAAO,IAAK30B,QAASg1B,GAAWT,GAAc,GAAM,MAG/GZ,EAAE73B,KAAO0D,EAAQ45B,QAAU55B,EAAQ1D,MAAQ63B,EAAEyF,QAAUzF,EAAE73B,KAGzD63B,EAAE8B,UAAYt8B,EAAOmB,KAAMq5B,EAAEzF,UAAY,KAAM3qB,cAAchH,MAAO1B,KAAqB,IAGnE,MAAjB84B,EAAE0F,cACNnG,EAAQ+B,GAAKr4B,KAAM+2B,EAAE3F,IAAIzqB,eACzBowB,EAAE0F,eAAkBnG,GACjBA,EAAO,KAAQqB,GAAc,IAAOrB,EAAO,KAAQqB,GAAc,KAChErB,EAAO,KAAwB,UAAfA,EAAO,GAAkB,KAAO,WAC/CqB,GAAc,KAA+B,UAAtBA,GAAc,GAAkB,KAAO,UAK/DZ,EAAE/xB,MAAQ+xB,EAAEkD,aAAiC,gBAAXlD,GAAE/xB,OACxC+xB,EAAE/xB,KAAOzI,EAAOqxB,MAAOmJ,EAAE/xB,KAAM+xB,EAAED,cAIlCgC,GAA+BP,GAAYxB,EAAGn0B,EAASo2B,GAGxC,IAAVte,EACJ,MAAOse,EAIRmC,GAAcpE,EAAEnS,OAGXuW,GAAmC,IAApB5+B,EAAOs9B,UAC1Bt9B,EAAOyC,MAAM8E,QAAQ,aAItBizB,EAAE73B,KAAO63B,EAAE73B,KAAKJ,cAGhBi4B,EAAE2F,YAAcvE,GAAW73B,KAAMy2B,EAAE73B,MAInC87B,EAAWjE,EAAE3F,IAGP2F,EAAE2F,aAGF3F,EAAE/xB,OACNg2B,EAAajE,EAAE3F,MAAS0G,GAAYx3B,KAAM06B,GAAa,IAAM,KAAQjE,EAAE/xB,WAEhE+xB,GAAE/xB,MAIL+xB,EAAEhpB,SAAU,IAChBgpB,EAAE3F,IAAM4G,GAAI13B,KAAM06B,GAGjBA,EAAS53B,QAAS40B,GAAK,OAASH,MAGhCmD,GAAalD,GAAYx3B,KAAM06B,GAAa,IAAM,KAAQ,KAAOnD,OAK/Dd,EAAE4F,aACDpgC,EAAOu9B,aAAckB,IACzBhC,EAAM+C,iBAAkB,oBAAqBx/B,EAAOu9B,aAAckB,IAE9Dz+B,EAAOw9B,KAAMiB,IACjBhC,EAAM+C,iBAAkB,gBAAiBx/B,EAAOw9B,KAAMiB,MAKnDjE,EAAE/xB,MAAQ+xB,EAAE2F,YAAc3F,EAAEmD,eAAgB,GAASt3B,EAAQs3B,cACjElB,EAAM+C,iBAAkB,eAAgBhF,EAAEmD,aAI3ClB,EAAM+C,iBACL,SACAhF,EAAE8B,UAAW,IAAO9B,EAAEoD,QAASpD,EAAE8B,UAAU,IAC1C9B,EAAEoD,QAASpD,EAAE8B,UAAU,KAA8B,MAArB9B,EAAE8B,UAAW,GAAc,KAAOJ,GAAW,WAAa,IAC1F1B,EAAEoD,QAAS,KAIb,KAAMn4B,IAAK+0B,GAAE6F,QACZ5D,EAAM+C,iBAAkB/5B,EAAG+0B,EAAE6F,QAAS56B,GAIvC,IAAK+0B,EAAE8F,aAAgB9F,EAAE8F,WAAW97B,KAAMu6B,EAAiBtC,EAAOjC,MAAQ,GAAmB,IAAVrc,GAElF,MAAOse,GAAMoD,OAIdR,GAAW,OAGX,KAAM55B,KAAOu6B,QAAS,EAAG13B,MAAO,EAAG80B,SAAU,GAC5CX,EAAOh3B,GAAK+0B,EAAG/0B,GAOhB,IAHAo5B,EAAYtC,GAA+BN,GAAYzB,EAAGn0B,EAASo2B,GAK5D,CACNA,EAAM75B,WAAa,EAGdg8B,GACJI,EAAmBz3B,QAAS,YAAck1B,EAAOjC,IAG7CA,EAAE7wB,OAAS6wB,EAAE1V,QAAU,IAC3B6Z,EAAet3B,WAAW,WACzBo1B,EAAMoD,MAAM,YACVrF,EAAE1V,SAGN,KACC3G,EAAQ,EACR0gB,EAAU0B,KAAMpB,EAAgBh6B,GAC/B,MAAQ+C,GAET,KAAa,EAARiW,GAIJ,KAAMjW,EAHN/C,GAAM,GAAI+C,QArBZ/C,GAAM,GAAI,eA8BX,SAASA,GAAMk4B,EAAQmD,EAAkBC,EAAWJ,GACnD,GAAIK,GAAWV,EAAS13B,EAAO40B,EAAUyD,EACxCb,EAAaU,CAGC,KAAVriB,IAKLA,EAAQ,EAGHwgB,GACJ5Z,aAAc4Z,GAKfE,EAAYt/B,EAGZm/B,EAAwB2B,GAAW,GAGnC5D,EAAM75B,WAAay6B,EAAS,EAAI,EAAI,EAGpCqD,EAAYrD,GAAU,KAAgB,IAATA,GAA2B,MAAXA,EAGxCoD,IACJvD,EAAW0D,GAAqBpG,EAAGiC,EAAOgE,IAI3CvD,EAAW2D,GAAarG,EAAG0C,EAAUT,EAAOiE,GAGvCA,GAGClG,EAAE4F,aACNO,EAAWlE,EAAM6C,kBAAkB,iBAC9BqB,IACJ3gC,EAAOu9B,aAAckB,GAAakC,GAEnCA,EAAWlE,EAAM6C,kBAAkB,QAC9BqB,IACJ3gC,EAAOw9B,KAAMiB,GAAakC,IAKZ,MAAXtD,GAA6B,SAAX7C,EAAE73B,KACxBm9B,EAAa,YAGS,MAAXzC,EACXyC,EAAa,eAIbA,EAAa5C,EAAS/e,MACtB6hB,EAAU9C,EAASz0B,KACnBH,EAAQ40B,EAAS50B,MACjBo4B,GAAap4B,KAKdA,EAAQw3B,GACHzC,IAAWyC,KACfA,EAAa,QACC,EAATzC,IACJA,EAAS,KAMZZ,EAAMY,OAASA,EACfZ,EAAMqD,YAAeU,GAAoBV,GAAe,GAGnDY,EACJriB,EAAS/W,YAAay3B,GAAmBiB,EAASF,EAAYrD,IAE9Dpe,EAASyiB,WAAY/B,GAAmBtC,EAAOqD,EAAYx3B,IAI5Dm0B,EAAMyC,WAAYA,GAClBA,EAAa3/B,EAERq/B,GACJI,EAAmBz3B,QAASm5B,EAAY,cAAgB,aACrDjE,EAAOjC,EAAGkG,EAAYV,EAAU13B,IAIpC22B,EAAiBjhB,SAAU+gB,GAAmBtC,EAAOqD,IAEhDlB,IACJI,EAAmBz3B,QAAS,gBAAkBk1B,EAAOjC,MAE3Cx6B,EAAOs9B,QAChBt9B,EAAOyC,MAAM8E,QAAQ,cAKxB,MAAOk1B,IAGRsE,QAAS,SAAUlM,EAAKpsB,EAAMzD,GAC7B,MAAOhF,GAAOyE,IAAKowB,EAAKpsB,EAAMzD,EAAU,SAGzCg8B,UAAW,SAAUnM,EAAK7vB,GACzB,MAAOhF,GAAOyE,IAAKowB,EAAKt1B,EAAWyF,EAAU,aAI/ChF,EAAO+E,MAAQ,MAAO,QAAU,SAAUU,EAAGw6B,GAC5CjgC,EAAQigC,GAAW,SAAUpL,EAAKpsB,EAAMzD,EAAUrC,GAQjD,MANK3C,GAAOiE,WAAYwE,KACvB9F,EAAOA,GAAQqC,EACfA,EAAWyD,EACXA,EAAOlJ,GAGDS,EAAO80B,MACbD,IAAKA,EACLlyB,KAAMs9B,EACNlL,SAAUpyB,EACV8F,KAAMA,EACNu3B,QAASh7B,MASZ,SAAS47B,IAAqBpG,EAAGiC,EAAOgE,GACvC,GAAIQ,GAAeC,EAAIC,EAAex+B,EACrCgsB,EAAW6L,EAAE7L,SACb2N,EAAY9B,EAAE8B,SAGf,OAA0B,MAAnBA,EAAW,GACjBA,EAAU5qB,QACLwvB,IAAO3hC,IACX2hC,EAAK1G,EAAEmF,UAAYlD,EAAM6C,kBAAkB,gBAK7C,IAAK4B,EACJ,IAAMv+B,IAAQgsB,GACb,GAAKA,EAAUhsB,IAAUgsB,EAAUhsB,GAAOoB,KAAMm9B,GAAO,CACtD5E,EAAU3nB,QAAShS,EACnB,OAMH,GAAK25B,EAAW,IAAOmE,GACtBU,EAAgB7E,EAAW,OACrB,CAEN,IAAM35B,IAAQ89B,GAAY,CACzB,IAAMnE,EAAW,IAAO9B,EAAEwD,WAAYr7B,EAAO,IAAM25B,EAAU,IAAO,CACnE6E,EAAgBx+B,CAChB,OAEKs+B,IACLA,EAAgBt+B,GAIlBw+B,EAAgBA,GAAiBF,EAMlC,MAAKE,IACCA,IAAkB7E,EAAW,IACjCA,EAAU3nB,QAASwsB,GAEbV,EAAWU,IAJnB,EAWD,QAASN,IAAarG,EAAG0C,EAAUT,EAAOiE,GACzC,GAAIU,GAAOC,EAASC,EAAM/3B,EAAKqlB,EAC9BoP,KAEA1B,EAAY9B,EAAE8B,UAAU37B,OAGzB,IAAK27B,EAAW,GACf,IAAMgF,IAAQ9G,GAAEwD,WACfA,EAAYsD,EAAKl3B,eAAkBowB,EAAEwD,WAAYsD,EAInDD,GAAU/E,EAAU5qB,OAGpB,OAAQ2vB,EAcP,GAZK7G,EAAEuD,eAAgBsD,KACtB5E,EAAOjC,EAAEuD,eAAgBsD,IAAcnE,IAIlCtO,GAAQ8R,GAAalG,EAAE+G,aAC5BrE,EAAW1C,EAAE+G,WAAYrE,EAAU1C,EAAEzF,WAGtCnG,EAAOyS,EACPA,EAAU/E,EAAU5qB,QAKnB,GAAiB,MAAZ2vB,EAEJA,EAAUzS,MAGJ,IAAc,MAATA,GAAgBA,IAASyS,EAAU,CAM9C,GAHAC,EAAOtD,EAAYpP,EAAO,IAAMyS,IAAarD,EAAY,KAAOqD,IAG1DC,EACL,IAAMF,IAASpD,GAId,GADAz0B,EAAM63B,EAAM90B,MAAO,KACd/C,EAAK,KAAQ83B,IAGjBC,EAAOtD,EAAYpP,EAAO,IAAMrlB,EAAK,KACpCy0B,EAAY,KAAOz0B,EAAK,KACb,CAEN+3B,KAAS,EACbA,EAAOtD,EAAYoD,GAGRpD,EAAYoD,MAAY,IACnCC,EAAU93B,EAAK,GACf+yB,EAAU3nB,QAASpL,EAAK,IAEzB,OAOJ,GAAK+3B,KAAS,EAGb,GAAKA,GAAQ9G,EAAG,UACf0C,EAAWoE,EAAMpE,OAEjB,KACCA,EAAWoE,EAAMpE,GAChB,MAAQh1B,GACT,OAASiW,MAAO,cAAe7V,MAAOg5B,EAAOp5B,EAAI,sBAAwB0mB,EAAO,OAASyS,IAQ/F,OAASljB,MAAO,UAAW1V,KAAMy0B,GAGlCl9B,EAAOq+B,WACNT,SACC4D,OAAQ,6FAET7S,UACC6S,OAAQ,uBAETxD,YACCyD,cAAe,SAAUl3B,GAExB,MADAvK,GAAO+J,WAAYQ,GACZA,MAMVvK,EAAOu+B,cAAe,SAAU,SAAU/D,GACpCA,EAAEhpB,QAAUjS,IAChBi7B,EAAEhpB,OAAQ,GAENgpB,EAAE0F,cACN1F,EAAE73B,KAAO,MACT63B,EAAEnS,QAAS,KAKbroB,EAAOw+B,cAAe,SAAU,SAAShE,GAGxC,GAAKA,EAAE0F,YAAc,CAEpB,GAAIsB,GACHE,EAAO9hC,EAAS8hC,MAAQ1hC,EAAO,QAAQ,IAAMJ,EAASE,eAEvD,QAECygC,KAAM,SAAUxwB,EAAG/K,GAElBw8B,EAAS5hC,EAASiJ,cAAc,UAEhC24B,EAAO73B,OAAQ,EAEV6wB,EAAEmH,gBACNH,EAAOI,QAAUpH,EAAEmH,eAGpBH,EAAOv7B,IAAMu0B,EAAE3F,IAGf2M,EAAOK,OAASL,EAAOM,mBAAqB,SAAU/xB,EAAGgyB,IAEnDA,IAAYP,EAAO5+B,YAAc,kBAAkBmB,KAAMy9B,EAAO5+B,eAGpE4+B,EAAOK,OAASL,EAAOM,mBAAqB,KAGvCN,EAAOp9B,YACXo9B,EAAOp9B,WAAW0N,YAAa0vB,GAIhCA,EAAS,KAGHO,GACL/8B,EAAU,IAAK,aAOlB08B,EAAKpP,aAAckP,EAAQE,EAAKruB,aAGjCwsB,MAAO,WACD2B,GACJA,EAAOK,OAAQtiC,GAAW,OAM/B,IAAIyiC,OACHC,GAAS,mBAGVjiC,GAAOq+B,WACN6D,MAAO,WACPC,cAAe,WACd,GAAIn9B,GAAWg9B,GAAa/zB,OAAWjO,EAAO0G,QAAU,IAAQ40B,IAEhE,OADAh4B,MAAM0B,IAAa,EACZA,KAKThF,EAAOu+B,cAAe,aAAc,SAAU/D,EAAG4H,EAAkB3F,GAElE,GAAI4F,GAAcC,EAAaC,EAC9BC,EAAWhI,EAAE0H,SAAU,IAAWD,GAAOl+B,KAAMy2B,EAAE3F,KAChD,MACkB,gBAAX2F,GAAE/xB,QAAwB+xB,EAAEmD,aAAe,IAAK98B,QAAQ,sCAAwCohC,GAAOl+B,KAAMy2B,EAAE/xB,OAAU,OAIlI,OAAK+5B,IAAiC,UAArBhI,EAAE8B,UAAW,IAG7B+F,EAAe7H,EAAE2H,cAAgBniC,EAAOiE,WAAYu2B,EAAE2H,eACrD3H,EAAE2H,gBACF3H,EAAE2H,cAGEK,EACJhI,EAAGgI,GAAahI,EAAGgI,GAAW37B,QAASo7B,GAAQ,KAAOI,GAC3C7H,EAAE0H,SAAU,IACvB1H,EAAE3F,MAAS0G,GAAYx3B,KAAMy2B,EAAE3F,KAAQ,IAAM,KAAQ2F,EAAE0H,MAAQ,IAAMG,GAItE7H,EAAEwD,WAAW,eAAiB,WAI7B,MAHMuE,IACLviC,EAAOsI,MAAO+5B,EAAe,mBAEvBE,EAAmB,IAI3B/H,EAAE8B,UAAW,GAAM,OAGnBgG,EAAchjC,EAAQ+iC,GACtB/iC,EAAQ+iC,GAAiB,WACxBE,EAAoBl9B,WAIrBo3B,EAAMre,OAAO,WAEZ9e,EAAQ+iC,GAAiBC,EAGpB9H,EAAG6H,KAEP7H,EAAE2H,cAAgBC,EAAiBD,cAGnCH,GAAavhC,KAAM4hC,IAIfE,GAAqBviC,EAAOiE,WAAYq+B,IAC5CA,EAAaC,EAAmB,IAGjCA,EAAoBD,EAAc/iC,IAI5B,UAtDR,GAyDD,IAAIkjC,IAAcC,GACjBC,GAAQ,EAERC,GAAmBtjC,EAAOoK,eAAiB,WAE1C,GAAIzB,EACJ,KAAMA,IAAOw6B,IACZA,GAAcx6B,GAAO1I,GAAW,GAKnC,SAASsjC,MACR,IACC,MAAO,IAAIvjC,GAAOwjC,eACjB,MAAO56B,KAGV,QAAS66B,MACR,IACC,MAAO,IAAIzjC,GAAOoK,cAAc,qBAC/B,MAAOxB,KAKVlI,EAAO06B,aAAasI,IAAM1jC,EAAOoK,cAOhC,WACC,OAAQpG,KAAKm6B,SAAWoF,MAAuBE,MAGhDF,GAGDH,GAAe1iC,EAAO06B,aAAasI,MACnChjC,EAAOmI,QAAQ86B,OAASP,IAAkB,mBAAqBA,IAC/DA,GAAe1iC,EAAOmI,QAAQ2sB,OAAS4N,GAGlCA,IAEJ1iC,EAAOw+B,cAAc,SAAUhE,GAE9B,IAAMA,EAAE0F,aAAelgC,EAAOmI,QAAQ86B,KAAO,CAE5C,GAAIj+B,EAEJ,QACCu7B,KAAM,SAAUF,EAASjD,GAGxB,GAAInU,GAAQxjB,EACXu9B,EAAMxI,EAAEwI,KAWT,IAPKxI,EAAE0I,SACNF,EAAIG,KAAM3I,EAAE73B,KAAM63B,EAAE3F,IAAK2F,EAAE7wB,MAAO6wB,EAAE0I,SAAU1I,EAAExhB,UAEhDgqB,EAAIG,KAAM3I,EAAE73B,KAAM63B,EAAE3F,IAAK2F,EAAE7wB,OAIvB6wB,EAAE4I,UACN,IAAM39B,IAAK+0B,GAAE4I,UACZJ,EAAKv9B,GAAM+0B,EAAE4I,UAAW39B,EAKrB+0B,GAAEmF,UAAYqD,EAAItD,kBACtBsD,EAAItD,iBAAkBlF,EAAEmF,UAQnBnF,EAAE0F,aAAgBG,EAAQ,sBAC/BA,EAAQ,oBAAsB,iBAI/B,KACC,IAAM56B,IAAK46B,GACV2C,EAAIxD,iBAAkB/5B,EAAG46B,EAAS56B,IAElC,MAAO2iB,IAKT4a,EAAIzC,KAAQ/F,EAAE2F,YAAc3F,EAAE/xB,MAAU,MAGxCzD,EAAW,SAAU+K,EAAGgyB,GACvB,GAAI1E,GAAQyB,EAAiBgB,EAAYW,CAKzC,KAGC,GAAKz7B,IAAc+8B,GAA8B,IAAnBiB,EAAIpgC,YAcjC,GAXAoC,EAAWzF,EAGN0pB,IACJ+Z,EAAIlB,mBAAqB9hC,EAAO8J,KAC3B84B,UACGH,IAAcxZ,IAKlB8Y,EAEoB,IAAnBiB,EAAIpgC,YACRogC,EAAInD,YAEC,CACNY,KACApD,EAAS2F,EAAI3F,OACbyB,EAAkBkE,EAAIzD,wBAIW,gBAArByD,GAAI7F,eACfsD,EAAUl2B,KAAOy4B,EAAI7F,aAKtB,KACC2C,EAAakD,EAAIlD,WAChB,MAAO53B,GAER43B,EAAa,GAQRzC,IAAU7C,EAAEiD,SAAYjD,EAAE0F,YAGT,OAAX7C,IACXA,EAAS,KAHTA,EAASoD,EAAUl2B,KAAO,IAAM,KAOlC,MAAO84B,GACFtB,GACL3E,EAAU,GAAIiG,GAKX5C,GACJrD,EAAUC,EAAQyC,EAAYW,EAAW3B,IAIrCtE,EAAE7wB,MAGuB,IAAnBq5B,EAAIpgC,WAGfyE,WAAYrC,IAEZikB,IAAW0Z,GACNC,KAGEH,KACLA,MACAziC,EAAQV,GAASgkC,OAAQV,KAG1BH,GAAcxZ,GAAWjkB,GAE1Bg+B,EAAIlB,mBAAqB98B,GAjBzBA,KAqBF66B,MAAO,WACD76B,GACJA,EAAUzF,GAAW,OAO3B,IAAIgkC,IAAOC,GACVC,GAAW,yBACXC,GAAaj1B,OAAQ,iBAAmBjN,EAAY,cAAe,KACnEmiC,GAAO,cACPC,IAAwBC,IACxBC,IACCjG,KAAM,SAAUjY,EAAMvb,GACrB,GAAI05B,GAAQzgC,KAAK0gC,YAAape,EAAMvb,GACnC9D,EAASw9B,EAAM3xB,MACf2nB,EAAQ2J,GAAOjgC,KAAM4G,GACrB45B,EAAOlK,GAASA,EAAO,KAAS/5B,EAAOw3B,UAAW5R,GAAS,GAAK,MAGhEhP,GAAU5W,EAAOw3B,UAAW5R,IAAmB,OAATqe,IAAkB19B,IACvDm9B,GAAOjgC,KAAMzD,EAAO82B,IAAKiN,EAAM1gC,KAAMuiB,IACtCse,EAAQ,EACRC,EAAgB,EAEjB,IAAKvtB,GAASA,EAAO,KAAQqtB,EAAO,CAEnCA,EAAOA,GAAQrtB,EAAO,GAGtBmjB,EAAQA,MAGRnjB,GAASrQ,GAAU,CAEnB,GAGC29B,GAAQA,GAAS,KAGjBttB,GAAgBstB,EAChBlkC,EAAO+L,MAAOg4B,EAAM1gC,KAAMuiB,EAAMhP,EAAQqtB,SAI/BC,KAAWA,EAAQH,EAAM3xB,MAAQ7L,IAAqB,IAAV29B,KAAiBC,GAaxE,MATKpK,KACJnjB,EAAQmtB,EAAMntB,OAASA,IAAUrQ,GAAU,EAC3Cw9B,EAAME,KAAOA,EAEbF,EAAMl+B,IAAMk0B,EAAO,GAClBnjB,GAAUmjB,EAAO,GAAM,GAAMA,EAAO,IACnCA,EAAO,IAGHgK,IAKV,SAASK,MAIR,MAHA/8B,YAAW,WACVk8B,GAAQhkC,IAEAgkC,GAAQvjC,EAAO0L,MAGzB,QAASs4B,IAAa35B,EAAOub,EAAMye,GAClC,GAAIN,GACHO,GAAeR,GAAUle,QAAerlB,OAAQujC,GAAU,MAC1DjmB,EAAQ,EACRra,EAAS8gC,EAAW9gC,MACrB,MAAgBA,EAARqa,EAAgBA,IACvB,GAAMkmB,EAAQO,EAAYzmB,GAAQrZ,KAAM6/B,EAAWze,EAAMvb,GAGxD,MAAO05B,GAKV,QAASQ,IAAWlhC,EAAMmhC,EAAYn+B,GACrC,GAAIgQ,GACHouB,EACA5mB,EAAQ,EACRra,EAASogC,GAAoBpgC,OAC7B6a,EAAWre,EAAOgM,WAAWoS,OAAQ,iBAE7BsmB,GAAKrhC,OAEbqhC,EAAO,WACN,GAAKD,EACJ,OAAO,CAER,IAAIE,GAAcpB,IAASa,KAC1B9kB,EAAY3Y,KAAKiE,IAAK,EAAGy5B,EAAUO,UAAYP,EAAUQ,SAAWF,GAEpElqB,EAAO6E,EAAY+kB,EAAUQ,UAAY,EACzCC,EAAU,EAAIrqB,EACdoD,EAAQ,EACRra,EAAS6gC,EAAUU,OAAOvhC,MAE3B,MAAgBA,EAARqa,EAAiBA,IACxBwmB,EAAUU,OAAQlnB,GAAQmnB,IAAKF,EAKhC,OAFAzmB,GAASqB,WAAYrc,GAAQghC,EAAWS,EAASxlB,IAElC,EAAVwlB,GAAethC,EACZ8b,GAEPjB,EAAS/W,YAAajE,GAAQghC,KACvB,IAGTA,EAAYhmB,EAASnZ,SACpB7B,KAAMA,EACNmoB,MAAOxrB,EAAOgG,UAAYw+B,GAC1BS,KAAMjlC,EAAOgG,QAAQ,GAAQk/B,kBAAqB7+B,GAClD8+B,mBAAoBX,EACpBhI,gBAAiBn2B,EACjBu+B,UAAWrB,IAASa,KACpBS,SAAUx+B,EAAQw+B,SAClBE,UACAf,YAAa,SAAUpe,EAAM/f,GAC5B,GAAIk+B,GAAQ/jC,EAAOolC,MAAO/hC,EAAMghC,EAAUY,KAAMrf,EAAM/f,EACpDw+B,EAAUY,KAAKC,cAAetf,IAAUye,EAAUY,KAAKI,OAEzD,OADAhB,GAAUU,OAAOtkC,KAAMsjC,GAChBA,GAERvf,KAAM,SAAU8gB,GACf,GAAIznB,GAAQ,EAGXra,EAAS8hC,EAAUjB,EAAUU,OAAOvhC,OAAS,CAC9C,IAAKihC,EACJ,MAAOnhC,KAGR,KADAmhC,GAAU,EACMjhC,EAARqa,EAAiBA,IACxBwmB,EAAUU,OAAQlnB,GAAQmnB,IAAK,EAUhC,OALKM,GACJjnB,EAAS/W,YAAajE,GAAQghC,EAAWiB,IAEzCjnB,EAASyiB,WAAYz9B,GAAQghC,EAAWiB,IAElChiC,QAGTkoB,EAAQ6Y,EAAU7Y,KAInB,KAFA+Z,GAAY/Z,EAAO6Y,EAAUY,KAAKC,eAElB1hC,EAARqa,EAAiBA,IAExB,GADAxH,EAASutB,GAAqB/lB,GAAQrZ,KAAM6/B,EAAWhhC,EAAMmoB,EAAO6Y,EAAUY,MAE7E,MAAO5uB,EAmBT,OAfArW,GAAO4F,IAAK4lB,EAAOwY,GAAaK,GAE3BrkC,EAAOiE,WAAYogC,EAAUY,KAAKruB,QACtCytB,EAAUY,KAAKruB,MAAMpS,KAAMnB,EAAMghC,GAGlCrkC,EAAO4kB,GAAG4gB,MACTxlC,EAAOgG,OAAQ0+B,GACdrhC,KAAMA,EACNoiC,KAAMpB,EACNngB,MAAOmgB,EAAUY,KAAK/gB,SAKjBmgB,EAAUtlB,SAAUslB,EAAUY,KAAKlmB,UACxC5Z,KAAMk/B,EAAUY,KAAK9/B,KAAMk/B,EAAUY,KAAK7H,UAC1C9e,KAAM+lB,EAAUY,KAAK3mB,MACrBF,OAAQimB,EAAUY,KAAK7mB,QAG1B,QAASmnB,IAAY/Z,EAAO0Z,GAC3B,GAAIrnB,GAAOzX,EAAMi/B,EAAQh7B,EAAOga,CAGhC,KAAMxG,IAAS2N,GAed,GAdAplB,EAAOpG,EAAOiK,UAAW4T,GACzBwnB,EAASH,EAAe9+B,GACxBiE,EAAQmhB,EAAO3N,GACV7d,EAAOyG,QAAS4D,KACpBg7B,EAASh7B,EAAO,GAChBA,EAAQmhB,EAAO3N,GAAUxT,EAAO,IAG5BwT,IAAUzX,IACdolB,EAAOplB,GAASiE,QACTmhB,GAAO3N,IAGfwG,EAAQrkB,EAAOs3B,SAAUlxB,GACpBie,GAAS,UAAYA,GAAQ,CACjCha,EAAQga,EAAMwV,OAAQxvB,SACfmhB,GAAOplB,EAId,KAAMyX,IAASxT,GACNwT,IAAS2N,KAChBA,EAAO3N,GAAUxT,EAAOwT,GACxBqnB,EAAernB,GAAUwnB,OAI3BH,GAAe9+B,GAASi/B,EAK3BrlC,EAAOukC,UAAYvkC,EAAOgG,OAAQu+B,IAEjCmB,QAAS,SAAUla,EAAOxmB,GACpBhF,EAAOiE,WAAYunB,IACvBxmB,EAAWwmB,EACXA,GAAU,MAEVA,EAAQA,EAAMlf,MAAM,IAGrB,IAAIsZ,GACH/H,EAAQ,EACRra,EAASgoB,EAAMhoB,MAEhB,MAAgBA,EAARqa,EAAiBA,IACxB+H,EAAO4F,EAAO3N,GACdimB,GAAUle,GAASke,GAAUle,OAC7Bke,GAAUle,GAAOjR,QAAS3P,IAI5B2gC,UAAW,SAAU3gC,EAAUqtB,GACzBA,EACJuR,GAAoBjvB,QAAS3P,GAE7B4+B,GAAoBnjC,KAAMuE,KAK7B,SAAS6+B,IAAkBxgC,EAAMmoB,EAAOyZ,GAEvC,GAAIrf,GAAMvb,EAAOgtB,EAAQ0M,EAAO1f,EAAOuhB,EACtCH,EAAOniC,KACPmqB,KACA1hB,EAAQ1I,EAAK0I,MACbkrB,EAAS5zB,EAAKQ,UAAY+yB,GAAUvzB,GACpCwiC,EAAW7lC,EAAO+jB,MAAO1gB,EAAM,SAG1B4hC,GAAK/gB,QACVG,EAAQrkB,EAAOskB,YAAajhB,EAAM,MACX,MAAlBghB,EAAMyhB,WACVzhB,EAAMyhB,SAAW,EACjBF,EAAUvhB,EAAM/L,MAAMkF,KACtB6G,EAAM/L,MAAMkF,KAAO,WACZ6G,EAAMyhB,UACXF,MAIHvhB,EAAMyhB,WAENL,EAAKrnB,OAAO,WAGXqnB,EAAKrnB,OAAO,WACXiG,EAAMyhB,WACA9lC,EAAOkkB,MAAO7gB,EAAM,MAAOG,QAChC6gB,EAAM/L,MAAMkF,YAOO,IAAlBna,EAAKQ,WAAoB,UAAY2nB,IAAS,SAAWA,MAK7DyZ,EAAKc,UAAah6B,EAAMg6B,SAAUh6B,EAAMi6B,UAAWj6B,EAAMk6B,WAIlB,WAAlCjmC,EAAO82B,IAAKzzB,EAAM,YACW,SAAhCrD,EAAO82B,IAAKzzB,EAAM,WAIbrD,EAAOmI,QAAQ4Y,wBAAkE,WAAxCmW,GAAoB7zB,EAAK8G,UAIvE4B,EAAMyW,KAAO,EAHbzW,EAAMuW,QAAU,iBAQd2iB,EAAKc,WACTh6B,EAAMg6B,SAAW,SACX/lC,EAAOmI,QAAQ6Y,kBACpBykB,EAAKrnB,OAAO,WACXrS,EAAMg6B,SAAWd,EAAKc,SAAU,GAChCh6B,EAAMi6B,UAAYf,EAAKc,SAAU,GACjCh6B,EAAMk6B,UAAYhB,EAAKc,SAAU,KAOpC,KAAMngB,IAAQ4F,GAEb,GADAnhB,EAAQmhB,EAAO5F,GACV6d,GAAShgC,KAAM4G,GAAU,CAG7B,SAFOmhB,GAAO5F,GACdyR,EAASA,GAAoB,WAAVhtB,EACdA,KAAY4sB,EAAS,OAAS,QAClC,QAEDxJ,GAAM7H,GAASigB,GAAYA,EAAUjgB,IAAU5lB,EAAO+L,MAAO1I,EAAMuiB,GAIrE,IAAM5lB,EAAOqI,cAAeolB,GAAS,CAC/BoY,EACC,UAAYA,KAChB5O,EAAS4O,EAAS5O,QAGnB4O,EAAW7lC,EAAO+jB,MAAO1gB,EAAM,aAI3Bg0B,IACJwO,EAAS5O,QAAUA,GAEfA,EACJj3B,EAAQqD,GAAO2zB,OAEfyO,EAAKtgC,KAAK,WACTnF,EAAQqD,GAAO+zB,SAGjBqO,EAAKtgC,KAAK,WACT,GAAIygB,EACJ5lB,GAAOgkB,YAAa3gB,EAAM,SAC1B,KAAMuiB,IAAQ6H,GACbztB,EAAO+L,MAAO1I,EAAMuiB,EAAM6H,EAAM7H,KAGlC,KAAMA,IAAQ6H,GACbsW,EAAQC,GAAa/M,EAAS4O,EAAUjgB,GAAS,EAAGA,EAAM6f,GAElD7f,IAAQigB,KACfA,EAAUjgB,GAASme,EAAMntB,MACpBqgB,IACJ8M,EAAMl+B,IAAMk+B,EAAMntB,MAClBmtB,EAAMntB,MAAiB,UAATgP,GAA6B,WAATA,EAAoB,EAAI,KAO/D,QAASwf,IAAO/hC,EAAMgD,EAASuf,EAAM/f,EAAKw/B,GACzC,MAAO,IAAID,IAAMniC,UAAU1B,KAAM8B,EAAMgD,EAASuf,EAAM/f,EAAKw/B,GAE5DrlC,EAAOolC,MAAQA,GAEfA,GAAMniC,WACLE,YAAaiiC,GACb7jC,KAAM,SAAU8B,EAAMgD,EAASuf,EAAM/f,EAAKw/B,EAAQpB,GACjD3gC,KAAKD,KAAOA,EACZC,KAAKsiB,KAAOA,EACZtiB,KAAK+hC,OAASA,GAAU,QACxB/hC,KAAK+C,QAAUA,EACf/C,KAAKsT,MAAQtT,KAAKoI,IAAMpI,KAAK8O,MAC7B9O,KAAKuC,IAAMA,EACXvC,KAAK2gC,KAAOA,IAAUjkC,EAAOw3B,UAAW5R,GAAS,GAAK,OAEvDxT,IAAK,WACJ,GAAIiS,GAAQ+gB,GAAMhe,UAAW9jB,KAAKsiB,KAElC,OAAOvB,IAASA,EAAM5f,IACrB4f,EAAM5f,IAAKnB,MACX8hC,GAAMhe,UAAUqD,SAAShmB,IAAKnB,OAEhC0hC,IAAK,SAAUF,GACd,GAAIoB,GACH7hB,EAAQ+gB,GAAMhe,UAAW9jB,KAAKsiB,KAoB/B,OAjBCtiB,MAAK2rB,IAAMiX,EADP5iC,KAAK+C,QAAQw+B,SACE7kC,EAAOqlC,OAAQ/hC,KAAK+hC,QACtCP,EAASxhC,KAAK+C,QAAQw+B,SAAWC,EAAS,EAAG,EAAGxhC,KAAK+C,QAAQw+B,UAG3CC,EAEpBxhC,KAAKoI,KAAQpI,KAAKuC,IAAMvC,KAAKsT,OAAUsvB,EAAQ5iC,KAAKsT,MAE/CtT,KAAK+C,QAAQ8/B,MACjB7iC,KAAK+C,QAAQ8/B,KAAK3hC,KAAMlB,KAAKD,KAAMC,KAAKoI,IAAKpI,MAGzC+gB,GAASA,EAAMoC,IACnBpC,EAAMoC,IAAKnjB,MAEX8hC,GAAMhe,UAAUqD,SAAShE,IAAKnjB,MAExBA,OAIT8hC,GAAMniC,UAAU1B,KAAK0B,UAAYmiC,GAAMniC,UAEvCmiC,GAAMhe,WACLqD,UACChmB,IAAK,SAAUs/B,GACd,GAAI1tB,EAEJ,OAAiC,OAA5B0tB,EAAM1gC,KAAM0gC,EAAMne,OACpBme,EAAM1gC,KAAK0I,OAA2C,MAAlCg4B,EAAM1gC,KAAK0I,MAAOg4B,EAAMne,OAQ/CvP,EAASrW,EAAO82B,IAAKiN,EAAM1gC,KAAM0gC,EAAMne,KAAM,IAErCvP,GAAqB,SAAXA,EAAwBA,EAAJ,GAT9B0tB,EAAM1gC,KAAM0gC,EAAMne,OAW3Ba,IAAK,SAAUsd,GAGT/jC,EAAO4kB,GAAGuhB,KAAMpC,EAAMne,MAC1B5lB,EAAO4kB,GAAGuhB,KAAMpC,EAAMne,MAAQme,GACnBA,EAAM1gC,KAAK0I,QAAgE,MAArDg4B,EAAM1gC,KAAK0I,MAAO/L,EAAOg4B,SAAU+L,EAAMne,QAAoB5lB,EAAOs3B,SAAUyM,EAAMne,OACrH5lB,EAAO+L,MAAOg4B,EAAM1gC,KAAM0gC,EAAMne,KAAMme,EAAMr4B,IAAMq4B,EAAME,MAExDF,EAAM1gC,KAAM0gC,EAAMne,MAASme,EAAMr4B,OASrC05B,GAAMhe,UAAUmF,UAAY6Y,GAAMhe,UAAU+E,YAC3C1F,IAAK,SAAUsd,GACTA,EAAM1gC,KAAKQ,UAAYkgC,EAAM1gC,KAAKe,aACtC2/B,EAAM1gC,KAAM0gC,EAAMne,MAASme,EAAMr4B,OAKpC1L,EAAO+E,MAAO,SAAU,OAAQ,QAAU,SAAUU,EAAGW,GACtD,GAAIggC,GAAQpmC,EAAOsB,GAAI8E,EACvBpG,GAAOsB,GAAI8E,GAAS,SAAUigC,EAAOhB,EAAQrgC,GAC5C,MAAgB,OAATqhC,GAAkC,iBAAVA,GAC9BD,EAAMhhC,MAAO9B,KAAM+B,WACnB/B,KAAKgjC,QAASC,GAAOngC,GAAM,GAAQigC,EAAOhB,EAAQrgC,MAIrDhF,EAAOsB,GAAG0E,QACTwgC,OAAQ,SAAUH,EAAOI,EAAIpB,EAAQrgC,GAGpC,MAAO1B,MAAKkQ,OAAQojB,IAAWE,IAAK,UAAW,GAAIE,OAGjDnxB,MAAMygC,SAAU/lB,QAASkmB,GAAMJ,EAAOhB,EAAQrgC,IAEjDshC,QAAS,SAAU1gB,EAAMygB,EAAOhB,EAAQrgC,GACvC,GAAIsT,GAAQtY,EAAOqI,cAAeud,GACjC8gB,EAAS1mC,EAAOqmC,MAAOA,EAAOhB,EAAQrgC,GACtC2hC,EAAc,WAEb,GAAIlB,GAAOlB,GAAWjhC,KAAMtD,EAAOgG,UAAY4f,GAAQ8gB,IAGlDpuB,GAAStY,EAAO+jB,MAAOzgB,KAAM,YACjCmiC,EAAKjhB,MAAM,GAKd,OAFCmiB,GAAYC,OAASD,EAEfruB,GAASouB,EAAOxiB,SAAU,EAChC5gB,KAAKyB,KAAM4hC,GACXrjC,KAAK4gB,MAAOwiB,EAAOxiB,MAAOyiB,IAE5BniB,KAAM,SAAU7hB,EAAMqiB,EAAYsgB,GACjC,GAAIuB,GAAY,SAAUxiB,GACzB,GAAIG,GAAOH,EAAMG,WACVH,GAAMG,KACbA,EAAM8gB,GAYP,OATqB,gBAAT3iC,KACX2iC,EAAUtgB,EACVA,EAAariB,EACbA,EAAOpD,GAEHylB,GAAcriB,KAAS,GAC3BW,KAAK4gB,MAAOvhB,GAAQ,SAGdW,KAAKyB,KAAK,WAChB,GAAIof,IAAU,EACbtG,EAAgB,MAARlb,GAAgBA,EAAO,aAC/BmkC,EAAS9mC,EAAO8mC,OAChBr+B,EAAOzI,EAAO+jB,MAAOzgB,KAEtB,IAAKua,EACCpV,EAAMoV,IAAWpV,EAAMoV,GAAQ2G,MACnCqiB,EAAWp+B,EAAMoV,QAGlB,KAAMA,IAASpV,GACTA,EAAMoV,IAAWpV,EAAMoV,GAAQ2G,MAAQmf,GAAK5/B,KAAM8Z,IACtDgpB,EAAWp+B,EAAMoV,GAKpB,KAAMA,EAAQipB,EAAOtjC,OAAQqa,KACvBipB,EAAQjpB,GAAQxa,OAASC,MAAiB,MAARX,GAAgBmkC,EAAQjpB,GAAQqG,QAAUvhB,IAChFmkC,EAAQjpB,GAAQ4nB,KAAKjhB,KAAM8gB,GAC3BnhB,GAAU,EACV2iB,EAAO/gC,OAAQ8X,EAAO,KAOnBsG,IAAYmhB,IAChBtlC,EAAOmkB,QAAS7gB,KAAMX,MAIzBikC,OAAQ,SAAUjkC,GAIjB,MAHKA,MAAS,IACbA,EAAOA,GAAQ,MAETW,KAAKyB,KAAK,WAChB,GAAI8Y,GACHpV,EAAOzI,EAAO+jB,MAAOzgB,MACrB4gB,EAAQzb,EAAM9F,EAAO,SACrB0hB,EAAQ5b,EAAM9F,EAAO,cACrBmkC,EAAS9mC,EAAO8mC,OAChBtjC,EAAS0gB,EAAQA,EAAM1gB,OAAS,CAajC,KAVAiF,EAAKm+B,QAAS,EAGd5mC,EAAOkkB,MAAO5gB,KAAMX,MAEf0hB,GAASA,EAAMG,MACnBH,EAAMG,KAAKhgB,KAAMlB,MAAM,GAIlBua,EAAQipB,EAAOtjC,OAAQqa,KACvBipB,EAAQjpB,GAAQxa,OAASC,MAAQwjC,EAAQjpB,GAAQqG,QAAUvhB,IAC/DmkC,EAAQjpB,GAAQ4nB,KAAKjhB,MAAM,GAC3BsiB,EAAO/gC,OAAQ8X,EAAO,GAKxB,KAAMA,EAAQ,EAAWra,EAARqa,EAAgBA,IAC3BqG,EAAOrG,IAAWqG,EAAOrG,GAAQ+oB,QACrC1iB,EAAOrG,GAAQ+oB,OAAOpiC,KAAMlB,YAKvBmF,GAAKm+B,WAMf,SAASL,IAAO5jC,EAAMokC,GACrB,GAAInb,GACH5Z,GAAUg1B,OAAQrkC,GAClB8C,EAAI,CAKL,KADAshC,EAAeA,EAAc,EAAI,EACtB,EAAJthC,EAAQA,GAAK,EAAIshC,EACvBnb,EAAQ2K,GAAW9wB,GACnBuM,EAAO,SAAW4Z,GAAU5Z,EAAO,UAAY4Z,GAAUjpB,CAO1D,OAJKokC,KACJ/0B,EAAMuO,QAAUvO,EAAM4Q,MAAQjgB,GAGxBqP,EAIRhS,EAAO+E,MACNkiC,UAAWV,GAAM,QACjBW,QAASX,GAAM,QACfY,YAAaZ,GAAM,UACnBa,QAAU7mB,QAAS,QACnB8mB,SAAW9mB,QAAS,QACpB+mB,YAAc/mB,QAAS,WACrB,SAAUna,EAAMolB,GAClBxrB,EAAOsB,GAAI8E,GAAS,SAAUigC,EAAOhB,EAAQrgC,GAC5C,MAAO1B,MAAKgjC,QAAS9a,EAAO6a,EAAOhB,EAAQrgC,MAI7ChF,EAAOqmC,MAAQ,SAAUA,EAAOhB,EAAQ/jC,GACvC,GAAIwe,GAAMumB,GAA0B,gBAAVA,GAAqBrmC,EAAOgG,UAAYqgC,IACjEjJ,SAAU97B,IAAOA,GAAM+jC,GACtBrlC,EAAOiE,WAAYoiC,IAAWA,EAC/BxB,SAAUwB,EACVhB,OAAQ/jC,GAAM+jC,GAAUA,IAAWrlC,EAAOiE,WAAYohC,IAAYA,EAwBnE,OArBAvlB,GAAI+kB,SAAW7kC,EAAO4kB,GAAGpd,IAAM,EAA4B,gBAAjBsY,GAAI+kB,SAAwB/kB,EAAI+kB,SACzE/kB,EAAI+kB,WAAY7kC,GAAO4kB,GAAGC,OAAS7kB,EAAO4kB,GAAGC,OAAQ/E,EAAI+kB,UAAa7kC,EAAO4kB,GAAGC,OAAO4F,UAGtE,MAAb3K,EAAIoE,OAAiBpE,EAAIoE,SAAU,KACvCpE,EAAIoE,MAAQ,MAIbpE,EAAIhU,IAAMgU,EAAIsd,SAEdtd,EAAIsd,SAAW,WACTp9B,EAAOiE,WAAY6b,EAAIhU,MAC3BgU,EAAIhU,IAAItH,KAAMlB,MAGVwc,EAAIoE,OACRlkB,EAAOmkB,QAAS7gB,KAAMwc,EAAIoE,QAIrBpE,GAGR9f,EAAOqlC,QACNkC,OAAQ,SAAUC,GACjB,MAAOA,IAERC,MAAO,SAAUD,GAChB,MAAO,GAAM7gC,KAAK+gC,IAAKF,EAAE7gC,KAAKghC,IAAO,IAIvC3nC,EAAO8mC,UACP9mC,EAAO4kB,GAAKwgB,GAAMniC,UAAU1B,KAC5BvB,EAAO4kB,GAAG8f,KAAO,WAChB,GAAIc,GACHsB,EAAS9mC,EAAO8mC,OAChBrhC,EAAI,CAIL,KAFA89B,GAAQvjC,EAAO0L,MAEHo7B,EAAOtjC,OAAXiC,EAAmBA,IAC1B+/B,EAAQsB,EAAQrhC,GAEV+/B,KAAWsB,EAAQrhC,KAAQ+/B,GAChCsB,EAAO/gC,OAAQN,IAAK,EAIhBqhC,GAAOtjC,QACZxD,EAAO4kB,GAAGJ,OAEX+e,GAAQhkC,GAGTS,EAAO4kB,GAAG4gB,MAAQ,SAAUA,GACtBA,KAAWxlC,EAAO8mC,OAAOrmC,KAAM+kC,IACnCxlC,EAAO4kB,GAAGhO,SAIZ5W,EAAO4kB,GAAGgjB,SAAW,GAErB5nC,EAAO4kB,GAAGhO,MAAQ,WACX4sB,KACLA,GAAUqE,YAAa7nC,EAAO4kB,GAAG8f,KAAM1kC,EAAO4kB,GAAGgjB,YAInD5nC,EAAO4kB,GAAGJ,KAAO,WAChBsjB,cAAetE,IACfA,GAAU,MAGXxjC,EAAO4kB,GAAGC,QACTkjB,KAAM,IACNC,KAAM,IAENvd,SAAU,KAIXzqB,EAAO4kB,GAAGuhB,QAELnmC,EAAO4U,MAAQ5U,EAAO4U,KAAKwE,UAC/BpZ,EAAO4U,KAAKwE,QAAQ6uB,SAAW,SAAU5kC,GACxC,MAAOrD,GAAO+K,KAAK/K,EAAO8mC,OAAQ,SAAUxlC,GAC3C,MAAO+B,KAAS/B,EAAG+B,OACjBG,SAGLxD,EAAOsB,GAAG4mC,OAAS,SAAU7hC,GAC5B,GAAKhB,UAAU7B,OACd,MAAO6C,KAAY9G,EAClB+D,KACAA,KAAKyB,KAAK,SAAUU,GACnBzF,EAAOkoC,OAAOC,UAAW7kC,KAAM+C,EAASZ,IAI3C,IAAI5F,GAASuoC,EACZC,GAAQn8B,IAAK,EAAGssB,KAAM,GACtBn1B,EAAOC,KAAM,GACbwP,EAAMzP,GAAQA,EAAKS,aAEpB,IAAMgP,EAON,MAHAjT,GAAUiT,EAAIhT,gBAGRE,EAAOmN,SAAUtN,EAASwD,UAMpBA,GAAKilC,wBAA0B5oC,IAC1C2oC,EAAMhlC,EAAKilC,yBAEZF,EAAMG,GAAWz1B,IAEhB5G,IAAKm8B,EAAIn8B,KAASk8B,EAAII,aAAe3oC,EAAQ0sB,YAAiB1sB,EAAQ2sB,WAAc,GACpFgM,KAAM6P,EAAI7P,MAAS4P,EAAIK,aAAe5oC,EAAQssB,aAAiBtsB,EAAQusB,YAAc,KAX9Eic,GAeTroC,EAAOkoC,QAENC,UAAW,SAAU9kC,EAAMgD,EAASZ,GACnC,GAAIywB,GAAWl2B,EAAO82B,IAAKzzB,EAAM,WAGf,YAAb6yB,IACJ7yB,EAAK0I,MAAMmqB,SAAW,WAGvB,IAAIwS,GAAU1oC,EAAQqD,GACrBslC,EAAYD,EAAQR,SACpBU,EAAY5oC,EAAO82B,IAAKzzB,EAAM,OAC9BwlC,EAAa7oC,EAAO82B,IAAKzzB,EAAM,QAC/BylC,GAAmC,aAAb5S,GAAwC,UAAbA,IAA0Bl2B,EAAO2K,QAAQ,QAASi+B,EAAWC,IAAe,GAC7Hrd,KAAYud,KAAkBC,EAAQC,CAGlCH,IACJC,EAAcL,EAAQxS,WACtB8S,EAASD,EAAY78B,IACrB+8B,EAAUF,EAAYvQ,OAEtBwQ,EAASlhC,WAAY8gC,IAAe,EACpCK,EAAUnhC,WAAY+gC,IAAgB,GAGlC7oC,EAAOiE,WAAYoC,KACvBA,EAAUA,EAAQ7B,KAAMnB,EAAMoC,EAAGkjC,IAGd,MAAftiC,EAAQ6F,MACZsf,EAAMtf,IAAQ7F,EAAQ6F,IAAMy8B,EAAUz8B,IAAQ88B,GAE1B,MAAhB3iC,EAAQmyB,OACZhN,EAAMgN,KAASnyB,EAAQmyB,KAAOmQ,EAAUnQ,KAASyQ,GAG7C,SAAW5iC,GACfA,EAAQ6iC,MAAM1kC,KAAMnB,EAAMmoB,GAE1Bkd,EAAQ5R,IAAKtL,KAMhBxrB,EAAOsB,GAAG0E,QAETkwB,SAAU,WACT,GAAM5yB,KAAM,GAAZ,CAIA,GAAI6lC,GAAcjB,EACjBkB,GAAiBl9B,IAAK,EAAGssB,KAAM,GAC/Bn1B,EAAOC,KAAM,EAwBd,OArBwC,UAAnCtD,EAAO82B,IAAKzzB,EAAM,YAEtB6kC,EAAS7kC,EAAKilC,yBAGda,EAAe7lC,KAAK6lC,eAGpBjB,EAAS5kC,KAAK4kC,SACRloC,EAAOmK,SAAUg/B,EAAc,GAAK,UACzCC,EAAeD,EAAajB,UAI7BkB,EAAal9B,KAAQlM,EAAO82B,IAAKqS,EAAc,GAAK,kBAAkB,GACtEC,EAAa5Q,MAAQx4B,EAAO82B,IAAKqS,EAAc,GAAK,mBAAmB,KAOvEj9B,IAAMg8B,EAAOh8B,IAAOk9B,EAAal9B,IAAMlM,EAAO82B,IAAKzzB,EAAM,aAAa,GACtEm1B,KAAM0P,EAAO1P,KAAO4Q,EAAa5Q,KAAOx4B,EAAO82B,IAAKzzB,EAAM,cAAc,MAI1E8lC,aAAc,WACb,MAAO7lC,MAAKsC,IAAI,WACf,GAAIujC,GAAe7lC,KAAK6lC,cAAgBtpC,CACxC,OAAQspC,IAAmBnpC,EAAOmK,SAAUg/B,EAAc,SAAsD,WAA1CnpC,EAAO82B,IAAKqS,EAAc,YAC/FA,EAAeA,EAAaA,YAE7B,OAAOA,IAAgBtpC,OAO1BG,EAAO+E,MAAOonB,WAAY,cAAeI,UAAW,eAAgB,SAAU0T,EAAQra,GACrF,GAAI1Z,GAAM,IAAInI,KAAM6hB,EAEpB5lB,GAAOsB,GAAI2+B,GAAW,SAAUnrB,GAC/B,MAAO9U,GAAOqL,OAAQ/H,KAAM,SAAUD,EAAM48B,EAAQnrB,GACnD,GAAIszB,GAAMG,GAAWllC,EAErB,OAAKyR,KAAQvV,EACL6oC,EAAOxiB,IAAQwiB,GAAOA,EAAKxiB,GACjCwiB,EAAIxoC,SAASE,gBAAiBmgC,GAC9B58B,EAAM48B,IAGHmI,EACJA,EAAIiB,SACFn9B,EAAYlM,EAAQooC,GAAMjc,aAApBrX,EACP5I,EAAM4I,EAAM9U,EAAQooC,GAAM7b,aAI3BlpB,EAAM48B,GAAWnrB,EAPlB,IASEmrB,EAAQnrB,EAAKzP,UAAU7B,OAAQ,QAIpC,SAAS+kC,IAAWllC,GACnB,MAAOrD,GAAO2H,SAAUtE,GACvBA,EACkB,IAAlBA,EAAKQ,SACJR,EAAK2P,aAAe3P,EAAKgnB,cACzB,EAGHrqB,EAAO+E,MAAQukC,OAAQ,SAAUC,MAAO,SAAW,SAAUnjC,EAAMzD,GAClE3C,EAAO+E,MAAQ00B,QAAS,QAAUrzB,EAAMktB,QAAS3wB,EAAM,GAAI,QAAUyD,GAAQ,SAAUojC,EAAcC,GAEpGzpC,EAAOsB,GAAImoC,GAAa,SAAUjQ,EAAQnvB,GACzC,GAAIiB,GAAYjG,UAAU7B,SAAYgmC,GAAkC,iBAAXhQ,IAC5DtB,EAAQsR,IAAkBhQ,KAAW,GAAQnvB,KAAU,EAAO,SAAW,SAE1E,OAAOrK,GAAOqL,OAAQ/H,KAAM,SAAUD,EAAMV,EAAM0H,GACjD,GAAIyI,EAEJ,OAAK9S,GAAO2H,SAAUtE,GAIdA,EAAKzD,SAASE,gBAAiB,SAAWsG,GAI3B,IAAlB/C,EAAKQ,UACTiP,EAAMzP,EAAKvD,gBAIJ6G,KAAKiE,IACXvH,EAAK+D,KAAM,SAAWhB,GAAQ0M,EAAK,SAAW1M,GAC9C/C,EAAK+D,KAAM,SAAWhB,GAAQ0M,EAAK,SAAW1M,GAC9C0M,EAAK,SAAW1M,KAIXiE,IAAU9K,EAEhBS,EAAO82B,IAAKzzB,EAAMV,EAAMu1B,GAGxBl4B,EAAO+L,MAAO1I,EAAMV,EAAM0H,EAAO6tB,IAChCv1B,EAAM2I,EAAYkuB,EAASj6B,EAAW+L,EAAW,WAQvDtL,EAAOsB,GAAGooC,KAAO,WAChB,MAAOpmC,MAAKE,QAGbxD,EAAOsB,GAAGqoC,QAAU3pC,EAAOsB,GAAG6tB,QAGP,gBAAXya,SAAuBA,QAAoC,gBAAnBA,QAAOC,QAK1DD,OAAOC,QAAU7pC,GAGjBV,EAAOU,OAASV,EAAOY,EAAIF,EASJ,kBAAX8pC,SAAyBA,OAAOC,KAC3CD,OAAQ,YAAc,WAAc,MAAO9pC,QAIzCV"}
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate-vsdoc.js b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate-vsdoc.js
new file mode 100644
index 00000000..f576a433
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate-vsdoc.js
@@ -0,0 +1,1302 @@
+/* NUGET: BEGIN LICENSE TEXT
+ *
+ * Microsoft grants you the right to use these script files for the sole
+ * purpose of either: (i) interacting through your browser with the Microsoft
+ * website or online service, subject to the applicable licensing or use
+ * terms; or (ii) using the files as included with a Microsoft product subject
+ * to that product's license terms. Microsoft reserves all other rights to the
+ * files not expressly granted by Microsoft, whether by implication, estoppel
+ * or otherwise. Insofar as a script file is dual licensed under GPL,
+ * Microsoft neither took the code under GPL nor distributes it thereunder but
+ * under the terms set out in this paragraph. All notices and licenses
+ * below are for informational purposes only.
+ *
+ * NUGET: END LICENSE TEXT */
+/*
+* This file has been commented to support Visual Studio Intellisense.
+* You should not use this file at runtime inside the browser--it is only
+* intended to be used only for design-time IntelliSense. Please use the
+* standard jQuery library for all production use.
+*
+* Comment version: 1.11.1
+*/
+
+/*
+* Note: While Microsoft is not the author of this file, Microsoft is
+* offering you a license subject to the terms of the Microsoft Software
+* License Terms for Microsoft ASP.NET Model View Controller 3.
+* Microsoft reserves all other rights. The notices below are provided
+* for informational purposes only and are not the license terms under
+* which Microsoft distributed this file.
+*
+* jQuery Validation Plugin - v1.11.1 - 2/4/2013
+* https://github.com/jzaefferer/jquery-validation
+* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT
+*
+*/
+
+(function($) {
+
+$.extend($.fn, {
+ // http://docs.jquery.com/Plugins/Validation/validate
+ validate: function( options ) {
+ ///
+ /// Validates the selected form. This method sets up event handlers for submit, focus,
+ /// keyup, blur and click to trigger validation of the entire form or individual
+ /// elements. Each one can be disabled, see the onxxx options (onsubmit, onfocusout,
+ /// onkeyup, onclick). focusInvalid focuses elements when submitting a invalid form.
+ ///
+ ///
+ /// A set of key/value pairs that configure the validate. All options are optional.
+ ///
+
+ // if nothing is selected, return nothing; can't chain anyway
+ if (!this.length) {
+ options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" );
+ return;
+ }
+
+ // check if a validator for this form was already created
+ var validator = $.data(this[0], 'validator');
+ if ( validator ) {
+ return validator;
+ }
+
+ validator = new $.validator( options, this[0] );
+ $.data(this[0], 'validator', validator);
+
+ if ( validator.settings.onsubmit ) {
+
+ // allow suppresing validation by adding a cancel class to the submit button
+ this.find("input, button").filter(".cancel").click(function() {
+ validator.cancelSubmit = true;
+ });
+
+ // when a submitHandler is used, capture the submitting button
+ if (validator.settings.submitHandler) {
+ this.find("input, button").filter(":submit").click(function() {
+ validator.submitButton = this;
+ });
+ }
+
+ // validate the form on submit
+ this.submit( function( event ) {
+ if ( validator.settings.debug )
+ // prevent form submit to be able to see console output
+ event.preventDefault();
+
+ function handle() {
+ if ( validator.settings.submitHandler ) {
+ if (validator.submitButton) {
+ // insert a hidden input as a replacement for the missing submit button
+ var hidden = $("
").attr("name", validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);
+ }
+ validator.settings.submitHandler.call( validator, validator.currentForm );
+ if (validator.submitButton) {
+ // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ hidden.remove();
+ }
+ return false;
+ }
+ return true;
+ }
+
+ // prevent submit for invalid forms or custom submit handlers
+ if ( validator.cancelSubmit ) {
+ validator.cancelSubmit = false;
+ return handle();
+ }
+ if ( validator.form() ) {
+ if ( validator.pendingRequest ) {
+ validator.formSubmitted = true;
+ return false;
+ }
+ return handle();
+ } else {
+ validator.focusInvalid();
+ return false;
+ }
+ });
+ }
+
+ return validator;
+ },
+ // http://docs.jquery.com/Plugins/Validation/valid
+ valid: function() {
+ ///
+ /// Checks if the selected form is valid or if all selected elements are valid.
+ /// validate() needs to be called on the form before checking it using this method.
+ ///
+ ///
+
+ if ( $(this[0]).is('form')) {
+ return this.validate().form();
+ } else {
+ var valid = true;
+ var validator = $(this[0].form).validate();
+ this.each(function() {
+ valid &= validator.element(this);
+ });
+ return valid;
+ }
+ },
+ // attributes: space seperated list of attributes to retrieve and remove
+ removeAttrs: function(attributes) {
+ ///
+ /// Remove the specified attributes from the first matched element and return them.
+ ///
+ ///
+ /// A space-seperated list of attribute names to remove.
+ ///
+
+ var result = {},
+ $element = this;
+ $.each(attributes.split(/\s/), function(index, value) {
+ result[value] = $element.attr(value);
+ $element.removeAttr(value);
+ });
+ return result;
+ },
+ // http://docs.jquery.com/Plugins/Validation/rules
+ rules: function(command, argument) {
+ ///
+ /// Return the validations rules for the first selected element.
+ ///
+ ///
+ /// Can be either "add" or "remove".
+ ///
+ ///
+ /// A list of rules to add or remove.
+ ///
+
+ var element = this[0];
+
+ if (command) {
+ var settings = $.data(element.form, 'validator').settings;
+ var staticRules = settings.rules;
+ var existingRules = $.validator.staticRules(element);
+ switch(command) {
+ case "add":
+ $.extend(existingRules, $.validator.normalizeRule(argument));
+ staticRules[element.name] = existingRules;
+ if (argument.messages)
+ settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
+ break;
+ case "remove":
+ if (!argument) {
+ delete staticRules[element.name];
+ return existingRules;
+ }
+ var filtered = {};
+ $.each(argument.split(/\s/), function(index, method) {
+ filtered[method] = existingRules[method];
+ delete existingRules[method];
+ });
+ return filtered;
+ }
+ }
+
+ var data = $.validator.normalizeRules(
+ $.extend(
+ {},
+ $.validator.metadataRules(element),
+ $.validator.classRules(element),
+ $.validator.attributeRules(element),
+ $.validator.staticRules(element)
+ ), element);
+
+ // make sure required is at front
+ if (data.required) {
+ var param = data.required;
+ delete data.required;
+ data = $.extend({required: param}, data);
+ }
+
+ return data;
+ }
+});
+
+// Custom selectors
+$.extend($.expr[":"], {
+ // http://docs.jquery.com/Plugins/Validation/blank
+ blank: function(a) {return !$.trim("" + a.value);},
+ // http://docs.jquery.com/Plugins/Validation/filled
+ filled: function(a) {return !!$.trim("" + a.value);},
+ // http://docs.jquery.com/Plugins/Validation/unchecked
+ unchecked: function(a) {return !a.checked;}
+});
+
+// constructor for validator
+$.validator = function( options, form ) {
+ this.settings = $.extend( true, {}, $.validator.defaults, options );
+ this.currentForm = form;
+ this.init();
+};
+
+$.validator.format = function(source, params) {
+ ///
+ /// Replaces {n} placeholders with arguments.
+ /// One or more arguments can be passed, in addition to the string template itself, to insert
+ /// into the string.
+ ///
+ ///
+ /// The string to format.
+ ///
+ ///
+ /// The first argument to insert, or an array of Strings to insert
+ ///
+ ///
+
+ if ( arguments.length == 1 )
+ return function() {
+ var args = $.makeArray(arguments);
+ args.unshift(source);
+ return $.validator.format.apply( this, args );
+ };
+ if ( arguments.length > 2 && params.constructor != Array ) {
+ params = $.makeArray(arguments).slice(1);
+ }
+ if ( params.constructor != Array ) {
+ params = [ params ];
+ }
+ $.each(params, function(i, n) {
+ source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n);
+ });
+ return source;
+};
+
+$.extend($.validator, {
+
+ defaults: {
+ messages: {},
+ groups: {},
+ rules: {},
+ errorClass: "error",
+ validClass: "valid",
+ errorElement: "label",
+ focusInvalid: true,
+ errorContainer: $( [] ),
+ errorLabelContainer: $( [] ),
+ onsubmit: true,
+ ignore: [],
+ ignoreTitle: false,
+ onfocusin: function(element) {
+ this.lastActive = element;
+
+ // hide error label and remove error class on focus if enabled
+ if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
+ this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
+ this.addWrapper(this.errorsFor(element)).hide();
+ }
+ },
+ onfocusout: function(element) {
+ if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
+ this.element(element);
+ }
+ },
+ onkeyup: function(element) {
+ if ( element.name in this.submitted || element == this.lastElement ) {
+ this.element(element);
+ }
+ },
+ onclick: function(element) {
+ // click on selects, radiobuttons and checkboxes
+ if ( element.name in this.submitted )
+ this.element(element);
+ // or option elements, check parent select in that case
+ else if (element.parentNode.name in this.submitted)
+ this.element(element.parentNode);
+ },
+ highlight: function( element, errorClass, validClass ) {
+ $(element).addClass(errorClass).removeClass(validClass);
+ },
+ unhighlight: function( element, errorClass, validClass ) {
+ $(element).removeClass(errorClass).addClass(validClass);
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
+ setDefaults: function(settings) {
+ ///
+ /// Modify default settings for validation.
+ /// Accepts everything that Plugins/Validation/validate accepts.
+ ///
+ ///
+ /// Options to set as default.
+ ///
+
+ $.extend( $.validator.defaults, settings );
+ },
+
+ messages: {
+ required: "This field is required.",
+ remote: "Please fix this field.",
+ email: "Please enter a valid email address.",
+ url: "Please enter a valid URL.",
+ date: "Please enter a valid date.",
+ dateISO: "Please enter a valid date (ISO).",
+ number: "Please enter a valid number.",
+ digits: "Please enter only digits.",
+ creditcard: "Please enter a valid credit card number.",
+ equalTo: "Please enter the same value again.",
+ accept: "Please enter a value with a valid extension.",
+ maxlength: $.validator.format("Please enter no more than {0} characters."),
+ minlength: $.validator.format("Please enter at least {0} characters."),
+ rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
+ range: $.validator.format("Please enter a value between {0} and {1}."),
+ max: $.validator.format("Please enter a value less than or equal to {0}."),
+ min: $.validator.format("Please enter a value greater than or equal to {0}.")
+ },
+
+ autoCreateRanges: false,
+
+ prototype: {
+
+ init: function() {
+ this.labelContainer = $(this.settings.errorLabelContainer);
+ this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
+ this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
+ this.submitted = {};
+ this.valueCache = {};
+ this.pendingRequest = 0;
+ this.pending = {};
+ this.invalid = {};
+ this.reset();
+
+ var groups = (this.groups = {});
+ $.each(this.settings.groups, function(key, value) {
+ $.each(value.split(/\s/), function(index, name) {
+ groups[name] = key;
+ });
+ });
+ var rules = this.settings.rules;
+ $.each(rules, function(key, value) {
+ rules[key] = $.validator.normalizeRule(value);
+ });
+
+ function delegate(event) {
+ var validator = $.data(this[0].form, "validator"),
+ eventType = "on" + event.type.replace(/^validate/, "");
+ validator.settings[eventType] && validator.settings[eventType].call(validator, this[0] );
+ }
+ $(this.currentForm)
+ .validateDelegate(":text, :password, :file, select, textarea", "focusin focusout keyup", delegate)
+ .validateDelegate(":radio, :checkbox, select, option", "click", delegate);
+
+ if (this.settings.invalidHandler)
+ $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/form
+ form: function() {
+ ///
+ /// Validates the form, returns true if it is valid, false otherwise.
+ /// This behaves as a normal submit event, but returns the result.
+ ///
+ ///
+
+ this.checkForm();
+ $.extend(this.submitted, this.errorMap);
+ this.invalid = $.extend({}, this.errorMap);
+ if (!this.valid())
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ this.showErrors();
+ return this.valid();
+ },
+
+ checkForm: function() {
+ this.prepareForm();
+ for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
+ this.check( elements[i] );
+ }
+ return this.valid();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/element
+ element: function( element ) {
+ ///
+ /// Validates a single element, returns true if it is valid, false otherwise.
+ /// This behaves as validation on blur or keyup, but returns the result.
+ ///
+ ///
+ /// An element to validate, must be inside the validated form.
+ ///
+ ///
+
+ element = this.clean( element );
+ this.lastElement = element;
+ this.prepareElement( element );
+ this.currentElements = $(element);
+ var result = this.check( element );
+ if ( result ) {
+ delete this.invalid[element.name];
+ } else {
+ this.invalid[element.name] = true;
+ }
+ if ( !this.numberOfInvalids() ) {
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+ return result;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/showErrors
+ showErrors: function(errors) {
+ ///
+ /// Show the specified messages.
+ /// Keys have to refer to the names of elements, values are displayed for those elements, using the configured error placement.
+ ///
+ ///
+ /// One or more key/value pairs of input names and messages.
+ ///
+
+ if(errors) {
+ // add items to error list and map
+ $.extend( this.errorMap, errors );
+ this.errorList = [];
+ for ( var name in errors ) {
+ this.errorList.push({
+ message: errors[name],
+ element: this.findByName(name)[0]
+ });
+ }
+ // remove items from success list
+ this.successList = $.grep( this.successList, function(element) {
+ return !(element.name in errors);
+ });
+ }
+ this.settings.showErrors
+ ? this.settings.showErrors.call( this, this.errorMap, this.errorList )
+ : this.defaultShowErrors();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/resetForm
+ resetForm: function() {
+ ///
+ /// Resets the controlled form.
+ /// Resets input fields to their original value (requires form plugin), removes classes
+ /// indicating invalid elements and hides error messages.
+ ///
+
+ if ( $.fn.resetForm )
+ $( this.currentForm ).resetForm();
+ this.submitted = {};
+ this.prepareForm();
+ this.hideErrors();
+ this.elements().removeClass( this.settings.errorClass );
+ },
+
+ numberOfInvalids: function() {
+ ///
+ /// Returns the number of invalid fields.
+ /// This depends on the internal validator state. It covers all fields only after
+ /// validating the complete form (on submit or via $("form").valid()). After validating
+ /// a single element, only that element is counted. Most useful in combination with the
+ /// invalidHandler-option.
+ ///
+ ///
+
+ return this.objectLength(this.invalid);
+ },
+
+ objectLength: function( obj ) {
+ var count = 0;
+ for ( var i in obj )
+ count++;
+ return count;
+ },
+
+ hideErrors: function() {
+ this.addWrapper( this.toHide ).hide();
+ },
+
+ valid: function() {
+ return this.size() == 0;
+ },
+
+ size: function() {
+ return this.errorList.length;
+ },
+
+ focusInvalid: function() {
+ if( this.settings.focusInvalid ) {
+ try {
+ $(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])
+ .filter(":visible")
+ .focus()
+ // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger("focusin");
+ } catch(e) {
+ // ignore IE throwing errors when focusing hidden elements
+ }
+ }
+ },
+
+ findLastActive: function() {
+ var lastActive = this.lastActive;
+ return lastActive && $.grep(this.errorList, function(n) {
+ return n.element.name == lastActive.name;
+ }).length == 1 && lastActive;
+ },
+
+ elements: function() {
+ var validator = this,
+ rulesCache = {};
+
+ // select all valid inputs inside the form (no submit or reset buttons)
+ // workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved
+ return $([]).add(this.currentForm.elements)
+ .filter(":input")
+ .not(":submit, :reset, :image, [disabled]")
+ .not( this.settings.ignore )
+ .filter(function() {
+ !this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);
+
+ // select only the first element for each name, and only those with rules specified
+ if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
+ return false;
+
+ rulesCache[this.name] = true;
+ return true;
+ });
+ },
+
+ clean: function( selector ) {
+ return $( selector )[0];
+ },
+
+ errors: function() {
+ return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext );
+ },
+
+ reset: function() {
+ this.successList = [];
+ this.errorList = [];
+ this.errorMap = {};
+ this.toShow = $([]);
+ this.toHide = $([]);
+ this.currentElements = $([]);
+ },
+
+ prepareForm: function() {
+ this.reset();
+ this.toHide = this.errors().add( this.containers );
+ },
+
+ prepareElement: function( element ) {
+ this.reset();
+ this.toHide = this.errorsFor(element);
+ },
+
+ check: function( element ) {
+ element = this.clean( element );
+
+ // if radio/checkbox, validate first element in group instead
+ if (this.checkable(element)) {
+ element = this.findByName(element.name).not(this.settings.ignore)[0];
+ }
+
+ var rules = $(element).rules();
+ var dependencyMismatch = false;
+ for (var method in rules) {
+ var rule = { method: method, parameters: rules[method] };
+ try {
+ var result = $.validator.methods[method].call( this, element.value.replace(/\r/g, ""), element, rule.parameters );
+
+ // if a method indicates that the field is optional and therefore valid,
+ // don't mark it as valid when there are no other rules
+ if ( result == "dependency-mismatch" ) {
+ dependencyMismatch = true;
+ continue;
+ }
+ dependencyMismatch = false;
+
+ if ( result == "pending" ) {
+ this.toHide = this.toHide.not( this.errorsFor(element) );
+ return;
+ }
+
+ if( !result ) {
+ this.formatAndAdd( element, rule );
+ return false;
+ }
+ } catch(e) {
+ this.settings.debug && window.console && console.log("exception occured when checking element " + element.id
+ + ", check the '" + rule.method + "' method", e);
+ throw e;
+ }
+ }
+ if (dependencyMismatch)
+ return;
+ if ( this.objectLength(rules) )
+ this.successList.push(element);
+ return true;
+ },
+
+ // return the custom message for the given element and validation method
+ // specified in the element's "messages" metadata
+ customMetaMessage: function(element, method) {
+ if (!$.metadata)
+ return;
+
+ var meta = this.settings.meta
+ ? $(element).metadata()[this.settings.meta]
+ : $(element).metadata();
+
+ return meta && meta.messages && meta.messages[method];
+ },
+
+ // return the custom message for the given element name and validation method
+ customMessage: function( name, method ) {
+ var m = this.settings.messages[name];
+ return m && (m.constructor == String
+ ? m
+ : m[method]);
+ },
+
+ // return the first defined argument, allowing empty strings
+ findDefined: function() {
+ for(var i = 0; i < arguments.length; i++) {
+ if (arguments[i] !== undefined)
+ return arguments[i];
+ }
+ return undefined;
+ },
+
+ defaultMessage: function( element, method) {
+ return this.findDefined(
+ this.customMessage( element.name, method ),
+ this.customMetaMessage( element, method ),
+ // title is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[method],
+ "
Warning: No message defined for " + element.name + " "
+ );
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule.method ),
+ theregex = /\$?\{(\d+)\}/g;
+ if ( typeof message == "function" ) {
+ message = message.call(this, rule.parameters, element);
+ } else if (theregex.test(message)) {
+ message = jQuery.format(message.replace(theregex, '{$1}'), rule.parameters);
+ }
+ this.errorList.push({
+ message: message,
+ element: element
+ });
+
+ this.errorMap[element.name] = message;
+ this.submitted[element.name] = message;
+ },
+
+ addWrapper: function(toToggle) {
+ if ( this.settings.wrapper )
+ toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
+ return toToggle;
+ },
+
+ defaultShowErrors: function() {
+ for ( var i = 0; this.errorList[i]; i++ ) {
+ var error = this.errorList[i];
+ this.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );
+ this.showLabel( error.element, error.message );
+ }
+ if( this.errorList.length ) {
+ this.toShow = this.toShow.add( this.containers );
+ }
+ if (this.settings.success) {
+ for ( var i = 0; this.successList[i]; i++ ) {
+ this.showLabel( this.successList[i] );
+ }
+ }
+ if (this.settings.unhighlight) {
+ for ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {
+ this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );
+ }
+ }
+ this.toHide = this.toHide.not( this.toShow );
+ this.hideErrors();
+ this.addWrapper( this.toShow ).show();
+ },
+
+ validElements: function() {
+ return this.currentElements.not(this.invalidElements());
+ },
+
+ invalidElements: function() {
+ return $(this.errorList).map(function() {
+ return this.element;
+ });
+ },
+
+ showLabel: function(element, message) {
+ var label = this.errorsFor( element );
+ if ( label.length ) {
+ // refresh error/success class
+ label.removeClass().addClass( this.settings.errorClass );
+
+ // check if we have a generated label, replace the message then
+ label.attr("generated") && label.html(message);
+ } else {
+ // create label
+ label = $("<" + this.settings.errorElement + "/>")
+ .attr({"for": this.idOrName(element), generated: true})
+ .addClass(this.settings.errorClass)
+ .html(message || "");
+ if ( this.settings.wrapper ) {
+ // make sure the element is visible, even in IE
+ // actually showing the wrapped element is handled elsewhere
+ label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
+ }
+ if ( !this.labelContainer.append(label).length )
+ this.settings.errorPlacement
+ ? this.settings.errorPlacement(label, $(element) )
+ : label.insertAfter(element);
+ }
+ if ( !message && this.settings.success ) {
+ label.text("");
+ typeof this.settings.success == "string"
+ ? label.addClass( this.settings.success )
+ : this.settings.success( label );
+ }
+ this.toShow = this.toShow.add(label);
+ },
+
+ errorsFor: function(element) {
+ var name = this.idOrName(element);
+ return this.errors().filter(function() {
+ return $(this).attr('for') == name;
+ });
+ },
+
+ idOrName: function(element) {
+ return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
+ },
+
+ checkable: function( element ) {
+ return /radio|checkbox/i.test(element.type);
+ },
+
+ findByName: function( name ) {
+ // select by name and filter by form for performance over form.find("[name=...]")
+ var form = this.currentForm;
+ return $(document.getElementsByName(name)).map(function(index, element) {
+ return element.form == form && element.name == name && element || null;
+ });
+ },
+
+ getLength: function(value, element) {
+ switch( element.nodeName.toLowerCase() ) {
+ case 'select':
+ return $("option:selected", element).length;
+ case 'input':
+ if( this.checkable( element) )
+ return this.findByName(element.name).filter(':checked').length;
+ }
+ return value.length;
+ },
+
+ depend: function(param, element) {
+ return this.dependTypes[typeof param]
+ ? this.dependTypes[typeof param](param, element)
+ : true;
+ },
+
+ dependTypes: {
+ "boolean": function(param, element) {
+ return param;
+ },
+ "string": function(param, element) {
+ return !!$(param, element.form).length;
+ },
+ "function": function(param, element) {
+ return param(element);
+ }
+ },
+
+ optional: function(element) {
+ return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";
+ },
+
+ startRequest: function(element) {
+ if (!this.pending[element.name]) {
+ this.pendingRequest++;
+ this.pending[element.name] = true;
+ }
+ },
+
+ stopRequest: function(element, valid) {
+ this.pendingRequest--;
+ // sometimes synchronization fails, make sure pendingRequest is never < 0
+ if (this.pendingRequest < 0)
+ this.pendingRequest = 0;
+ delete this.pending[element.name];
+ if ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {
+ $(this.currentForm).submit();
+ this.formSubmitted = false;
+ } else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ this.formSubmitted = false;
+ }
+ },
+
+ previousValue: function(element) {
+ return $.data(element, "previousValue") || $.data(element, "previousValue", {
+ old: null,
+ valid: true,
+ message: this.defaultMessage( element, "remote" )
+ });
+ }
+
+ },
+
+ classRuleSettings: {
+ required: {required: true},
+ email: {email: true},
+ url: {url: true},
+ date: {date: true},
+ dateISO: {dateISO: true},
+ dateDE: {dateDE: true},
+ number: {number: true},
+ numberDE: {numberDE: true},
+ digits: {digits: true},
+ creditcard: {creditcard: true}
+ },
+
+ addClassRules: function(className, rules) {
+ ///
+ /// Add a compound class method - useful to refactor common combinations of rules into a single
+ /// class.
+ ///
+ ///
+ /// The name of the class rule to add
+ ///
+ ///
+ /// The compound rules
+ ///
+
+ className.constructor == String ?
+ this.classRuleSettings[className] = rules :
+ $.extend(this.classRuleSettings, className);
+ },
+
+ classRules: function(element) {
+ var rules = {};
+ var classes = $(element).attr('class');
+ classes && $.each(classes.split(' '), function() {
+ if (this in $.validator.classRuleSettings) {
+ $.extend(rules, $.validator.classRuleSettings[this]);
+ }
+ });
+ return rules;
+ },
+
+ attributeRules: function(element) {
+ var rules = {};
+ var $element = $(element);
+
+ for (var method in $.validator.methods) {
+ var value = $element.attr(method);
+ if (value) {
+ rules[method] = value;
+ }
+ }
+
+ // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
+ if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {
+ delete rules.maxlength;
+ }
+
+ return rules;
+ },
+
+ metadataRules: function(element) {
+ if (!$.metadata) return {};
+
+ var meta = $.data(element.form, 'validator').settings.meta;
+ return meta ?
+ $(element).metadata()[meta] :
+ $(element).metadata();
+ },
+
+ staticRules: function(element) {
+ var rules = {};
+ var validator = $.data(element.form, 'validator');
+ if (validator.settings.rules) {
+ rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
+ }
+ return rules;
+ },
+
+ normalizeRules: function(rules, element) {
+ // handle dependency check
+ $.each(rules, function(prop, val) {
+ // ignore rule when param is explicitly false, eg. required:false
+ if (val === false) {
+ delete rules[prop];
+ return;
+ }
+ if (val.param || val.depends) {
+ var keepRule = true;
+ switch (typeof val.depends) {
+ case "string":
+ keepRule = !!$(val.depends, element.form).length;
+ break;
+ case "function":
+ keepRule = val.depends.call(element, element);
+ break;
+ }
+ if (keepRule) {
+ rules[prop] = val.param !== undefined ? val.param : true;
+ } else {
+ delete rules[prop];
+ }
+ }
+ });
+
+ // evaluate parameters
+ $.each(rules, function(rule, parameter) {
+ rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
+ });
+
+ // clean number parameters
+ $.each(['minlength', 'maxlength', 'min', 'max'], function() {
+ if (rules[this]) {
+ rules[this] = Number(rules[this]);
+ }
+ });
+ $.each(['rangelength', 'range'], function() {
+ if (rules[this]) {
+ rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
+ }
+ });
+
+ if ($.validator.autoCreateRanges) {
+ // auto-create ranges
+ if (rules.min && rules.max) {
+ rules.range = [rules.min, rules.max];
+ delete rules.min;
+ delete rules.max;
+ }
+ if (rules.minlength && rules.maxlength) {
+ rules.rangelength = [rules.minlength, rules.maxlength];
+ delete rules.minlength;
+ delete rules.maxlength;
+ }
+ }
+
+ // To support custom messages in metadata ignore rule methods titled "messages"
+ if (rules.messages) {
+ delete rules.messages;
+ }
+
+ return rules;
+ },
+
+ // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
+ normalizeRule: function(data) {
+ if( typeof data == "string" ) {
+ var transformed = {};
+ $.each(data.split(/\s/), function() {
+ transformed[this] = true;
+ });
+ data = transformed;
+ }
+ return data;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/addMethod
+ addMethod: function(name, method, message) {
+ ///
+ /// Add a custom validation method. It must consist of a name (must be a legal javascript
+ /// identifier), a javascript based function and a default string message.
+ ///
+ ///
+ /// The name of the method, used to identify and referencing it, must be a valid javascript
+ /// identifier
+ ///
+ ///
+ /// The actual method implementation, returning true if an element is valid
+ ///
+ ///
+ /// (Optional) The default message to display for this method. Can be a function created by
+ /// jQuery.validator.format(value). When undefined, an already existing message is used
+ /// (handy for localization), otherwise the field-specific messages have to be defined.
+ ///
+
+ $.validator.methods[name] = method;
+ $.validator.messages[name] = message != undefined ? message : $.validator.messages[name];
+ if (method.length < 3) {
+ $.validator.addClassRules(name, $.validator.normalizeRule(name));
+ }
+ },
+
+ methods: {
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/required
+ required: function(value, element, param) {
+ // check if dependency is met
+ if ( !this.depend(param, element) )
+ return "dependency-mismatch";
+ switch( element.nodeName.toLowerCase() ) {
+ case 'select':
+ // could be an array for select-multiple or a string, both are fine this way
+ var val = $(element).val();
+ return val && val.length > 0;
+ case 'input':
+ if ( this.checkable(element) )
+ return this.getLength(value, element) > 0;
+ default:
+ return $.trim(value).length > 0;
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/remote
+ remote: function(value, element, param) {
+ if ( this.optional(element) )
+ return "dependency-mismatch";
+
+ var previous = this.previousValue(element);
+ if (!this.settings.messages[element.name] )
+ this.settings.messages[element.name] = {};
+ previous.originalMessage = this.settings.messages[element.name].remote;
+ this.settings.messages[element.name].remote = previous.message;
+
+ param = typeof param == "string" && {url:param} || param;
+
+ if ( this.pending[element.name] ) {
+ return "pending";
+ }
+ if ( previous.old === value ) {
+ return previous.valid;
+ }
+
+ previous.old = value;
+ var validator = this;
+ this.startRequest(element);
+ var data = {};
+ data[element.name] = value;
+ $.ajax($.extend(true, {
+ url: param,
+ mode: "abort",
+ port: "validate" + element.name,
+ dataType: "json",
+ data: data,
+ success: function(response) {
+ validator.settings.messages[element.name].remote = previous.originalMessage;
+ var valid = response === true;
+ if ( valid ) {
+ var submitted = validator.formSubmitted;
+ validator.prepareElement(element);
+ validator.formSubmitted = submitted;
+ validator.successList.push(element);
+ validator.showErrors();
+ } else {
+ var errors = {};
+ var message = response || validator.defaultMessage(element, "remote");
+ errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;
+ validator.showErrors(errors);
+ }
+ previous.valid = valid;
+ validator.stopRequest(element, valid);
+ }
+ }, param));
+ return "pending";
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/minlength
+ minlength: function(value, element, param) {
+ return this.optional(element) || this.getLength($.trim(value), element) >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/maxlength
+ maxlength: function(value, element, param) {
+ return this.optional(element) || this.getLength($.trim(value), element) <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/rangelength
+ rangelength: function(value, element, param) {
+ var length = this.getLength($.trim(value), element);
+ return this.optional(element) || ( length >= param[0] && length <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/min
+ min: function( value, element, param ) {
+ return this.optional(element) || value >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/max
+ max: function( value, element, param ) {
+ return this.optional(element) || value <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/range
+ range: function( value, element, param ) {
+ return this.optional(element) || ( value >= param[0] && value <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/email
+ email: function(value, element) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
+ return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/url
+ url: function(value, element) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
+ return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/date
+ date: function(value, element) {
+ return this.optional(element) || !/Invalid|NaN/.test(new Date(value));
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/dateISO
+ dateISO: function(value, element) {
+ return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/number
+ number: function(value, element) {
+ return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/digits
+ digits: function(value, element) {
+ return this.optional(element) || /^\d+$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/creditcard
+ // based on http://en.wikipedia.org/wiki/Luhn
+ creditcard: function(value, element) {
+ if ( this.optional(element) )
+ return "dependency-mismatch";
+ // accept only digits and dashes
+ if (/[^0-9-]+/.test(value))
+ return false;
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false;
+
+ value = value.replace(/\D/g, "");
+
+ for (var n = value.length - 1; n >= 0; n--) {
+ var cDigit = value.charAt(n);
+ var nDigit = parseInt(cDigit, 10);
+ if (bEven) {
+ if ((nDigit *= 2) > 9)
+ nDigit -= 9;
+ }
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return (nCheck % 10) == 0;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/accept
+ accept: function(value, element, param) {
+ param = typeof param == "string" ? param.replace(/,/g, '|') : "png|jpe?g|gif";
+ return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/equalTo
+ equalTo: function(value, element, param) {
+ // bind to the blur event of the target in order to revalidate whenever the target field is updated
+ // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+ var target = $(param).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
+ $(element).valid();
+ });
+ return value == target.val();
+ }
+
+ }
+
+});
+
+// deprecated, use $.validator.format instead
+$.format = $.validator.format;
+
+})(jQuery);
+
+// ajax mode: abort
+// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
+// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
+;(function($) {
+ var pendingRequests = {};
+ // Use a prefilter if available (1.5+)
+ if ( $.ajaxPrefilter ) {
+ $.ajaxPrefilter(function(settings, _, xhr) {
+ var port = settings.port;
+ if (settings.mode == "abort") {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ } pendingRequests[port] = xhr;
+ }
+ });
+ } else {
+ // Proxy ajax
+ var ajax = $.ajax;
+ $.ajax = function(settings) {
+ var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
+ port = ( "port" in settings ? settings : $.ajaxSettings ).port;
+ if (mode == "abort") {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+
+ return (pendingRequests[port] = ajax.apply(this, arguments));
+ }
+ return ajax.apply(this, arguments);
+ };
+ }
+})(jQuery);
+
+// provides cross-browser focusin and focusout events
+// IE has native support, in other browsers, use event caputuring (neither bubbles)
+
+// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
+// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
+;(function($) {
+ // only implement if not provided by jQuery core (since 1.4)
+ // TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs
+ if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {
+ $.each({
+ focus: 'focusin',
+ blur: 'focusout'
+ }, function( original, fix ){
+ $.event.special[fix] = {
+ setup:function() {
+ this.addEventListener( original, handler, true );
+ },
+ teardown:function() {
+ this.removeEventListener( original, handler, true );
+ },
+ handler: function(e) {
+ arguments[0] = $.event.fix(e);
+ arguments[0].type = fix;
+ return $.event.handle.apply(this, arguments);
+ }
+ };
+ function handler(e) {
+ e = $.event.fix(e);
+ e.type = fix;
+ return $.event.handle.call(this, e);
+ }
+ });
+ };
+ $.extend($.fn, {
+ validateDelegate: function(delegate, type, handler) {
+ return this.bind(type, function(event) {
+ var target = $(event.target);
+ if (target.is(delegate)) {
+ return handler.apply(target, arguments);
+ }
+ });
+ }
+ });
+})(jQuery);
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.js b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.js
new file mode 100644
index 00000000..f91a328b
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.js
@@ -0,0 +1,1245 @@
+/* NUGET: BEGIN LICENSE TEXT
+ *
+ * Microsoft grants you the right to use these script files for the sole
+ * purpose of either: (i) interacting through your browser with the Microsoft
+ * website or online service, subject to the applicable licensing or use
+ * terms; or (ii) using the files as included with a Microsoft product subject
+ * to that product's license terms. Microsoft reserves all other rights to the
+ * files not expressly granted by Microsoft, whether by implication, estoppel
+ * or otherwise. Insofar as a script file is dual licensed under GPL,
+ * Microsoft neither took the code under GPL nor distributes it thereunder but
+ * under the terms set out in this paragraph. All notices and licenses
+ * below are for informational purposes only.
+ *
+ * NUGET: END LICENSE TEXT */
+/*!
+ * jQuery Validation Plugin 1.11.1
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright 2013 Jörn Zaefferer
+ * Released under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+
+(function($) {
+
+$.extend($.fn, {
+ // http://docs.jquery.com/Plugins/Validation/validate
+ validate: function( options ) {
+
+ // if nothing is selected, return nothing; can't chain anyway
+ if ( !this.length ) {
+ if ( options && options.debug && window.console ) {
+ console.warn( "Nothing selected, can't validate, returning nothing." );
+ }
+ return;
+ }
+
+ // check if a validator for this form was already created
+ var validator = $.data( this[0], "validator" );
+ if ( validator ) {
+ return validator;
+ }
+
+ // Add novalidate tag if HTML5.
+ this.attr( "novalidate", "novalidate" );
+
+ validator = new $.validator( options, this[0] );
+ $.data( this[0], "validator", validator );
+
+ if ( validator.settings.onsubmit ) {
+
+ this.validateDelegate( ":submit", "click", function( event ) {
+ if ( validator.settings.submitHandler ) {
+ validator.submitButton = event.target;
+ }
+ // allow suppressing validation by adding a cancel class to the submit button
+ if ( $(event.target).hasClass("cancel") ) {
+ validator.cancelSubmit = true;
+ }
+
+ // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
+ if ( $(event.target).attr("formnovalidate") !== undefined ) {
+ validator.cancelSubmit = true;
+ }
+ });
+
+ // validate the form on submit
+ this.submit( function( event ) {
+ if ( validator.settings.debug ) {
+ // prevent form submit to be able to see console output
+ event.preventDefault();
+ }
+ function handle() {
+ var hidden;
+ if ( validator.settings.submitHandler ) {
+ if ( validator.submitButton ) {
+ // insert a hidden input as a replacement for the missing submit button
+ hidden = $("
").attr("name", validator.submitButton.name).val( $(validator.submitButton).val() ).appendTo(validator.currentForm);
+ }
+ validator.settings.submitHandler.call( validator, validator.currentForm, event );
+ if ( validator.submitButton ) {
+ // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ hidden.remove();
+ }
+ return false;
+ }
+ return true;
+ }
+
+ // prevent submit for invalid forms or custom submit handlers
+ if ( validator.cancelSubmit ) {
+ validator.cancelSubmit = false;
+ return handle();
+ }
+ if ( validator.form() ) {
+ if ( validator.pendingRequest ) {
+ validator.formSubmitted = true;
+ return false;
+ }
+ return handle();
+ } else {
+ validator.focusInvalid();
+ return false;
+ }
+ });
+ }
+
+ return validator;
+ },
+ // http://docs.jquery.com/Plugins/Validation/valid
+ valid: function() {
+ if ( $(this[0]).is("form")) {
+ return this.validate().form();
+ } else {
+ var valid = true;
+ var validator = $(this[0].form).validate();
+ this.each(function() {
+ valid = valid && validator.element(this);
+ });
+ return valid;
+ }
+ },
+ // attributes: space seperated list of attributes to retrieve and remove
+ removeAttrs: function( attributes ) {
+ var result = {},
+ $element = this;
+ $.each(attributes.split(/\s/), function( index, value ) {
+ result[value] = $element.attr(value);
+ $element.removeAttr(value);
+ });
+ return result;
+ },
+ // http://docs.jquery.com/Plugins/Validation/rules
+ rules: function( command, argument ) {
+ var element = this[0];
+
+ if ( command ) {
+ var settings = $.data(element.form, "validator").settings;
+ var staticRules = settings.rules;
+ var existingRules = $.validator.staticRules(element);
+ switch(command) {
+ case "add":
+ $.extend(existingRules, $.validator.normalizeRule(argument));
+ // remove messages from rules, but allow them to be set separetely
+ delete existingRules.messages;
+ staticRules[element.name] = existingRules;
+ if ( argument.messages ) {
+ settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
+ }
+ break;
+ case "remove":
+ if ( !argument ) {
+ delete staticRules[element.name];
+ return existingRules;
+ }
+ var filtered = {};
+ $.each(argument.split(/\s/), function( index, method ) {
+ filtered[method] = existingRules[method];
+ delete existingRules[method];
+ });
+ return filtered;
+ }
+ }
+
+ var data = $.validator.normalizeRules(
+ $.extend(
+ {},
+ $.validator.classRules(element),
+ $.validator.attributeRules(element),
+ $.validator.dataRules(element),
+ $.validator.staticRules(element)
+ ), element);
+
+ // make sure required is at front
+ if ( data.required ) {
+ var param = data.required;
+ delete data.required;
+ data = $.extend({required: param}, data);
+ }
+
+ return data;
+ }
+});
+
+// Custom selectors
+$.extend($.expr[":"], {
+ // http://docs.jquery.com/Plugins/Validation/blank
+ blank: function( a ) { return !$.trim("" + $(a).val()); },
+ // http://docs.jquery.com/Plugins/Validation/filled
+ filled: function( a ) { return !!$.trim("" + $(a).val()); },
+ // http://docs.jquery.com/Plugins/Validation/unchecked
+ unchecked: function( a ) { return !$(a).prop("checked"); }
+});
+
+// constructor for validator
+$.validator = function( options, form ) {
+ this.settings = $.extend( true, {}, $.validator.defaults, options );
+ this.currentForm = form;
+ this.init();
+};
+
+$.validator.format = function( source, params ) {
+ if ( arguments.length === 1 ) {
+ return function() {
+ var args = $.makeArray(arguments);
+ args.unshift(source);
+ return $.validator.format.apply( this, args );
+ };
+ }
+ if ( arguments.length > 2 && params.constructor !== Array ) {
+ params = $.makeArray(arguments).slice(1);
+ }
+ if ( params.constructor !== Array ) {
+ params = [ params ];
+ }
+ $.each(params, function( i, n ) {
+ source = source.replace( new RegExp("\\{" + i + "\\}", "g"), function() {
+ return n;
+ });
+ });
+ return source;
+};
+
+$.extend($.validator, {
+
+ defaults: {
+ messages: {},
+ groups: {},
+ rules: {},
+ errorClass: "error",
+ validClass: "valid",
+ errorElement: "label",
+ focusInvalid: true,
+ errorContainer: $([]),
+ errorLabelContainer: $([]),
+ onsubmit: true,
+ ignore: ":hidden",
+ ignoreTitle: false,
+ onfocusin: function( element, event ) {
+ this.lastActive = element;
+
+ // hide error label and remove error class on focus if enabled
+ if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
+ if ( this.settings.unhighlight ) {
+ this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.addWrapper(this.errorsFor(element)).hide();
+ }
+ },
+ onfocusout: function( element, event ) {
+ if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
+ this.element(element);
+ }
+ },
+ onkeyup: function( element, event ) {
+ if ( event.which === 9 && this.elementValue(element) === "" ) {
+ return;
+ } else if ( element.name in this.submitted || element === this.lastElement ) {
+ this.element(element);
+ }
+ },
+ onclick: function( element, event ) {
+ // click on selects, radiobuttons and checkboxes
+ if ( element.name in this.submitted ) {
+ this.element(element);
+ }
+ // or option elements, check parent select in that case
+ else if ( element.parentNode.name in this.submitted ) {
+ this.element(element.parentNode);
+ }
+ },
+ highlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName(element.name).addClass(errorClass).removeClass(validClass);
+ } else {
+ $(element).addClass(errorClass).removeClass(validClass);
+ }
+ },
+ unhighlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName(element.name).removeClass(errorClass).addClass(validClass);
+ } else {
+ $(element).removeClass(errorClass).addClass(validClass);
+ }
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
+ setDefaults: function( settings ) {
+ $.extend( $.validator.defaults, settings );
+ },
+
+ messages: {
+ required: "This field is required.",
+ remote: "Please fix this field.",
+ email: "Please enter a valid email address.",
+ url: "Please enter a valid URL.",
+ date: "Please enter a valid date.",
+ dateISO: "Please enter a valid date (ISO).",
+ number: "Please enter a valid number.",
+ digits: "Please enter only digits.",
+ creditcard: "Please enter a valid credit card number.",
+ equalTo: "Please enter the same value again.",
+ maxlength: $.validator.format("Please enter no more than {0} characters."),
+ minlength: $.validator.format("Please enter at least {0} characters."),
+ rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
+ range: $.validator.format("Please enter a value between {0} and {1}."),
+ max: $.validator.format("Please enter a value less than or equal to {0}."),
+ min: $.validator.format("Please enter a value greater than or equal to {0}.")
+ },
+
+ autoCreateRanges: false,
+
+ prototype: {
+
+ init: function() {
+ this.labelContainer = $(this.settings.errorLabelContainer);
+ this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
+ this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
+ this.submitted = {};
+ this.valueCache = {};
+ this.pendingRequest = 0;
+ this.pending = {};
+ this.invalid = {};
+ this.reset();
+
+ var groups = (this.groups = {});
+ $.each(this.settings.groups, function( key, value ) {
+ if ( typeof value === "string" ) {
+ value = value.split(/\s/);
+ }
+ $.each(value, function( index, name ) {
+ groups[name] = key;
+ });
+ });
+ var rules = this.settings.rules;
+ $.each(rules, function( key, value ) {
+ rules[key] = $.validator.normalizeRule(value);
+ });
+
+ function delegate(event) {
+ var validator = $.data(this[0].form, "validator"),
+ eventType = "on" + event.type.replace(/^validate/, "");
+ if ( validator.settings[eventType] ) {
+ validator.settings[eventType].call(validator, this[0], event);
+ }
+ }
+ $(this.currentForm)
+ .validateDelegate(":text, [type='password'], [type='file'], select, textarea, " +
+ "[type='number'], [type='search'] ,[type='tel'], [type='url'], " +
+ "[type='email'], [type='datetime'], [type='date'], [type='month'], " +
+ "[type='week'], [type='time'], [type='datetime-local'], " +
+ "[type='range'], [type='color'] ",
+ "focusin focusout keyup", delegate)
+ .validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);
+
+ if ( this.settings.invalidHandler ) {
+ $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/form
+ form: function() {
+ this.checkForm();
+ $.extend(this.submitted, this.errorMap);
+ this.invalid = $.extend({}, this.errorMap);
+ if ( !this.valid() ) {
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ }
+ this.showErrors();
+ return this.valid();
+ },
+
+ checkForm: function() {
+ this.prepareForm();
+ for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
+ this.check( elements[i] );
+ }
+ return this.valid();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/element
+ element: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+ this.lastElement = element;
+ this.prepareElement( element );
+ this.currentElements = $(element);
+ var result = this.check( element ) !== false;
+ if ( result ) {
+ delete this.invalid[element.name];
+ } else {
+ this.invalid[element.name] = true;
+ }
+ if ( !this.numberOfInvalids() ) {
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+ return result;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/showErrors
+ showErrors: function( errors ) {
+ if ( errors ) {
+ // add items to error list and map
+ $.extend( this.errorMap, errors );
+ this.errorList = [];
+ for ( var name in errors ) {
+ this.errorList.push({
+ message: errors[name],
+ element: this.findByName(name)[0]
+ });
+ }
+ // remove items from success list
+ this.successList = $.grep( this.successList, function( element ) {
+ return !(element.name in errors);
+ });
+ }
+ if ( this.settings.showErrors ) {
+ this.settings.showErrors.call( this, this.errorMap, this.errorList );
+ } else {
+ this.defaultShowErrors();
+ }
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/resetForm
+ resetForm: function() {
+ if ( $.fn.resetForm ) {
+ $(this.currentForm).resetForm();
+ }
+ this.submitted = {};
+ this.lastElement = null;
+ this.prepareForm();
+ this.hideErrors();
+ this.elements().removeClass( this.settings.errorClass ).removeData( "previousValue" );
+ },
+
+ numberOfInvalids: function() {
+ return this.objectLength(this.invalid);
+ },
+
+ objectLength: function( obj ) {
+ var count = 0;
+ for ( var i in obj ) {
+ count++;
+ }
+ return count;
+ },
+
+ hideErrors: function() {
+ this.addWrapper( this.toHide ).hide();
+ },
+
+ valid: function() {
+ return this.size() === 0;
+ },
+
+ size: function() {
+ return this.errorList.length;
+ },
+
+ focusInvalid: function() {
+ if ( this.settings.focusInvalid ) {
+ try {
+ $(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])
+ .filter(":visible")
+ .focus()
+ // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger("focusin");
+ } catch(e) {
+ // ignore IE throwing errors when focusing hidden elements
+ }
+ }
+ },
+
+ findLastActive: function() {
+ var lastActive = this.lastActive;
+ return lastActive && $.grep(this.errorList, function( n ) {
+ return n.element.name === lastActive.name;
+ }).length === 1 && lastActive;
+ },
+
+ elements: function() {
+ var validator = this,
+ rulesCache = {};
+
+ // select all valid inputs inside the form (no submit or reset buttons)
+ return $(this.currentForm)
+ .find("input, select, textarea")
+ .not(":submit, :reset, :image, [disabled]")
+ .not( this.settings.ignore )
+ .filter(function() {
+ if ( !this.name && validator.settings.debug && window.console ) {
+ console.error( "%o has no name assigned", this);
+ }
+
+ // select only the first element for each name, and only those with rules specified
+ if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) {
+ return false;
+ }
+
+ rulesCache[this.name] = true;
+ return true;
+ });
+ },
+
+ clean: function( selector ) {
+ return $(selector)[0];
+ },
+
+ errors: function() {
+ var errorClass = this.settings.errorClass.replace(" ", ".");
+ return $(this.settings.errorElement + "." + errorClass, this.errorContext);
+ },
+
+ reset: function() {
+ this.successList = [];
+ this.errorList = [];
+ this.errorMap = {};
+ this.toShow = $([]);
+ this.toHide = $([]);
+ this.currentElements = $([]);
+ },
+
+ prepareForm: function() {
+ this.reset();
+ this.toHide = this.errors().add( this.containers );
+ },
+
+ prepareElement: function( element ) {
+ this.reset();
+ this.toHide = this.errorsFor(element);
+ },
+
+ elementValue: function( element ) {
+ var type = $(element).attr("type"),
+ val = $(element).val();
+
+ if ( type === "radio" || type === "checkbox" ) {
+ return $("input[name='" + $(element).attr("name") + "']:checked").val();
+ }
+
+ if ( typeof val === "string" ) {
+ return val.replace(/\r/g, "");
+ }
+ return val;
+ },
+
+ check: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+
+ var rules = $(element).rules();
+ var dependencyMismatch = false;
+ var val = this.elementValue(element);
+ var result;
+
+ for (var method in rules ) {
+ var rule = { method: method, parameters: rules[method] };
+ try {
+
+ result = $.validator.methods[method].call( this, val, element, rule.parameters );
+
+ // if a method indicates that the field is optional and therefore valid,
+ // don't mark it as valid when there are no other rules
+ if ( result === "dependency-mismatch" ) {
+ dependencyMismatch = true;
+ continue;
+ }
+ dependencyMismatch = false;
+
+ if ( result === "pending" ) {
+ this.toHide = this.toHide.not( this.errorsFor(element) );
+ return;
+ }
+
+ if ( !result ) {
+ this.formatAndAdd( element, rule );
+ return false;
+ }
+ } catch(e) {
+ if ( this.settings.debug && window.console ) {
+ console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e );
+ }
+ throw e;
+ }
+ }
+ if ( dependencyMismatch ) {
+ return;
+ }
+ if ( this.objectLength(rules) ) {
+ this.successList.push(element);
+ }
+ return true;
+ },
+
+ // return the custom message for the given element and validation method
+ // specified in the element's HTML5 data attribute
+ customDataMessage: function( element, method ) {
+ return $(element).data("msg-" + method.toLowerCase()) || (element.attributes && $(element).attr("data-msg-" + method.toLowerCase()));
+ },
+
+ // return the custom message for the given element name and validation method
+ customMessage: function( name, method ) {
+ var m = this.settings.messages[name];
+ return m && (m.constructor === String ? m : m[method]);
+ },
+
+ // return the first defined argument, allowing empty strings
+ findDefined: function() {
+ for(var i = 0; i < arguments.length; i++) {
+ if ( arguments[i] !== undefined ) {
+ return arguments[i];
+ }
+ }
+ return undefined;
+ },
+
+ defaultMessage: function( element, method ) {
+ return this.findDefined(
+ this.customMessage( element.name, method ),
+ this.customDataMessage( element, method ),
+ // title is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[method],
+ "
Warning: No message defined for " + element.name + " "
+ );
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule.method ),
+ theregex = /\$?\{(\d+)\}/g;
+ if ( typeof message === "function" ) {
+ message = message.call(this, rule.parameters, element);
+ } else if (theregex.test(message)) {
+ message = $.validator.format(message.replace(theregex, "{$1}"), rule.parameters);
+ }
+ this.errorList.push({
+ message: message,
+ element: element
+ });
+
+ this.errorMap[element.name] = message;
+ this.submitted[element.name] = message;
+ },
+
+ addWrapper: function( toToggle ) {
+ if ( this.settings.wrapper ) {
+ toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
+ }
+ return toToggle;
+ },
+
+ defaultShowErrors: function() {
+ var i, elements;
+ for ( i = 0; this.errorList[i]; i++ ) {
+ var error = this.errorList[i];
+ if ( this.settings.highlight ) {
+ this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.showLabel( error.element, error.message );
+ }
+ if ( this.errorList.length ) {
+ this.toShow = this.toShow.add( this.containers );
+ }
+ if ( this.settings.success ) {
+ for ( i = 0; this.successList[i]; i++ ) {
+ this.showLabel( this.successList[i] );
+ }
+ }
+ if ( this.settings.unhighlight ) {
+ for ( i = 0, elements = this.validElements(); elements[i]; i++ ) {
+ this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );
+ }
+ }
+ this.toHide = this.toHide.not( this.toShow );
+ this.hideErrors();
+ this.addWrapper( this.toShow ).show();
+ },
+
+ validElements: function() {
+ return this.currentElements.not(this.invalidElements());
+ },
+
+ invalidElements: function() {
+ return $(this.errorList).map(function() {
+ return this.element;
+ });
+ },
+
+ showLabel: function( element, message ) {
+ var label = this.errorsFor( element );
+ if ( label.length ) {
+ // refresh error/success class
+ label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
+ // replace message on existing label
+ label.html(message);
+ } else {
+ // create label
+ label = $("<" + this.settings.errorElement + ">")
+ .attr("for", this.idOrName(element))
+ .addClass(this.settings.errorClass)
+ .html(message || "");
+ if ( this.settings.wrapper ) {
+ // make sure the element is visible, even in IE
+ // actually showing the wrapped element is handled elsewhere
+ label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
+ }
+ if ( !this.labelContainer.append(label).length ) {
+ if ( this.settings.errorPlacement ) {
+ this.settings.errorPlacement(label, $(element) );
+ } else {
+ label.insertAfter(element);
+ }
+ }
+ }
+ if ( !message && this.settings.success ) {
+ label.text("");
+ if ( typeof this.settings.success === "string" ) {
+ label.addClass( this.settings.success );
+ } else {
+ this.settings.success( label, element );
+ }
+ }
+ this.toShow = this.toShow.add(label);
+ },
+
+ errorsFor: function( element ) {
+ var name = this.idOrName(element);
+ return this.errors().filter(function() {
+ return $(this).attr("for") === name;
+ });
+ },
+
+ idOrName: function( element ) {
+ return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
+ },
+
+ validationTargetFor: function( element ) {
+ // if radio/checkbox, validate first element in group instead
+ if ( this.checkable(element) ) {
+ element = this.findByName( element.name ).not(this.settings.ignore)[0];
+ }
+ return element;
+ },
+
+ checkable: function( element ) {
+ return (/radio|checkbox/i).test(element.type);
+ },
+
+ findByName: function( name ) {
+ return $(this.currentForm).find("[name='" + name + "']");
+ },
+
+ getLength: function( value, element ) {
+ switch( element.nodeName.toLowerCase() ) {
+ case "select":
+ return $("option:selected", element).length;
+ case "input":
+ if ( this.checkable( element) ) {
+ return this.findByName(element.name).filter(":checked").length;
+ }
+ }
+ return value.length;
+ },
+
+ depend: function( param, element ) {
+ return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true;
+ },
+
+ dependTypes: {
+ "boolean": function( param, element ) {
+ return param;
+ },
+ "string": function( param, element ) {
+ return !!$(param, element.form).length;
+ },
+ "function": function( param, element ) {
+ return param(element);
+ }
+ },
+
+ optional: function( element ) {
+ var val = this.elementValue(element);
+ return !$.validator.methods.required.call(this, val, element) && "dependency-mismatch";
+ },
+
+ startRequest: function( element ) {
+ if ( !this.pending[element.name] ) {
+ this.pendingRequest++;
+ this.pending[element.name] = true;
+ }
+ },
+
+ stopRequest: function( element, valid ) {
+ this.pendingRequest--;
+ // sometimes synchronization fails, make sure pendingRequest is never < 0
+ if ( this.pendingRequest < 0 ) {
+ this.pendingRequest = 0;
+ }
+ delete this.pending[element.name];
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
+ $(this.currentForm).submit();
+ this.formSubmitted = false;
+ } else if (!valid && this.pendingRequest === 0 && this.formSubmitted) {
+ $(this.currentForm).triggerHandler("invalid-form", [this]);
+ this.formSubmitted = false;
+ }
+ },
+
+ previousValue: function( element ) {
+ return $.data(element, "previousValue") || $.data(element, "previousValue", {
+ old: null,
+ valid: true,
+ message: this.defaultMessage( element, "remote" )
+ });
+ }
+
+ },
+
+ classRuleSettings: {
+ required: {required: true},
+ email: {email: true},
+ url: {url: true},
+ date: {date: true},
+ dateISO: {dateISO: true},
+ number: {number: true},
+ digits: {digits: true},
+ creditcard: {creditcard: true}
+ },
+
+ addClassRules: function( className, rules ) {
+ if ( className.constructor === String ) {
+ this.classRuleSettings[className] = rules;
+ } else {
+ $.extend(this.classRuleSettings, className);
+ }
+ },
+
+ classRules: function( element ) {
+ var rules = {};
+ var classes = $(element).attr("class");
+ if ( classes ) {
+ $.each(classes.split(" "), function() {
+ if ( this in $.validator.classRuleSettings ) {
+ $.extend(rules, $.validator.classRuleSettings[this]);
+ }
+ });
+ }
+ return rules;
+ },
+
+ attributeRules: function( element ) {
+ var rules = {};
+ var $element = $(element);
+ var type = $element[0].getAttribute("type");
+
+ for (var method in $.validator.methods) {
+ var value;
+
+ // support for
in both html5 and older browsers
+ if ( method === "required" ) {
+ value = $element.get(0).getAttribute(method);
+ // Some browsers return an empty string for the required attribute
+ // and non-HTML5 browsers might have required="" markup
+ if ( value === "" ) {
+ value = true;
+ }
+ // force non-HTML5 browsers to return bool
+ value = !!value;
+ } else {
+ value = $element.attr(method);
+ }
+
+ // convert the value to a number for number inputs, and for text for backwards compability
+ // allows type="date" and others to be compared as strings
+ if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ value = Number(value);
+ }
+
+ if ( value ) {
+ rules[method] = value;
+ } else if ( type === method && type !== 'range' ) {
+ // exception: the jquery validate 'range' method
+ // does not test for the html5 'range' type
+ rules[method] = true;
+ }
+ }
+
+ // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
+ if ( rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength) ) {
+ delete rules.maxlength;
+ }
+
+ return rules;
+ },
+
+ dataRules: function( element ) {
+ var method, value,
+ rules = {}, $element = $(element);
+ for (method in $.validator.methods) {
+ value = $element.data("rule-" + method.toLowerCase());
+ if ( value !== undefined ) {
+ rules[method] = value;
+ }
+ }
+ return rules;
+ },
+
+ staticRules: function( element ) {
+ var rules = {};
+ var validator = $.data(element.form, "validator");
+ if ( validator.settings.rules ) {
+ rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
+ }
+ return rules;
+ },
+
+ normalizeRules: function( rules, element ) {
+ // handle dependency check
+ $.each(rules, function( prop, val ) {
+ // ignore rule when param is explicitly false, eg. required:false
+ if ( val === false ) {
+ delete rules[prop];
+ return;
+ }
+ if ( val.param || val.depends ) {
+ var keepRule = true;
+ switch (typeof val.depends) {
+ case "string":
+ keepRule = !!$(val.depends, element.form).length;
+ break;
+ case "function":
+ keepRule = val.depends.call(element, element);
+ break;
+ }
+ if ( keepRule ) {
+ rules[prop] = val.param !== undefined ? val.param : true;
+ } else {
+ delete rules[prop];
+ }
+ }
+ });
+
+ // evaluate parameters
+ $.each(rules, function( rule, parameter ) {
+ rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
+ });
+
+ // clean number parameters
+ $.each(['minlength', 'maxlength'], function() {
+ if ( rules[this] ) {
+ rules[this] = Number(rules[this]);
+ }
+ });
+ $.each(['rangelength', 'range'], function() {
+ var parts;
+ if ( rules[this] ) {
+ if ( $.isArray(rules[this]) ) {
+ rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
+ } else if ( typeof rules[this] === "string" ) {
+ parts = rules[this].split(/[\s,]+/);
+ rules[this] = [Number(parts[0]), Number(parts[1])];
+ }
+ }
+ });
+
+ if ( $.validator.autoCreateRanges ) {
+ // auto-create ranges
+ if ( rules.min && rules.max ) {
+ rules.range = [rules.min, rules.max];
+ delete rules.min;
+ delete rules.max;
+ }
+ if ( rules.minlength && rules.maxlength ) {
+ rules.rangelength = [rules.minlength, rules.maxlength];
+ delete rules.minlength;
+ delete rules.maxlength;
+ }
+ }
+
+ return rules;
+ },
+
+ // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
+ normalizeRule: function( data ) {
+ if ( typeof data === "string" ) {
+ var transformed = {};
+ $.each(data.split(/\s/), function() {
+ transformed[this] = true;
+ });
+ data = transformed;
+ }
+ return data;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Validator/addMethod
+ addMethod: function( name, method, message ) {
+ $.validator.methods[name] = method;
+ $.validator.messages[name] = message !== undefined ? message : $.validator.messages[name];
+ if ( method.length < 3 ) {
+ $.validator.addClassRules(name, $.validator.normalizeRule(name));
+ }
+ },
+
+ methods: {
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/required
+ required: function( value, element, param ) {
+ // check if dependency is met
+ if ( !this.depend(param, element) ) {
+ return "dependency-mismatch";
+ }
+ if ( element.nodeName.toLowerCase() === "select" ) {
+ // could be an array for select-multiple or a string, both are fine this way
+ var val = $(element).val();
+ return val && val.length > 0;
+ }
+ if ( this.checkable(element) ) {
+ return this.getLength(value, element) > 0;
+ }
+ return $.trim(value).length > 0;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/email
+ email: function( value, element ) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
+ return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/url
+ url: function( value, element ) {
+ // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
+ return this.optional(element) || /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/date
+ date: function( value, element ) {
+ return this.optional(element) || !/Invalid|NaN/.test(new Date(value).toString());
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/dateISO
+ dateISO: function( value, element ) {
+ return this.optional(element) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/number
+ number: function( value, element ) {
+ return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/digits
+ digits: function( value, element ) {
+ return this.optional(element) || /^\d+$/.test(value);
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/creditcard
+ // based on http://en.wikipedia.org/wiki/Luhn
+ creditcard: function( value, element ) {
+ if ( this.optional(element) ) {
+ return "dependency-mismatch";
+ }
+ // accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test(value) ) {
+ return false;
+ }
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false;
+
+ value = value.replace(/\D/g, "");
+
+ for (var n = value.length - 1; n >= 0; n--) {
+ var cDigit = value.charAt(n);
+ nDigit = parseInt(cDigit, 10);
+ if ( bEven ) {
+ if ( (nDigit *= 2) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return (nCheck % 10) === 0;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/minlength
+ minlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || length >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/maxlength
+ maxlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || length <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/rangelength
+ rangelength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
+ return this.optional(element) || ( length >= param[0] && length <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/min
+ min: function( value, element, param ) {
+ return this.optional(element) || value >= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/max
+ max: function( value, element, param ) {
+ return this.optional(element) || value <= param;
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/range
+ range: function( value, element, param ) {
+ return this.optional(element) || ( value >= param[0] && value <= param[1] );
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/equalTo
+ equalTo: function( value, element, param ) {
+ // bind to the blur event of the target in order to revalidate whenever the target field is updated
+ // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+ var target = $(param);
+ if ( this.settings.onfocusout ) {
+ target.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
+ $(element).valid();
+ });
+ }
+ return value === target.val();
+ },
+
+ // http://docs.jquery.com/Plugins/Validation/Methods/remote
+ remote: function( value, element, param ) {
+ if ( this.optional(element) ) {
+ return "dependency-mismatch";
+ }
+
+ var previous = this.previousValue(element);
+ if (!this.settings.messages[element.name] ) {
+ this.settings.messages[element.name] = {};
+ }
+ previous.originalMessage = this.settings.messages[element.name].remote;
+ this.settings.messages[element.name].remote = previous.message;
+
+ param = typeof param === "string" && {url:param} || param;
+
+ if ( previous.old === value ) {
+ return previous.valid;
+ }
+
+ previous.old = value;
+ var validator = this;
+ this.startRequest(element);
+ var data = {};
+ data[element.name] = value;
+ $.ajax($.extend(true, {
+ url: param,
+ mode: "abort",
+ port: "validate" + element.name,
+ dataType: "json",
+ data: data,
+ success: function( response ) {
+ validator.settings.messages[element.name].remote = previous.originalMessage;
+ var valid = response === true || response === "true";
+ if ( valid ) {
+ var submitted = validator.formSubmitted;
+ validator.prepareElement(element);
+ validator.formSubmitted = submitted;
+ validator.successList.push(element);
+ delete validator.invalid[element.name];
+ validator.showErrors();
+ } else {
+ var errors = {};
+ var message = response || validator.defaultMessage( element, "remote" );
+ errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;
+ validator.invalid[element.name] = true;
+ validator.showErrors(errors);
+ }
+ previous.valid = valid;
+ validator.stopRequest(element, valid);
+ }
+ }, param));
+ return "pending";
+ }
+
+ }
+
+});
+
+// deprecated, use $.validator.format instead
+$.format = $.validator.format;
+
+}(jQuery));
+
+// ajax mode: abort
+// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
+// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
+(function($) {
+ var pendingRequests = {};
+ // Use a prefilter if available (1.5+)
+ if ( $.ajaxPrefilter ) {
+ $.ajaxPrefilter(function( settings, _, xhr ) {
+ var port = settings.port;
+ if ( settings.mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = xhr;
+ }
+ });
+ } else {
+ // Proxy ajax
+ var ajax = $.ajax;
+ $.ajax = function( settings ) {
+ var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
+ port = ( "port" in settings ? settings : $.ajaxSettings ).port;
+ if ( mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = ajax.apply(this, arguments);
+ return pendingRequests[port];
+ }
+ return ajax.apply(this, arguments);
+ };
+ }
+}(jQuery));
+
+// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
+// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
+(function($) {
+ $.extend($.fn, {
+ validateDelegate: function( delegate, type, handler ) {
+ return this.bind(type, function( event ) {
+ var target = $(event.target);
+ if ( target.is(delegate) ) {
+ return handler.apply(target, arguments);
+ }
+ });
+ }
+ });
+}(jQuery));
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.min.js b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.min.js
new file mode 100644
index 00000000..6a5de91c
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.min.js
@@ -0,0 +1,16 @@
+/* NUGET: BEGIN LICENSE TEXT
+ *
+ * Microsoft grants you the right to use these script files for the sole
+ * purpose of either: (i) interacting through your browser with the Microsoft
+ * website or online service, subject to the applicable licensing or use
+ * terms; or (ii) using the files as included with a Microsoft product subject
+ * to that product's license terms. Microsoft reserves all other rights to the
+ * files not expressly granted by Microsoft, whether by implication, estoppel
+ * or otherwise. Insofar as a script file is dual licensed under GPL,
+ * Microsoft neither took the code under GPL nor distributes it thereunder but
+ * under the terms set out in this paragraph. All notices and licenses
+ * below are for informational purposes only.
+ *
+ * NUGET: END LICENSE TEXT */
+/*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation
+* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */(function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=t.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(e.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(e){function s(){var s;return i.settings.submitHandler?(i.submitButton&&(s=t("
").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&s.remove(),!1):!0}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)})),i)},valid:function(){if(t(this[0]).is("form"))return this.validate().form();var e=!0,i=t(this[0].form).validate();return this.each(function(){e=e&&i.element(this)}),e},removeAttrs:function(e){var i={},s=this;return t.each(e.split(/\s/),function(t,e){i[e]=s.attr(e),s.removeAttr(e)}),i},rules:function(e,i){var s=this[0];if(e){var r=t.data(s.form,"validator").settings,n=r.rules,a=t.validator.staticRules(s);switch(e){case"add":t.extend(a,t.validator.normalizeRule(i)),delete a.messages,n[s.name]=a,i.messages&&(r.messages[s.name]=t.extend(r.messages[s.name],i.messages));break;case"remove":if(!i)return delete n[s.name],a;var u={};return t.each(i.split(/\s/),function(t,e){u[e]=a[e],delete a[e]}),u}}var o=t.validator.normalizeRules(t.extend({},t.validator.classRules(s),t.validator.attributeRules(s),t.validator.dataRules(s),t.validator.staticRules(s)),s);if(o.required){var l=o.required;delete o.required,o=t.extend({required:l},o)}return o}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this[0].form,"validator"),s="on"+e.type.replace(/^validate/,"");i.settings[s]&&i.settings[s].call(i,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i=this.groups={};t.each(this.settings.groups,function(e,s){"string"==typeof s&&(s=s.split(/\s/)),t.each(s,function(t,s){i[s]=e})});var s=this.settings.rules;t.each(s,function(e,i){s[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){e=this.validationTargetFor(this.clean(e)),this.lastElement=e,this.prepareElement(e),this.currentElements=t(e);var i=this.check(e)!==!1;return i?delete this.invalid[e.name]:this.invalid[e.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var i in e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!e.objectLength(t(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.replace(" ",".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i=t(e).attr("type"),s=t(e).val();return"radio"===i||"checkbox"===i?t("input[name='"+t(e).attr("name")+"']:checked").val():"string"==typeof s?s.replace(/\r/g,""):s},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s=t(e).rules(),r=!1,n=this.elementValue(e);for(var a in s){var u={method:a,parameters:s[a]};try{if(i=t.validator.methods[a].call(this,n,e,u.parameters),"dependency-mismatch"===i){r=!0;continue}if(r=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(e)),void 0;if(!i)return this.formatAndAdd(e,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+u.method+"' method.",o),o}}return r?void 0:(this.objectLength(s)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg-"+i.toLowerCase())||e.attributes&&t(e).attr("data-msg-"+i.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t];return void 0},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"
Warning: No message defined for "+e.name+" ")},formatAndAdd:function(e,i){var s=this.defaultMessage(e,i.method),r=/\$?\{(\d+)\}/g;"function"==typeof s?s=s.call(this,i.parameters,e):r.test(s)&&(s=t.validator.format(s.replace(r,"{$1}"),i.parameters)),this.errorList.push({message:s,element:e}),this.errorMap[e.name]=s,this.submitted[e.name]=s},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var s=this.errorsFor(e);s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(s).length||(this.settings.errorPlacement?this.settings.errorPlacement(s,t(e)):s.insertAfter(e))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var i=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===i})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,i){return!!t(e,i.form).length},"function":function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},attributeRules:function(e){var i={},s=t(e),r=s[0].getAttribute("type");for(var n in t.validator.methods){var a;"required"===n?(a=s.get(0).getAttribute(n),""===a&&(a=!0),a=!!a):a=s.attr(n),/min|max/.test(n)&&(null===r||/number|range|text/.test(r))&&(a=Number(a)),a?i[n]=a:r===n&&"range"!==r&&(i[n]=!0)}return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var i,s,r={},n=t(e);for(i in t.validator.methods)s=n.data("rule-"+i.toLowerCase()),void 0!==s&&(r[i]=s);return r},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(s,r){if(r===!1)return delete e[s],void 0;if(r.param||r.depends){var n=!0;switch(typeof r.depends){case"string":n=!!t(r.depends,i.form).length;break;case"function":n=r.depends.call(i,i)}n?e[s]=void 0!==r.param?r.param:!0:delete e[s]}}),t.each(e,function(s,r){e[s]=t.isFunction(r)?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],3>i.length&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(t))},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i=0,s=0,r=!1;t=t.replace(/\D/g,"");for(var n=t.length-1;n>=0;n--){var a=t.charAt(n);s=parseInt(a,10),r&&(s*=2)>9&&(s-=9),i+=s,r=!r}return 0===i%10},minlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s},maxlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=r},rangelength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s[0]&&s[1]>=r},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&i[1]>=t},equalTo:function(e,i,s){var r=t(s);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,s){if(this.optional(i))return"dependency-mismatch";var r=this.previousValue(i);if(this.settings.messages[i.name]||(this.settings.messages[i.name]={}),r.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=r.message,s="string"==typeof s&&{url:s}||s,r.old===e)return r.valid;r.old=e;var n=this;this.startRequest(i);var a={};return a[i.name]=e,t.ajax(t.extend(!0,{url:s,mode:"abort",port:"validate"+i.name,dataType:"json",data:a,success:function(s){n.settings.messages[i.name].remote=r.originalMessage;var a=s===!0||"true"===s;if(a){var u=n.formSubmitted;n.prepareElement(i),n.formSubmitted=u,n.successList.push(i),delete n.invalid[i.name],n.showErrors()}else{var o={},l=s||n.defaultMessage(i,"remote");o[i.name]=r.message=t.isFunction(l)?l(e):l,n.invalid[i.name]=!0,n.showErrors(o)}r.valid=a,n.stopRequest(i,a)}},s)),"pending"}}}),t.format=t.validator.format})(jQuery),function(t){var e={};if(t.ajaxPrefilter)t.ajaxPrefilter(function(t,i,s){var r=t.port;"abort"===t.mode&&(e[r]&&e[r].abort(),e[r]=s)});else{var i=t.ajax;t.ajax=function(s){var r=("mode"in s?s:t.ajaxSettings).mode,n=("port"in s?s:t.ajaxSettings).port;return"abort"===r?(e[n]&&e[n].abort(),e[n]=i.apply(this,arguments),e[n]):i.apply(this,arguments)}}}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,i,s){return this.bind(i,function(i){var r=t(i.target);return r.is(e)?s.apply(r,arguments):void 0})}})}(jQuery);
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.unobtrusive.js b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.unobtrusive.js
new file mode 100644
index 00000000..f9d99c9e
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.unobtrusive.js
@@ -0,0 +1,394 @@
+/* NUGET: BEGIN LICENSE TEXT
+ *
+ * Microsoft grants you the right to use these script files for the sole
+ * purpose of either: (i) interacting through your browser with the Microsoft
+ * website or online service, subject to the applicable licensing or use
+ * terms; or (ii) using the files as included with a Microsoft product subject
+ * to that product's license terms. Microsoft reserves all other rights to the
+ * files not expressly granted by Microsoft, whether by implication, estoppel
+ * or otherwise. Insofar as a script file is dual licensed under GPL,
+ * Microsoft neither took the code under GPL nor distributes it thereunder but
+ * under the terms set out in this paragraph. All notices and licenses
+ * below are for informational purposes only.
+ *
+ * NUGET: END LICENSE TEXT */
+/*!
+** Unobtrusive validation support library for jQuery and jQuery Validate
+** Copyright (C) Microsoft Corporation. All rights reserved.
+*/
+
+/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
+/*global document: false, jQuery: false */
+
+(function ($) {
+ var $jQval = $.validator,
+ adapters,
+ data_validation = "unobtrusiveValidation";
+
+ function setValidationValues(options, ruleName, value) {
+ options.rules[ruleName] = value;
+ if (options.message) {
+ options.messages[ruleName] = options.message;
+ }
+ }
+
+ function splitAndTrim(value) {
+ return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g);
+ }
+
+ function escapeAttributeValue(value) {
+ // As mentioned on http://api.jquery.com/category/selectors/
+ return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
+ }
+
+ function getModelPrefix(fieldName) {
+ return fieldName.substr(0, fieldName.lastIndexOf(".") + 1);
+ }
+
+ function appendModelPrefix(value, prefix) {
+ if (value.indexOf("*.") === 0) {
+ value = value.replace("*.", prefix);
+ }
+ return value;
+ }
+
+ function onError(error, inputElement) { // 'this' is the form element
+ var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"),
+ replaceAttrValue = container.attr("data-valmsg-replace"),
+ replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null;
+
+ container.removeClass("field-validation-valid").addClass("field-validation-error");
+ error.data("unobtrusiveContainer", container);
+
+ if (replace) {
+ container.empty();
+ error.removeClass("input-validation-error").appendTo(container);
+ }
+ else {
+ error.hide();
+ }
+ }
+
+ function onErrors(event, validator) { // 'this' is the form element
+ var container = $(this).find("[data-valmsg-summary=true]"),
+ list = container.find("ul");
+
+ if (list && list.length && validator.errorList.length) {
+ list.empty();
+ container.addClass("validation-summary-errors").removeClass("validation-summary-valid");
+
+ $.each(validator.errorList, function () {
+ $("
").html(this.message).appendTo(list);
+ });
+ }
+ }
+
+ function onSuccess(error) { // 'this' is the form element
+ var container = error.data("unobtrusiveContainer"),
+ replaceAttrValue = container.attr("data-valmsg-replace"),
+ replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
+
+ if (container) {
+ container.addClass("field-validation-valid").removeClass("field-validation-error");
+ error.removeData("unobtrusiveContainer");
+
+ if (replace) {
+ container.empty();
+ }
+ }
+ }
+
+ function onReset(event) { // 'this' is the form element
+ var $form = $(this);
+ $form.data("validator").resetForm();
+ $form.find(".validation-summary-errors")
+ .addClass("validation-summary-valid")
+ .removeClass("validation-summary-errors");
+ $form.find(".field-validation-error")
+ .addClass("field-validation-valid")
+ .removeClass("field-validation-error")
+ .removeData("unobtrusiveContainer")
+ .find(">*") // If we were using valmsg-replace, get the underlying error
+ .removeData("unobtrusiveContainer");
+ }
+
+ function validationInfo(form) {
+ var $form = $(form),
+ result = $form.data(data_validation),
+ onResetProxy = $.proxy(onReset, form);
+
+ if (!result) {
+ result = {
+ options: { // options structure passed to jQuery Validate's validate() method
+ errorClass: "input-validation-error",
+ errorElement: "span",
+ errorPlacement: $.proxy(onError, form),
+ invalidHandler: $.proxy(onErrors, form),
+ messages: {},
+ rules: {},
+ success: $.proxy(onSuccess, form)
+ },
+ attachValidation: function () {
+ $form
+ .unbind("reset." + data_validation, onResetProxy)
+ .bind("reset." + data_validation, onResetProxy)
+ .validate(this.options);
+ },
+ validate: function () { // a validation function that is called by unobtrusive Ajax
+ $form.validate();
+ return $form.valid();
+ }
+ };
+ $form.data(data_validation, result);
+ }
+
+ return result;
+ }
+
+ $jQval.unobtrusive = {
+ adapters: [],
+
+ parseElement: function (element, skipAttach) {
+ ///
+ /// Parses a single HTML element for unobtrusive validation attributes.
+ ///
+ ///
The HTML element to be parsed.
+ ///
[Optional] true to skip attaching the
+ /// validation to the form. If parsing just this single element, you should specify true.
+ /// If parsing several elements, you should specify false, and manually attach the validation
+ /// to the form when you are finished. The default is false.
+ var $element = $(element),
+ form = $element.parents("form")[0],
+ valInfo, rules, messages;
+
+ if (!form) { // Cannot do client-side validation without a form
+ return;
+ }
+
+ valInfo = validationInfo(form);
+ valInfo.options.rules[element.name] = rules = {};
+ valInfo.options.messages[element.name] = messages = {};
+
+ $.each(this.adapters, function () {
+ var prefix = "data-val-" + this.name,
+ message = $element.attr(prefix),
+ paramValues = {};
+
+ if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy)
+ prefix += "-";
+
+ $.each(this.params, function () {
+ paramValues[this] = $element.attr(prefix + this);
+ });
+
+ this.adapt({
+ element: element,
+ form: form,
+ message: message,
+ params: paramValues,
+ rules: rules,
+ messages: messages
+ });
+ }
+ });
+
+ $.extend(rules, { "__dummy__": true });
+
+ if (!skipAttach) {
+ valInfo.attachValidation();
+ }
+ },
+
+ parse: function (selector) {
+ ///
+ /// Parses all the HTML elements in the specified selector. It looks for input elements decorated
+ /// with the [data-val=true] attribute value and enables validation according to the data-val-*
+ /// attribute values.
+ ///
+ ///
Any valid jQuery selector.
+ var $forms = $(selector)
+ .parents("form")
+ .andSelf()
+ .add($(selector).find("form"))
+ .filter("form");
+
+ // :input is a psuedoselector provided by jQuery which selects input and input-like elements
+ // combining :input with other selectors significantly decreases performance.
+ $(selector).find(":input").filter("[data-val=true]").each(function () {
+ $jQval.unobtrusive.parseElement(this, true);
+ });
+
+ $forms.each(function () {
+ var info = validationInfo(this);
+ if (info) {
+ info.attachValidation();
+ }
+ });
+ }
+ };
+
+ adapters = $jQval.unobtrusive.adapters;
+
+ adapters.add = function (adapterName, params, fn) {
+ ///
Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.
+ ///
The name of the adapter to be added. This matches the name used
+ /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
+ ///
[Optional] An array of parameter names (strings) that will
+ /// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and
+ /// mmmm is the parameter name).
+ ///
The function to call, which adapts the values from the HTML
+ /// attributes into jQuery Validate rules and/or messages.
+ ///
+ if (!fn) { // Called with no params, just a function
+ fn = params;
+ params = [];
+ }
+ this.push({ name: adapterName, params: params, adapt: fn });
+ return this;
+ };
+
+ adapters.addBool = function (adapterName, ruleName) {
+ ///
Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
+ /// the jQuery Validate validation rule has no parameter values.
+ ///
The name of the adapter to be added. This matches the name used
+ /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
+ ///
[Optional] The name of the jQuery Validate rule. If not provided, the value
+ /// of adapterName will be used instead.
+ ///
+ return this.add(adapterName, function (options) {
+ setValidationValues(options, ruleName || adapterName, true);
+ });
+ };
+
+ adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {
+ ///
Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
+ /// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and
+ /// one for min-and-max). The HTML parameters are expected to be named -min and -max.
+ ///
The name of the adapter to be added. This matches the name used
+ /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
+ ///
The name of the jQuery Validate rule to be used when you only
+ /// have a minimum value.
+ ///
The name of the jQuery Validate rule to be used when you only
+ /// have a maximum value.
+ ///
The name of the jQuery Validate rule to be used when you
+ /// have both a minimum and maximum value.
+ ///
[Optional] The name of the HTML attribute that
+ /// contains the minimum value. The default is "min".
+ ///
[Optional] The name of the HTML attribute that
+ /// contains the maximum value. The default is "max".
+ ///
+ return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) {
+ var min = options.params.min,
+ max = options.params.max;
+
+ if (min && max) {
+ setValidationValues(options, minMaxRuleName, [min, max]);
+ }
+ else if (min) {
+ setValidationValues(options, minRuleName, min);
+ }
+ else if (max) {
+ setValidationValues(options, maxRuleName, max);
+ }
+ });
+ };
+
+ adapters.addSingleVal = function (adapterName, attribute, ruleName) {
+ ///
Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
+ /// the jQuery Validate validation rule has a single value.
+ ///
The name of the adapter to be added. This matches the name used
+ /// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).
+ ///
[Optional] The name of the HTML attribute that contains the value.
+ /// The default is "val".
+ ///
[Optional] The name of the jQuery Validate rule. If not provided, the value
+ /// of adapterName will be used instead.
+ ///
+ return this.add(adapterName, [attribute || "val"], function (options) {
+ setValidationValues(options, ruleName || adapterName, options.params[attribute]);
+ });
+ };
+
+ $jQval.addMethod("__dummy__", function (value, element, params) {
+ return true;
+ });
+
+ $jQval.addMethod("regex", function (value, element, params) {
+ var match;
+ if (this.optional(element)) {
+ return true;
+ }
+
+ match = new RegExp(params).exec(value);
+ return (match && (match.index === 0) && (match[0].length === value.length));
+ });
+
+ $jQval.addMethod("nonalphamin", function (value, element, nonalphamin) {
+ var match;
+ if (nonalphamin) {
+ match = value.match(/\W/g);
+ match = match && match.length >= nonalphamin;
+ }
+ return match;
+ });
+
+ if ($jQval.methods.extension) {
+ adapters.addSingleVal("accept", "mimtype");
+ adapters.addSingleVal("extension", "extension");
+ } else {
+ // for backward compatibility, when the 'extension' validation method does not exist, such as with versions
+ // of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for
+ // validating the extension, and ignore mime-type validations as they are not supported.
+ adapters.addSingleVal("extension", "extension", "accept");
+ }
+
+ adapters.addSingleVal("regex", "pattern");
+ adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");
+ adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range");
+ adapters.addMinMax("minlength", "minlength").addMinMax("maxlength", "minlength", "maxlength");
+ adapters.add("equalto", ["other"], function (options) {
+ var prefix = getModelPrefix(options.element.name),
+ other = options.params.other,
+ fullOtherName = appendModelPrefix(other, prefix),
+ element = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(fullOtherName) + "']")[0];
+
+ setValidationValues(options, "equalTo", element);
+ });
+ adapters.add("required", function (options) {
+ // jQuery Validate equates "required" with "mandatory" for checkbox elements
+ if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") {
+ setValidationValues(options, "required", true);
+ }
+ });
+ adapters.add("remote", ["url", "type", "additionalfields"], function (options) {
+ var value = {
+ url: options.params.url,
+ type: options.params.type || "GET",
+ data: {}
+ },
+ prefix = getModelPrefix(options.element.name);
+
+ $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {
+ var paramName = appendModelPrefix(fieldName, prefix);
+ value.data[paramName] = function () {
+ return $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']").val();
+ };
+ });
+
+ setValidationValues(options, "remote", value);
+ });
+ adapters.add("password", ["min", "nonalphamin", "regex"], function (options) {
+ if (options.params.min) {
+ setValidationValues(options, "minlength", options.params.min);
+ }
+ if (options.params.nonalphamin) {
+ setValidationValues(options, "nonalphamin", options.params.nonalphamin);
+ }
+ if (options.params.regex) {
+ setValidationValues(options, "regex", options.params.regex);
+ }
+ });
+
+ $(function () {
+ $jQval.unobtrusive.parse(document);
+ });
+}(jQuery));
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.unobtrusive.min.js b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.unobtrusive.min.js
new file mode 100644
index 00000000..b48de5b2
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/jquery.validate.unobtrusive.min.js
@@ -0,0 +1,19 @@
+/* NUGET: BEGIN LICENSE TEXT
+ *
+ * Microsoft grants you the right to use these script files for the sole
+ * purpose of either: (i) interacting through your browser with the Microsoft
+ * website or online service, subject to the applicable licensing or use
+ * terms; or (ii) using the files as included with a Microsoft product subject
+ * to that product's license terms. Microsoft reserves all other rights to the
+ * files not expressly granted by Microsoft, whether by implication, estoppel
+ * or otherwise. Insofar as a script file is dual licensed under GPL,
+ * Microsoft neither took the code under GPL nor distributes it thereunder but
+ * under the terms set out in this paragraph. All notices and licenses
+ * below are for informational purposes only.
+ *
+ * NUGET: END LICENSE TEXT */
+/*
+** Unobtrusive validation support library for jQuery and jQuery Validate
+** Copyright (C) Microsoft Corporation. All rights reserved.
+*/
+(function(a){var d=a.validator,b,e="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function j(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function h(a){return a.substr(0,a.lastIndexOf(".")+1)}function g(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function m(c,e){var b=a(this).find("[data-valmsg-for='"+f(e[0].name)+"']"),d=b.attr("data-valmsg-replace"),g=d?a.parseJSON(d)!==false:null;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(g){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function l(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("
").html(this.message).appendTo(b)})}}function k(d){var b=d.data("unobtrusiveContainer"),c=b.attr("data-valmsg-replace"),e=c?a.parseJSON(c):null;if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");d.removeData("unobtrusiveContainer");e&&b.empty()}}function n(){var b=a(this);b.data("validator").resetForm();b.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");b.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function i(c){var b=a(c),d=b.data(e),f=a.proxy(n,c);if(!d){d={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:a.proxy(m,c),invalidHandler:a.proxy(l,c),messages:{},rules:{},success:a.proxy(k,c)},attachValidation:function(){b.unbind("reset."+e,f).bind("reset."+e,f).validate(this.options)},validate:function(){b.validate();return b.valid()}};b.data(e,d)}return d}d.unobtrusive={adapters:[],parseElement:function(b,h){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=i(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});a.extend(e,{__dummy__:true});!h&&c.attachValidation()},parse:function(b){var c=a(b).parents("form").andSelf().add(a(b).find("form")).filter("form");a(b).find(":input").filter("[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});c.each(function(){var a=i(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});d.addMethod("nonalphamin",function(c,d,b){var a;if(b){a=c.match(/\W/g);a=a&&a.length>=b}return a});if(d.methods.extension){b.addSingleVal("accept","mimtype");b.addSingleVal("extension","extension")}else b.addSingleVal("extension","extension","accept");b.addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength");b.add("equalto",["other"],function(b){var i=h(b.element.name),j=b.params.other,d=g(j,i),e=a(b.form).find(":input").filter("[name='"+f(d)+"']")[0];c(b,"equalTo",e)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},e=h(b.element.name);a.each(j(b.params.additionalfields||b.element.name),function(i,h){var c=g(h,e);d.data[c]=function(){return a(b.form).find(":input").filter("[name='"+f(c)+"']").val()}});c(b,"remote",d)});b.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&c(a,"minlength",a.params.min);a.params.nonalphamin&&c(a,"nonalphamin",a.params.nonalphamin);a.params.regex&&c(a,"regex",a.params.regex)});a(function(){d.unobtrusive.parse(document)})})(jQuery);
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/modernizr-2.6.2.js b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/modernizr-2.6.2.js
new file mode 100644
index 00000000..df681870
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/modernizr-2.6.2.js
@@ -0,0 +1,1416 @@
+/* NUGET: BEGIN LICENSE TEXT
+ *
+ * Microsoft grants you the right to use these script files for the sole
+ * purpose of either: (i) interacting through your browser with the Microsoft
+ * website or online service, subject to the applicable licensing or use
+ * terms; or (ii) using the files as included with a Microsoft product subject
+ * to that product's license terms. Microsoft reserves all other rights to the
+ * files not expressly granted by Microsoft, whether by implication, estoppel
+ * or otherwise. Insofar as a script file is dual licensed under GPL,
+ * Microsoft neither took the code under GPL nor distributes it thereunder but
+ * under the terms set out in this paragraph. All notices and licenses
+ * below are for informational purposes only.
+ *
+ * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton; http://www.modernizr.com/license/
+ *
+ * Includes matchMedia polyfill; Copyright (c) 2010 Filament Group, Inc; http://opensource.org/licenses/MIT
+ *
+ * Includes material adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js; Copyright 2009-2012 by contributors; http://opensource.org/licenses/MIT
+ *
+ * Includes material from css-support; Copyright (c) 2005-2012 Diego Perini; https://github.com/dperini/css-support/blob/master/LICENSE
+ *
+ * NUGET: END LICENSE TEXT */
+
+/*!
+ * Modernizr v2.6.2
+ * www.modernizr.com
+ *
+ * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
+ * Available under the BSD and MIT licenses: www.modernizr.com/license/
+ */
+
+/*
+ * Modernizr tests which native CSS3 and HTML5 features are available in
+ * the current UA and makes the results available to you in two ways:
+ * as properties on a global Modernizr object, and as classes on the
+ * element. This information allows you to progressively enhance
+ * your pages with a granular level of control over the experience.
+ *
+ * Modernizr has an optional (not included) conditional resource loader
+ * called Modernizr.load(), based on Yepnope.js (yepnopejs.com).
+ * To get a build that includes Modernizr.load(), as well as choosing
+ * which tests to include, go to www.modernizr.com/download/
+ *
+ * Authors Faruk Ates, Paul Irish, Alex Sexton
+ * Contributors Ryan Seddon, Ben Alman
+ */
+
+window.Modernizr = (function( window, document, undefined ) {
+
+ var version = '2.6.2',
+
+ Modernizr = {},
+
+ /*>>cssclasses*/
+ // option for enabling the HTML classes to be added
+ enableClasses = true,
+ /*>>cssclasses*/
+
+ docElement = document.documentElement,
+
+ /**
+ * Create our "modernizr" element that we do most feature tests on.
+ */
+ mod = 'modernizr',
+ modElem = document.createElement(mod),
+ mStyle = modElem.style,
+
+ /**
+ * Create the input element for various Web Forms feature tests.
+ */
+ inputElem /*>>inputelem*/ = document.createElement('input') /*>>inputelem*/ ,
+
+ /*>>smile*/
+ smile = ':)',
+ /*>>smile*/
+
+ toString = {}.toString,
+
+ // TODO :: make the prefixes more granular
+ /*>>prefixes*/
+ // List of property values to set for css tests. See ticket #21
+ prefixes = ' -webkit- -moz- -o- -ms- '.split(' '),
+ /*>>prefixes*/
+
+ /*>>domprefixes*/
+ // Following spec is to expose vendor-specific style properties as:
+ // elem.style.WebkitBorderRadius
+ // and the following would be incorrect:
+ // elem.style.webkitBorderRadius
+
+ // Webkit ghosts their properties in lowercase but Opera & Moz do not.
+ // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+
+ // erik.eae.net/archives/2008/03/10/21.48.10/
+
+ // More here: github.com/Modernizr/Modernizr/issues/issue/21
+ omPrefixes = 'Webkit Moz O ms',
+
+ cssomPrefixes = omPrefixes.split(' '),
+
+ domPrefixes = omPrefixes.toLowerCase().split(' '),
+ /*>>domprefixes*/
+
+ /*>>ns*/
+ ns = {'svg': 'http://www.w3.org/2000/svg'},
+ /*>>ns*/
+
+ tests = {},
+ inputs = {},
+ attrs = {},
+
+ classes = [],
+
+ slice = classes.slice,
+
+ featureName, // used in testing loop
+
+
+ /*>>teststyles*/
+ // Inject element with style element and some CSS rules
+ injectElementWithStyles = function( rule, callback, nodes, testnames ) {
+
+ var style, ret, node, docOverflow,
+ div = document.createElement('div'),
+ // After page load injecting a fake body doesn't work so check if body exists
+ body = document.body,
+ // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it.
+ fakeBody = body || document.createElement('body');
+
+ if ( parseInt(nodes, 10) ) {
+ // In order not to give false positives we create a node for each test
+ // This also allows the method to scale for unspecified uses
+ while ( nodes-- ) {
+ node = document.createElement('div');
+ node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
+ div.appendChild(node);
+ }
+ }
+
+ // '].join('');
+ div.id = mod;
+ // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
+ // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
+ (body ? div : fakeBody).innerHTML += style;
+ fakeBody.appendChild(div);
+ if ( !body ) {
+ //avoid crashing IE8, if background image is used
+ fakeBody.style.background = '';
+ //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
+ fakeBody.style.overflow = 'hidden';
+ docOverflow = docElement.style.overflow;
+ docElement.style.overflow = 'hidden';
+ docElement.appendChild(fakeBody);
+ }
+
+ ret = callback(div, rule);
+ // If this is done after page load we don't want to remove the body so check if body exists
+ if ( !body ) {
+ fakeBody.parentNode.removeChild(fakeBody);
+ docElement.style.overflow = docOverflow;
+ } else {
+ div.parentNode.removeChild(div);
+ }
+
+ return !!ret;
+
+ },
+ /*>>teststyles*/
+
+ /*>>mq*/
+ // adapted from matchMedia polyfill
+ // by Scott Jehl and Paul Irish
+ // gist.github.com/786768
+ testMediaQuery = function( mq ) {
+
+ var matchMedia = window.matchMedia || window.msMatchMedia;
+ if ( matchMedia ) {
+ return matchMedia(mq).matches;
+ }
+
+ var bool;
+
+ injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) {
+ bool = (window.getComputedStyle ?
+ getComputedStyle(node, null) :
+ node.currentStyle)['position'] == 'absolute';
+ });
+
+ return bool;
+
+ },
+ /*>>mq*/
+
+
+ /*>>hasevent*/
+ //
+ // isEventSupported determines if a given element supports the given event
+ // kangax.github.com/iseventsupported/
+ //
+ // The following results are known incorrects:
+ // Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative
+ // Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333
+ // ...
+ isEventSupported = (function() {
+
+ var TAGNAMES = {
+ 'select': 'input', 'change': 'input',
+ 'submit': 'form', 'reset': 'form',
+ 'error': 'img', 'load': 'img', 'abort': 'img'
+ };
+
+ function isEventSupported( eventName, element ) {
+
+ element = element || document.createElement(TAGNAMES[eventName] || 'div');
+ eventName = 'on' + eventName;
+
+ // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those
+ var isSupported = eventName in element;
+
+ if ( !isSupported ) {
+ // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element
+ if ( !element.setAttribute ) {
+ element = document.createElement('div');
+ }
+ if ( element.setAttribute && element.removeAttribute ) {
+ element.setAttribute(eventName, '');
+ isSupported = is(element[eventName], 'function');
+
+ // If property was created, "remove it" (by setting value to `undefined`)
+ if ( !is(element[eventName], 'undefined') ) {
+ element[eventName] = undefined;
+ }
+ element.removeAttribute(eventName);
+ }
+ }
+
+ element = null;
+ return isSupported;
+ }
+ return isEventSupported;
+ })(),
+ /*>>hasevent*/
+
+ // TODO :: Add flag for hasownprop ? didn't last time
+
+ // hasOwnProperty shim by kangax needed for Safari 2.0 support
+ _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;
+
+ if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
+ hasOwnProp = function (object, property) {
+ return _hasOwnProperty.call(object, property);
+ };
+ }
+ else {
+ hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
+ return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
+ };
+ }
+
+ // Adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js
+ // es5.github.com/#x15.3.4.5
+
+ if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) {
+
+ var target = this;
+
+ if (typeof target != "function") {
+ throw new TypeError();
+ }
+
+ var args = slice.call(arguments, 1),
+ bound = function () {
+
+ if (this instanceof bound) {
+
+ var F = function(){};
+ F.prototype = target.prototype;
+ var self = new F();
+
+ var result = target.apply(
+ self,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return self;
+
+ } else {
+
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+
+ return bound;
+ };
+ }
+
+ /**
+ * setCss applies given styles to the Modernizr DOM node.
+ */
+ function setCss( str ) {
+ mStyle.cssText = str;
+ }
+
+ /**
+ * setCssAll extrapolates all vendor-specific css strings.
+ */
+ function setCssAll( str1, str2 ) {
+ return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
+ }
+
+ /**
+ * is returns a boolean for if typeof obj is exactly type.
+ */
+ function is( obj, type ) {
+ return typeof obj === type;
+ }
+
+ /**
+ * contains returns a boolean for if substr is found within str.
+ */
+ function contains( str, substr ) {
+ return !!~('' + str).indexOf(substr);
+ }
+
+ /*>>testprop*/
+
+ // testProps is a generic CSS / DOM property test.
+
+ // In testing support for a given CSS property, it's legit to test:
+ // `elem.style[styleName] !== undefined`
+ // If the property is supported it will return an empty string,
+ // if unsupported it will return undefined.
+
+ // We'll take advantage of this quick test and skip setting a style
+ // on our modernizr element, but instead just testing undefined vs
+ // empty string.
+
+ // Because the testing of the CSS property names (with "-", as
+ // opposed to the camelCase DOM properties) is non-portable and
+ // non-standard but works in WebKit and IE (but not Gecko or Opera),
+ // we explicitly reject properties with dashes so that authors
+ // developing in WebKit or IE first don't end up with
+ // browser-specific content by accident.
+
+ function testProps( props, prefixed ) {
+ for ( var i in props ) {
+ var prop = props[i];
+ if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
+ return prefixed == 'pfx' ? prop : true;
+ }
+ }
+ return false;
+ }
+ /*>>testprop*/
+
+ // TODO :: add testDOMProps
+ /**
+ * testDOMProps is a generic DOM property test; if a browser supports
+ * a certain property, it won't return undefined for it.
+ */
+ function testDOMProps( props, obj, elem ) {
+ for ( var i in props ) {
+ var item = obj[props[i]];
+ if ( item !== undefined) {
+
+ // return the property name as a string
+ if (elem === false) return props[i];
+
+ // let's bind a function
+ if (is(item, 'function')){
+ // default to autobind unless override
+ return item.bind(elem || obj);
+ }
+
+ // return the unbound function or obj or value
+ return item;
+ }
+ }
+ return false;
+ }
+
+ /*>>testallprops*/
+ /**
+ * testPropsAll tests a list of DOM properties we want to check against.
+ * We specify literally ALL possible (known and/or likely) properties on
+ * the element including the non-vendor prefixed one, for forward-
+ * compatibility.
+ */
+ function testPropsAll( prop, prefixed, elem ) {
+
+ var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
+ props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
+
+ // did they call .prefixed('boxSizing') or are we just testing a prop?
+ if(is(prefixed, "string") || is(prefixed, "undefined")) {
+ return testProps(props, prefixed);
+
+ // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])
+ } else {
+ props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
+ return testDOMProps(props, prefixed, elem);
+ }
+ }
+ /*>>testallprops*/
+
+
+ /**
+ * Tests
+ * -----
+ */
+
+ // The *new* flexbox
+ // dev.w3.org/csswg/css3-flexbox
+
+ tests['flexbox'] = function() {
+ return testPropsAll('flexWrap');
+ };
+
+ // The *old* flexbox
+ // www.w3.org/TR/2009/WD-css3-flexbox-20090723/
+
+ tests['flexboxlegacy'] = function() {
+ return testPropsAll('boxDirection');
+ };
+
+ // On the S60 and BB Storm, getContext exists, but always returns undefined
+ // so we actually have to call getContext() to verify
+ // github.com/Modernizr/Modernizr/issues/issue/97/
+
+ tests['canvas'] = function() {
+ var elem = document.createElement('canvas');
+ return !!(elem.getContext && elem.getContext('2d'));
+ };
+
+ tests['canvastext'] = function() {
+ return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
+ };
+
+ // webk.it/70117 is tracking a legit WebGL feature detect proposal
+
+ // We do a soft detect which may false positive in order to avoid
+ // an expensive context creation: bugzil.la/732441
+
+ tests['webgl'] = function() {
+ return !!window.WebGLRenderingContext;
+ };
+
+ /*
+ * The Modernizr.touch test only indicates if the browser supports
+ * touch events, which does not necessarily reflect a touchscreen
+ * device, as evidenced by tablets running Windows 7 or, alas,
+ * the Palm Pre / WebOS (touch) phones.
+ *
+ * Additionally, Chrome (desktop) used to lie about its support on this,
+ * but that has since been rectified: crbug.com/36415
+ *
+ * We also test for Firefox 4 Multitouch Support.
+ *
+ * For more info, see: modernizr.github.com/Modernizr/touch.html
+ */
+
+ tests['touch'] = function() {
+ var bool;
+
+ if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
+ bool = true;
+ } else {
+ injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) {
+ bool = node.offsetTop === 9;
+ });
+ }
+
+ return bool;
+ };
+
+
+ // geolocation is often considered a trivial feature detect...
+ // Turns out, it's quite tricky to get right:
+ //
+ // Using !!navigator.geolocation does two things we don't want. It:
+ // 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
+ // 2. Disables page caching in WebKit: webk.it/43956
+ //
+ // Meanwhile, in Firefox < 8, an about:config setting could expose
+ // a false positive that would throw an exception: bugzil.la/688158
+
+ tests['geolocation'] = function() {
+ return 'geolocation' in navigator;
+ };
+
+
+ tests['postmessage'] = function() {
+ return !!window.postMessage;
+ };
+
+
+ // Chrome incognito mode used to throw an exception when using openDatabase
+ // It doesn't anymore.
+ tests['websqldatabase'] = function() {
+ return !!window.openDatabase;
+ };
+
+ // Vendors had inconsistent prefixing with the experimental Indexed DB:
+ // - Webkit's implementation is accessible through webkitIndexedDB
+ // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
+ // For speed, we don't test the legacy (and beta-only) indexedDB
+ tests['indexedDB'] = function() {
+ return !!testPropsAll("indexedDB", window);
+ };
+
+ // documentMode logic from YUI to filter out IE8 Compat Mode
+ // which false positives.
+ tests['hashchange'] = function() {
+ return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7);
+ };
+
+ // Per 1.6:
+ // This used to be Modernizr.historymanagement but the longer
+ // name has been deprecated in favor of a shorter and property-matching one.
+ // The old API is still available in 1.6, but as of 2.0 will throw a warning,
+ // and in the first release thereafter disappear entirely.
+ tests['history'] = function() {
+ return !!(window.history && history.pushState);
+ };
+
+ tests['draganddrop'] = function() {
+ var div = document.createElement('div');
+ return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
+ };
+
+ // FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10
+ // will be supported until FF19 (2/12/13), at which time, ESR becomes FF17.
+ // FF10 still uses prefixes, so check for it until then.
+ // for more ESR info, see: mozilla.org/en-US/firefox/organizations/faq/
+ tests['websockets'] = function() {
+ return 'WebSocket' in window || 'MozWebSocket' in window;
+ };
+
+
+ // css-tricks.com/rgba-browser-support/
+ tests['rgba'] = function() {
+ // Set an rgba() color and check the returned value
+
+ setCss('background-color:rgba(150,255,150,.5)');
+
+ return contains(mStyle.backgroundColor, 'rgba');
+ };
+
+ tests['hsla'] = function() {
+ // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally,
+ // except IE9 who retains it as hsla
+
+ setCss('background-color:hsla(120,40%,100%,.5)');
+
+ return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');
+ };
+
+ tests['multiplebgs'] = function() {
+ // Setting multiple images AND a color on the background shorthand property
+ // and then querying the style.background property value for the number of
+ // occurrences of "url(" is a reliable method for detecting ACTUAL support for this!
+
+ setCss('background:url(https://),url(https://),red url(https://)');
+
+ // If the UA supports multiple backgrounds, there should be three occurrences
+ // of the string "url(" in the return value for elemStyle.background
+
+ return (/(url\s*\(.*?){3}/).test(mStyle.background);
+ };
+
+
+
+ // this will false positive in Opera Mini
+ // github.com/Modernizr/Modernizr/issues/396
+
+ tests['backgroundsize'] = function() {
+ return testPropsAll('backgroundSize');
+ };
+
+ tests['borderimage'] = function() {
+ return testPropsAll('borderImage');
+ };
+
+
+ // Super comprehensive table about all the unique implementations of
+ // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance
+
+ tests['borderradius'] = function() {
+ return testPropsAll('borderRadius');
+ };
+
+ // WebOS unfortunately false positives on this test.
+ tests['boxshadow'] = function() {
+ return testPropsAll('boxShadow');
+ };
+
+ // FF3.0 will false positive on this test
+ tests['textshadow'] = function() {
+ return document.createElement('div').style.textShadow === '';
+ };
+
+
+ tests['opacity'] = function() {
+ // Browsers that actually have CSS Opacity implemented have done so
+ // according to spec, which means their return values are within the
+ // range of [0.0,1.0] - including the leading zero.
+
+ setCssAll('opacity:.55');
+
+ // The non-literal . in this regex is intentional:
+ // German Chrome returns this value as 0,55
+ // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632
+ return (/^0.55$/).test(mStyle.opacity);
+ };
+
+
+ // Note, Android < 4 will pass this test, but can only animate
+ // a single property at a time
+ // daneden.me/2011/12/putting-up-with-androids-bullshit/
+ tests['cssanimations'] = function() {
+ return testPropsAll('animationName');
+ };
+
+
+ tests['csscolumns'] = function() {
+ return testPropsAll('columnCount');
+ };
+
+
+ tests['cssgradients'] = function() {
+ /**
+ * For CSS Gradients syntax, please see:
+ * webkit.org/blog/175/introducing-css-gradients/
+ * developer.mozilla.org/en/CSS/-moz-linear-gradient
+ * developer.mozilla.org/en/CSS/-moz-radial-gradient
+ * dev.w3.org/csswg/css3-images/#gradients-
+ */
+
+ var str1 = 'background-image:',
+ str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',
+ str3 = 'linear-gradient(left top,#9f9, white);';
+
+ setCss(
+ // legacy webkit syntax (FIXME: remove when syntax not in use anymore)
+ (str1 + '-webkit- '.split(' ').join(str2 + str1) +
+ // standard syntax // trailing 'background-image:'
+ prefixes.join(str3 + str1)).slice(0, -str1.length)
+ );
+
+ return contains(mStyle.backgroundImage, 'gradient');
+ };
+
+
+ tests['cssreflections'] = function() {
+ return testPropsAll('boxReflect');
+ };
+
+
+ tests['csstransforms'] = function() {
+ return !!testPropsAll('transform');
+ };
+
+
+ tests['csstransforms3d'] = function() {
+
+ var ret = !!testPropsAll('perspective');
+
+ // Webkit's 3D transforms are passed off to the browser's own graphics renderer.
+ // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
+ // some conditions. As a result, Webkit typically recognizes the syntax but
+ // will sometimes throw a false positive, thus we must do a more thorough check:
+ if ( ret && 'webkitPerspective' in docElement.style ) {
+
+ // Webkit allows this media query to succeed only if the feature is enabled.
+ // `@media (transform-3d),(-webkit-transform-3d){ ... }`
+ injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) {
+ ret = node.offsetLeft === 9 && node.offsetHeight === 3;
+ });
+ }
+ return ret;
+ };
+
+
+ tests['csstransitions'] = function() {
+ return testPropsAll('transition');
+ };
+
+
+ /*>>fontface*/
+ // @font-face detection routine by Diego Perini
+ // javascript.nwbox.com/CSSSupport/
+
+ // false positives:
+ // WebOS github.com/Modernizr/Modernizr/issues/342
+ // WP7 github.com/Modernizr/Modernizr/issues/538
+ tests['fontface'] = function() {
+ var bool;
+
+ injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) {
+ var style = document.getElementById('smodernizr'),
+ sheet = style.sheet || style.styleSheet,
+ cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
+
+ bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
+ });
+
+ return bool;
+ };
+ /*>>fontface*/
+
+ // CSS generated content detection
+ tests['generatedcontent'] = function() {
+ var bool;
+
+ injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) {
+ bool = node.offsetHeight >= 3;
+ });
+
+ return bool;
+ };
+
+
+
+ // These tests evaluate support of the video/audio elements, as well as
+ // testing what types of content they support.
+ //
+ // We're using the Boolean constructor here, so that we can extend the value
+ // e.g. Modernizr.video // true
+ // Modernizr.video.ogg // 'probably'
+ //
+ // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
+ // thx to NielsLeenheer and zcorpan
+
+ // Note: in some older browsers, "no" was a return value instead of empty string.
+ // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
+ // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
+
+ tests['video'] = function() {
+ var elem = document.createElement('video'),
+ bool = false;
+
+ // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224
+ try {
+ if ( bool = !!elem.canPlayType ) {
+ bool = new Boolean(bool);
+ bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,'');
+
+ // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
+ bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');
+
+ bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
+ }
+
+ } catch(e) { }
+
+ return bool;
+ };
+
+ tests['audio'] = function() {
+ var elem = document.createElement('audio'),
+ bool = false;
+
+ try {
+ if ( bool = !!elem.canPlayType ) {
+ bool = new Boolean(bool);
+ bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
+ bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,'');
+
+ // Mimetypes accepted:
+ // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
+ // bit.ly/iphoneoscodecs
+ bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,'');
+ bool.m4a = ( elem.canPlayType('audio/x-m4a;') ||
+ elem.canPlayType('audio/aac;')) .replace(/^no$/,'');
+ }
+ } catch(e) { }
+
+ return bool;
+ };
+
+
+ // In FF4, if disabled, window.localStorage should === null.
+
+ // Normally, we could not test that directly and need to do a
+ // `('localStorage' in window) && ` test first because otherwise Firefox will
+ // throw bugzil.la/365772 if cookies are disabled
+
+ // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
+ // will throw the exception:
+ // QUOTA_EXCEEDED_ERRROR DOM Exception 22.
+ // Peculiarly, getItem and removeItem calls do not throw.
+
+ // Because we are forced to try/catch this, we'll go aggressive.
+
+ // Just FWIW: IE8 Compat mode supports these features completely:
+ // www.quirksmode.org/dom/html5.html
+ // But IE8 doesn't support either with local files
+
+ tests['localstorage'] = function() {
+ try {
+ localStorage.setItem(mod, mod);
+ localStorage.removeItem(mod);
+ return true;
+ } catch(e) {
+ return false;
+ }
+ };
+
+ tests['sessionstorage'] = function() {
+ try {
+ sessionStorage.setItem(mod, mod);
+ sessionStorage.removeItem(mod);
+ return true;
+ } catch(e) {
+ return false;
+ }
+ };
+
+
+ tests['webworkers'] = function() {
+ return !!window.Worker;
+ };
+
+
+ tests['applicationcache'] = function() {
+ return !!window.applicationCache;
+ };
+
+
+ // Thanks to Erik Dahlstrom
+ tests['svg'] = function() {
+ return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect;
+ };
+
+ // specifically for SVG inline in HTML, not within XHTML
+ // test page: paulirish.com/demo/inline-svg
+ tests['inlinesvg'] = function() {
+ var div = document.createElement('div');
+ div.innerHTML = '
';
+ return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;
+ };
+
+ // SVG SMIL animation
+ tests['smil'] = function() {
+ return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
+ };
+
+ // This test is only for clip paths in SVG proper, not clip paths on HTML content
+ // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg
+
+ // However read the comments to dig into applying SVG clippaths to HTML content here:
+ // github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491
+ tests['svgclippaths'] = function() {
+ return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
+ };
+
+ /*>>webforms*/
+ // input features and input types go directly onto the ret object, bypassing the tests loop.
+ // Hold this guy to execute in a moment.
+ function webforms() {
+ /*>>input*/
+ // Run through HTML5's new input attributes to see if the UA understands any.
+ // We're using f which is the
element created early on
+ // Mike Taylr has created a comprehensive resource for testing these attributes
+ // when applied to all input types:
+ // miketaylr.com/code/input-type-attr.html
+ // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
+
+ // Only input placeholder is tested while textarea's placeholder is not.
+ // Currently Safari 4 and Opera 11 have support only for the input placeholder
+ // Both tests are available in feature-detects/forms-placeholder.js
+ Modernizr['input'] = (function( props ) {
+ for ( var i = 0, len = props.length; i < len; i++ ) {
+ attrs[ props[i] ] = !!(props[i] in inputElem);
+ }
+ if (attrs.list){
+ // safari false positive's on datalist: webk.it/74252
+ // see also github.com/Modernizr/Modernizr/issues/146
+ attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
+ }
+ return attrs;
+ })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
+ /*>>input*/
+
+ /*>>inputtypes*/
+ // Run through HTML5's new input types to see if the UA understands any.
+ // This is put behind the tests runloop because it doesn't return a
+ // true/false like all the other tests; instead, it returns an object
+ // containing each input type with its corresponding true/false value
+
+ // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/
+ Modernizr['inputtypes'] = (function(props) {
+
+ for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {
+
+ inputElem.setAttribute('type', inputElemType = props[i]);
+ bool = inputElem.type !== 'text';
+
+ // We first check to see if the type we give it sticks..
+ // If the type does, we feed it a textual value, which shouldn't be valid.
+ // If the value doesn't stick, we know there's input sanitization which infers a custom UI
+ if ( bool ) {
+
+ inputElem.value = smile;
+ inputElem.style.cssText = 'position:absolute;visibility:hidden;';
+
+ if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {
+
+ docElement.appendChild(inputElem);
+ defaultView = document.defaultView;
+
+ // Safari 2-4 allows the smiley as a value, despite making a slider
+ bool = defaultView.getComputedStyle &&
+ defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
+ // Mobile android web browser has false positive, so must
+ // check the height to see if the widget is actually there.
+ (inputElem.offsetHeight !== 0);
+
+ docElement.removeChild(inputElem);
+
+ } else if ( /^(search|tel)$/.test(inputElemType) ){
+ // Spec doesn't define any special parsing or detectable UI
+ // behaviors so we pass these through as true
+
+ // Interestingly, opera fails the earlier test, so it doesn't
+ // even make it here.
+
+ } else if ( /^(url|email)$/.test(inputElemType) ) {
+ // Real url and email support comes with prebaked validation.
+ bool = inputElem.checkValidity && inputElem.checkValidity() === false;
+
+ } else {
+ // If the upgraded input compontent rejects the :) text, we got a winner
+ bool = inputElem.value != smile;
+ }
+ }
+
+ inputs[ props[i] ] = !!bool;
+ }
+ return inputs;
+ })('search tel url email datetime date month week time datetime-local number range color'.split(' '));
+ /*>>inputtypes*/
+ }
+ /*>>webforms*/
+
+
+ // End of test definitions
+ // -----------------------
+
+
+
+ // Run through all tests and detect their support in the current UA.
+ // todo: hypothetically we could be doing an array of tests and use a basic loop here.
+ for ( var feature in tests ) {
+ if ( hasOwnProp(tests, feature) ) {
+ // run the test, throw the return value into the Modernizr,
+ // then based on that boolean, define an appropriate className
+ // and push it into an array of classes we'll join later.
+ featureName = feature.toLowerCase();
+ Modernizr[featureName] = tests[feature]();
+
+ classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
+ }
+ }
+
+ /*>>webforms*/
+ // input tests need to run.
+ Modernizr.input || webforms();
+ /*>>webforms*/
+
+
+ /**
+ * addTest allows the user to define their own feature tests
+ * the result will be added onto the Modernizr object,
+ * as well as an appropriate className set on the html element
+ *
+ * @param feature - String naming the feature
+ * @param test - Function returning true if feature is supported, false if not
+ */
+ Modernizr.addTest = function ( feature, test ) {
+ if ( typeof feature == 'object' ) {
+ for ( var key in feature ) {
+ if ( hasOwnProp( feature, key ) ) {
+ Modernizr.addTest( key, feature[ key ] );
+ }
+ }
+ } else {
+
+ feature = feature.toLowerCase();
+
+ if ( Modernizr[feature] !== undefined ) {
+ // we're going to quit if you're trying to overwrite an existing test
+ // if we were to allow it, we'd do this:
+ // var re = new RegExp("\\b(no-)?" + feature + "\\b");
+ // docElement.className = docElement.className.replace( re, '' );
+ // but, no rly, stuff 'em.
+ return Modernizr;
+ }
+
+ test = typeof test == 'function' ? test() : test;
+
+ if (typeof enableClasses !== "undefined" && enableClasses) {
+ docElement.className += ' ' + (test ? '' : 'no-') + feature;
+ }
+ Modernizr[feature] = test;
+
+ }
+
+ return Modernizr; // allow chaining.
+ };
+
+
+ // Reset modElem.cssText to nothing to reduce memory footprint.
+ setCss('');
+ modElem = inputElem = null;
+
+ /*>>shiv*/
+ /*! HTML5 Shiv v3.6.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */
+ ;(function(window, document) {
+ /*jshint evil:true */
+ /** Preset options */
+ var options = window.html5 || {};
+
+ /** Used to skip problem elements */
+ var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+ /** Not all elements can be cloned in IE **/
+ var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+ /** Detect whether the browser supports default html5 styles */
+ var supportsHtml5Styles;
+
+ /** Name of the expando, to work with multiple documents or to re-shiv one document */
+ var expando = '_html5shiv';
+
+ /** The id for the the documents expando */
+ var expanID = 0;
+
+ /** Cached data for each document */
+ var expandoData = {};
+
+ /** Detect whether the browser supports unknown elements */
+ var supportsUnknownElements;
+
+ (function() {
+ try {
+ var a = document.createElement('a');
+ a.innerHTML = '
';
+ //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
+ supportsHtml5Styles = ('hidden' in a);
+
+ supportsUnknownElements = a.childNodes.length == 1 || (function() {
+ // assign a false positive if unable to shiv
+ (document.createElement)('a');
+ var frag = document.createDocumentFragment();
+ return (
+ typeof frag.cloneNode == 'undefined' ||
+ typeof frag.createDocumentFragment == 'undefined' ||
+ typeof frag.createElement == 'undefined'
+ );
+ }());
+ } catch(e) {
+ supportsHtml5Styles = true;
+ supportsUnknownElements = true;
+ }
+
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Creates a style sheet with the given CSS text and adds it to the document.
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @param {String} cssText The CSS text.
+ * @returns {StyleSheet} The style element.
+ */
+ function addStyleSheet(ownerDocument, cssText) {
+ var p = ownerDocument.createElement('p'),
+ parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
+
+ p.innerHTML = 'x';
+ return parent.insertBefore(p.lastChild, parent.firstChild);
+ }
+
+ /**
+ * Returns the value of `html5.elements` as an array.
+ * @private
+ * @returns {Array} An array of shived element node names.
+ */
+ function getElements() {
+ var elements = html5.elements;
+ return typeof elements == 'string' ? elements.split(' ') : elements;
+ }
+
+ /**
+ * Returns the data associated to the given document
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Object} An object of data.
+ */
+ function getExpandoData(ownerDocument) {
+ var data = expandoData[ownerDocument[expando]];
+ if (!data) {
+ data = {};
+ expanID++;
+ ownerDocument[expando] = expanID;
+ expandoData[expanID] = data;
+ }
+ return data;
+ }
+
+ /**
+ * returns a shived element for the given nodeName and document
+ * @memberOf html5
+ * @param {String} nodeName name of the element
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived element.
+ */
+ function createElement(nodeName, ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createElement(nodeName);
+ }
+ if (!data) {
+ data = getExpandoData(ownerDocument);
+ }
+ var node;
+
+ if (data.cache[nodeName]) {
+ node = data.cache[nodeName].cloneNode();
+ } else if (saveClones.test(nodeName)) {
+ node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+ } else {
+ node = data.createElem(nodeName);
+ }
+
+ // Avoid adding some elements to fragments in IE < 9 because
+ // * Attributes like `name` or `type` cannot be set/changed once an element
+ // is inserted into a document/fragment
+ // * Link elements with `src` attributes that are inaccessible, as with
+ // a 403 response, will cause the tab/window to crash
+ // * Script elements appended to fragments will execute when their `src`
+ // or `text` property is set
+ return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
+ }
+
+ /**
+ * returns a shived DocumentFragment for the given document
+ * @memberOf html5
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived DocumentFragment.
+ */
+ function createDocumentFragment(ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createDocumentFragment();
+ }
+ data = data || getExpandoData(ownerDocument);
+ var clone = data.frag.cloneNode(),
+ i = 0,
+ elems = getElements(),
+ l = elems.length;
+ for(;i
>shiv*/
+
+ // Assign private properties to the return object with prefix
+ Modernizr._version = version;
+
+ // expose these for the plugin API. Look in the source for how to join() them against your input
+ /*>>prefixes*/
+ Modernizr._prefixes = prefixes;
+ /*>>prefixes*/
+ /*>>domprefixes*/
+ Modernizr._domPrefixes = domPrefixes;
+ Modernizr._cssomPrefixes = cssomPrefixes;
+ /*>>domprefixes*/
+
+ /*>>mq*/
+ // Modernizr.mq tests a given media query, live against the current state of the window
+ // A few important notes:
+ // * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false
+ // * A max-width or orientation query will be evaluated against the current state, which may change later.
+ // * You must specify values. Eg. If you are testing support for the min-width media query use:
+ // Modernizr.mq('(min-width:0)')
+ // usage:
+ // Modernizr.mq('only screen and (max-width:768)')
+ Modernizr.mq = testMediaQuery;
+ /*>>mq*/
+
+ /*>>hasevent*/
+ // Modernizr.hasEvent() detects support for a given event, with an optional element to test on
+ // Modernizr.hasEvent('gesturestart', elem)
+ Modernizr.hasEvent = isEventSupported;
+ /*>>hasevent*/
+
+ /*>>testprop*/
+ // Modernizr.testProp() investigates whether a given style property is recognized
+ // Note that the property names must be provided in the camelCase variant.
+ // Modernizr.testProp('pointerEvents')
+ Modernizr.testProp = function(prop){
+ return testProps([prop]);
+ };
+ /*>>testprop*/
+
+ /*>>testallprops*/
+ // Modernizr.testAllProps() investigates whether a given style property,
+ // or any of its vendor-prefixed variants, is recognized
+ // Note that the property names must be provided in the camelCase variant.
+ // Modernizr.testAllProps('boxSizing')
+ Modernizr.testAllProps = testPropsAll;
+ /*>>testallprops*/
+
+
+ /*>>teststyles*/
+ // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards
+ // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... })
+ Modernizr.testStyles = injectElementWithStyles;
+ /*>>teststyles*/
+
+
+ /*>>prefixed*/
+ // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input
+ // Modernizr.prefixed('boxSizing') // 'MozBoxSizing'
+
+ // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style.
+ // Return values will also be the camelCase variant, if you need to translate that to hypenated style use:
+ //
+ // str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-');
+
+ // If you're trying to ascertain which transition end event to bind to, you might do something like...
+ //
+ // var transEndEventNames = {
+ // 'WebkitTransition' : 'webkitTransitionEnd',
+ // 'MozTransition' : 'transitionend',
+ // 'OTransition' : 'oTransitionEnd',
+ // 'msTransition' : 'MSTransitionEnd',
+ // 'transition' : 'transitionend'
+ // },
+ // transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
+
+ Modernizr.prefixed = function(prop, obj, elem){
+ if(!obj) {
+ return testPropsAll(prop, 'pfx');
+ } else {
+ // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'
+ return testPropsAll(prop, obj, elem);
+ }
+ };
+ /*>>prefixed*/
+
+
+ /*>>cssclasses*/
+ // Remove "no-js" class from element, if it exists:
+ docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +
+
+ // Add the new classes to the element.
+ (enableClasses ? ' js ' + classes.join(' ') : '');
+ /*>>cssclasses*/
+
+ return Modernizr;
+
+})(this, this.document);
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/respond.js b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/respond.js
new file mode 100644
index 00000000..08d6cf9c
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/respond.js
@@ -0,0 +1,340 @@
+/* NUGET: BEGIN LICENSE TEXT
+ *
+ * Microsoft grants you the right to use these script files for the sole
+ * purpose of either: (i) interacting through your browser with the Microsoft
+ * website or online service, subject to the applicable licensing or use
+ * terms; or (ii) using the files as included with a Microsoft product subject
+ * to that product's license terms. Microsoft reserves all other rights to the
+ * files not expressly granted by Microsoft, whether by implication, estoppel
+ * or otherwise. Insofar as a script file is dual licensed under GPL,
+ * Microsoft neither took the code under GPL nor distributes it thereunder but
+ * under the terms set out in this paragraph. All notices and licenses
+ * below are for informational purposes only.
+ *
+ * NUGET: END LICENSE TEXT */
+/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
+/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
+window.matchMedia = window.matchMedia || (function(doc, undefined){
+
+ var bool,
+ docElem = doc.documentElement,
+ refNode = docElem.firstElementChild || docElem.firstChild,
+ // fakeBody required for
+ fakeBody = doc.createElement('body'),
+ div = doc.createElement('div');
+
+ div.id = 'mq-test-1';
+ div.style.cssText = "position:absolute;top:-100em";
+ fakeBody.style.background = "none";
+ fakeBody.appendChild(div);
+
+ return function(q){
+
+ div.innerHTML = '';
+
+ docElem.insertBefore(fakeBody, refNode);
+ bool = div.offsetWidth == 42;
+ docElem.removeChild(fakeBody);
+
+ return { matches: bool, media: q };
+ };
+
+})(document);
+
+
+
+
+/*! Respond.js v1.2.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
+(function( win ){
+ //exposed namespace
+ win.respond = {};
+
+ //define update even in native-mq-supporting browsers, to avoid errors
+ respond.update = function(){};
+
+ //expose media query support flag for external use
+ respond.mediaQueriesSupported = win.matchMedia && win.matchMedia( "only all" ).matches;
+
+ //if media queries are supported, exit here
+ if( respond.mediaQueriesSupported ){ return; }
+
+ //define vars
+ var doc = win.document,
+ docElem = doc.documentElement,
+ mediastyles = [],
+ rules = [],
+ appendedEls = [],
+ parsedSheets = {},
+ resizeThrottle = 30,
+ head = doc.getElementsByTagName( "head" )[0] || docElem,
+ base = doc.getElementsByTagName( "base" )[0],
+ links = head.getElementsByTagName( "link" ),
+ requestQueue = [],
+
+ //loop stylesheets, send text content to translate
+ ripCSS = function(){
+ var sheets = links,
+ sl = sheets.length,
+ i = 0,
+ //vars for loop:
+ sheet, href, media, isCSS;
+
+ for( ; i < sl; i++ ){
+ sheet = sheets[ i ],
+ href = sheet.href,
+ media = sheet.media,
+ isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
+
+ //only links plz and prevent re-parsing
+ if( !!href && isCSS && !parsedSheets[ href ] ){
+ // selectivizr exposes css through the rawCssText expando
+ if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
+ translate( sheet.styleSheet.rawCssText, href, media );
+ parsedSheets[ href ] = true;
+ } else {
+ if( (!/^([a-zA-Z:]*\/\/)/.test( href ) && !base)
+ || href.replace( RegExp.$1, "" ).split( "/" )[0] === win.location.host ){
+ requestQueue.push( {
+ href: href,
+ media: media
+ } );
+ }
+ }
+ }
+ }
+ makeRequests();
+ },
+
+ //recurse through request queue, get css text
+ makeRequests = function(){
+ if( requestQueue.length ){
+ var thisRequest = requestQueue.shift();
+
+ ajax( thisRequest.href, function( styles ){
+ translate( styles, thisRequest.href, thisRequest.media );
+ parsedSheets[ thisRequest.href ] = true;
+ makeRequests();
+ } );
+ }
+ },
+
+ //find media blocks in css text, convert to style blocks
+ translate = function( styles, href, media ){
+ var qs = styles.match( /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi ),
+ ql = qs && qs.length || 0,
+ //try to get CSS path
+ href = href.substring( 0, href.lastIndexOf( "/" )),
+ repUrls = function( css ){
+ return css.replace( /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + href + "$2$3" );
+ },
+ useMedia = !ql && media,
+ //vars used in loop
+ i = 0,
+ j, fullq, thisq, eachq, eql;
+
+ //if path exists, tack on trailing slash
+ if( href.length ){ href += "/"; }
+
+ //if no internal queries exist, but media attr does, use that
+ //note: this currently lacks support for situations where a media attr is specified on a link AND
+ //its associated stylesheet has internal CSS media queries.
+ //In those cases, the media attribute will currently be ignored.
+ if( useMedia ){
+ ql = 1;
+ }
+
+
+ for( ; i < ql; i++ ){
+ j = 0;
+
+ //media attr
+ if( useMedia ){
+ fullq = media;
+ rules.push( repUrls( styles ) );
+ }
+ //parse for styles
+ else{
+ fullq = qs[ i ].match( /@media *([^\{]+)\{([\S\s]+?)$/ ) && RegExp.$1;
+ rules.push( RegExp.$2 && repUrls( RegExp.$2 ) );
+ }
+
+ eachq = fullq.split( "," );
+ eql = eachq.length;
+
+ for( ; j < eql; j++ ){
+ thisq = eachq[ j ];
+ mediastyles.push( {
+ media : thisq.split( "(" )[ 0 ].match( /(only\s+)?([a-zA-Z]+)\s?/ ) && RegExp.$2 || "all",
+ rules : rules.length - 1,
+ hasquery: thisq.indexOf("(") > -1,
+ minw : thisq.match( /\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ),
+ maxw : thisq.match( /\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" )
+ } );
+ }
+ }
+
+ applyMedia();
+ },
+
+ lastCall,
+
+ resizeDefer,
+
+ // returns the value of 1em in pixels
+ getEmValue = function() {
+ var ret,
+ div = doc.createElement('div'),
+ body = doc.body,
+ fakeUsed = false;
+
+ div.style.cssText = "position:absolute;font-size:1em;width:1em";
+
+ if( !body ){
+ body = fakeUsed = doc.createElement( "body" );
+ body.style.background = "none";
+ }
+
+ body.appendChild( div );
+
+ docElem.insertBefore( body, docElem.firstChild );
+
+ ret = div.offsetWidth;
+
+ if( fakeUsed ){
+ docElem.removeChild( body );
+ }
+ else {
+ body.removeChild( div );
+ }
+
+ //also update eminpx before returning
+ ret = eminpx = parseFloat(ret);
+
+ return ret;
+ },
+
+ //cached container for 1em value, populated the first time it's needed
+ eminpx,
+
+ //enable/disable styles
+ applyMedia = function( fromResize ){
+ var name = "clientWidth",
+ docElemProp = docElem[ name ],
+ currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp,
+ styleBlocks = {},
+ lastLink = links[ links.length-1 ],
+ now = (new Date()).getTime();
+
+ //throttle resize calls
+ if( fromResize && lastCall && now - lastCall < resizeThrottle ){
+ clearTimeout( resizeDefer );
+ resizeDefer = setTimeout( applyMedia, resizeThrottle );
+ return;
+ }
+ else {
+ lastCall = now;
+ }
+
+ for( var i in mediastyles ){
+ var thisstyle = mediastyles[ i ],
+ min = thisstyle.minw,
+ max = thisstyle.maxw,
+ minnull = min === null,
+ maxnull = max === null,
+ em = "em";
+
+ if( !!min ){
+ min = parseFloat( min ) * ( min.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
+ }
+ if( !!max ){
+ max = parseFloat( max ) * ( max.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 );
+ }
+
+ // if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true
+ if( !thisstyle.hasquery || ( !minnull || !maxnull ) && ( minnull || currWidth >= min ) && ( maxnull || currWidth <= max ) ){
+ if( !styleBlocks[ thisstyle.media ] ){
+ styleBlocks[ thisstyle.media ] = [];
+ }
+ styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] );
+ }
+ }
+
+ //remove any existing respond style element(s)
+ for( var i in appendedEls ){
+ if( appendedEls[ i ] && appendedEls[ i ].parentNode === head ){
+ head.removeChild( appendedEls[ i ] );
+ }
+ }
+
+ //inject active styles, grouped by media type
+ for( var i in styleBlocks ){
+ var ss = doc.createElement( "style" ),
+ css = styleBlocks[ i ].join( "\n" );
+
+ ss.type = "text/css";
+ ss.media = i;
+
+ //originally, ss was appended to a documentFragment and sheets were appended in bulk.
+ //this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one!
+ head.insertBefore( ss, lastLink.nextSibling );
+
+ if ( ss.styleSheet ){
+ ss.styleSheet.cssText = css;
+ }
+ else {
+ ss.appendChild( doc.createTextNode( css ) );
+ }
+
+ //push to appendedEls to track for later removal
+ appendedEls.push( ss );
+ }
+ },
+ //tweaked Ajax functions from Quirksmode
+ ajax = function( url, callback ) {
+ var req = xmlHttp();
+ if (!req){
+ return;
+ }
+ req.open( "GET", url, true );
+ req.onreadystatechange = function () {
+ if ( req.readyState != 4 || req.status != 200 && req.status != 304 ){
+ return;
+ }
+ callback( req.responseText );
+ }
+ if ( req.readyState == 4 ){
+ return;
+ }
+ req.send( null );
+ },
+ //define ajax obj
+ xmlHttp = (function() {
+ var xmlhttpmethod = false;
+ try {
+ xmlhttpmethod = new XMLHttpRequest();
+ }
+ catch( e ){
+ xmlhttpmethod = new ActiveXObject( "Microsoft.XMLHTTP" );
+ }
+ return function(){
+ return xmlhttpmethod;
+ };
+ })();
+
+ //translate CSS
+ ripCSS();
+
+ //expose update for re-running respond later on
+ respond.update = ripCSS;
+
+ //adjust on resize
+ function callMedia(){
+ applyMedia( true );
+ }
+ if( win.addEventListener ){
+ win.addEventListener( "resize", callMedia, false );
+ }
+ else if( win.attachEvent ){
+ win.attachEvent( "onresize", callMedia );
+ }
+})(this);
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/respond.min.js b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/respond.min.js
new file mode 100644
index 00000000..a9063f89
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Scripts/respond.min.js
@@ -0,0 +1,20 @@
+/* NUGET: BEGIN LICENSE TEXT
+ *
+ * Microsoft grants you the right to use these script files for the sole
+ * purpose of either: (i) interacting through your browser with the Microsoft
+ * website or online service, subject to the applicable licensing or use
+ * terms; or (ii) using the files as included with a Microsoft product subject
+ * to that product's license terms. Microsoft reserves all other rights to the
+ * files not expressly granted by Microsoft, whether by implication, estoppel
+ * or otherwise. Insofar as a script file is dual licensed under GPL,
+ * Microsoft neither took the code under GPL nor distributes it thereunder but
+ * under the terms set out in this paragraph. All notices and licenses
+ * below are for informational purposes only.
+ *
+ * NUGET: END LICENSE TEXT */
+/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
+/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
+window.matchMedia=window.matchMedia||(function(e,f){var c,a=e.documentElement,b=a.firstElementChild||a.firstChild,d=e.createElement("body"),g=e.createElement("div");g.id="mq-test-1";g.style.cssText="position:absolute;top:-100em";d.style.background="none";d.appendChild(g);return function(h){g.innerHTML='';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document);
+
+/*! Respond.js v1.2.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
+(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this);
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Site.css b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Site.css
new file mode 100644
index 00000000..3507b5bd
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/Site.css
@@ -0,0 +1,43 @@
+body {
+ padding-top: 50px;
+ padding-bottom: 20px;
+}
+
+/* Set padding to keep content from hitting the edges */
+.body-content {
+ padding-left: 15px;
+ padding-right: 15px;
+}
+
+/* Set width on the form input elements since they're 100% wide by default */
+input,
+select,
+textarea {
+ max-width: 280px;
+}
+
+/* styles for validation helpers */
+.field-validation-error {
+ color: #b94a48;
+}
+
+.field-validation-valid {
+ display: none;
+}
+
+input.input-validation-error {
+ border: 1px solid #b94a48;
+}
+
+input[type="checkbox"].input-validation-error {
+ border: 0 none;
+}
+
+.validation-summary-errors {
+ color: #b94a48;
+}
+
+.validation-summary-valid {
+ display: none;
+}
+
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/bootstrap.css b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/bootstrap.css
new file mode 100644
index 00000000..07098345
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/bootstrap.css
@@ -0,0 +1,6816 @@
+/* NUGET: BEGIN LICENSE TEXT
+ *
+ * Microsoft grants you the right to use these script files for the sole
+ * purpose of either: (i) interacting through your browser with the Microsoft
+ * website or online service, subject to the applicable licensing or use
+ * terms; or (ii) using the files as included with a Microsoft product subject
+ * to that product's license terms. Microsoft reserves all other rights to the
+ * files not expressly granted by Microsoft, whether by implication, estoppel
+ * or otherwise. The notices and licenses below are for informational purposes only.
+ *
+ * NUGET: END LICENSE TEXT */
+/*!
+ * Bootstrap v3.0.0
+ *
+ * Copyright 2013 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world by @mdo and @fat.
+ */
+
+/*! normalize.css v2.1.0 | MIT License | git.io/normalize */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+ display: block;
+}
+
+audio,
+canvas,
+video {
+ display: inline-block;
+}
+
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+
+[hidden] {
+ display: none;
+}
+
+html {
+ font-family: sans-serif;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+}
+
+body {
+ margin: 0;
+}
+
+a:focus {
+ outline: thin dotted;
+}
+
+a:active,
+a:hover {
+ outline: 0;
+}
+
+h1 {
+ margin: 0.67em 0;
+ font-size: 2em;
+}
+
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+
+b,
+strong {
+ font-weight: bold;
+}
+
+dfn {
+ font-style: italic;
+}
+
+hr {
+ height: 0;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+
+mark {
+ color: #000;
+ background: #ff0;
+}
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, serif;
+ font-size: 1em;
+}
+
+pre {
+ white-space: pre-wrap;
+}
+
+q {
+ quotes: "\201C" "\201D" "\2018" "\2019";
+}
+
+small {
+ font-size: 80%;
+}
+
+sub,
+sup {
+ position: relative;
+ font-size: 75%;
+ line-height: 0;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+img {
+ border: 0;
+}
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+figure {
+ margin: 0;
+}
+
+fieldset {
+ padding: 0.35em 0.625em 0.75em;
+ margin: 0 2px;
+ border: 1px solid #c0c0c0;
+}
+
+legend {
+ padding: 0;
+ border: 0;
+}
+
+button,
+input,
+select,
+textarea {
+ margin: 0;
+ font-family: inherit;
+ font-size: 100%;
+}
+
+button,
+input {
+ line-height: normal;
+}
+
+button,
+select {
+ text-transform: none;
+}
+
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ cursor: pointer;
+ -webkit-appearance: button;
+}
+
+button[disabled],
+html input[disabled] {
+ cursor: default;
+}
+
+input[type="checkbox"],
+input[type="radio"] {
+ padding: 0;
+ box-sizing: border-box;
+}
+
+input[type="search"] {
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ -webkit-appearance: textfield;
+}
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+}
+
+textarea {
+ overflow: auto;
+ vertical-align: top;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+@media print {
+ * {
+ color: #000 !important;
+ text-shadow: none !important;
+ background: transparent !important;
+ box-shadow: none !important;
+ }
+ a,
+ a:visited {
+ text-decoration: underline;
+ }
+ a[href]:after {
+ content: " (" attr(href) ")";
+ }
+ abbr[title]:after {
+ content: " (" attr(title) ")";
+ }
+ .ir a:after,
+ a[href^="javascript:"]:after,
+ a[href^="#"]:after {
+ content: "";
+ }
+ pre,
+ blockquote {
+ border: 1px solid #999;
+ page-break-inside: avoid;
+ }
+ thead {
+ display: table-header-group;
+ }
+ tr,
+ img {
+ page-break-inside: avoid;
+ }
+ img {
+ max-width: 100% !important;
+ }
+ @page {
+ margin: 2cm .5cm;
+ }
+ p,
+ h2,
+ h3 {
+ orphans: 3;
+ widows: 3;
+ }
+ h2,
+ h3 {
+ page-break-after: avoid;
+ }
+ .navbar {
+ display: none;
+ }
+ .table td,
+ .table th {
+ background-color: #fff !important;
+ }
+ .btn > .caret,
+ .dropup > .btn > .caret {
+ border-top-color: #000 !important;
+ }
+ .label {
+ border: 1px solid #000;
+ }
+ .table {
+ border-collapse: collapse !important;
+ }
+ .table-bordered th,
+ .table-bordered td {
+ border: 1px solid #ddd !important;
+ }
+}
+
+*,
+*:before,
+*:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+html {
+ font-size: 62.5%;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+
+body {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #333333;
+ background-color: #ffffff;
+}
+
+input,
+button,
+select,
+textarea {
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+
+button,
+input,
+select[multiple],
+textarea {
+ background-image: none;
+}
+
+a {
+ color: #428bca;
+ text-decoration: none;
+}
+
+a:hover,
+a:focus {
+ color: #2a6496;
+ text-decoration: underline;
+}
+
+a:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+
+img {
+ vertical-align: middle;
+}
+
+.img-responsive {
+ display: block;
+ height: auto;
+ max-width: 100%;
+}
+
+.img-rounded {
+ border-radius: 6px;
+}
+
+.img-thumbnail {
+ display: inline-block;
+ height: auto;
+ max-width: 100%;
+ padding: 4px;
+ line-height: 1.428571429;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-radius: 4px;
+ -webkit-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+}
+
+.img-circle {
+ border-radius: 50%;
+}
+
+hr {
+ margin-top: 20px;
+ margin-bottom: 20px;
+ border: 0;
+ border-top: 1px solid #eeeeee;
+}
+
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0 0 0 0);
+ border: 0;
+}
+
+p {
+ margin: 0 0 10px;
+}
+
+.lead {
+ margin-bottom: 20px;
+ font-size: 16.099999999999998px;
+ font-weight: 200;
+ line-height: 1.4;
+}
+
+@media (min-width: 768px) {
+ .lead {
+ font-size: 21px;
+ }
+}
+
+small {
+ font-size: 85%;
+}
+
+cite {
+ font-style: normal;
+}
+
+.text-muted {
+ color: #999999;
+}
+
+.text-primary {
+ color: #428bca;
+}
+
+.text-warning {
+ color: #c09853;
+}
+
+.text-danger {
+ color: #b94a48;
+}
+
+.text-success {
+ color: #468847;
+}
+
+.text-info {
+ color: #3a87ad;
+}
+
+.text-left {
+ text-align: left;
+}
+
+.text-right {
+ text-align: right;
+}
+
+.text-center {
+ text-align: center;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+.h1,
+.h2,
+.h3,
+.h4,
+.h5,
+.h6 {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-weight: 500;
+ line-height: 1.1;
+}
+
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small,
+.h1 small,
+.h2 small,
+.h3 small,
+.h4 small,
+.h5 small,
+.h6 small {
+ font-weight: normal;
+ line-height: 1;
+ color: #999999;
+}
+
+h1,
+h2,
+h3 {
+ margin-top: 20px;
+ margin-bottom: 10px;
+}
+
+h4,
+h5,
+h6 {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+
+h1,
+.h1 {
+ font-size: 36px;
+}
+
+h2,
+.h2 {
+ font-size: 30px;
+}
+
+h3,
+.h3 {
+ font-size: 24px;
+}
+
+h4,
+.h4 {
+ font-size: 18px;
+}
+
+h5,
+.h5 {
+ font-size: 14px;
+}
+
+h6,
+.h6 {
+ font-size: 12px;
+}
+
+h1 small,
+.h1 small {
+ font-size: 24px;
+}
+
+h2 small,
+.h2 small {
+ font-size: 18px;
+}
+
+h3 small,
+.h3 small,
+h4 small,
+.h4 small {
+ font-size: 14px;
+}
+
+.page-header {
+ padding-bottom: 9px;
+ margin: 40px 0 20px;
+ border-bottom: 1px solid #eeeeee;
+}
+
+ul,
+ol {
+ margin-top: 0;
+ margin-bottom: 10px;
+}
+
+ul ul,
+ol ul,
+ul ol,
+ol ol {
+ margin-bottom: 0;
+}
+
+.list-unstyled {
+ padding-left: 0;
+ list-style: none;
+}
+
+.list-inline {
+ padding-left: 0;
+ list-style: none;
+}
+
+.list-inline > li {
+ display: inline-block;
+ padding-right: 5px;
+ padding-left: 5px;
+}
+
+dl {
+ margin-bottom: 20px;
+}
+
+dt,
+dd {
+ line-height: 1.428571429;
+}
+
+dt {
+ font-weight: bold;
+}
+
+dd {
+ margin-left: 0;
+}
+
+@media (min-width: 768px) {
+ .dl-horizontal dt {
+ float: left;
+ width: 160px;
+ overflow: hidden;
+ clear: left;
+ text-align: right;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .dl-horizontal dd {
+ margin-left: 180px;
+ }
+ .dl-horizontal dd:before,
+ .dl-horizontal dd:after {
+ display: table;
+ content: " ";
+ }
+ .dl-horizontal dd:after {
+ clear: both;
+ }
+ .dl-horizontal dd:before,
+ .dl-horizontal dd:after {
+ display: table;
+ content: " ";
+ }
+ .dl-horizontal dd:after {
+ clear: both;
+ }
+}
+
+abbr[title],
+abbr[data-original-title] {
+ cursor: help;
+ border-bottom: 1px dotted #999999;
+}
+
+abbr.initialism {
+ font-size: 90%;
+ text-transform: uppercase;
+}
+
+blockquote {
+ padding: 10px 20px;
+ margin: 0 0 20px;
+ border-left: 5px solid #eeeeee;
+}
+
+blockquote p {
+ font-size: 17.5px;
+ font-weight: 300;
+ line-height: 1.25;
+}
+
+blockquote p:last-child {
+ margin-bottom: 0;
+}
+
+blockquote small {
+ display: block;
+ line-height: 1.428571429;
+ color: #999999;
+}
+
+blockquote small:before {
+ content: '\2014 \00A0';
+}
+
+blockquote.pull-right {
+ padding-right: 15px;
+ padding-left: 0;
+ border-right: 5px solid #eeeeee;
+ border-left: 0;
+}
+
+blockquote.pull-right p,
+blockquote.pull-right small {
+ text-align: right;
+}
+
+blockquote.pull-right small:before {
+ content: '';
+}
+
+blockquote.pull-right small:after {
+ content: '\00A0 \2014';
+}
+
+q:before,
+q:after,
+blockquote:before,
+blockquote:after {
+ content: "";
+}
+
+address {
+ display: block;
+ margin-bottom: 20px;
+ font-style: normal;
+ line-height: 1.428571429;
+}
+
+code,
+pre {
+ font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+}
+
+code {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #c7254e;
+ white-space: nowrap;
+ background-color: #f9f2f4;
+ border-radius: 4px;
+}
+
+pre {
+ display: block;
+ padding: 9.5px;
+ margin: 0 0 10px;
+ font-size: 13px;
+ line-height: 1.428571429;
+ color: #333333;
+ word-break: break-all;
+ word-wrap: break-word;
+ background-color: #f5f5f5;
+ border: 1px solid #cccccc;
+ border-radius: 4px;
+}
+
+pre.prettyprint {
+ margin-bottom: 20px;
+}
+
+pre code {
+ padding: 0;
+ font-size: inherit;
+ color: inherit;
+ white-space: pre-wrap;
+ background-color: transparent;
+ border: 0;
+}
+
+.pre-scrollable {
+ max-height: 340px;
+ overflow-y: scroll;
+}
+
+.container {
+ padding-right: 15px;
+ padding-left: 15px;
+ margin-right: auto;
+ margin-left: auto;
+}
+
+.container:before,
+.container:after {
+ display: table;
+ content: " ";
+}
+
+.container:after {
+ clear: both;
+}
+
+.container:before,
+.container:after {
+ display: table;
+ content: " ";
+}
+
+.container:after {
+ clear: both;
+}
+
+.row {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+
+.row:before,
+.row:after {
+ display: table;
+ content: " ";
+}
+
+.row:after {
+ clear: both;
+}
+
+.row:before,
+.row:after {
+ display: table;
+ content: " ";
+}
+
+.row:after {
+ clear: both;
+}
+
+.col-xs-1,
+.col-xs-2,
+.col-xs-3,
+.col-xs-4,
+.col-xs-5,
+.col-xs-6,
+.col-xs-7,
+.col-xs-8,
+.col-xs-9,
+.col-xs-10,
+.col-xs-11,
+.col-xs-12,
+.col-sm-1,
+.col-sm-2,
+.col-sm-3,
+.col-sm-4,
+.col-sm-5,
+.col-sm-6,
+.col-sm-7,
+.col-sm-8,
+.col-sm-9,
+.col-sm-10,
+.col-sm-11,
+.col-sm-12,
+.col-md-1,
+.col-md-2,
+.col-md-3,
+.col-md-4,
+.col-md-5,
+.col-md-6,
+.col-md-7,
+.col-md-8,
+.col-md-9,
+.col-md-10,
+.col-md-11,
+.col-md-12,
+.col-lg-1,
+.col-lg-2,
+.col-lg-3,
+.col-lg-4,
+.col-lg-5,
+.col-lg-6,
+.col-lg-7,
+.col-lg-8,
+.col-lg-9,
+.col-lg-10,
+.col-lg-11,
+.col-lg-12 {
+ position: relative;
+ min-height: 1px;
+ padding-right: 15px;
+ padding-left: 15px;
+}
+
+.col-xs-1,
+.col-xs-2,
+.col-xs-3,
+.col-xs-4,
+.col-xs-5,
+.col-xs-6,
+.col-xs-7,
+.col-xs-8,
+.col-xs-9,
+.col-xs-10,
+.col-xs-11 {
+ float: left;
+}
+
+.col-xs-1 {
+ width: 8.333333333333332%;
+}
+
+.col-xs-2 {
+ width: 16.666666666666664%;
+}
+
+.col-xs-3 {
+ width: 25%;
+}
+
+.col-xs-4 {
+ width: 33.33333333333333%;
+}
+
+.col-xs-5 {
+ width: 41.66666666666667%;
+}
+
+.col-xs-6 {
+ width: 50%;
+}
+
+.col-xs-7 {
+ width: 58.333333333333336%;
+}
+
+.col-xs-8 {
+ width: 66.66666666666666%;
+}
+
+.col-xs-9 {
+ width: 75%;
+}
+
+.col-xs-10 {
+ width: 83.33333333333334%;
+}
+
+.col-xs-11 {
+ width: 91.66666666666666%;
+}
+
+.col-xs-12 {
+ width: 100%;
+}
+
+@media (min-width: 768px) {
+ .container {
+ max-width: 750px;
+ }
+ .col-sm-1,
+ .col-sm-2,
+ .col-sm-3,
+ .col-sm-4,
+ .col-sm-5,
+ .col-sm-6,
+ .col-sm-7,
+ .col-sm-8,
+ .col-sm-9,
+ .col-sm-10,
+ .col-sm-11 {
+ float: left;
+ }
+ .col-sm-1 {
+ width: 8.333333333333332%;
+ }
+ .col-sm-2 {
+ width: 16.666666666666664%;
+ }
+ .col-sm-3 {
+ width: 25%;
+ }
+ .col-sm-4 {
+ width: 33.33333333333333%;
+ }
+ .col-sm-5 {
+ width: 41.66666666666667%;
+ }
+ .col-sm-6 {
+ width: 50%;
+ }
+ .col-sm-7 {
+ width: 58.333333333333336%;
+ }
+ .col-sm-8 {
+ width: 66.66666666666666%;
+ }
+ .col-sm-9 {
+ width: 75%;
+ }
+ .col-sm-10 {
+ width: 83.33333333333334%;
+ }
+ .col-sm-11 {
+ width: 91.66666666666666%;
+ }
+ .col-sm-12 {
+ width: 100%;
+ }
+ .col-sm-push-1 {
+ left: 8.333333333333332%;
+ }
+ .col-sm-push-2 {
+ left: 16.666666666666664%;
+ }
+ .col-sm-push-3 {
+ left: 25%;
+ }
+ .col-sm-push-4 {
+ left: 33.33333333333333%;
+ }
+ .col-sm-push-5 {
+ left: 41.66666666666667%;
+ }
+ .col-sm-push-6 {
+ left: 50%;
+ }
+ .col-sm-push-7 {
+ left: 58.333333333333336%;
+ }
+ .col-sm-push-8 {
+ left: 66.66666666666666%;
+ }
+ .col-sm-push-9 {
+ left: 75%;
+ }
+ .col-sm-push-10 {
+ left: 83.33333333333334%;
+ }
+ .col-sm-push-11 {
+ left: 91.66666666666666%;
+ }
+ .col-sm-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .col-sm-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .col-sm-pull-3 {
+ right: 25%;
+ }
+ .col-sm-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .col-sm-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .col-sm-pull-6 {
+ right: 50%;
+ }
+ .col-sm-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .col-sm-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .col-sm-pull-9 {
+ right: 75%;
+ }
+ .col-sm-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .col-sm-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .col-sm-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+ .col-sm-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .col-sm-offset-3 {
+ margin-left: 25%;
+ }
+ .col-sm-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .col-sm-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .col-sm-offset-6 {
+ margin-left: 50%;
+ }
+ .col-sm-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .col-sm-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .col-sm-offset-9 {
+ margin-left: 75%;
+ }
+ .col-sm-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .col-sm-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+}
+
+@media (min-width: 992px) {
+ .container {
+ max-width: 970px;
+ }
+ .col-md-1,
+ .col-md-2,
+ .col-md-3,
+ .col-md-4,
+ .col-md-5,
+ .col-md-6,
+ .col-md-7,
+ .col-md-8,
+ .col-md-9,
+ .col-md-10,
+ .col-md-11 {
+ float: left;
+ }
+ .col-md-1 {
+ width: 8.333333333333332%;
+ }
+ .col-md-2 {
+ width: 16.666666666666664%;
+ }
+ .col-md-3 {
+ width: 25%;
+ }
+ .col-md-4 {
+ width: 33.33333333333333%;
+ }
+ .col-md-5 {
+ width: 41.66666666666667%;
+ }
+ .col-md-6 {
+ width: 50%;
+ }
+ .col-md-7 {
+ width: 58.333333333333336%;
+ }
+ .col-md-8 {
+ width: 66.66666666666666%;
+ }
+ .col-md-9 {
+ width: 75%;
+ }
+ .col-md-10 {
+ width: 83.33333333333334%;
+ }
+ .col-md-11 {
+ width: 91.66666666666666%;
+ }
+ .col-md-12 {
+ width: 100%;
+ }
+ .col-md-push-0 {
+ left: auto;
+ }
+ .col-md-push-1 {
+ left: 8.333333333333332%;
+ }
+ .col-md-push-2 {
+ left: 16.666666666666664%;
+ }
+ .col-md-push-3 {
+ left: 25%;
+ }
+ .col-md-push-4 {
+ left: 33.33333333333333%;
+ }
+ .col-md-push-5 {
+ left: 41.66666666666667%;
+ }
+ .col-md-push-6 {
+ left: 50%;
+ }
+ .col-md-push-7 {
+ left: 58.333333333333336%;
+ }
+ .col-md-push-8 {
+ left: 66.66666666666666%;
+ }
+ .col-md-push-9 {
+ left: 75%;
+ }
+ .col-md-push-10 {
+ left: 83.33333333333334%;
+ }
+ .col-md-push-11 {
+ left: 91.66666666666666%;
+ }
+ .col-md-pull-0 {
+ right: auto;
+ }
+ .col-md-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .col-md-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .col-md-pull-3 {
+ right: 25%;
+ }
+ .col-md-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .col-md-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .col-md-pull-6 {
+ right: 50%;
+ }
+ .col-md-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .col-md-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .col-md-pull-9 {
+ right: 75%;
+ }
+ .col-md-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .col-md-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .col-md-offset-0 {
+ margin-left: 0;
+ }
+ .col-md-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+ .col-md-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .col-md-offset-3 {
+ margin-left: 25%;
+ }
+ .col-md-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .col-md-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .col-md-offset-6 {
+ margin-left: 50%;
+ }
+ .col-md-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .col-md-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .col-md-offset-9 {
+ margin-left: 75%;
+ }
+ .col-md-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .col-md-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+}
+
+@media (min-width: 1200px) {
+ .container {
+ max-width: 1170px;
+ }
+ .col-lg-1,
+ .col-lg-2,
+ .col-lg-3,
+ .col-lg-4,
+ .col-lg-5,
+ .col-lg-6,
+ .col-lg-7,
+ .col-lg-8,
+ .col-lg-9,
+ .col-lg-10,
+ .col-lg-11 {
+ float: left;
+ }
+ .col-lg-1 {
+ width: 8.333333333333332%;
+ }
+ .col-lg-2 {
+ width: 16.666666666666664%;
+ }
+ .col-lg-3 {
+ width: 25%;
+ }
+ .col-lg-4 {
+ width: 33.33333333333333%;
+ }
+ .col-lg-5 {
+ width: 41.66666666666667%;
+ }
+ .col-lg-6 {
+ width: 50%;
+ }
+ .col-lg-7 {
+ width: 58.333333333333336%;
+ }
+ .col-lg-8 {
+ width: 66.66666666666666%;
+ }
+ .col-lg-9 {
+ width: 75%;
+ }
+ .col-lg-10 {
+ width: 83.33333333333334%;
+ }
+ .col-lg-11 {
+ width: 91.66666666666666%;
+ }
+ .col-lg-12 {
+ width: 100%;
+ }
+ .col-lg-push-0 {
+ left: auto;
+ }
+ .col-lg-push-1 {
+ left: 8.333333333333332%;
+ }
+ .col-lg-push-2 {
+ left: 16.666666666666664%;
+ }
+ .col-lg-push-3 {
+ left: 25%;
+ }
+ .col-lg-push-4 {
+ left: 33.33333333333333%;
+ }
+ .col-lg-push-5 {
+ left: 41.66666666666667%;
+ }
+ .col-lg-push-6 {
+ left: 50%;
+ }
+ .col-lg-push-7 {
+ left: 58.333333333333336%;
+ }
+ .col-lg-push-8 {
+ left: 66.66666666666666%;
+ }
+ .col-lg-push-9 {
+ left: 75%;
+ }
+ .col-lg-push-10 {
+ left: 83.33333333333334%;
+ }
+ .col-lg-push-11 {
+ left: 91.66666666666666%;
+ }
+ .col-lg-pull-0 {
+ right: auto;
+ }
+ .col-lg-pull-1 {
+ right: 8.333333333333332%;
+ }
+ .col-lg-pull-2 {
+ right: 16.666666666666664%;
+ }
+ .col-lg-pull-3 {
+ right: 25%;
+ }
+ .col-lg-pull-4 {
+ right: 33.33333333333333%;
+ }
+ .col-lg-pull-5 {
+ right: 41.66666666666667%;
+ }
+ .col-lg-pull-6 {
+ right: 50%;
+ }
+ .col-lg-pull-7 {
+ right: 58.333333333333336%;
+ }
+ .col-lg-pull-8 {
+ right: 66.66666666666666%;
+ }
+ .col-lg-pull-9 {
+ right: 75%;
+ }
+ .col-lg-pull-10 {
+ right: 83.33333333333334%;
+ }
+ .col-lg-pull-11 {
+ right: 91.66666666666666%;
+ }
+ .col-lg-offset-0 {
+ margin-left: 0;
+ }
+ .col-lg-offset-1 {
+ margin-left: 8.333333333333332%;
+ }
+ .col-lg-offset-2 {
+ margin-left: 16.666666666666664%;
+ }
+ .col-lg-offset-3 {
+ margin-left: 25%;
+ }
+ .col-lg-offset-4 {
+ margin-left: 33.33333333333333%;
+ }
+ .col-lg-offset-5 {
+ margin-left: 41.66666666666667%;
+ }
+ .col-lg-offset-6 {
+ margin-left: 50%;
+ }
+ .col-lg-offset-7 {
+ margin-left: 58.333333333333336%;
+ }
+ .col-lg-offset-8 {
+ margin-left: 66.66666666666666%;
+ }
+ .col-lg-offset-9 {
+ margin-left: 75%;
+ }
+ .col-lg-offset-10 {
+ margin-left: 83.33333333333334%;
+ }
+ .col-lg-offset-11 {
+ margin-left: 91.66666666666666%;
+ }
+}
+
+table {
+ max-width: 100%;
+ background-color: transparent;
+}
+
+th {
+ text-align: left;
+}
+
+.table {
+ width: 100%;
+ margin-bottom: 20px;
+}
+
+.table thead > tr > th,
+.table tbody > tr > th,
+.table tfoot > tr > th,
+.table thead > tr > td,
+.table tbody > tr > td,
+.table tfoot > tr > td {
+ padding: 8px;
+ line-height: 1.428571429;
+ vertical-align: top;
+ border-top: 1px solid #dddddd;
+}
+
+.table thead > tr > th {
+ vertical-align: bottom;
+ border-bottom: 2px solid #dddddd;
+}
+
+.table caption + thead tr:first-child th,
+.table colgroup + thead tr:first-child th,
+.table thead:first-child tr:first-child th,
+.table caption + thead tr:first-child td,
+.table colgroup + thead tr:first-child td,
+.table thead:first-child tr:first-child td {
+ border-top: 0;
+}
+
+.table tbody + tbody {
+ border-top: 2px solid #dddddd;
+}
+
+.table .table {
+ background-color: #ffffff;
+}
+
+.table-condensed thead > tr > th,
+.table-condensed tbody > tr > th,
+.table-condensed tfoot > tr > th,
+.table-condensed thead > tr > td,
+.table-condensed tbody > tr > td,
+.table-condensed tfoot > tr > td {
+ padding: 5px;
+}
+
+.table-bordered {
+ border: 1px solid #dddddd;
+}
+
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+ border: 1px solid #dddddd;
+}
+
+.table-bordered > thead > tr > th,
+.table-bordered > thead > tr > td {
+ border-bottom-width: 2px;
+}
+
+.table-striped > tbody > tr:nth-child(odd) > td,
+.table-striped > tbody > tr:nth-child(odd) > th {
+ background-color: #f9f9f9;
+}
+
+.table-hover > tbody > tr:hover > td,
+.table-hover > tbody > tr:hover > th {
+ background-color: #f5f5f5;
+}
+
+table col[class*="col-"] {
+ display: table-column;
+ float: none;
+}
+
+table td[class*="col-"],
+table th[class*="col-"] {
+ display: table-cell;
+ float: none;
+}
+
+.table > thead > tr > td.active,
+.table > tbody > tr > td.active,
+.table > tfoot > tr > td.active,
+.table > thead > tr > th.active,
+.table > tbody > tr > th.active,
+.table > tfoot > tr > th.active,
+.table > thead > tr.active > td,
+.table > tbody > tr.active > td,
+.table > tfoot > tr.active > td,
+.table > thead > tr.active > th,
+.table > tbody > tr.active > th,
+.table > tfoot > tr.active > th {
+ background-color: #f5f5f5;
+}
+
+.table > thead > tr > td.success,
+.table > tbody > tr > td.success,
+.table > tfoot > tr > td.success,
+.table > thead > tr > th.success,
+.table > tbody > tr > th.success,
+.table > tfoot > tr > th.success,
+.table > thead > tr.success > td,
+.table > tbody > tr.success > td,
+.table > tfoot > tr.success > td,
+.table > thead > tr.success > th,
+.table > tbody > tr.success > th,
+.table > tfoot > tr.success > th {
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+
+.table-hover > tbody > tr > td.success:hover,
+.table-hover > tbody > tr > th.success:hover,
+.table-hover > tbody > tr.success:hover > td {
+ background-color: #d0e9c6;
+ border-color: #c9e2b3;
+}
+
+.table > thead > tr > td.danger,
+.table > tbody > tr > td.danger,
+.table > tfoot > tr > td.danger,
+.table > thead > tr > th.danger,
+.table > tbody > tr > th.danger,
+.table > tfoot > tr > th.danger,
+.table > thead > tr.danger > td,
+.table > tbody > tr.danger > td,
+.table > tfoot > tr.danger > td,
+.table > thead > tr.danger > th,
+.table > tbody > tr.danger > th,
+.table > tfoot > tr.danger > th {
+ background-color: #f2dede;
+ border-color: #eed3d7;
+}
+
+.table-hover > tbody > tr > td.danger:hover,
+.table-hover > tbody > tr > th.danger:hover,
+.table-hover > tbody > tr.danger:hover > td {
+ background-color: #ebcccc;
+ border-color: #e6c1c7;
+}
+
+.table > thead > tr > td.warning,
+.table > tbody > tr > td.warning,
+.table > tfoot > tr > td.warning,
+.table > thead > tr > th.warning,
+.table > tbody > tr > th.warning,
+.table > tfoot > tr > th.warning,
+.table > thead > tr.warning > td,
+.table > tbody > tr.warning > td,
+.table > tfoot > tr.warning > td,
+.table > thead > tr.warning > th,
+.table > tbody > tr.warning > th,
+.table > tfoot > tr.warning > th {
+ background-color: #fcf8e3;
+ border-color: #fbeed5;
+}
+
+.table-hover > tbody > tr > td.warning:hover,
+.table-hover > tbody > tr > th.warning:hover,
+.table-hover > tbody > tr.warning:hover > td {
+ background-color: #faf2cc;
+ border-color: #f8e5be;
+}
+
+@media (max-width: 768px) {
+ .table-responsive {
+ width: 100%;
+ margin-bottom: 15px;
+ overflow-x: scroll;
+ overflow-y: hidden;
+ border: 1px solid #dddddd;
+ }
+ .table-responsive > .table {
+ margin-bottom: 0;
+ background-color: #fff;
+ }
+ .table-responsive > .table > thead > tr > th,
+ .table-responsive > .table > tbody > tr > th,
+ .table-responsive > .table > tfoot > tr > th,
+ .table-responsive > .table > thead > tr > td,
+ .table-responsive > .table > tbody > tr > td,
+ .table-responsive > .table > tfoot > tr > td {
+ white-space: nowrap;
+ }
+ .table-responsive > .table-bordered {
+ border: 0;
+ }
+ .table-responsive > .table-bordered > thead > tr > th:first-child,
+ .table-responsive > .table-bordered > tbody > tr > th:first-child,
+ .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+ .table-responsive > .table-bordered > thead > tr > td:first-child,
+ .table-responsive > .table-bordered > tbody > tr > td:first-child,
+ .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+ }
+ .table-responsive > .table-bordered > thead > tr > th:last-child,
+ .table-responsive > .table-bordered > tbody > tr > th:last-child,
+ .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+ .table-responsive > .table-bordered > thead > tr > td:last-child,
+ .table-responsive > .table-bordered > tbody > tr > td:last-child,
+ .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+ }
+ .table-responsive > .table-bordered > thead > tr:last-child > th,
+ .table-responsive > .table-bordered > tbody > tr:last-child > th,
+ .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+ .table-responsive > .table-bordered > thead > tr:last-child > td,
+ .table-responsive > .table-bordered > tbody > tr:last-child > td,
+ .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+ border-bottom: 0;
+ }
+}
+
+fieldset {
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+
+legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 20px;
+ font-size: 21px;
+ line-height: inherit;
+ color: #333333;
+ border: 0;
+ border-bottom: 1px solid #e5e5e5;
+}
+
+label {
+ display: inline-block;
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+
+input[type="search"] {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+input[type="radio"],
+input[type="checkbox"] {
+ margin: 4px 0 0;
+ margin-top: 1px \9;
+ /* IE8-9 */
+
+ line-height: normal;
+}
+
+input[type="file"] {
+ display: block;
+}
+
+select[multiple],
+select[size] {
+ height: auto;
+}
+
+select optgroup {
+ font-family: inherit;
+ font-size: inherit;
+ font-style: inherit;
+}
+
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+
+input[type="number"]::-webkit-outer-spin-button,
+input[type="number"]::-webkit-inner-spin-button {
+ height: auto;
+}
+
+.form-control:-moz-placeholder {
+ color: #999999;
+}
+
+.form-control::-moz-placeholder {
+ color: #999999;
+}
+
+.form-control:-ms-input-placeholder {
+ color: #999999;
+}
+
+.form-control::-webkit-input-placeholder {
+ color: #999999;
+}
+
+.form-control {
+ display: block;
+ width: 100%;
+ height: 34px;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #555555;
+ vertical-align: middle;
+ background-color: #ffffff;
+ border: 1px solid #cccccc;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+}
+
+.form-control:focus {
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+}
+
+.form-control[disabled],
+.form-control[readonly],
+fieldset[disabled] .form-control {
+ cursor: not-allowed;
+ background-color: #eeeeee;
+}
+
+textarea.form-control {
+ height: auto;
+}
+
+.form-group {
+ margin-bottom: 15px;
+}
+
+.radio,
+.checkbox {
+ display: block;
+ min-height: 20px;
+ padding-left: 20px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ vertical-align: middle;
+}
+
+.radio label,
+.checkbox label {
+ display: inline;
+ margin-bottom: 0;
+ font-weight: normal;
+ cursor: pointer;
+}
+
+.radio input[type="radio"],
+.radio-inline input[type="radio"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+ float: left;
+ margin-left: -20px;
+}
+
+.radio + .radio,
+.checkbox + .checkbox {
+ margin-top: -5px;
+}
+
+.radio-inline,
+.checkbox-inline {
+ display: inline-block;
+ padding-left: 20px;
+ margin-bottom: 0;
+ font-weight: normal;
+ vertical-align: middle;
+ cursor: pointer;
+}
+
+.radio-inline + .radio-inline,
+.checkbox-inline + .checkbox-inline {
+ margin-top: 0;
+ margin-left: 10px;
+}
+
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+.radio[disabled],
+.radio-inline[disabled],
+.checkbox[disabled],
+.checkbox-inline[disabled],
+fieldset[disabled] input[type="radio"],
+fieldset[disabled] input[type="checkbox"],
+fieldset[disabled] .radio,
+fieldset[disabled] .radio-inline,
+fieldset[disabled] .checkbox,
+fieldset[disabled] .checkbox-inline {
+ cursor: not-allowed;
+}
+
+.input-sm {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+
+select.input-sm {
+ height: 30px;
+ line-height: 30px;
+}
+
+textarea.input-sm {
+ height: auto;
+}
+
+.input-lg {
+ height: 45px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+
+select.input-lg {
+ height: 45px;
+ line-height: 45px;
+}
+
+textarea.input-lg {
+ height: auto;
+}
+
+.has-warning .help-block,
+.has-warning .control-label {
+ color: #c09853;
+}
+
+.has-warning .form-control {
+ border-color: #c09853;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.has-warning .form-control:focus {
+ border-color: #a47e3c;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+}
+
+.has-warning .input-group-addon {
+ color: #c09853;
+ background-color: #fcf8e3;
+ border-color: #c09853;
+}
+
+.has-error .help-block,
+.has-error .control-label {
+ color: #b94a48;
+}
+
+.has-error .form-control {
+ border-color: #b94a48;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.has-error .form-control:focus {
+ border-color: #953b39;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+}
+
+.has-error .input-group-addon {
+ color: #b94a48;
+ background-color: #f2dede;
+ border-color: #b94a48;
+}
+
+.has-success .help-block,
+.has-success .control-label {
+ color: #468847;
+}
+
+.has-success .form-control {
+ border-color: #468847;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.has-success .form-control:focus {
+ border-color: #356635;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+}
+
+.has-success .input-group-addon {
+ color: #468847;
+ background-color: #dff0d8;
+ border-color: #468847;
+}
+
+.form-control-static {
+ padding-top: 7px;
+ margin-bottom: 0;
+}
+
+.help-block {
+ display: block;
+ margin-top: 5px;
+ margin-bottom: 10px;
+ color: #737373;
+}
+
+@media (min-width: 768px) {
+ .form-inline .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .form-inline .form-control {
+ display: inline-block;
+ }
+ .form-inline .radio,
+ .form-inline .checkbox {
+ display: inline-block;
+ padding-left: 0;
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+ .form-inline .radio input[type="radio"],
+ .form-inline .checkbox input[type="checkbox"] {
+ float: none;
+ margin-left: 0;
+ }
+}
+
+.form-horizontal .control-label,
+.form-horizontal .radio,
+.form-horizontal .checkbox,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+ padding-top: 7px;
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+.form-horizontal .form-group {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+
+.form-horizontal .form-group:before,
+.form-horizontal .form-group:after {
+ display: table;
+ content: " ";
+}
+
+.form-horizontal .form-group:after {
+ clear: both;
+}
+
+.form-horizontal .form-group:before,
+.form-horizontal .form-group:after {
+ display: table;
+ content: " ";
+}
+
+.form-horizontal .form-group:after {
+ clear: both;
+}
+
+@media (min-width: 768px) {
+ .form-horizontal .control-label {
+ text-align: right;
+ }
+}
+
+.btn {
+ display: inline-block;
+ padding: 6px 12px;
+ margin-bottom: 0;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 1.428571429;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ cursor: pointer;
+ border: 1px solid transparent;
+ border-radius: 4px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ -o-user-select: none;
+ user-select: none;
+}
+
+.btn:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+
+.btn:hover,
+.btn:focus {
+ color: #333333;
+ text-decoration: none;
+}
+
+.btn:active,
+.btn.active {
+ background-image: none;
+ outline: 0;
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+
+.btn.disabled,
+.btn[disabled],
+fieldset[disabled] .btn {
+ pointer-events: none;
+ cursor: not-allowed;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+
+.btn-default {
+ color: #333333;
+ background-color: #ffffff;
+ border-color: #cccccc;
+}
+
+.btn-default:hover,
+.btn-default:focus,
+.btn-default:active,
+.btn-default.active,
+.open .dropdown-toggle.btn-default {
+ color: #333333;
+ background-color: #ebebeb;
+ border-color: #adadad;
+}
+
+.btn-default:active,
+.btn-default.active,
+.open .dropdown-toggle.btn-default {
+ background-image: none;
+}
+
+.btn-default.disabled,
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
+ background-color: #ffffff;
+ border-color: #cccccc;
+}
+
+.btn-primary {
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+
+.btn-primary:hover,
+.btn-primary:focus,
+.btn-primary:active,
+.btn-primary.active,
+.open .dropdown-toggle.btn-primary {
+ color: #ffffff;
+ background-color: #3276b1;
+ border-color: #285e8e;
+}
+
+.btn-primary:active,
+.btn-primary.active,
+.open .dropdown-toggle.btn-primary {
+ background-image: none;
+}
+
+.btn-primary.disabled,
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
+ background-color: #428bca;
+ border-color: #357ebd;
+}
+
+.btn-warning {
+ color: #ffffff;
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+
+.btn-warning:hover,
+.btn-warning:focus,
+.btn-warning:active,
+.btn-warning.active,
+.open .dropdown-toggle.btn-warning {
+ color: #ffffff;
+ background-color: #ed9c28;
+ border-color: #d58512;
+}
+
+.btn-warning:active,
+.btn-warning.active,
+.open .dropdown-toggle.btn-warning {
+ background-image: none;
+}
+
+.btn-warning.disabled,
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+
+.btn-danger {
+ color: #ffffff;
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+
+.btn-danger:hover,
+.btn-danger:focus,
+.btn-danger:active,
+.btn-danger.active,
+.open .dropdown-toggle.btn-danger {
+ color: #ffffff;
+ background-color: #d2322d;
+ border-color: #ac2925;
+}
+
+.btn-danger:active,
+.btn-danger.active,
+.open .dropdown-toggle.btn-danger {
+ background-image: none;
+}
+
+.btn-danger.disabled,
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+
+.btn-success {
+ color: #ffffff;
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+
+.btn-success:hover,
+.btn-success:focus,
+.btn-success:active,
+.btn-success.active,
+.open .dropdown-toggle.btn-success {
+ color: #ffffff;
+ background-color: #47a447;
+ border-color: #398439;
+}
+
+.btn-success:active,
+.btn-success.active,
+.open .dropdown-toggle.btn-success {
+ background-image: none;
+}
+
+.btn-success.disabled,
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+
+.btn-info {
+ color: #ffffff;
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+
+.btn-info:hover,
+.btn-info:focus,
+.btn-info:active,
+.btn-info.active,
+.open .dropdown-toggle.btn-info {
+ color: #ffffff;
+ background-color: #39b3d7;
+ border-color: #269abc;
+}
+
+.btn-info:active,
+.btn-info.active,
+.open .dropdown-toggle.btn-info {
+ background-image: none;
+}
+
+.btn-info.disabled,
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+
+.btn-link {
+ font-weight: normal;
+ color: #428bca;
+ cursor: pointer;
+ border-radius: 0;
+}
+
+.btn-link,
+.btn-link:active,
+.btn-link[disabled],
+fieldset[disabled] .btn-link {
+ background-color: transparent;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+
+.btn-link,
+.btn-link:hover,
+.btn-link:focus,
+.btn-link:active {
+ border-color: transparent;
+}
+
+.btn-link:hover,
+.btn-link:focus {
+ color: #2a6496;
+ text-decoration: underline;
+ background-color: transparent;
+}
+
+.btn-link[disabled]:hover,
+fieldset[disabled] .btn-link:hover,
+.btn-link[disabled]:focus,
+fieldset[disabled] .btn-link:focus {
+ color: #999999;
+ text-decoration: none;
+}
+
+.btn-lg {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+
+.btn-sm,
+.btn-xs {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+
+.btn-xs {
+ padding: 1px 5px;
+}
+
+.btn-block {
+ display: block;
+ width: 100%;
+ padding-right: 0;
+ padding-left: 0;
+}
+
+.btn-block + .btn-block {
+ margin-top: 5px;
+}
+
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+ width: 100%;
+}
+
+.fade {
+ opacity: 0;
+ -webkit-transition: opacity 0.15s linear;
+ transition: opacity 0.15s linear;
+}
+
+.fade.in {
+ opacity: 1;
+}
+
+.collapse {
+ display: none;
+}
+
+.collapse.in {
+ display: block;
+}
+
+.collapsing {
+ position: relative;
+ height: 0;
+ overflow: hidden;
+ -webkit-transition: height 0.35s ease;
+ transition: height 0.35s ease;
+}
+
+@font-face {
+ font-family: 'Glyphicons Halflings';
+ src: url('../fonts/glyphicons-halflings-regular.eot');
+ src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
+}
+
+.glyphicon {
+ position: relative;
+ top: 1px;
+ display: inline-block;
+ font-family: 'Glyphicons Halflings';
+ -webkit-font-smoothing: antialiased;
+ font-style: normal;
+ font-weight: normal;
+ line-height: 1;
+}
+
+.glyphicon-asterisk:before {
+ content: "\2a";
+}
+
+.glyphicon-plus:before {
+ content: "\2b";
+}
+
+.glyphicon-euro:before {
+ content: "\20ac";
+}
+
+.glyphicon-minus:before {
+ content: "\2212";
+}
+
+.glyphicon-cloud:before {
+ content: "\2601";
+}
+
+.glyphicon-envelope:before {
+ content: "\2709";
+}
+
+.glyphicon-pencil:before {
+ content: "\270f";
+}
+
+.glyphicon-glass:before {
+ content: "\e001";
+}
+
+.glyphicon-music:before {
+ content: "\e002";
+}
+
+.glyphicon-search:before {
+ content: "\e003";
+}
+
+.glyphicon-heart:before {
+ content: "\e005";
+}
+
+.glyphicon-star:before {
+ content: "\e006";
+}
+
+.glyphicon-star-empty:before {
+ content: "\e007";
+}
+
+.glyphicon-user:before {
+ content: "\e008";
+}
+
+.glyphicon-film:before {
+ content: "\e009";
+}
+
+.glyphicon-th-large:before {
+ content: "\e010";
+}
+
+.glyphicon-th:before {
+ content: "\e011";
+}
+
+.glyphicon-th-list:before {
+ content: "\e012";
+}
+
+.glyphicon-ok:before {
+ content: "\e013";
+}
+
+.glyphicon-remove:before {
+ content: "\e014";
+}
+
+.glyphicon-zoom-in:before {
+ content: "\e015";
+}
+
+.glyphicon-zoom-out:before {
+ content: "\e016";
+}
+
+.glyphicon-off:before {
+ content: "\e017";
+}
+
+.glyphicon-signal:before {
+ content: "\e018";
+}
+
+.glyphicon-cog:before {
+ content: "\e019";
+}
+
+.glyphicon-trash:before {
+ content: "\e020";
+}
+
+.glyphicon-home:before {
+ content: "\e021";
+}
+
+.glyphicon-file:before {
+ content: "\e022";
+}
+
+.glyphicon-time:before {
+ content: "\e023";
+}
+
+.glyphicon-road:before {
+ content: "\e024";
+}
+
+.glyphicon-download-alt:before {
+ content: "\e025";
+}
+
+.glyphicon-download:before {
+ content: "\e026";
+}
+
+.glyphicon-upload:before {
+ content: "\e027";
+}
+
+.glyphicon-inbox:before {
+ content: "\e028";
+}
+
+.glyphicon-play-circle:before {
+ content: "\e029";
+}
+
+.glyphicon-repeat:before {
+ content: "\e030";
+}
+
+.glyphicon-refresh:before {
+ content: "\e031";
+}
+
+.glyphicon-list-alt:before {
+ content: "\e032";
+}
+
+.glyphicon-flag:before {
+ content: "\e034";
+}
+
+.glyphicon-headphones:before {
+ content: "\e035";
+}
+
+.glyphicon-volume-off:before {
+ content: "\e036";
+}
+
+.glyphicon-volume-down:before {
+ content: "\e037";
+}
+
+.glyphicon-volume-up:before {
+ content: "\e038";
+}
+
+.glyphicon-qrcode:before {
+ content: "\e039";
+}
+
+.glyphicon-barcode:before {
+ content: "\e040";
+}
+
+.glyphicon-tag:before {
+ content: "\e041";
+}
+
+.glyphicon-tags:before {
+ content: "\e042";
+}
+
+.glyphicon-book:before {
+ content: "\e043";
+}
+
+.glyphicon-print:before {
+ content: "\e045";
+}
+
+.glyphicon-font:before {
+ content: "\e047";
+}
+
+.glyphicon-bold:before {
+ content: "\e048";
+}
+
+.glyphicon-italic:before {
+ content: "\e049";
+}
+
+.glyphicon-text-height:before {
+ content: "\e050";
+}
+
+.glyphicon-text-width:before {
+ content: "\e051";
+}
+
+.glyphicon-align-left:before {
+ content: "\e052";
+}
+
+.glyphicon-align-center:before {
+ content: "\e053";
+}
+
+.glyphicon-align-right:before {
+ content: "\e054";
+}
+
+.glyphicon-align-justify:before {
+ content: "\e055";
+}
+
+.glyphicon-list:before {
+ content: "\e056";
+}
+
+.glyphicon-indent-left:before {
+ content: "\e057";
+}
+
+.glyphicon-indent-right:before {
+ content: "\e058";
+}
+
+.glyphicon-facetime-video:before {
+ content: "\e059";
+}
+
+.glyphicon-picture:before {
+ content: "\e060";
+}
+
+.glyphicon-map-marker:before {
+ content: "\e062";
+}
+
+.glyphicon-adjust:before {
+ content: "\e063";
+}
+
+.glyphicon-tint:before {
+ content: "\e064";
+}
+
+.glyphicon-edit:before {
+ content: "\e065";
+}
+
+.glyphicon-share:before {
+ content: "\e066";
+}
+
+.glyphicon-check:before {
+ content: "\e067";
+}
+
+.glyphicon-move:before {
+ content: "\e068";
+}
+
+.glyphicon-step-backward:before {
+ content: "\e069";
+}
+
+.glyphicon-fast-backward:before {
+ content: "\e070";
+}
+
+.glyphicon-backward:before {
+ content: "\e071";
+}
+
+.glyphicon-play:before {
+ content: "\e072";
+}
+
+.glyphicon-pause:before {
+ content: "\e073";
+}
+
+.glyphicon-stop:before {
+ content: "\e074";
+}
+
+.glyphicon-forward:before {
+ content: "\e075";
+}
+
+.glyphicon-fast-forward:before {
+ content: "\e076";
+}
+
+.glyphicon-step-forward:before {
+ content: "\e077";
+}
+
+.glyphicon-eject:before {
+ content: "\e078";
+}
+
+.glyphicon-chevron-left:before {
+ content: "\e079";
+}
+
+.glyphicon-chevron-right:before {
+ content: "\e080";
+}
+
+.glyphicon-plus-sign:before {
+ content: "\e081";
+}
+
+.glyphicon-minus-sign:before {
+ content: "\e082";
+}
+
+.glyphicon-remove-sign:before {
+ content: "\e083";
+}
+
+.glyphicon-ok-sign:before {
+ content: "\e084";
+}
+
+.glyphicon-question-sign:before {
+ content: "\e085";
+}
+
+.glyphicon-info-sign:before {
+ content: "\e086";
+}
+
+.glyphicon-screenshot:before {
+ content: "\e087";
+}
+
+.glyphicon-remove-circle:before {
+ content: "\e088";
+}
+
+.glyphicon-ok-circle:before {
+ content: "\e089";
+}
+
+.glyphicon-ban-circle:before {
+ content: "\e090";
+}
+
+.glyphicon-arrow-left:before {
+ content: "\e091";
+}
+
+.glyphicon-arrow-right:before {
+ content: "\e092";
+}
+
+.glyphicon-arrow-up:before {
+ content: "\e093";
+}
+
+.glyphicon-arrow-down:before {
+ content: "\e094";
+}
+
+.glyphicon-share-alt:before {
+ content: "\e095";
+}
+
+.glyphicon-resize-full:before {
+ content: "\e096";
+}
+
+.glyphicon-resize-small:before {
+ content: "\e097";
+}
+
+.glyphicon-exclamation-sign:before {
+ content: "\e101";
+}
+
+.glyphicon-gift:before {
+ content: "\e102";
+}
+
+.glyphicon-leaf:before {
+ content: "\e103";
+}
+
+.glyphicon-eye-open:before {
+ content: "\e105";
+}
+
+.glyphicon-eye-close:before {
+ content: "\e106";
+}
+
+.glyphicon-warning-sign:before {
+ content: "\e107";
+}
+
+.glyphicon-plane:before {
+ content: "\e108";
+}
+
+.glyphicon-random:before {
+ content: "\e110";
+}
+
+.glyphicon-comment:before {
+ content: "\e111";
+}
+
+.glyphicon-magnet:before {
+ content: "\e112";
+}
+
+.glyphicon-chevron-up:before {
+ content: "\e113";
+}
+
+.glyphicon-chevron-down:before {
+ content: "\e114";
+}
+
+.glyphicon-retweet:before {
+ content: "\e115";
+}
+
+.glyphicon-shopping-cart:before {
+ content: "\e116";
+}
+
+.glyphicon-folder-close:before {
+ content: "\e117";
+}
+
+.glyphicon-folder-open:before {
+ content: "\e118";
+}
+
+.glyphicon-resize-vertical:before {
+ content: "\e119";
+}
+
+.glyphicon-resize-horizontal:before {
+ content: "\e120";
+}
+
+.glyphicon-hdd:before {
+ content: "\e121";
+}
+
+.glyphicon-bullhorn:before {
+ content: "\e122";
+}
+
+.glyphicon-certificate:before {
+ content: "\e124";
+}
+
+.glyphicon-thumbs-up:before {
+ content: "\e125";
+}
+
+.glyphicon-thumbs-down:before {
+ content: "\e126";
+}
+
+.glyphicon-hand-right:before {
+ content: "\e127";
+}
+
+.glyphicon-hand-left:before {
+ content: "\e128";
+}
+
+.glyphicon-hand-up:before {
+ content: "\e129";
+}
+
+.glyphicon-hand-down:before {
+ content: "\e130";
+}
+
+.glyphicon-circle-arrow-right:before {
+ content: "\e131";
+}
+
+.glyphicon-circle-arrow-left:before {
+ content: "\e132";
+}
+
+.glyphicon-circle-arrow-up:before {
+ content: "\e133";
+}
+
+.glyphicon-circle-arrow-down:before {
+ content: "\e134";
+}
+
+.glyphicon-globe:before {
+ content: "\e135";
+}
+
+.glyphicon-tasks:before {
+ content: "\e137";
+}
+
+.glyphicon-filter:before {
+ content: "\e138";
+}
+
+.glyphicon-fullscreen:before {
+ content: "\e140";
+}
+
+.glyphicon-dashboard:before {
+ content: "\e141";
+}
+
+.glyphicon-heart-empty:before {
+ content: "\e143";
+}
+
+.glyphicon-link:before {
+ content: "\e144";
+}
+
+.glyphicon-phone:before {
+ content: "\e145";
+}
+
+.glyphicon-usd:before {
+ content: "\e148";
+}
+
+.glyphicon-gbp:before {
+ content: "\e149";
+}
+
+.glyphicon-sort:before {
+ content: "\e150";
+}
+
+.glyphicon-sort-by-alphabet:before {
+ content: "\e151";
+}
+
+.glyphicon-sort-by-alphabet-alt:before {
+ content: "\e152";
+}
+
+.glyphicon-sort-by-order:before {
+ content: "\e153";
+}
+
+.glyphicon-sort-by-order-alt:before {
+ content: "\e154";
+}
+
+.glyphicon-sort-by-attributes:before {
+ content: "\e155";
+}
+
+.glyphicon-sort-by-attributes-alt:before {
+ content: "\e156";
+}
+
+.glyphicon-unchecked:before {
+ content: "\e157";
+}
+
+.glyphicon-expand:before {
+ content: "\e158";
+}
+
+.glyphicon-collapse-down:before {
+ content: "\e159";
+}
+
+.glyphicon-collapse-up:before {
+ content: "\e160";
+}
+
+.glyphicon-log-in:before {
+ content: "\e161";
+}
+
+.glyphicon-flash:before {
+ content: "\e162";
+}
+
+.glyphicon-log-out:before {
+ content: "\e163";
+}
+
+.glyphicon-new-window:before {
+ content: "\e164";
+}
+
+.glyphicon-record:before {
+ content: "\e165";
+}
+
+.glyphicon-save:before {
+ content: "\e166";
+}
+
+.glyphicon-open:before {
+ content: "\e167";
+}
+
+.glyphicon-saved:before {
+ content: "\e168";
+}
+
+.glyphicon-import:before {
+ content: "\e169";
+}
+
+.glyphicon-export:before {
+ content: "\e170";
+}
+
+.glyphicon-send:before {
+ content: "\e171";
+}
+
+.glyphicon-floppy-disk:before {
+ content: "\e172";
+}
+
+.glyphicon-floppy-saved:before {
+ content: "\e173";
+}
+
+.glyphicon-floppy-remove:before {
+ content: "\e174";
+}
+
+.glyphicon-floppy-save:before {
+ content: "\e175";
+}
+
+.glyphicon-floppy-open:before {
+ content: "\e176";
+}
+
+.glyphicon-credit-card:before {
+ content: "\e177";
+}
+
+.glyphicon-transfer:before {
+ content: "\e178";
+}
+
+.glyphicon-cutlery:before {
+ content: "\e179";
+}
+
+.glyphicon-header:before {
+ content: "\e180";
+}
+
+.glyphicon-compressed:before {
+ content: "\e181";
+}
+
+.glyphicon-earphone:before {
+ content: "\e182";
+}
+
+.glyphicon-phone-alt:before {
+ content: "\e183";
+}
+
+.glyphicon-tower:before {
+ content: "\e184";
+}
+
+.glyphicon-stats:before {
+ content: "\e185";
+}
+
+.glyphicon-sd-video:before {
+ content: "\e186";
+}
+
+.glyphicon-hd-video:before {
+ content: "\e187";
+}
+
+.glyphicon-subtitles:before {
+ content: "\e188";
+}
+
+.glyphicon-sound-stereo:before {
+ content: "\e189";
+}
+
+.glyphicon-sound-dolby:before {
+ content: "\e190";
+}
+
+.glyphicon-sound-5-1:before {
+ content: "\e191";
+}
+
+.glyphicon-sound-6-1:before {
+ content: "\e192";
+}
+
+.glyphicon-sound-7-1:before {
+ content: "\e193";
+}
+
+.glyphicon-copyright-mark:before {
+ content: "\e194";
+}
+
+.glyphicon-registration-mark:before {
+ content: "\e195";
+}
+
+.glyphicon-cloud-download:before {
+ content: "\e197";
+}
+
+.glyphicon-cloud-upload:before {
+ content: "\e198";
+}
+
+.glyphicon-tree-conifer:before {
+ content: "\e199";
+}
+
+.glyphicon-tree-deciduous:before {
+ content: "\e200";
+}
+
+.glyphicon-briefcase:before {
+ content: "\1f4bc";
+}
+
+.glyphicon-calendar:before {
+ content: "\1f4c5";
+}
+
+.glyphicon-pushpin:before {
+ content: "\1f4cc";
+}
+
+.glyphicon-paperclip:before {
+ content: "\1f4ce";
+}
+
+.glyphicon-camera:before {
+ content: "\1f4f7";
+}
+
+.glyphicon-lock:before {
+ content: "\1f512";
+}
+
+.glyphicon-bell:before {
+ content: "\1f514";
+}
+
+.glyphicon-bookmark:before {
+ content: "\1f516";
+}
+
+.glyphicon-fire:before {
+ content: "\1f525";
+}
+
+.glyphicon-wrench:before {
+ content: "\1f527";
+}
+
+.caret {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ margin-left: 2px;
+ vertical-align: middle;
+ border-top: 4px solid #000000;
+ border-right: 4px solid transparent;
+ border-bottom: 0 dotted;
+ border-left: 4px solid transparent;
+ content: "";
+}
+
+.dropdown {
+ position: relative;
+}
+
+.dropdown-toggle:focus {
+ outline: 0;
+}
+
+.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ display: none;
+ float: left;
+ min-width: 160px;
+ padding: 5px 0;
+ margin: 2px 0 0;
+ font-size: 14px;
+ list-style: none;
+ background-color: #ffffff;
+ border: 1px solid #cccccc;
+ border: 1px solid rgba(0, 0, 0, 0.15);
+ border-radius: 4px;
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
+ background-clip: padding-box;
+}
+
+.dropdown-menu.pull-right {
+ right: 0;
+ left: auto;
+}
+
+.dropdown-menu .divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+
+.dropdown-menu > li > a {
+ display: block;
+ padding: 3px 20px;
+ clear: both;
+ font-weight: normal;
+ line-height: 1.428571429;
+ color: #333333;
+ white-space: nowrap;
+}
+
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #428bca;
+}
+
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #428bca;
+ outline: 0;
+}
+
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+ color: #999999;
+}
+
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+ text-decoration: none;
+ cursor: not-allowed;
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.open > .dropdown-menu {
+ display: block;
+}
+
+.open > a {
+ outline: 0;
+}
+
+.dropdown-header {
+ display: block;
+ padding: 3px 20px;
+ font-size: 12px;
+ line-height: 1.428571429;
+ color: #999999;
+}
+
+.dropdown-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 990;
+}
+
+.pull-right > .dropdown-menu {
+ right: 0;
+ left: auto;
+}
+
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+ border-top: 0 dotted;
+ border-bottom: 4px solid #000000;
+ content: "";
+}
+
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 1px;
+}
+
+@media (min-width: 768px) {
+ .navbar-right .dropdown-menu {
+ right: 0;
+ left: auto;
+ }
+}
+
+.btn-default .caret {
+ border-top-color: #333333;
+}
+
+.btn-primary .caret,
+.btn-success .caret,
+.btn-warning .caret,
+.btn-danger .caret,
+.btn-info .caret {
+ border-top-color: #fff;
+}
+
+.dropup .btn-default .caret {
+ border-bottom-color: #333333;
+}
+
+.dropup .btn-primary .caret,
+.dropup .btn-success .caret,
+.dropup .btn-warning .caret,
+.dropup .btn-danger .caret,
+.dropup .btn-info .caret {
+ border-bottom-color: #fff;
+}
+
+.btn-group,
+.btn-group-vertical {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.btn-group > .btn,
+.btn-group-vertical > .btn {
+ position: relative;
+ float: left;
+}
+
+.btn-group > .btn:hover,
+.btn-group-vertical > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus,
+.btn-group > .btn:active,
+.btn-group-vertical > .btn:active,
+.btn-group > .btn.active,
+.btn-group-vertical > .btn.active {
+ z-index: 2;
+}
+
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus {
+ outline: none;
+}
+
+.btn-group .btn + .btn,
+.btn-group .btn + .btn-group,
+.btn-group .btn-group + .btn,
+.btn-group .btn-group + .btn-group {
+ margin-left: -1px;
+}
+
+.btn-toolbar:before,
+.btn-toolbar:after {
+ display: table;
+ content: " ";
+}
+
+.btn-toolbar:after {
+ clear: both;
+}
+
+.btn-toolbar:before,
+.btn-toolbar:after {
+ display: table;
+ content: " ";
+}
+
+.btn-toolbar:after {
+ clear: both;
+}
+
+.btn-toolbar .btn-group {
+ float: left;
+}
+
+.btn-toolbar > .btn + .btn,
+.btn-toolbar > .btn-group + .btn,
+.btn-toolbar > .btn + .btn-group,
+.btn-toolbar > .btn-group + .btn-group {
+ margin-left: 5px;
+}
+
+.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+ border-radius: 0;
+}
+
+.btn-group > .btn:first-child {
+ margin-left: 0;
+}
+
+.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.btn-group > .btn:last-child:not(:first-child),
+.btn-group > .dropdown-toggle:not(:first-child) {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+}
+
+.btn-group > .btn-group {
+ float: left;
+}
+
+.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+
+.btn-group > .btn-group:first-child > .btn:last-child,
+.btn-group > .btn-group:first-child > .dropdown-toggle {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.btn-group > .btn-group:last-child > .btn:first-child {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+}
+
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+ outline: 0;
+}
+
+.btn-group-xs > .btn {
+ padding: 5px 10px;
+ padding: 1px 5px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+
+.btn-group-sm > .btn {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+
+.btn-group-lg > .btn {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+
+.btn-group > .btn + .dropdown-toggle {
+ padding-right: 8px;
+ padding-left: 8px;
+}
+
+.btn-group > .btn-lg + .dropdown-toggle {
+ padding-right: 12px;
+ padding-left: 12px;
+}
+
+.btn-group.open .dropdown-toggle {
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+
+.btn .caret {
+ margin-left: 0;
+}
+
+.btn-lg .caret {
+ border-width: 5px 5px 0;
+ border-bottom-width: 0;
+}
+
+.dropup .btn-lg .caret {
+ border-width: 0 5px 5px;
+}
+
+.btn-group-vertical > .btn,
+.btn-group-vertical > .btn-group {
+ display: block;
+ float: none;
+ width: 100%;
+ max-width: 100%;
+}
+
+.btn-group-vertical > .btn-group:before,
+.btn-group-vertical > .btn-group:after {
+ display: table;
+ content: " ";
+}
+
+.btn-group-vertical > .btn-group:after {
+ clear: both;
+}
+
+.btn-group-vertical > .btn-group:before,
+.btn-group-vertical > .btn-group:after {
+ display: table;
+ content: " ";
+}
+
+.btn-group-vertical > .btn-group:after {
+ clear: both;
+}
+
+.btn-group-vertical > .btn-group > .btn {
+ float: none;
+}
+
+.btn-group-vertical > .btn + .btn,
+.btn-group-vertical > .btn + .btn-group,
+.btn-group-vertical > .btn-group + .btn,
+.btn-group-vertical > .btn-group + .btn-group {
+ margin-top: -1px;
+ margin-left: 0;
+}
+
+.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+
+.btn-group-vertical > .btn:first-child:not(:last-child) {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.btn-group-vertical > .btn:last-child:not(:first-child) {
+ border-top-right-radius: 0;
+ border-bottom-left-radius: 4px;
+ border-top-left-radius: 0;
+}
+
+.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+
+.btn-group-vertical > .btn-group:first-child > .btn:last-child,
+.btn-group-vertical > .btn-group:first-child > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.btn-group-vertical > .btn-group:last-child > .btn:first-child {
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+
+.btn-group-justified {
+ display: table;
+ width: 100%;
+ border-collapse: separate;
+ table-layout: fixed;
+}
+
+.btn-group-justified .btn {
+ display: table-cell;
+ float: none;
+ width: 1%;
+}
+
+[data-toggle="buttons"] > .btn > input[type="radio"],
+[data-toggle="buttons"] > .btn > input[type="checkbox"] {
+ display: none;
+}
+
+.input-group {
+ position: relative;
+ display: table;
+ border-collapse: separate;
+}
+
+.input-group.col {
+ float: none;
+ padding-right: 0;
+ padding-left: 0;
+}
+
+.input-group .form-control {
+ width: 100%;
+ margin-bottom: 0;
+}
+
+.input-group-lg > .form-control,
+.input-group-lg > .input-group-addon,
+.input-group-lg > .input-group-btn > .btn {
+ height: 45px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.33;
+ border-radius: 6px;
+}
+
+select.input-group-lg > .form-control,
+select.input-group-lg > .input-group-addon,
+select.input-group-lg > .input-group-btn > .btn {
+ height: 45px;
+ line-height: 45px;
+}
+
+textarea.input-group-lg > .form-control,
+textarea.input-group-lg > .input-group-addon,
+textarea.input-group-lg > .input-group-btn > .btn {
+ height: auto;
+}
+
+.input-group-sm > .form-control,
+.input-group-sm > .input-group-addon,
+.input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+
+select.input-group-sm > .form-control,
+select.input-group-sm > .input-group-addon,
+select.input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ line-height: 30px;
+}
+
+textarea.input-group-sm > .form-control,
+textarea.input-group-sm > .input-group-addon,
+textarea.input-group-sm > .input-group-btn > .btn {
+ height: auto;
+}
+
+.input-group-addon,
+.input-group-btn,
+.input-group .form-control {
+ display: table-cell;
+}
+
+.input-group-addon:not(:first-child):not(:last-child),
+.input-group-btn:not(:first-child):not(:last-child),
+.input-group .form-control:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+
+.input-group-addon,
+.input-group-btn {
+ width: 1%;
+ white-space: nowrap;
+ vertical-align: middle;
+}
+
+.input-group-addon {
+ padding: 6px 12px;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 1;
+ text-align: center;
+ background-color: #eeeeee;
+ border: 1px solid #cccccc;
+ border-radius: 4px;
+}
+
+.input-group-addon.input-sm {
+ padding: 5px 10px;
+ font-size: 12px;
+ border-radius: 3px;
+}
+
+.input-group-addon.input-lg {
+ padding: 10px 16px;
+ font-size: 18px;
+ border-radius: 6px;
+}
+
+.input-group-addon input[type="radio"],
+.input-group-addon input[type="checkbox"] {
+ margin-top: 0;
+}
+
+.input-group .form-control:first-child,
+.input-group-addon:first-child,
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .dropdown-toggle,
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.input-group-addon:first-child {
+ border-right: 0;
+}
+
+.input-group .form-control:last-child,
+.input-group-addon:last-child,
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .dropdown-toggle,
+.input-group-btn:first-child > .btn:not(:first-child) {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+}
+
+.input-group-addon:last-child {
+ border-left: 0;
+}
+
+.input-group-btn {
+ position: relative;
+ white-space: nowrap;
+}
+
+.input-group-btn > .btn {
+ position: relative;
+}
+
+.input-group-btn > .btn + .btn {
+ margin-left: -4px;
+}
+
+.input-group-btn > .btn:hover,
+.input-group-btn > .btn:active {
+ z-index: 2;
+}
+
+.nav {
+ padding-left: 0;
+ margin-bottom: 0;
+ list-style: none;
+}
+
+.nav:before,
+.nav:after {
+ display: table;
+ content: " ";
+}
+
+.nav:after {
+ clear: both;
+}
+
+.nav:before,
+.nav:after {
+ display: table;
+ content: " ";
+}
+
+.nav:after {
+ clear: both;
+}
+
+.nav > li {
+ position: relative;
+ display: block;
+}
+
+.nav > li > a {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+}
+
+.nav > li > a:hover,
+.nav > li > a:focus {
+ text-decoration: none;
+ background-color: #eeeeee;
+}
+
+.nav > li.disabled > a {
+ color: #999999;
+}
+
+.nav > li.disabled > a:hover,
+.nav > li.disabled > a:focus {
+ color: #999999;
+ text-decoration: none;
+ cursor: not-allowed;
+ background-color: transparent;
+}
+
+.nav .open > a,
+.nav .open > a:hover,
+.nav .open > a:focus {
+ background-color: #eeeeee;
+ border-color: #428bca;
+}
+
+.nav .nav-divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+
+.nav > li > a > img {
+ max-width: none;
+}
+
+.nav-tabs {
+ border-bottom: 1px solid #dddddd;
+}
+
+.nav-tabs > li {
+ float: left;
+ margin-bottom: -1px;
+}
+
+.nav-tabs > li > a {
+ margin-right: 2px;
+ line-height: 1.428571429;
+ border: 1px solid transparent;
+ border-radius: 4px 4px 0 0;
+}
+
+.nav-tabs > li > a:hover {
+ border-color: #eeeeee #eeeeee #dddddd;
+}
+
+.nav-tabs > li.active > a,
+.nav-tabs > li.active > a:hover,
+.nav-tabs > li.active > a:focus {
+ color: #555555;
+ cursor: default;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-bottom-color: transparent;
+}
+
+.nav-tabs.nav-justified {
+ width: 100%;
+ border-bottom: 0;
+}
+
+.nav-tabs.nav-justified > li {
+ float: none;
+}
+
+.nav-tabs.nav-justified > li > a {
+ text-align: center;
+}
+
+@media (min-width: 768px) {
+ .nav-tabs.nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+}
+
+.nav-tabs.nav-justified > li > a {
+ margin-right: 0;
+ border-bottom: 1px solid #dddddd;
+}
+
+.nav-tabs.nav-justified > .active > a {
+ border-bottom-color: #ffffff;
+}
+
+.nav-pills > li {
+ float: left;
+}
+
+.nav-pills > li > a {
+ border-radius: 5px;
+}
+
+.nav-pills > li + li {
+ margin-left: 2px;
+}
+
+.nav-pills > li.active > a,
+.nav-pills > li.active > a:hover,
+.nav-pills > li.active > a:focus {
+ color: #ffffff;
+ background-color: #428bca;
+}
+
+.nav-stacked > li {
+ float: none;
+}
+
+.nav-stacked > li + li {
+ margin-top: 2px;
+ margin-left: 0;
+}
+
+.nav-justified {
+ width: 100%;
+}
+
+.nav-justified > li {
+ float: none;
+}
+
+.nav-justified > li > a {
+ text-align: center;
+}
+
+@media (min-width: 768px) {
+ .nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+}
+
+.nav-tabs-justified {
+ border-bottom: 0;
+}
+
+.nav-tabs-justified > li > a {
+ margin-right: 0;
+ border-bottom: 1px solid #dddddd;
+}
+
+.nav-tabs-justified > .active > a {
+ border-bottom-color: #ffffff;
+}
+
+.tabbable:before,
+.tabbable:after {
+ display: table;
+ content: " ";
+}
+
+.tabbable:after {
+ clear: both;
+}
+
+.tabbable:before,
+.tabbable:after {
+ display: table;
+ content: " ";
+}
+
+.tabbable:after {
+ clear: both;
+}
+
+.tab-content > .tab-pane,
+.pill-content > .pill-pane {
+ display: none;
+}
+
+.tab-content > .active,
+.pill-content > .active {
+ display: block;
+}
+
+.nav .caret {
+ border-top-color: #428bca;
+ border-bottom-color: #428bca;
+}
+
+.nav a:hover .caret {
+ border-top-color: #2a6496;
+ border-bottom-color: #2a6496;
+}
+
+.nav-tabs .dropdown-menu {
+ margin-top: -1px;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+
+.navbar {
+ position: relative;
+ z-index: 1000;
+ min-height: 50px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+}
+
+.navbar:before,
+.navbar:after {
+ display: table;
+ content: " ";
+}
+
+.navbar:after {
+ clear: both;
+}
+
+.navbar:before,
+.navbar:after {
+ display: table;
+ content: " ";
+}
+
+.navbar:after {
+ clear: both;
+}
+
+@media (min-width: 768px) {
+ .navbar {
+ border-radius: 4px;
+ }
+}
+
+.navbar-header:before,
+.navbar-header:after {
+ display: table;
+ content: " ";
+}
+
+.navbar-header:after {
+ clear: both;
+}
+
+.navbar-header:before,
+.navbar-header:after {
+ display: table;
+ content: " ";
+}
+
+.navbar-header:after {
+ clear: both;
+}
+
+@media (min-width: 768px) {
+ .navbar-header {
+ float: left;
+ }
+}
+
+.navbar-collapse {
+ max-height: 340px;
+ padding-right: 15px;
+ padding-left: 15px;
+ overflow-x: visible;
+ border-top: 1px solid transparent;
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
+ -webkit-overflow-scrolling: touch;
+}
+
+.navbar-collapse:before,
+.navbar-collapse:after {
+ display: table;
+ content: " ";
+}
+
+.navbar-collapse:after {
+ clear: both;
+}
+
+.navbar-collapse:before,
+.navbar-collapse:after {
+ display: table;
+ content: " ";
+}
+
+.navbar-collapse:after {
+ clear: both;
+}
+
+.navbar-collapse.in {
+ overflow-y: auto;
+}
+
+@media (min-width: 768px) {
+ .navbar-collapse {
+ width: auto;
+ border-top: 0;
+ box-shadow: none;
+ }
+ .navbar-collapse.collapse {
+ display: block !important;
+ height: auto !important;
+ padding-bottom: 0;
+ overflow: visible !important;
+ }
+ .navbar-collapse.in {
+ overflow-y: visible;
+ }
+ .navbar-collapse .navbar-nav.navbar-left:first-child {
+ margin-left: -15px;
+ }
+ .navbar-collapse .navbar-nav.navbar-right:last-child {
+ margin-right: -15px;
+ }
+ .navbar-collapse .navbar-text:last-child {
+ margin-right: 0;
+ }
+}
+
+.container > .navbar-header,
+.container > .navbar-collapse {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+
+@media (min-width: 768px) {
+ .container > .navbar-header,
+ .container > .navbar-collapse {
+ margin-right: 0;
+ margin-left: 0;
+ }
+}
+
+.navbar-static-top {
+ border-width: 0 0 1px;
+}
+
+@media (min-width: 768px) {
+ .navbar-static-top {
+ border-radius: 0;
+ }
+}
+
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+ position: fixed;
+ right: 0;
+ left: 0;
+ border-width: 0 0 1px;
+}
+
+@media (min-width: 768px) {
+ .navbar-fixed-top,
+ .navbar-fixed-bottom {
+ border-radius: 0;
+ }
+}
+
+.navbar-fixed-top {
+ top: 0;
+ z-index: 1030;
+}
+
+.navbar-fixed-bottom {
+ bottom: 0;
+ margin-bottom: 0;
+}
+
+.navbar-brand {
+ float: left;
+ padding: 15px 15px;
+ font-size: 18px;
+ line-height: 20px;
+}
+
+.navbar-brand:hover,
+.navbar-brand:focus {
+ text-decoration: none;
+}
+
+@media (min-width: 768px) {
+ .navbar > .container .navbar-brand {
+ margin-left: -15px;
+ }
+}
+
+.navbar-toggle {
+ position: relative;
+ float: right;
+ padding: 9px 10px;
+ margin-top: 8px;
+ margin-right: 15px;
+ margin-bottom: 8px;
+ background-color: transparent;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+
+.navbar-toggle .icon-bar {
+ display: block;
+ width: 22px;
+ height: 2px;
+ border-radius: 1px;
+}
+
+.navbar-toggle .icon-bar + .icon-bar {
+ margin-top: 4px;
+}
+
+@media (min-width: 768px) {
+ .navbar-toggle {
+ display: none;
+ }
+}
+
+.navbar-nav {
+ margin: 7.5px -15px;
+}
+
+.navbar-nav > li > a {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ line-height: 20px;
+}
+
+@media (max-width: 767px) {
+ .navbar-nav .open .dropdown-menu {
+ position: static;
+ float: none;
+ width: auto;
+ margin-top: 0;
+ background-color: transparent;
+ border: 0;
+ box-shadow: none;
+ }
+ .navbar-nav .open .dropdown-menu > li > a,
+ .navbar-nav .open .dropdown-menu .dropdown-header {
+ padding: 5px 15px 5px 25px;
+ }
+ .navbar-nav .open .dropdown-menu > li > a {
+ line-height: 20px;
+ }
+ .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-nav .open .dropdown-menu > li > a:focus {
+ background-image: none;
+ }
+}
+
+@media (min-width: 768px) {
+ .navbar-nav {
+ float: left;
+ margin: 0;
+ }
+ .navbar-nav > li {
+ float: left;
+ }
+ .navbar-nav > li > a {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ }
+}
+
+@media (min-width: 768px) {
+ .navbar-left {
+ float: left !important;
+ }
+ .navbar-right {
+ float: right !important;
+ }
+}
+
+.navbar-form {
+ padding: 10px 15px;
+ margin-top: 8px;
+ margin-right: -15px;
+ margin-bottom: 8px;
+ margin-left: -15px;
+ border-top: 1px solid transparent;
+ border-bottom: 1px solid transparent;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+}
+
+@media (min-width: 768px) {
+ .navbar-form .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .navbar-form .form-control {
+ display: inline-block;
+ }
+ .navbar-form .radio,
+ .navbar-form .checkbox {
+ display: inline-block;
+ padding-left: 0;
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+ .navbar-form .radio input[type="radio"],
+ .navbar-form .checkbox input[type="checkbox"] {
+ float: none;
+ margin-left: 0;
+ }
+}
+
+@media (max-width: 767px) {
+ .navbar-form .form-group {
+ margin-bottom: 5px;
+ }
+}
+
+@media (min-width: 768px) {
+ .navbar-form {
+ width: auto;
+ padding-top: 0;
+ padding-bottom: 0;
+ margin-right: 0;
+ margin-left: 0;
+ border: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ }
+}
+
+.navbar-nav > li > .dropdown-menu {
+ margin-top: 0;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+
+.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.navbar-nav.pull-right > li > .dropdown-menu,
+.navbar-nav > li > .dropdown-menu.pull-right {
+ right: 0;
+ left: auto;
+}
+
+.navbar-btn {
+ margin-top: 8px;
+ margin-bottom: 8px;
+}
+
+.navbar-text {
+ float: left;
+ margin-top: 15px;
+ margin-bottom: 15px;
+}
+
+@media (min-width: 768px) {
+ .navbar-text {
+ margin-right: 15px;
+ margin-left: 15px;
+ }
+}
+
+.navbar-default {
+ background-color: #f8f8f8;
+ border-color: #e7e7e7;
+}
+
+.navbar-default .navbar-brand {
+ color: #777777;
+}
+
+.navbar-default .navbar-brand:hover,
+.navbar-default .navbar-brand:focus {
+ color: #5e5e5e;
+ background-color: transparent;
+}
+
+.navbar-default .navbar-text {
+ color: #777777;
+}
+
+.navbar-default .navbar-nav > li > a {
+ color: #777777;
+}
+
+.navbar-default .navbar-nav > li > a:hover,
+.navbar-default .navbar-nav > li > a:focus {
+ color: #333333;
+ background-color: transparent;
+}
+
+.navbar-default .navbar-nav > .active > a,
+.navbar-default .navbar-nav > .active > a:hover,
+.navbar-default .navbar-nav > .active > a:focus {
+ color: #555555;
+ background-color: #e7e7e7;
+}
+
+.navbar-default .navbar-nav > .disabled > a,
+.navbar-default .navbar-nav > .disabled > a:hover,
+.navbar-default .navbar-nav > .disabled > a:focus {
+ color: #cccccc;
+ background-color: transparent;
+}
+
+.navbar-default .navbar-toggle {
+ border-color: #dddddd;
+}
+
+.navbar-default .navbar-toggle:hover,
+.navbar-default .navbar-toggle:focus {
+ background-color: #dddddd;
+}
+
+.navbar-default .navbar-toggle .icon-bar {
+ background-color: #cccccc;
+}
+
+.navbar-default .navbar-collapse,
+.navbar-default .navbar-form {
+ border-color: #e6e6e6;
+}
+
+.navbar-default .navbar-nav > .dropdown > a:hover .caret,
+.navbar-default .navbar-nav > .dropdown > a:focus .caret {
+ border-top-color: #333333;
+ border-bottom-color: #333333;
+}
+
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .open > a:hover,
+.navbar-default .navbar-nav > .open > a:focus {
+ color: #555555;
+ background-color: #e7e7e7;
+}
+
+.navbar-default .navbar-nav > .open > a .caret,
+.navbar-default .navbar-nav > .open > a:hover .caret,
+.navbar-default .navbar-nav > .open > a:focus .caret {
+ border-top-color: #555555;
+ border-bottom-color: #555555;
+}
+
+.navbar-default .navbar-nav > .dropdown > a .caret {
+ border-top-color: #777777;
+ border-bottom-color: #777777;
+}
+
+@media (max-width: 767px) {
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+ color: #777777;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: #333333;
+ background-color: transparent;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #555555;
+ background-color: #e7e7e7;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+ color: #cccccc;
+ background-color: transparent;
+ }
+}
+
+.navbar-default .navbar-link {
+ color: #777777;
+}
+
+.navbar-default .navbar-link:hover {
+ color: #333333;
+}
+
+.navbar-inverse {
+ background-color: #222222;
+ border-color: #080808;
+}
+
+.navbar-inverse .navbar-brand {
+ color: #999999;
+}
+
+.navbar-inverse .navbar-brand:hover,
+.navbar-inverse .navbar-brand:focus {
+ color: #ffffff;
+ background-color: transparent;
+}
+
+.navbar-inverse .navbar-text {
+ color: #999999;
+}
+
+.navbar-inverse .navbar-nav > li > a {
+ color: #999999;
+}
+
+.navbar-inverse .navbar-nav > li > a:hover,
+.navbar-inverse .navbar-nav > li > a:focus {
+ color: #ffffff;
+ background-color: transparent;
+}
+
+.navbar-inverse .navbar-nav > .active > a,
+.navbar-inverse .navbar-nav > .active > a:hover,
+.navbar-inverse .navbar-nav > .active > a:focus {
+ color: #ffffff;
+ background-color: #080808;
+}
+
+.navbar-inverse .navbar-nav > .disabled > a,
+.navbar-inverse .navbar-nav > .disabled > a:hover,
+.navbar-inverse .navbar-nav > .disabled > a:focus {
+ color: #444444;
+ background-color: transparent;
+}
+
+.navbar-inverse .navbar-toggle {
+ border-color: #333333;
+}
+
+.navbar-inverse .navbar-toggle:hover,
+.navbar-inverse .navbar-toggle:focus {
+ background-color: #333333;
+}
+
+.navbar-inverse .navbar-toggle .icon-bar {
+ background-color: #ffffff;
+}
+
+.navbar-inverse .navbar-collapse,
+.navbar-inverse .navbar-form {
+ border-color: #101010;
+}
+
+.navbar-inverse .navbar-nav > .open > a,
+.navbar-inverse .navbar-nav > .open > a:hover,
+.navbar-inverse .navbar-nav > .open > a:focus {
+ color: #ffffff;
+ background-color: #080808;
+}
+
+.navbar-inverse .navbar-nav > .dropdown > a:hover .caret {
+ border-top-color: #ffffff;
+ border-bottom-color: #ffffff;
+}
+
+.navbar-inverse .navbar-nav > .dropdown > a .caret {
+ border-top-color: #999999;
+ border-bottom-color: #999999;
+}
+
+.navbar-inverse .navbar-nav > .open > a .caret,
+.navbar-inverse .navbar-nav > .open > a:hover .caret,
+.navbar-inverse .navbar-nav > .open > a:focus .caret {
+ border-top-color: #ffffff;
+ border-bottom-color: #ffffff;
+}
+
+@media (max-width: 767px) {
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
+ border-color: #080808;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
+ color: #999999;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: #ffffff;
+ background-color: transparent;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #ffffff;
+ background-color: #080808;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+ color: #444444;
+ background-color: transparent;
+ }
+}
+
+.navbar-inverse .navbar-link {
+ color: #999999;
+}
+
+.navbar-inverse .navbar-link:hover {
+ color: #ffffff;
+}
+
+.breadcrumb {
+ padding: 8px 15px;
+ margin-bottom: 20px;
+ list-style: none;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+}
+
+.breadcrumb > li {
+ display: inline-block;
+}
+
+.breadcrumb > li + li:before {
+ padding: 0 5px;
+ color: #cccccc;
+ content: "/\00a0";
+}
+
+.breadcrumb > .active {
+ color: #999999;
+}
+
+.pagination {
+ display: inline-block;
+ padding-left: 0;
+ margin: 20px 0;
+ border-radius: 4px;
+}
+
+.pagination > li {
+ display: inline;
+}
+
+.pagination > li > a,
+.pagination > li > span {
+ position: relative;
+ float: left;
+ padding: 6px 12px;
+ margin-left: -1px;
+ line-height: 1.428571429;
+ text-decoration: none;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+}
+
+.pagination > li:first-child > a,
+.pagination > li:first-child > span {
+ margin-left: 0;
+ border-bottom-left-radius: 4px;
+ border-top-left-radius: 4px;
+}
+
+.pagination > li:last-child > a,
+.pagination > li:last-child > span {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+}
+
+.pagination > li > a:hover,
+.pagination > li > span:hover,
+.pagination > li > a:focus,
+.pagination > li > span:focus {
+ background-color: #eeeeee;
+}
+
+.pagination > .active > a,
+.pagination > .active > span,
+.pagination > .active > a:hover,
+.pagination > .active > span:hover,
+.pagination > .active > a:focus,
+.pagination > .active > span:focus {
+ z-index: 2;
+ color: #ffffff;
+ cursor: default;
+ background-color: #428bca;
+ border-color: #428bca;
+}
+
+.pagination > .disabled > span,
+.pagination > .disabled > a,
+.pagination > .disabled > a:hover,
+.pagination > .disabled > a:focus {
+ color: #999999;
+ cursor: not-allowed;
+ background-color: #ffffff;
+ border-color: #dddddd;
+}
+
+.pagination-lg > li > a,
+.pagination-lg > li > span {
+ padding: 10px 16px;
+ font-size: 18px;
+}
+
+.pagination-lg > li:first-child > a,
+.pagination-lg > li:first-child > span {
+ border-bottom-left-radius: 6px;
+ border-top-left-radius: 6px;
+}
+
+.pagination-lg > li:last-child > a,
+.pagination-lg > li:last-child > span {
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+}
+
+.pagination-sm > li > a,
+.pagination-sm > li > span {
+ padding: 5px 10px;
+ font-size: 12px;
+}
+
+.pagination-sm > li:first-child > a,
+.pagination-sm > li:first-child > span {
+ border-bottom-left-radius: 3px;
+ border-top-left-radius: 3px;
+}
+
+.pagination-sm > li:last-child > a,
+.pagination-sm > li:last-child > span {
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+}
+
+.pager {
+ padding-left: 0;
+ margin: 20px 0;
+ text-align: center;
+ list-style: none;
+}
+
+.pager:before,
+.pager:after {
+ display: table;
+ content: " ";
+}
+
+.pager:after {
+ clear: both;
+}
+
+.pager:before,
+.pager:after {
+ display: table;
+ content: " ";
+}
+
+.pager:after {
+ clear: both;
+}
+
+.pager li {
+ display: inline;
+}
+
+.pager li > a,
+.pager li > span {
+ display: inline-block;
+ padding: 5px 14px;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-radius: 15px;
+}
+
+.pager li > a:hover,
+.pager li > a:focus {
+ text-decoration: none;
+ background-color: #eeeeee;
+}
+
+.pager .next > a,
+.pager .next > span {
+ float: right;
+}
+
+.pager .previous > a,
+.pager .previous > span {
+ float: left;
+}
+
+.pager .disabled > a,
+.pager .disabled > a:hover,
+.pager .disabled > a:focus,
+.pager .disabled > span {
+ color: #999999;
+ cursor: not-allowed;
+ background-color: #ffffff;
+}
+
+.label {
+ display: inline;
+ padding: .2em .6em .3em;
+ font-size: 75%;
+ font-weight: bold;
+ line-height: 1;
+ color: #ffffff;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ border-radius: .25em;
+}
+
+.label[href]:hover,
+.label[href]:focus {
+ color: #ffffff;
+ text-decoration: none;
+ cursor: pointer;
+}
+
+.label:empty {
+ display: none;
+}
+
+.label-default {
+ background-color: #999999;
+}
+
+.label-default[href]:hover,
+.label-default[href]:focus {
+ background-color: #808080;
+}
+
+.label-primary {
+ background-color: #428bca;
+}
+
+.label-primary[href]:hover,
+.label-primary[href]:focus {
+ background-color: #3071a9;
+}
+
+.label-success {
+ background-color: #5cb85c;
+}
+
+.label-success[href]:hover,
+.label-success[href]:focus {
+ background-color: #449d44;
+}
+
+.label-info {
+ background-color: #5bc0de;
+}
+
+.label-info[href]:hover,
+.label-info[href]:focus {
+ background-color: #31b0d5;
+}
+
+.label-warning {
+ background-color: #f0ad4e;
+}
+
+.label-warning[href]:hover,
+.label-warning[href]:focus {
+ background-color: #ec971f;
+}
+
+.label-danger {
+ background-color: #d9534f;
+}
+
+.label-danger[href]:hover,
+.label-danger[href]:focus {
+ background-color: #c9302c;
+}
+
+.badge {
+ display: inline-block;
+ min-width: 10px;
+ padding: 3px 7px;
+ font-size: 12px;
+ font-weight: bold;
+ line-height: 1;
+ color: #ffffff;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ background-color: #999999;
+ border-radius: 10px;
+}
+
+.badge:empty {
+ display: none;
+}
+
+a.badge:hover,
+a.badge:focus {
+ color: #ffffff;
+ text-decoration: none;
+ cursor: pointer;
+}
+
+.btn .badge {
+ position: relative;
+ top: -1px;
+}
+
+a.list-group-item.active > .badge,
+.nav-pills > .active > a > .badge {
+ color: #428bca;
+ background-color: #ffffff;
+}
+
+.nav-pills > li > a > .badge {
+ margin-left: 3px;
+}
+
+.jumbotron {
+ padding: 30px;
+ margin-bottom: 30px;
+ font-size: 21px;
+ font-weight: 200;
+ line-height: 2.1428571435;
+ color: inherit;
+ background-color: #eeeeee;
+}
+
+.jumbotron h1 {
+ line-height: 1;
+ color: inherit;
+}
+
+.jumbotron p {
+ line-height: 1.4;
+}
+
+.container .jumbotron {
+ border-radius: 6px;
+}
+
+@media screen and (min-width: 768px) {
+ .jumbotron {
+ padding-top: 48px;
+ padding-bottom: 48px;
+ }
+ .container .jumbotron {
+ padding-right: 60px;
+ padding-left: 60px;
+ }
+ .jumbotron h1 {
+ font-size: 63px;
+ }
+}
+
+.thumbnail {
+ display: inline-block;
+ display: block;
+ height: auto;
+ max-width: 100%;
+ padding: 4px;
+ line-height: 1.428571429;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+ border-radius: 4px;
+ -webkit-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+}
+
+.thumbnail > img {
+ display: block;
+ height: auto;
+ max-width: 100%;
+}
+
+a.thumbnail:hover,
+a.thumbnail:focus {
+ border-color: #428bca;
+}
+
+.thumbnail > img {
+ margin-right: auto;
+ margin-left: auto;
+}
+
+.thumbnail .caption {
+ padding: 9px;
+ color: #333333;
+}
+
+.alert {
+ padding: 15px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+
+.alert h4 {
+ margin-top: 0;
+ color: inherit;
+}
+
+.alert .alert-link {
+ font-weight: bold;
+}
+
+.alert > p,
+.alert > ul {
+ margin-bottom: 0;
+}
+
+.alert > p + p {
+ margin-top: 5px;
+}
+
+.alert-dismissable {
+ padding-right: 35px;
+}
+
+.alert-dismissable .close {
+ position: relative;
+ top: -2px;
+ right: -21px;
+ color: inherit;
+}
+
+.alert-success {
+ color: #468847;
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+
+.alert-success hr {
+ border-top-color: #c9e2b3;
+}
+
+.alert-success .alert-link {
+ color: #356635;
+}
+
+.alert-info {
+ color: #3a87ad;
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+
+.alert-info hr {
+ border-top-color: #a6e1ec;
+}
+
+.alert-info .alert-link {
+ color: #2d6987;
+}
+
+.alert-warning {
+ color: #c09853;
+ background-color: #fcf8e3;
+ border-color: #fbeed5;
+}
+
+.alert-warning hr {
+ border-top-color: #f8e5be;
+}
+
+.alert-warning .alert-link {
+ color: #a47e3c;
+}
+
+.alert-danger {
+ color: #b94a48;
+ background-color: #f2dede;
+ border-color: #eed3d7;
+}
+
+.alert-danger hr {
+ border-top-color: #e6c1c7;
+}
+
+.alert-danger .alert-link {
+ color: #953b39;
+}
+
+@-webkit-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+
+@-moz-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+
+@-o-keyframes progress-bar-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 40px 0;
+ }
+}
+
+@keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+
+.progress {
+ height: 20px;
+ margin-bottom: 20px;
+ overflow: hidden;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+}
+
+.progress-bar {
+ float: left;
+ width: 0;
+ height: 100%;
+ font-size: 12px;
+ color: #ffffff;
+ text-align: center;
+ background-color: #428bca;
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+ -webkit-transition: width 0.6s ease;
+ transition: width 0.6s ease;
+}
+
+.progress-striped .progress-bar {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-size: 40px 40px;
+}
+
+.progress.active .progress-bar {
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
+ -moz-animation: progress-bar-stripes 2s linear infinite;
+ -ms-animation: progress-bar-stripes 2s linear infinite;
+ -o-animation: progress-bar-stripes 2s linear infinite;
+ animation: progress-bar-stripes 2s linear infinite;
+}
+
+.progress-bar-success {
+ background-color: #5cb85c;
+}
+
+.progress-striped .progress-bar-success {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.progress-bar-info {
+ background-color: #5bc0de;
+}
+
+.progress-striped .progress-bar-info {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.progress-bar-warning {
+ background-color: #f0ad4e;
+}
+
+.progress-striped .progress-bar-warning {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.progress-bar-danger {
+ background-color: #d9534f;
+}
+
+.progress-striped .progress-bar-danger {
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.media,
+.media-body {
+ overflow: hidden;
+ zoom: 1;
+}
+
+.media,
+.media .media {
+ margin-top: 15px;
+}
+
+.media:first-child {
+ margin-top: 0;
+}
+
+.media-object {
+ display: block;
+}
+
+.media-heading {
+ margin: 0 0 5px;
+}
+
+.media > .pull-left {
+ margin-right: 10px;
+}
+
+.media > .pull-right {
+ margin-left: 10px;
+}
+
+.media-list {
+ padding-left: 0;
+ list-style: none;
+}
+
+.list-group {
+ padding-left: 0;
+ margin-bottom: 20px;
+}
+
+.list-group-item {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+ margin-bottom: -1px;
+ background-color: #ffffff;
+ border: 1px solid #dddddd;
+}
+
+.list-group-item:first-child {
+ border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+}
+
+.list-group-item:last-child {
+ margin-bottom: 0;
+ border-bottom-right-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+
+.list-group-item > .badge {
+ float: right;
+}
+
+.list-group-item > .badge + .badge {
+ margin-right: 5px;
+}
+
+a.list-group-item {
+ color: #555555;
+}
+
+a.list-group-item .list-group-item-heading {
+ color: #333333;
+}
+
+a.list-group-item:hover,
+a.list-group-item:focus {
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+
+.list-group-item.active,
+.list-group-item.active:hover,
+.list-group-item.active:focus {
+ z-index: 2;
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #428bca;
+}
+
+.list-group-item.active .list-group-item-heading,
+.list-group-item.active:hover .list-group-item-heading,
+.list-group-item.active:focus .list-group-item-heading {
+ color: inherit;
+}
+
+.list-group-item.active .list-group-item-text,
+.list-group-item.active:hover .list-group-item-text,
+.list-group-item.active:focus .list-group-item-text {
+ color: #e1edf7;
+}
+
+.list-group-item-heading {
+ margin-top: 0;
+ margin-bottom: 5px;
+}
+
+.list-group-item-text {
+ margin-bottom: 0;
+ line-height: 1.3;
+}
+
+.panel {
+ margin-bottom: 20px;
+ background-color: #ffffff;
+ border: 1px solid transparent;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+
+.panel-body {
+ padding: 15px;
+}
+
+.panel-body:before,
+.panel-body:after {
+ display: table;
+ content: " ";
+}
+
+.panel-body:after {
+ clear: both;
+}
+
+.panel-body:before,
+.panel-body:after {
+ display: table;
+ content: " ";
+}
+
+.panel-body:after {
+ clear: both;
+}
+
+.panel > .list-group {
+ margin-bottom: 0;
+}
+
+.panel > .list-group .list-group-item {
+ border-width: 1px 0;
+}
+
+.panel > .list-group .list-group-item:first-child {
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+}
+
+.panel > .list-group .list-group-item:last-child {
+ border-bottom: 0;
+}
+
+.panel-heading + .list-group .list-group-item:first-child {
+ border-top-width: 0;
+}
+
+.panel > .table {
+ margin-bottom: 0;
+}
+
+.panel > .panel-body + .table {
+ border-top: 1px solid #dddddd;
+}
+
+.panel-heading {
+ padding: 10px 15px;
+ border-bottom: 1px solid transparent;
+ border-top-right-radius: 3px;
+ border-top-left-radius: 3px;
+}
+
+.panel-title {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-size: 16px;
+}
+
+.panel-title > a {
+ color: inherit;
+}
+
+.panel-footer {
+ padding: 10px 15px;
+ background-color: #f5f5f5;
+ border-top: 1px solid #dddddd;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+
+.panel-group .panel {
+ margin-bottom: 0;
+ overflow: hidden;
+ border-radius: 4px;
+}
+
+.panel-group .panel + .panel {
+ margin-top: 5px;
+}
+
+.panel-group .panel-heading {
+ border-bottom: 0;
+}
+
+.panel-group .panel-heading + .panel-collapse .panel-body {
+ border-top: 1px solid #dddddd;
+}
+
+.panel-group .panel-footer {
+ border-top: 0;
+}
+
+.panel-group .panel-footer + .panel-collapse .panel-body {
+ border-bottom: 1px solid #dddddd;
+}
+
+.panel-default {
+ border-color: #dddddd;
+}
+
+.panel-default > .panel-heading {
+ color: #333333;
+ background-color: #f5f5f5;
+ border-color: #dddddd;
+}
+
+.panel-default > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #dddddd;
+}
+
+.panel-default > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #dddddd;
+}
+
+.panel-primary {
+ border-color: #428bca;
+}
+
+.panel-primary > .panel-heading {
+ color: #ffffff;
+ background-color: #428bca;
+ border-color: #428bca;
+}
+
+.panel-primary > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #428bca;
+}
+
+.panel-primary > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #428bca;
+}
+
+.panel-success {
+ border-color: #d6e9c6;
+}
+
+.panel-success > .panel-heading {
+ color: #468847;
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+
+.panel-success > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #d6e9c6;
+}
+
+.panel-success > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #d6e9c6;
+}
+
+.panel-warning {
+ border-color: #fbeed5;
+}
+
+.panel-warning > .panel-heading {
+ color: #c09853;
+ background-color: #fcf8e3;
+ border-color: #fbeed5;
+}
+
+.panel-warning > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #fbeed5;
+}
+
+.panel-warning > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #fbeed5;
+}
+
+.panel-danger {
+ border-color: #eed3d7;
+}
+
+.panel-danger > .panel-heading {
+ color: #b94a48;
+ background-color: #f2dede;
+ border-color: #eed3d7;
+}
+
+.panel-danger > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #eed3d7;
+}
+
+.panel-danger > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #eed3d7;
+}
+
+.panel-info {
+ border-color: #bce8f1;
+}
+
+.panel-info > .panel-heading {
+ color: #3a87ad;
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+
+.panel-info > .panel-heading + .panel-collapse .panel-body {
+ border-top-color: #bce8f1;
+}
+
+.panel-info > .panel-footer + .panel-collapse .panel-body {
+ border-bottom-color: #bce8f1;
+}
+
+.well {
+ min-height: 20px;
+ padding: 19px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border: 1px solid #e3e3e3;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+
+.well blockquote {
+ border-color: #ddd;
+ border-color: rgba(0, 0, 0, 0.15);
+}
+
+.well-lg {
+ padding: 24px;
+ border-radius: 6px;
+}
+
+.well-sm {
+ padding: 9px;
+ border-radius: 3px;
+}
+
+.close {
+ float: right;
+ font-size: 21px;
+ font-weight: bold;
+ line-height: 1;
+ color: #000000;
+ text-shadow: 0 1px 0 #ffffff;
+ opacity: 0.2;
+ filter: alpha(opacity=20);
+}
+
+.close:hover,
+.close:focus {
+ color: #000000;
+ text-decoration: none;
+ cursor: pointer;
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+}
+
+button.close {
+ padding: 0;
+ cursor: pointer;
+ background: transparent;
+ border: 0;
+ -webkit-appearance: none;
+}
+
+.modal-open {
+ overflow: hidden;
+}
+
+body.modal-open,
+.modal-open .navbar-fixed-top,
+.modal-open .navbar-fixed-bottom {
+ margin-right: 15px;
+}
+
+.modal {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1040;
+ display: none;
+ overflow: auto;
+ overflow-y: scroll;
+}
+
+.modal.fade .modal-dialog {
+ -webkit-transform: translate(0, -25%);
+ -ms-transform: translate(0, -25%);
+ transform: translate(0, -25%);
+ -webkit-transition: -webkit-transform 0.3s ease-out;
+ -moz-transition: -moz-transform 0.3s ease-out;
+ -o-transition: -o-transform 0.3s ease-out;
+ transition: transform 0.3s ease-out;
+}
+
+.modal.in .modal-dialog {
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ transform: translate(0, 0);
+}
+
+.modal-dialog {
+ z-index: 1050;
+ width: auto;
+ padding: 10px;
+ margin-right: auto;
+ margin-left: auto;
+}
+
+.modal-content {
+ position: relative;
+ background-color: #ffffff;
+ border: 1px solid #999999;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ border-radius: 6px;
+ outline: none;
+ -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+ background-clip: padding-box;
+}
+
+.modal-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1030;
+ background-color: #000000;
+}
+
+.modal-backdrop.fade {
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+
+.modal-backdrop.in {
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+}
+
+.modal-header {
+ min-height: 16.428571429px;
+ padding: 15px;
+ border-bottom: 1px solid #e5e5e5;
+}
+
+.modal-header .close {
+ margin-top: -2px;
+}
+
+.modal-title {
+ margin: 0;
+ line-height: 1.428571429;
+}
+
+.modal-body {
+ position: relative;
+ padding: 20px;
+}
+
+.modal-footer {
+ padding: 19px 20px 20px;
+ margin-top: 15px;
+ text-align: right;
+ border-top: 1px solid #e5e5e5;
+}
+
+.modal-footer:before,
+.modal-footer:after {
+ display: table;
+ content: " ";
+}
+
+.modal-footer:after {
+ clear: both;
+}
+
+.modal-footer:before,
+.modal-footer:after {
+ display: table;
+ content: " ";
+}
+
+.modal-footer:after {
+ clear: both;
+}
+
+.modal-footer .btn + .btn {
+ margin-bottom: 0;
+ margin-left: 5px;
+}
+
+.modal-footer .btn-group .btn + .btn {
+ margin-left: -1px;
+}
+
+.modal-footer .btn-block + .btn-block {
+ margin-left: 0;
+}
+
+@media screen and (min-width: 768px) {
+ .modal-dialog {
+ right: auto;
+ left: 50%;
+ width: 600px;
+ padding-top: 30px;
+ padding-bottom: 30px;
+ }
+ .modal-content {
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+ }
+}
+
+.tooltip {
+ position: absolute;
+ z-index: 1030;
+ display: block;
+ font-size: 12px;
+ line-height: 1.4;
+ opacity: 0;
+ filter: alpha(opacity=0);
+ visibility: visible;
+}
+
+.tooltip.in {
+ opacity: 0.9;
+ filter: alpha(opacity=90);
+}
+
+.tooltip.top {
+ padding: 5px 0;
+ margin-top: -3px;
+}
+
+.tooltip.right {
+ padding: 0 5px;
+ margin-left: 3px;
+}
+
+.tooltip.bottom {
+ padding: 5px 0;
+ margin-top: 3px;
+}
+
+.tooltip.left {
+ padding: 0 5px;
+ margin-left: -3px;
+}
+
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 8px;
+ color: #ffffff;
+ text-align: center;
+ text-decoration: none;
+ background-color: #000000;
+ border-radius: 4px;
+}
+
+.tooltip-arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+}
+
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-top-color: #000000;
+ border-width: 5px 5px 0;
+}
+
+.tooltip.top-left .tooltip-arrow {
+ bottom: 0;
+ left: 5px;
+ border-top-color: #000000;
+ border-width: 5px 5px 0;
+}
+
+.tooltip.top-right .tooltip-arrow {
+ right: 5px;
+ bottom: 0;
+ border-top-color: #000000;
+ border-width: 5px 5px 0;
+}
+
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-right-color: #000000;
+ border-width: 5px 5px 5px 0;
+}
+
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-left-color: #000000;
+ border-width: 5px 0 5px 5px;
+}
+
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-bottom-color: #000000;
+ border-width: 0 5px 5px;
+}
+
+.tooltip.bottom-left .tooltip-arrow {
+ top: 0;
+ left: 5px;
+ border-bottom-color: #000000;
+ border-width: 0 5px 5px;
+}
+
+.tooltip.bottom-right .tooltip-arrow {
+ top: 0;
+ right: 5px;
+ border-bottom-color: #000000;
+ border-width: 0 5px 5px;
+}
+
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ max-width: 276px;
+ padding: 1px;
+ text-align: left;
+ white-space: normal;
+ background-color: #ffffff;
+ border: 1px solid #cccccc;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ border-radius: 6px;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ background-clip: padding-box;
+}
+
+.popover.top {
+ margin-top: -10px;
+}
+
+.popover.right {
+ margin-left: 10px;
+}
+
+.popover.bottom {
+ margin-top: 10px;
+}
+
+.popover.left {
+ margin-left: -10px;
+}
+
+.popover-title {
+ padding: 8px 14px;
+ margin: 0;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 18px;
+ background-color: #f7f7f7;
+ border-bottom: 1px solid #ebebeb;
+ border-radius: 5px 5px 0 0;
+}
+
+.popover-content {
+ padding: 9px 14px;
+}
+
+.popover .arrow,
+.popover .arrow:after {
+ position: absolute;
+ display: block;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+}
+
+.popover .arrow {
+ border-width: 11px;
+}
+
+.popover .arrow:after {
+ border-width: 10px;
+ content: "";
+}
+
+.popover.top .arrow {
+ bottom: -11px;
+ left: 50%;
+ margin-left: -11px;
+ border-top-color: #999999;
+ border-top-color: rgba(0, 0, 0, 0.25);
+ border-bottom-width: 0;
+}
+
+.popover.top .arrow:after {
+ bottom: 1px;
+ margin-left: -10px;
+ border-top-color: #ffffff;
+ border-bottom-width: 0;
+ content: " ";
+}
+
+.popover.right .arrow {
+ top: 50%;
+ left: -11px;
+ margin-top: -11px;
+ border-right-color: #999999;
+ border-right-color: rgba(0, 0, 0, 0.25);
+ border-left-width: 0;
+}
+
+.popover.right .arrow:after {
+ bottom: -10px;
+ left: 1px;
+ border-right-color: #ffffff;
+ border-left-width: 0;
+ content: " ";
+}
+
+.popover.bottom .arrow {
+ top: -11px;
+ left: 50%;
+ margin-left: -11px;
+ border-bottom-color: #999999;
+ border-bottom-color: rgba(0, 0, 0, 0.25);
+ border-top-width: 0;
+}
+
+.popover.bottom .arrow:after {
+ top: 1px;
+ margin-left: -10px;
+ border-bottom-color: #ffffff;
+ border-top-width: 0;
+ content: " ";
+}
+
+.popover.left .arrow {
+ top: 50%;
+ right: -11px;
+ margin-top: -11px;
+ border-left-color: #999999;
+ border-left-color: rgba(0, 0, 0, 0.25);
+ border-right-width: 0;
+}
+
+.popover.left .arrow:after {
+ right: 1px;
+ bottom: -10px;
+ border-left-color: #ffffff;
+ border-right-width: 0;
+ content: " ";
+}
+
+.carousel {
+ position: relative;
+}
+
+.carousel-inner {
+ position: relative;
+ width: 100%;
+ overflow: hidden;
+}
+
+.carousel-inner > .item {
+ position: relative;
+ display: none;
+ -webkit-transition: 0.6s ease-in-out left;
+ transition: 0.6s ease-in-out left;
+}
+
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+ display: block;
+ height: auto;
+ max-width: 100%;
+ line-height: 1;
+}
+
+.carousel-inner > .active,
+.carousel-inner > .next,
+.carousel-inner > .prev {
+ display: block;
+}
+
+.carousel-inner > .active {
+ left: 0;
+}
+
+.carousel-inner > .next,
+.carousel-inner > .prev {
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+
+.carousel-inner > .next {
+ left: 100%;
+}
+
+.carousel-inner > .prev {
+ left: -100%;
+}
+
+.carousel-inner > .next.left,
+.carousel-inner > .prev.right {
+ left: 0;
+}
+
+.carousel-inner > .active.left {
+ left: -100%;
+}
+
+.carousel-inner > .active.right {
+ left: 100%;
+}
+
+.carousel-control {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 15%;
+ font-size: 20px;
+ color: #ffffff;
+ text-align: center;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+}
+
+.carousel-control.left {
+ background-image: -webkit-gradient(linear, 0 top, 100% top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.0001)));
+ background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.5) 0), color-stop(rgba(0, 0, 0, 0.0001) 100%));
+ background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%);
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
+}
+
+.carousel-control.right {
+ right: 0;
+ left: auto;
+ background-image: -webkit-gradient(linear, 0 top, 100% top, from(rgba(0, 0, 0, 0.0001)), to(rgba(0, 0, 0, 0.5)));
+ background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.0001) 0), color-stop(rgba(0, 0, 0, 0.5) 100%));
+ background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%);
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
+}
+
+.carousel-control:hover,
+.carousel-control:focus {
+ color: #ffffff;
+ text-decoration: none;
+ opacity: 0.9;
+ filter: alpha(opacity=90);
+}
+
+.carousel-control .icon-prev,
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-left,
+.carousel-control .glyphicon-chevron-right {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ z-index: 5;
+ display: inline-block;
+}
+
+.carousel-control .icon-prev,
+.carousel-control .icon-next {
+ width: 20px;
+ height: 20px;
+ margin-top: -10px;
+ margin-left: -10px;
+ font-family: serif;
+}
+
+.carousel-control .icon-prev:before {
+ content: '\2039';
+}
+
+.carousel-control .icon-next:before {
+ content: '\203a';
+}
+
+.carousel-indicators {
+ position: absolute;
+ bottom: 10px;
+ left: 50%;
+ z-index: 15;
+ width: 60%;
+ padding-left: 0;
+ margin-left: -30%;
+ text-align: center;
+ list-style: none;
+}
+
+.carousel-indicators li {
+ display: inline-block;
+ width: 10px;
+ height: 10px;
+ margin: 1px;
+ text-indent: -999px;
+ cursor: pointer;
+ border: 1px solid #ffffff;
+ border-radius: 10px;
+}
+
+.carousel-indicators .active {
+ width: 12px;
+ height: 12px;
+ margin: 0;
+ background-color: #ffffff;
+}
+
+.carousel-caption {
+ position: absolute;
+ right: 15%;
+ bottom: 20px;
+ left: 15%;
+ z-index: 10;
+ padding-top: 20px;
+ padding-bottom: 20px;
+ color: #ffffff;
+ text-align: center;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
+}
+
+.carousel-caption .btn {
+ text-shadow: none;
+}
+
+@media screen and (min-width: 768px) {
+ .carousel-control .icon-prev,
+ .carousel-control .icon-next {
+ width: 30px;
+ height: 30px;
+ margin-top: -15px;
+ margin-left: -15px;
+ font-size: 30px;
+ }
+ .carousel-caption {
+ right: 20%;
+ left: 20%;
+ padding-bottom: 30px;
+ }
+ .carousel-indicators {
+ bottom: 20px;
+ }
+}
+
+.clearfix:before,
+.clearfix:after {
+ display: table;
+ content: " ";
+}
+
+.clearfix:after {
+ clear: both;
+}
+
+.pull-right {
+ float: right !important;
+}
+
+.pull-left {
+ float: left !important;
+}
+
+.hide {
+ display: none !important;
+}
+
+.show {
+ display: block !important;
+}
+
+.invisible {
+ visibility: hidden;
+}
+
+.text-hide {
+ font: 0/0 a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0;
+}
+
+.affix {
+ position: fixed;
+}
+
+@-ms-viewport {
+ width: device-width;
+}
+
+@media screen and (max-width: 400px) {
+ @-ms-viewport {
+ width: 320px;
+ }
+}
+
+.hidden {
+ display: none !important;
+ visibility: hidden !important;
+}
+
+.visible-xs {
+ display: none !important;
+}
+
+tr.visible-xs {
+ display: none !important;
+}
+
+th.visible-xs,
+td.visible-xs {
+ display: none !important;
+}
+
+@media (max-width: 767px) {
+ .visible-xs {
+ display: block !important;
+ }
+ tr.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-xs,
+ td.visible-xs {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-xs.visible-sm {
+ display: block !important;
+ }
+ tr.visible-xs.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-xs.visible-sm,
+ td.visible-xs.visible-sm {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-xs.visible-md {
+ display: block !important;
+ }
+ tr.visible-xs.visible-md {
+ display: table-row !important;
+ }
+ th.visible-xs.visible-md,
+ td.visible-xs.visible-md {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 1200px) {
+ .visible-xs.visible-lg {
+ display: block !important;
+ }
+ tr.visible-xs.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-xs.visible-lg,
+ td.visible-xs.visible-lg {
+ display: table-cell !important;
+ }
+}
+
+.visible-sm {
+ display: none !important;
+}
+
+tr.visible-sm {
+ display: none !important;
+}
+
+th.visible-sm,
+td.visible-sm {
+ display: none !important;
+}
+
+@media (max-width: 767px) {
+ .visible-sm.visible-xs {
+ display: block !important;
+ }
+ tr.visible-sm.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-sm.visible-xs,
+ td.visible-sm.visible-xs {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-sm {
+ display: block !important;
+ }
+ tr.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-sm,
+ td.visible-sm {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-sm.visible-md {
+ display: block !important;
+ }
+ tr.visible-sm.visible-md {
+ display: table-row !important;
+ }
+ th.visible-sm.visible-md,
+ td.visible-sm.visible-md {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 1200px) {
+ .visible-sm.visible-lg {
+ display: block !important;
+ }
+ tr.visible-sm.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-sm.visible-lg,
+ td.visible-sm.visible-lg {
+ display: table-cell !important;
+ }
+}
+
+.visible-md {
+ display: none !important;
+}
+
+tr.visible-md {
+ display: none !important;
+}
+
+th.visible-md,
+td.visible-md {
+ display: none !important;
+}
+
+@media (max-width: 767px) {
+ .visible-md.visible-xs {
+ display: block !important;
+ }
+ tr.visible-md.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-md.visible-xs,
+ td.visible-md.visible-xs {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-md.visible-sm {
+ display: block !important;
+ }
+ tr.visible-md.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-md.visible-sm,
+ td.visible-md.visible-sm {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-md {
+ display: block !important;
+ }
+ tr.visible-md {
+ display: table-row !important;
+ }
+ th.visible-md,
+ td.visible-md {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 1200px) {
+ .visible-md.visible-lg {
+ display: block !important;
+ }
+ tr.visible-md.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-md.visible-lg,
+ td.visible-md.visible-lg {
+ display: table-cell !important;
+ }
+}
+
+.visible-lg {
+ display: none !important;
+}
+
+tr.visible-lg {
+ display: none !important;
+}
+
+th.visible-lg,
+td.visible-lg {
+ display: none !important;
+}
+
+@media (max-width: 767px) {
+ .visible-lg.visible-xs {
+ display: block !important;
+ }
+ tr.visible-lg.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-lg.visible-xs,
+ td.visible-lg.visible-xs {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-lg.visible-sm {
+ display: block !important;
+ }
+ tr.visible-lg.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-lg.visible-sm,
+ td.visible-lg.visible-sm {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-lg.visible-md {
+ display: block !important;
+ }
+ tr.visible-lg.visible-md {
+ display: table-row !important;
+ }
+ th.visible-lg.visible-md,
+ td.visible-lg.visible-md {
+ display: table-cell !important;
+ }
+}
+
+@media (min-width: 1200px) {
+ .visible-lg {
+ display: block !important;
+ }
+ tr.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-lg,
+ td.visible-lg {
+ display: table-cell !important;
+ }
+}
+
+.hidden-xs {
+ display: block !important;
+}
+
+tr.hidden-xs {
+ display: table-row !important;
+}
+
+th.hidden-xs,
+td.hidden-xs {
+ display: table-cell !important;
+}
+
+@media (max-width: 767px) {
+ .hidden-xs {
+ display: none !important;
+ }
+ tr.hidden-xs {
+ display: none !important;
+ }
+ th.hidden-xs,
+ td.hidden-xs {
+ display: none !important;
+ }
+}
+
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-xs.hidden-sm {
+ display: none !important;
+ }
+ tr.hidden-xs.hidden-sm {
+ display: none !important;
+ }
+ th.hidden-xs.hidden-sm,
+ td.hidden-xs.hidden-sm {
+ display: none !important;
+ }
+}
+
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-xs.hidden-md {
+ display: none !important;
+ }
+ tr.hidden-xs.hidden-md {
+ display: none !important;
+ }
+ th.hidden-xs.hidden-md,
+ td.hidden-xs.hidden-md {
+ display: none !important;
+ }
+}
+
+@media (min-width: 1200px) {
+ .hidden-xs.hidden-lg {
+ display: none !important;
+ }
+ tr.hidden-xs.hidden-lg {
+ display: none !important;
+ }
+ th.hidden-xs.hidden-lg,
+ td.hidden-xs.hidden-lg {
+ display: none !important;
+ }
+}
+
+.hidden-sm {
+ display: block !important;
+}
+
+tr.hidden-sm {
+ display: table-row !important;
+}
+
+th.hidden-sm,
+td.hidden-sm {
+ display: table-cell !important;
+}
+
+@media (max-width: 767px) {
+ .hidden-sm.hidden-xs {
+ display: none !important;
+ }
+ tr.hidden-sm.hidden-xs {
+ display: none !important;
+ }
+ th.hidden-sm.hidden-xs,
+ td.hidden-sm.hidden-xs {
+ display: none !important;
+ }
+}
+
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-sm {
+ display: none !important;
+ }
+ tr.hidden-sm {
+ display: none !important;
+ }
+ th.hidden-sm,
+ td.hidden-sm {
+ display: none !important;
+ }
+}
+
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-sm.hidden-md {
+ display: none !important;
+ }
+ tr.hidden-sm.hidden-md {
+ display: none !important;
+ }
+ th.hidden-sm.hidden-md,
+ td.hidden-sm.hidden-md {
+ display: none !important;
+ }
+}
+
+@media (min-width: 1200px) {
+ .hidden-sm.hidden-lg {
+ display: none !important;
+ }
+ tr.hidden-sm.hidden-lg {
+ display: none !important;
+ }
+ th.hidden-sm.hidden-lg,
+ td.hidden-sm.hidden-lg {
+ display: none !important;
+ }
+}
+
+.hidden-md {
+ display: block !important;
+}
+
+tr.hidden-md {
+ display: table-row !important;
+}
+
+th.hidden-md,
+td.hidden-md {
+ display: table-cell !important;
+}
+
+@media (max-width: 767px) {
+ .hidden-md.hidden-xs {
+ display: none !important;
+ }
+ tr.hidden-md.hidden-xs {
+ display: none !important;
+ }
+ th.hidden-md.hidden-xs,
+ td.hidden-md.hidden-xs {
+ display: none !important;
+ }
+}
+
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-md.hidden-sm {
+ display: none !important;
+ }
+ tr.hidden-md.hidden-sm {
+ display: none !important;
+ }
+ th.hidden-md.hidden-sm,
+ td.hidden-md.hidden-sm {
+ display: none !important;
+ }
+}
+
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-md {
+ display: none !important;
+ }
+ tr.hidden-md {
+ display: none !important;
+ }
+ th.hidden-md,
+ td.hidden-md {
+ display: none !important;
+ }
+}
+
+@media (min-width: 1200px) {
+ .hidden-md.hidden-lg {
+ display: none !important;
+ }
+ tr.hidden-md.hidden-lg {
+ display: none !important;
+ }
+ th.hidden-md.hidden-lg,
+ td.hidden-md.hidden-lg {
+ display: none !important;
+ }
+}
+
+.hidden-lg {
+ display: block !important;
+}
+
+tr.hidden-lg {
+ display: table-row !important;
+}
+
+th.hidden-lg,
+td.hidden-lg {
+ display: table-cell !important;
+}
+
+@media (max-width: 767px) {
+ .hidden-lg.hidden-xs {
+ display: none !important;
+ }
+ tr.hidden-lg.hidden-xs {
+ display: none !important;
+ }
+ th.hidden-lg.hidden-xs,
+ td.hidden-lg.hidden-xs {
+ display: none !important;
+ }
+}
+
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-lg.hidden-sm {
+ display: none !important;
+ }
+ tr.hidden-lg.hidden-sm {
+ display: none !important;
+ }
+ th.hidden-lg.hidden-sm,
+ td.hidden-lg.hidden-sm {
+ display: none !important;
+ }
+}
+
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-lg.hidden-md {
+ display: none !important;
+ }
+ tr.hidden-lg.hidden-md {
+ display: none !important;
+ }
+ th.hidden-lg.hidden-md,
+ td.hidden-lg.hidden-md {
+ display: none !important;
+ }
+}
+
+@media (min-width: 1200px) {
+ .hidden-lg {
+ display: none !important;
+ }
+ tr.hidden-lg {
+ display: none !important;
+ }
+ th.hidden-lg,
+ td.hidden-lg {
+ display: none !important;
+ }
+}
+
+.visible-print {
+ display: none !important;
+}
+
+tr.visible-print {
+ display: none !important;
+}
+
+th.visible-print,
+td.visible-print {
+ display: none !important;
+}
+
+@media print {
+ .visible-print {
+ display: block !important;
+ }
+ tr.visible-print {
+ display: table-row !important;
+ }
+ th.visible-print,
+ td.visible-print {
+ display: table-cell !important;
+ }
+ .hidden-print {
+ display: none !important;
+ }
+ tr.hidden-print {
+ display: none !important;
+ }
+ th.hidden-print,
+ td.hidden-print {
+ display: none !important;
+ }
+}
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/bootstrap.min.css b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/bootstrap.min.css
new file mode 100644
index 00000000..1984a5b7
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/StaticFiles/Content/bootstrap.min.css
@@ -0,0 +1,20 @@
+/* NUGET: BEGIN LICENSE TEXT
+ *
+ * Microsoft grants you the right to use these script files for the sole
+ * purpose of either: (i) interacting through your browser with the Microsoft
+ * website or online service, subject to the applicable licensing or use
+ * terms; or (ii) using the files as included with a Microsoft product subject
+ * to that product's license terms. Microsoft reserves all other rights to the
+ * files not expressly granted by Microsoft, whether by implication, estoppel
+ * or otherwise. The notices and licenses below are for informational purposes only.
+ *
+ * NUGET: END LICENSE TEXT */
+/*!
+ * Bootstrap v3.0.0
+ *
+ * Copyright 2013 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world by @mdo and @fat.
+ *//*! normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}button,input,select[multiple],textarea{background-image:none}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16.099999999999998px;font-weight:200;line-height:1.4}@media(min-width:768px){.lead{font-size:21px}}small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-warning{color:#c09853}.text-danger{color:#b94a48}.text-success{color:#468847}.text-info{color:#3a87ad}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{margin-top:20px;margin-bottom:10px}h4,h5,h6{margin-top:10px;margin-bottom:10px}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}h1 small,.h1 small{font-size:24px}h2 small,.h2 small{font-size:18px}h3 small,.h3 small,h4 small,.h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-bottom:20px}dt,dd{line-height:1.428571429}dt{font-weight:bold}dd{margin-left:0}@media(min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{font-size:17.5px;font-weight:300;line-height:1.25}blockquote p:last-child{margin-bottom:0}blockquote small{display:block;line-height:1.428571429;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:1.428571429}code,pre{font-family:Monaco,Menlo,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;white-space:nowrap;background-color:#f9f2f4;border-radius:4px}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.428571429;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.row{margin-right:-15px;margin-left:-15px}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11{float:left}.col-xs-1{width:8.333333333333332%}.col-xs-2{width:16.666666666666664%}.col-xs-3{width:25%}.col-xs-4{width:33.33333333333333%}.col-xs-5{width:41.66666666666667%}.col-xs-6{width:50%}.col-xs-7{width:58.333333333333336%}.col-xs-8{width:66.66666666666666%}.col-xs-9{width:75%}.col-xs-10{width:83.33333333333334%}.col-xs-11{width:91.66666666666666%}.col-xs-12{width:100%}@media(min-width:768px){.container{max-width:750px}.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11{float:left}.col-sm-1{width:8.333333333333332%}.col-sm-2{width:16.666666666666664%}.col-sm-3{width:25%}.col-sm-4{width:33.33333333333333%}.col-sm-5{width:41.66666666666667%}.col-sm-6{width:50%}.col-sm-7{width:58.333333333333336%}.col-sm-8{width:66.66666666666666%}.col-sm-9{width:75%}.col-sm-10{width:83.33333333333334%}.col-sm-11{width:91.66666666666666%}.col-sm-12{width:100%}.col-sm-push-1{left:8.333333333333332%}.col-sm-push-2{left:16.666666666666664%}.col-sm-push-3{left:25%}.col-sm-push-4{left:33.33333333333333%}.col-sm-push-5{left:41.66666666666667%}.col-sm-push-6{left:50%}.col-sm-push-7{left:58.333333333333336%}.col-sm-push-8{left:66.66666666666666%}.col-sm-push-9{left:75%}.col-sm-push-10{left:83.33333333333334%}.col-sm-push-11{left:91.66666666666666%}.col-sm-pull-1{right:8.333333333333332%}.col-sm-pull-2{right:16.666666666666664%}.col-sm-pull-3{right:25%}.col-sm-pull-4{right:33.33333333333333%}.col-sm-pull-5{right:41.66666666666667%}.col-sm-pull-6{right:50%}.col-sm-pull-7{right:58.333333333333336%}.col-sm-pull-8{right:66.66666666666666%}.col-sm-pull-9{right:75%}.col-sm-pull-10{right:83.33333333333334%}.col-sm-pull-11{right:91.66666666666666%}.col-sm-offset-1{margin-left:8.333333333333332%}.col-sm-offset-2{margin-left:16.666666666666664%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333333333%}.col-sm-offset-5{margin-left:41.66666666666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.333333333333336%}.col-sm-offset-8{margin-left:66.66666666666666%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333333334%}.col-sm-offset-11{margin-left:91.66666666666666%}}@media(min-width:992px){.container{max-width:970px}.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11{float:left}.col-md-1{width:8.333333333333332%}.col-md-2{width:16.666666666666664%}.col-md-3{width:25%}.col-md-4{width:33.33333333333333%}.col-md-5{width:41.66666666666667%}.col-md-6{width:50%}.col-md-7{width:58.333333333333336%}.col-md-8{width:66.66666666666666%}.col-md-9{width:75%}.col-md-10{width:83.33333333333334%}.col-md-11{width:91.66666666666666%}.col-md-12{width:100%}.col-md-push-0{left:auto}.col-md-push-1{left:8.333333333333332%}.col-md-push-2{left:16.666666666666664%}.col-md-push-3{left:25%}.col-md-push-4{left:33.33333333333333%}.col-md-push-5{left:41.66666666666667%}.col-md-push-6{left:50%}.col-md-push-7{left:58.333333333333336%}.col-md-push-8{left:66.66666666666666%}.col-md-push-9{left:75%}.col-md-push-10{left:83.33333333333334%}.col-md-push-11{left:91.66666666666666%}.col-md-pull-0{right:auto}.col-md-pull-1{right:8.333333333333332%}.col-md-pull-2{right:16.666666666666664%}.col-md-pull-3{right:25%}.col-md-pull-4{right:33.33333333333333%}.col-md-pull-5{right:41.66666666666667%}.col-md-pull-6{right:50%}.col-md-pull-7{right:58.333333333333336%}.col-md-pull-8{right:66.66666666666666%}.col-md-pull-9{right:75%}.col-md-pull-10{right:83.33333333333334%}.col-md-pull-11{right:91.66666666666666%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.333333333333332%}.col-md-offset-2{margin-left:16.666666666666664%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333333333%}.col-md-offset-5{margin-left:41.66666666666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.333333333333336%}.col-md-offset-8{margin-left:66.66666666666666%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333333334%}.col-md-offset-11{margin-left:91.66666666666666%}}@media(min-width:1200px){.container{max-width:1170px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11{float:left}.col-lg-1{width:8.333333333333332%}.col-lg-2{width:16.666666666666664%}.col-lg-3{width:25%}.col-lg-4{width:33.33333333333333%}.col-lg-5{width:41.66666666666667%}.col-lg-6{width:50%}.col-lg-7{width:58.333333333333336%}.col-lg-8{width:66.66666666666666%}.col-lg-9{width:75%}.col-lg-10{width:83.33333333333334%}.col-lg-11{width:91.66666666666666%}.col-lg-12{width:100%}.col-lg-push-0{left:auto}.col-lg-push-1{left:8.333333333333332%}.col-lg-push-2{left:16.666666666666664%}.col-lg-push-3{left:25%}.col-lg-push-4{left:33.33333333333333%}.col-lg-push-5{left:41.66666666666667%}.col-lg-push-6{left:50%}.col-lg-push-7{left:58.333333333333336%}.col-lg-push-8{left:66.66666666666666%}.col-lg-push-9{left:75%}.col-lg-push-10{left:83.33333333333334%}.col-lg-push-11{left:91.66666666666666%}.col-lg-pull-0{right:auto}.col-lg-pull-1{right:8.333333333333332%}.col-lg-pull-2{right:16.666666666666664%}.col-lg-pull-3{right:25%}.col-lg-pull-4{right:33.33333333333333%}.col-lg-pull-5{right:41.66666666666667%}.col-lg-pull-6{right:50%}.col-lg-pull-7{right:58.333333333333336%}.col-lg-pull-8{right:66.66666666666666%}.col-lg-pull-9{right:75%}.col-lg-pull-10{right:83.33333333333334%}.col-lg-pull-11{right:91.66666666666666%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.333333333333332%}.col-lg-offset-2{margin-left:16.666666666666664%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333333333%}.col-lg-offset-5{margin-left:41.66666666666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.333333333333336%}.col-lg-offset-8{margin-left:66.66666666666666%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333333334%}.col-lg-offset-11{margin-left:91.66666666666666%}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table thead>tr>th,.table tbody>tr>th,.table tfoot>tr>th,.table thead>tr>td,.table tbody>tr>td,.table tfoot>tr>td{padding:8px;line-height:1.428571429;vertical-align:top;border-top:1px solid #ddd}.table thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table caption+thead tr:first-child th,.table colgroup+thead tr:first-child th,.table thead:first-child tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed thead>tr>th,.table-condensed tbody>tr>th,.table-condensed tfoot>tr>th,.table-condensed thead>tr>td,.table-condensed tbody>tr>td,.table-condensed tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*="col-"]{display:table-column;float:none}table td[class*="col-"],table th[class*="col-"]{display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8;border-color:#d6e9c6}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td{background-color:#d0e9c6;border-color:#c9e2b3}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede;border-color:#eed3d7}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td{background-color:#ebcccc;border-color:#e6c1c7}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3;border-color:#fbeed5}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td{background-color:#faf2cc;border-color:#f8e5be}@media(max-width:768px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:scroll;overflow-y:hidden;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0;background-color:#fff}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>thead>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>thead>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}select[multiple],select[size]{height:auto}select optgroup{font-family:inherit;font-size:inherit;font-style:inherit}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{height:auto}.form-control:-moz-placeholder{color:#999}.form-control::-moz-placeholder{color:#999}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle;background-color:#fff;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee}textarea.form-control{height:auto}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;padding-left:20px;margin-top:10px;margin-bottom:10px;vertical-align:middle}.radio label,.checkbox label{display:inline;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:normal;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm{height:auto}.input-lg{height:45px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:45px;line-height:45px}textarea.input-lg{height:auto}.has-warning .help-block,.has-warning .control-label{color:#c09853}.has-warning .form-control{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.has-warning .input-group-addon{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.has-error .help-block,.has-error .control-label{color:#b94a48}.has-error .form-control{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.has-error .input-group-addon{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.has-success .help-block,.has-success .control-label{color:#468847}.has-success .form-control{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.has-success .input-group-addon{color:#468847;background-color:#dff0d8;border-color:#468847}.form-control-static{padding-top:7px;margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media(min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block}.form-inline .radio,.form-inline .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:none;margin-left:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}@media(min-width:768px){.form-horizontal .control-label{text-align:right}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-link{font-weight:normal;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:normal;line-height:1}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-print:before{content:"\e045"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-briefcase:before{content:"\1f4bc"}.glyphicon-calendar:before{content:"\1f4c5"}.glyphicon-pushpin:before{content:"\1f4cc"}.glyphicon-paperclip:before{content:"\1f4ce"}.glyphicon-camera:before{content:"\1f4f7"}.glyphicon-lock:before{content:"\1f512"}.glyphicon-bell:before{content:"\1f514"}.glyphicon-bookmark:before{content:"\1f516"}.glyphicon-fire:before{content:"\1f525"}.glyphicon-wrench:before{content:"\1f527"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid #000;border-right:4px solid transparent;border-bottom:0 dotted;border-left:4px solid transparent;content:""}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.428571429;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#fff;text-decoration:none;background-color:#428bca}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.428571429;color:#999}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0 dotted;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media(min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}}.btn-default .caret{border-top-color:#333}.btn-primary .caret,.btn-success .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret{border-top-color:#fff}.dropup .btn-default .caret{border-bottom-color:#333}.dropup .btn-primary .caret,.dropup .btn-success .caret,.dropup .btn-warning .caret,.dropup .btn-danger .caret,.dropup .btn-info .caret{border-bottom-color:#fff}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar .btn-group{float:left}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group-xs>.btn{padding:5px 10px;padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:4px;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child>.btn:last-child,.btn-group-vertical>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;border-collapse:separate;table-layout:fixed}.btn-group-justified .btn{display:table-cell;float:none;width:1%}[data-toggle="buttons"]>.btn>input[type="radio"],[data-toggle="buttons"]>.btn>input[type="checkbox"]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group.col{float:none;padding-right:0;padding-left:0}.input-group .form-control{width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:45px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:45px;line-height:45px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:normal;line-height:1;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-4px}.input-group-btn>.btn:hover,.input-group-btn>.btn:active{z-index:2}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.428571429;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center}@media(min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}}.nav-tabs.nav-justified>li>a{margin-right:0;border-bottom:1px solid #ddd}.nav-tabs.nav-justified>.active>a{border-bottom-color:#fff}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:5px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center}@media(min-width:768px){.nav-justified>li{display:table-cell;width:1%}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-bottom:1px solid #ddd}.nav-tabs-justified>.active>a{border-bottom-color:#fff}.tabbable:before,.tabbable:after{display:table;content:" "}.tabbable:after{clear:both}.tabbable:before,.tabbable:after{display:table;content:" "}.tabbable:after{clear:both}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.nav .caret{border-top-color:#428bca;border-bottom-color:#428bca}.nav a:hover .caret{border-top-color:#2a6496;border-bottom-color:#2a6496}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;z-index:1000;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}@media(min-width:768px){.navbar{border-radius:4px}}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}@media(min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;padding-right:15px;padding-left:15px;overflow-x:visible;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse.in{overflow-y:auto}@media(min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-collapse .navbar-nav.navbar-left:first-child{margin-left:-15px}.navbar-collapse .navbar-nav.navbar-right:last-child{margin-right:-15px}.navbar-collapse .navbar-text:last-child{margin-right:0}}.container>.navbar-header,.container>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media(min-width:768px){.container>.navbar-header,.container>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{border-width:0 0 1px}@media(min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;border-width:0 0 1px}@media(min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;z-index:1030}.navbar-fixed-bottom{bottom:0;margin-bottom:0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media(min-width:768px){.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media(min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media(max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media(min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}@media(min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}@media(min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{float:none;margin-left:0}}@media(max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media(min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-nav.pull-right>li>.dropdown-menu,.navbar-nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-text{float:left;margin-top:15px;margin-bottom:15px}@media(min-width:768px){.navbar-text{margin-right:15px;margin-left:15px}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#ccc}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e6e6e6}.navbar-default .navbar-nav>.dropdown>a:hover .caret,.navbar-default .navbar-nav>.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.open>a .caret,.navbar-default .navbar-nav>.open>a:hover .caret,.navbar-default .navbar-nav>.open>a:focus .caret{border-top-color:#555;border-bottom-color:#555}.navbar-default .navbar-nav>.dropdown>a .caret{border-top-color:#777;border-bottom-color:#777}@media(max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.dropdown>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-nav>.dropdown>a .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .navbar-nav>.open>a .caret,.navbar-inverse .navbar-nav>.open>a:hover .caret,.navbar-inverse .navbar-nav>.open>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}@media(max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.428571429;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{background-color:#eee}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:#808080}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#999;border-radius:10px}.badge:empty{display:none}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.btn .badge{position:relative;top:-1px}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;font-size:21px;font-weight:200;line-height:2.1428571435;color:inherit;background-color:#eee}.jumbotron h1{line-height:1;color:inherit}.jumbotron p{line-height:1.4}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.thumbnail{display:inline-block;display:block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img{display:block;height:auto;max-width:100%}a.thumbnail:hover,a.thumbnail:focus{border-color:#428bca}.thumbnail>img{margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#356635}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#2d6987}.alert-warning{color:#c09853;background-color:#fcf8e3;border-color:#fbeed5}.alert-warning hr{border-top-color:#f8e5be}.alert-warning .alert-link{color:#a47e3c}.alert-danger{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger hr{border-top-color:#e6c1c7}.alert-danger .alert-link{color:#953b39}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0}.panel>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel>.list-group .list-group-item:last-child{border-bottom:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table{margin-bottom:0}.panel>.panel-body+.table{border-top:1px solid #ddd}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-group .panel{margin-bottom:0;overflow:hidden;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-warning{border-color:#fbeed5}.panel-warning>.panel-heading{color:#c09853;background-color:#fcf8e3;border-color:#fbeed5}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#fbeed5}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#fbeed5}.panel-danger{border-color:#eed3d7}.panel-danger>.panel-heading{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#eed3d7}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#eed3d7}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}body.modal-open,.modal-open .navbar-fixed-top,.modal-open .navbar-fixed-bottom{margin-right:15px}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;overflow:auto;overflow-y:scroll}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{z-index:1050;width:auto;padding:10px;margin-right:auto;margin-left:auto}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);background-clip:padding-box}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1030;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{min-height:16.428571429px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.428571429}.modal-body{position:relative;padding:20px}.modal-footer{padding:19px 20px 20px;margin-top:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media screen and (min-width:768px){.modal-dialog{right:auto;left:50%;width:600px;padding-top:30px;padding-bottom:30px}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}}.tooltip{position:absolute;z-index:1030;display:block;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-bottom-color:#000;border-width:0 5px 5px}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0;content:" "}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0;content:" "}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0;content:" "}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0;content:" "}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;height:auto;max-width:100%;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);opacity:.5;filter:alpha(opacity=50)}.carousel-control.left{background-image:-webkit-gradient(linear,0 top,100% top,from(rgba(0,0,0,0.5)),to(rgba(0,0,0,0.0001)));background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.5) 0),color-stop(rgba(0,0,0,0.0001) 100%));background-image:-moz-linear-gradient(left,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000',endColorstr='#00000000',GradientType=1)}.carousel-control.right{right:0;left:auto;background-image:-webkit-gradient(linear,0 top,100% top,from(rgba(0,0,0,0.0001)),to(rgba(0,0,0,0.5)));background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.0001) 0),color-stop(rgba(0,0,0,0.5) 100%));background-image:-moz-linear-gradient(left,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000',endColorstr='#80000000',GradientType=1)}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;left:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after{display:table;content:" "}.clearfix:after{clear:both}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media screen and (max-width:400px){@-ms-viewport{width:320px}}.hidden{display:none!important;visibility:hidden!important}.visible-xs{display:none!important}tr.visible-xs{display:none!important}th.visible-xs,td.visible-xs{display:none!important}@media(max-width:767px){.visible-xs{display:block!important}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-xs.visible-sm{display:block!important}tr.visible-xs.visible-sm{display:table-row!important}th.visible-xs.visible-sm,td.visible-xs.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-xs.visible-md{display:block!important}tr.visible-xs.visible-md{display:table-row!important}th.visible-xs.visible-md,td.visible-xs.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-xs.visible-lg{display:block!important}tr.visible-xs.visible-lg{display:table-row!important}th.visible-xs.visible-lg,td.visible-xs.visible-lg{display:table-cell!important}}.visible-sm{display:none!important}tr.visible-sm{display:none!important}th.visible-sm,td.visible-sm{display:none!important}@media(max-width:767px){.visible-sm.visible-xs{display:block!important}tr.visible-sm.visible-xs{display:table-row!important}th.visible-sm.visible-xs,td.visible-sm.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-sm{display:block!important}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-sm.visible-md{display:block!important}tr.visible-sm.visible-md{display:table-row!important}th.visible-sm.visible-md,td.visible-sm.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-sm.visible-lg{display:block!important}tr.visible-sm.visible-lg{display:table-row!important}th.visible-sm.visible-lg,td.visible-sm.visible-lg{display:table-cell!important}}.visible-md{display:none!important}tr.visible-md{display:none!important}th.visible-md,td.visible-md{display:none!important}@media(max-width:767px){.visible-md.visible-xs{display:block!important}tr.visible-md.visible-xs{display:table-row!important}th.visible-md.visible-xs,td.visible-md.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-md.visible-sm{display:block!important}tr.visible-md.visible-sm{display:table-row!important}th.visible-md.visible-sm,td.visible-md.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-md{display:block!important}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-md.visible-lg{display:block!important}tr.visible-md.visible-lg{display:table-row!important}th.visible-md.visible-lg,td.visible-md.visible-lg{display:table-cell!important}}.visible-lg{display:none!important}tr.visible-lg{display:none!important}th.visible-lg,td.visible-lg{display:none!important}@media(max-width:767px){.visible-lg.visible-xs{display:block!important}tr.visible-lg.visible-xs{display:table-row!important}th.visible-lg.visible-xs,td.visible-lg.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-lg.visible-sm{display:block!important}tr.visible-lg.visible-sm{display:table-row!important}th.visible-lg.visible-sm,td.visible-lg.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-lg.visible-md{display:block!important}tr.visible-lg.visible-md{display:table-row!important}th.visible-lg.visible-md,td.visible-lg.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-lg{display:block!important}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}.hidden-xs{display:block!important}tr.hidden-xs{display:table-row!important}th.hidden-xs,td.hidden-xs{display:table-cell!important}@media(max-width:767px){.hidden-xs{display:none!important}tr.hidden-xs{display:none!important}th.hidden-xs,td.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-xs.hidden-sm{display:none!important}tr.hidden-xs.hidden-sm{display:none!important}th.hidden-xs.hidden-sm,td.hidden-xs.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-xs.hidden-md{display:none!important}tr.hidden-xs.hidden-md{display:none!important}th.hidden-xs.hidden-md,td.hidden-xs.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-xs.hidden-lg{display:none!important}tr.hidden-xs.hidden-lg{display:none!important}th.hidden-xs.hidden-lg,td.hidden-xs.hidden-lg{display:none!important}}.hidden-sm{display:block!important}tr.hidden-sm{display:table-row!important}th.hidden-sm,td.hidden-sm{display:table-cell!important}@media(max-width:767px){.hidden-sm.hidden-xs{display:none!important}tr.hidden-sm.hidden-xs{display:none!important}th.hidden-sm.hidden-xs,td.hidden-sm.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}tr.hidden-sm{display:none!important}th.hidden-sm,td.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-sm.hidden-md{display:none!important}tr.hidden-sm.hidden-md{display:none!important}th.hidden-sm.hidden-md,td.hidden-sm.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-sm.hidden-lg{display:none!important}tr.hidden-sm.hidden-lg{display:none!important}th.hidden-sm.hidden-lg,td.hidden-sm.hidden-lg{display:none!important}}.hidden-md{display:block!important}tr.hidden-md{display:table-row!important}th.hidden-md,td.hidden-md{display:table-cell!important}@media(max-width:767px){.hidden-md.hidden-xs{display:none!important}tr.hidden-md.hidden-xs{display:none!important}th.hidden-md.hidden-xs,td.hidden-md.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-md.hidden-sm{display:none!important}tr.hidden-md.hidden-sm{display:none!important}th.hidden-md.hidden-sm,td.hidden-md.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}tr.hidden-md{display:none!important}th.hidden-md,td.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-md.hidden-lg{display:none!important}tr.hidden-md.hidden-lg{display:none!important}th.hidden-md.hidden-lg,td.hidden-md.hidden-lg{display:none!important}}.hidden-lg{display:block!important}tr.hidden-lg{display:table-row!important}th.hidden-lg,td.hidden-lg{display:table-cell!important}@media(max-width:767px){.hidden-lg.hidden-xs{display:none!important}tr.hidden-lg.hidden-xs{display:none!important}th.hidden-lg.hidden-xs,td.hidden-lg.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-lg.hidden-sm{display:none!important}tr.hidden-lg.hidden-sm{display:none!important}th.hidden-lg.hidden-sm,td.hidden-lg.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-lg.hidden-md{display:none!important}tr.hidden-lg.hidden-md{display:none!important}th.hidden-lg.hidden-md,td.hidden-lg.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-lg{display:none!important}tr.hidden-lg{display:none!important}th.hidden-lg,td.hidden-lg{display:none!important}}.visible-print{display:none!important}tr.visible-print{display:none!important}th.visible-print,td.visible-print{display:none!important}@media print{.visible-print{display:block!important}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}.hidden-print{display:none!important}tr.hidden-print{display:none!important}th.hidden-print,td.hidden-print{display:none!important}}
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Create.cshtml b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Create.cshtml
new file mode 100644
index 00000000..80b99d40
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Create.cshtml
@@ -0,0 +1,145 @@
+@inherits Microsoft.Extensions.CodeGeneration.Templating.RazorTemplateBase
+@using Microsoft.Extensions.CodeGeneration.EntityFramework
+@@model @Model.ViewDataTypeName
+
+@{
+ if (Model.IsPartialView)
+ {
+ }
+ else if (Model.IsLayoutPageSelected)
+ {
+@:@@{
+ @:ViewData["Title"] = "@Model.ViewName";
+ if (!string.IsNullOrEmpty(Model.LayoutPageFile))
+ {
+ @:Layout = "@Model.LayoutPageFile";
+ }
+@:}
+@:
+@:@Model.ViewName
+@:
+ }
+ else
+ {
+@:@@{
+ @:Layout = null;
+@:}
+@:
+@:
+@:
+@:
+@:
+ @:
+ @:@Model.ViewName
+@:
+@:
+@:
+ // PushIndent(" ");
+ }
+@:
+
+
+
+@{
+ if (Model.ReferenceScriptLibraries && (Model.IsLayoutPageSelected || Model.IsPartialView))
+ {
+@:@@section Scripts {
+ @:
+ @:
+ @:
+@:}
+ }
+ // The following code closes the tag used in the case of a view using a layout page and the body and html tags in the case of a regular view page
+ if (!Model.IsPartialView && !Model.IsLayoutPageSelected)
+ {
+ if (Model.ReferenceScriptLibraries)
+ {
+@:@@section Scripts {
+ @:
+ @:
+ @:
+@:}
+ //ClearIndent();
+ }
+@:
+@:
+ }
+}
+@functions
+{
+ // Do we need to use this in conjunction with the PrimaryKey check?
+ bool IsPropertyGuid(PropertyMetadata property)
+ {
+ return string.Equals("System.Guid", property.TypeName, StringComparison.OrdinalIgnoreCase);
+ }
+}
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Delete.cshtml b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Delete.cshtml
new file mode 100644
index 00000000..5fe1ae31
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Delete.cshtml
@@ -0,0 +1,81 @@
+@inherits Microsoft.Extensions.CodeGeneration.Templating.RazorTemplateBase
+@using Microsoft.Extensions.CodeGeneration.EntityFramework
+@@model @Model.ViewDataTypeName
+
+@{
+ if (Model.IsPartialView)
+ {
+ }
+ else if (Model.IsLayoutPageSelected)
+ {
+@:@@{
+ @:ViewData["Title"] = "@Model.ViewName";
+ if (!string.IsNullOrEmpty(Model.LayoutPageFile))
+ {
+ @:Layout = "@Model.LayoutPageFile";
+ }
+@:}
+@:
+@:@Model.ViewName
+@:
+ }
+ else
+ {
+@:@@{
+ @:Layout = null;
+@:}
+@:
+@:
+@:
+@:
+@:
+ @:
+ @:@Model.ViewName
+@:
+@:
+@:
+ // PushIndent(" ");
+ }
+}
+Are you sure you want to delete this?
+
+
@Model.ViewDataTypeShortName
+
+
+@{
+ foreach (var property in Model.ModelMetadata.Properties)
+ {
+ if (property.Scaffold && !property.IsPrimaryKey && !property.IsForeignKey)
+ {
+
+ @@Html.DisplayNameFor(model => model.@GetValueExpression(property))
+
+
+ @@Html.DisplayFor(model => model.@GetValueExpression(property))
+
+ }
+ }
+ @:
+ @:
+ @:
+@:
+ if (!Model.IsPartialView && !Model.IsLayoutPageSelected)
+ {
+ //ClearIndent();
+@:
+@:
+ }
+}
+@functions
+{
+ string GetValueExpression(PropertyMetadata property)
+ {
+ //Todo: Get the association for the property and use that.
+ return property.PropertyName;
+ }
+}
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Details.cshtml b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Details.cshtml
new file mode 100644
index 00000000..a3b68fa2
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Details.cshtml
@@ -0,0 +1,95 @@
+@inherits Microsoft.Extensions.CodeGeneration.Templating.RazorTemplateBase
+@using Microsoft.Extensions.CodeGeneration.EntityFramework
+@@model @Model.ViewDataTypeName
+
+@{
+ if (Model.IsPartialView)
+ {
+ }
+ else if (Model.IsLayoutPageSelected)
+ {
+@:@@{
+ @:ViewData["Title"] = "@Model.ViewName";
+ if (!string.IsNullOrEmpty(Model.LayoutPageFile))
+ {
+ @:Layout = "@Model.LayoutPageFile";
+ }
+@:}
+@:
+@:@Model.ViewName
+@:
+ }
+ else
+ {
+@:@@{
+ @:Layout = null;
+@:}
+@:
+@:
+@:
+@:
+@:
+ @:
+ @:@Model.ViewName
+@:
+@:
+@:
+ // PushIndent(" ");
+ }
+}
+
+
@Model.ViewDataTypeShortName
+
+
+@{
+ foreach (var property in Model.ModelMetadata.Properties)
+ {
+ if (property.Scaffold && !property.IsPrimaryKey && !property.IsForeignKey)
+ {
+
+ @@Html.DisplayNameFor(model => model.@GetValueExpression(property))
+
+
+ @@Html.DisplayFor(model => model.@GetValueExpression(property))
+
+ }
+ }
+}
+
+
+@{
+ string pkName = GetPrimaryKeyName();
+ if (pkName != null)
+ {
+ @:Edit |
+ @:Back to List
+ }
+ else
+ {
+ @:@@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
+ @:Back to List
+ }
+}
+@{
+ if (!Model.IsPartialView && !Model.IsLayoutPageSelected)
+ {
+ //ClearIndent();
+@:
+@:
+ }
+}
+@functions
+{
+ string GetPrimaryKeyName()
+ {
+ return (Model.ModelMetadata.PrimaryKeys != null && Model.ModelMetadata.PrimaryKeys.Length == 1)
+ ? Model.ModelMetadata.PrimaryKeys[0].PropertyName
+ : null;
+ }
+
+ string GetValueExpression(PropertyMetadata property)
+ {
+ //Todo: Get the association for the property and use that.
+ return property.PropertyName;
+ }
+}
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Edit.cshtml b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Edit.cshtml
new file mode 100644
index 00000000..35048a37
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/Edit.cshtml
@@ -0,0 +1,149 @@
+@inherits Microsoft.Extensions.CodeGeneration.Templating.RazorTemplateBase
+@using Microsoft.Extensions.CodeGeneration.EntityFramework
+@@model @Model.ViewDataTypeName
+
+@{
+ if (Model.IsPartialView)
+ {
+ }
+ else if (Model.IsLayoutPageSelected)
+ {
+@:@@{
+ @:ViewData["Title"] = "@Model.ViewName";
+ if (!string.IsNullOrEmpty(Model.LayoutPageFile))
+ {
+ @:Layout = "@Model.LayoutPageFile";
+ }
+@:}
+@:
+@:@Model.ViewName
+@:
+ }
+ else
+ {
+@:@@{
+ @:Layout = null;
+@:}
+@:
+@:
+@:
+@:
+@:
+ @:
+ @:@Model.ViewName
+@:
+@:
+@:
+ // PushIndent(" ");
+ }
+@:
+
+
+
+@{
+ if (Model.ReferenceScriptLibraries && (Model.IsLayoutPageSelected || Model.IsPartialView))
+ {
+@:@@section Scripts {
+ @:
+ @:
+ @:
+@:}
+ }
+ // The following code closes the tag used in the case of a view using a layout page and the body and html tags in the case of a regular view page
+ if (!Model.IsPartialView && !Model.IsLayoutPageSelected)
+ {
+ if (Model.ReferenceScriptLibraries)
+ {
+@:@@section Scripts {
+ @:
+ @:
+ @:
+@:}
+ //ClearIndent();
+ }
+@:
+@:
+ }
+}
+@functions
+{
+ string GetAssociationName(PropertyMetadata property)
+ {
+ //Todo: Implement properly.
+ return property.PropertyName;
+ }
+}
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/List.cshtml b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/List.cshtml
new file mode 100644
index 00000000..75be9388
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/List.cshtml
@@ -0,0 +1,115 @@
+@inherits Microsoft.Extensions.CodeGeneration.Templating.RazorTemplateBase
+@using Microsoft.Extensions.CodeGeneration.EntityFramework
+@@model @GetEnumerableTypeExpression(Model.ViewDataTypeName)
+
+@{
+ if (Model.IsPartialView)
+ {
+ }
+ else if (Model.IsLayoutPageSelected)
+ {
+@:@@{
+ @:ViewData["Title"] = "@Model.ViewName";
+ if (!string.IsNullOrEmpty(Model.LayoutPageFile))
+ {
+ @:Layout = "@Model.LayoutPageFile";
+ }
+@:}
+@:
+@:@Model.ViewName
+@:
+ }
+ else
+ {
+@:@@{
+ @:Layout = null;
+@:}
+@:
+@:
+@:
+@:
+@:
+ @:
+ @:@Model.ViewName
+@:
+@:
+ // PushIndent(" ");
+ }
+@:
+ @:Create New
+@:
+@:
+ @:
+ IEnumerable properties = Model.ModelMetadata.Properties;
+ foreach (var property in properties)
+ {
+ if (property.Scaffold && !property.IsPrimaryKey && !property.IsForeignKey)
+ {
+
+ @@Html.DisplayNameFor(model => model.@GetValueExpression(property))
+
+ }
+ }
+ @:
+ @:
+ @:
+@:@@foreach (var item in Model) {
+ @:
+ foreach (PropertyMetadata property in properties)
+ {
+ if (property.Scaffold && !property.IsPrimaryKey && !property.IsForeignKey)
+ {
+
+ @@Html.DisplayFor(modelItem => item.@GetValueExpression(property))
+
+ }
+ }
+
+ string pkName = GetPrimaryKeyName();
+ if (pkName != null)
+ {
+ @:
+ @:Edit |
+ @:Details |
+ @:Delete
+ @:
+ }
+ else
+ {
+
+ @@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
+ @@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
+ @@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
+
+ }
+ @:
+@:}
+
+@:
+ if(!Model.IsPartialView && !Model.IsLayoutPageSelected)
+ {
+ //ClearIndent();
+@:
+@:
+ }
+}
+@functions
+{
+ string GetPrimaryKeyName()
+ {
+ return (Model.ModelMetadata.PrimaryKeys != null && Model.ModelMetadata.PrimaryKeys.Length == 1)
+ ? Model.ModelMetadata.PrimaryKeys[0].PropertyName
+ : null;
+ }
+
+ string GetValueExpression(PropertyMetadata property)
+ {
+ //Todo: Get the association for the property and use that.
+ return property.PropertyName;
+ }
+
+ string GetEnumerableTypeExpression(string typeName)
+ {
+ return "IEnumerable<" + typeName + ">";
+ }
+}
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/lib/dnx451/Microsoft.Extensions.CodeGenerators.Mvc.dll b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/lib/dnx451/Microsoft.Extensions.CodeGenerators.Mvc.dll
new file mode 100644
index 00000000..d55fa544
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/lib/dnx451/Microsoft.Extensions.CodeGenerators.Mvc.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/lib/dnxcore50/Microsoft.Extensions.CodeGenerators.Mvc.dll b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/lib/dnxcore50/Microsoft.Extensions.CodeGenerators.Mvc.dll
new file mode 100644
index 00000000..6a53cada
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/lib/dnxcore50/Microsoft.Extensions.CodeGenerators.Mvc.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.Configuration.Abstractions.nuspec b/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.Configuration.Abstractions.nuspec
new file mode 100644
index 00000000..ba7e855e
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.Configuration.Abstractions.nuspec
@@ -0,0 +1,34 @@
+
+
+
+ Microsoft.Extensions.Configuration.Abstractions
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Abstractions of key-value pair based configuration.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.Abstractions.dll b/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.Abstractions.dll
new file mode 100644
index 00000000..7d7e0e23
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.Abstractions.dll b/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.Abstractions.dll
new file mode 100644
index 00000000..84232d8c
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.Abstractions.dll b/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.Abstractions.dll
new file mode 100644
index 00000000..d98ce426
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.Abstractions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/Microsoft.Extensions.Configuration.Binder.nuspec b/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/Microsoft.Extensions.Configuration.Binder.nuspec
new file mode 100644
index 00000000..1574ab48
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/Microsoft.Extensions.Configuration.Binder.nuspec
@@ -0,0 +1,41 @@
+
+
+
+ Microsoft.Extensions.Configuration.Binder
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Functionality to bind an object to data in configuration providers.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.Binder.dll b/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.Binder.dll
new file mode 100644
index 00000000..d21e47a1
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.Binder.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.Binder.dll b/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.Binder.dll
new file mode 100644
index 00000000..75b85bb1
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.Binder.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.Binder.dll b/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.Binder.dll
new file mode 100644
index 00000000..877df562
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.Binder/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.Binder.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/Microsoft.Extensions.Configuration.CommandLine.nuspec b/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/Microsoft.Extensions.Configuration.CommandLine.nuspec
new file mode 100644
index 00000000..325a0b57
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/Microsoft.Extensions.Configuration.CommandLine.nuspec
@@ -0,0 +1,32 @@
+
+
+
+ Microsoft.Extensions.Configuration.CommandLine
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Command line configuration provider for the Configuration package.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.CommandLine.dll b/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.CommandLine.dll
new file mode 100644
index 00000000..6c108386
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.CommandLine.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.CommandLine.dll b/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.CommandLine.dll
new file mode 100644
index 00000000..f9b14db8
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.CommandLine.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.CommandLine.dll b/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.CommandLine.dll
new file mode 100644
index 00000000..37952ee7
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.CommandLine/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.CommandLine.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/Microsoft.Extensions.Configuration.EnvironmentVariables.nuspec b/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/Microsoft.Extensions.Configuration.EnvironmentVariables.nuspec
new file mode 100644
index 00000000..ed80e429
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/Microsoft.Extensions.Configuration.EnvironmentVariables.nuspec
@@ -0,0 +1,32 @@
+
+
+
+ Microsoft.Extensions.Configuration.EnvironmentVariables
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Environment variables configuration provider for the Configuration package.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.EnvironmentVariables.dll b/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.EnvironmentVariables.dll
new file mode 100644
index 00000000..0636a122
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.EnvironmentVariables.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.EnvironmentVariables.dll b/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.EnvironmentVariables.dll
new file mode 100644
index 00000000..d490fae0
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.EnvironmentVariables.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.EnvironmentVariables.dll b/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.EnvironmentVariables.dll
new file mode 100644
index 00000000..11e5cf88
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.EnvironmentVariables/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.EnvironmentVariables.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/Microsoft.Extensions.Configuration.FileExtensions.nuspec b/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/Microsoft.Extensions.Configuration.FileExtensions.nuspec
new file mode 100644
index 00000000..5e98d149
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/Microsoft.Extensions.Configuration.FileExtensions.nuspec
@@ -0,0 +1,34 @@
+
+
+
+ Microsoft.Extensions.Configuration.FileExtensions
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ File based provider configuration extensions for the Configuration package.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.FileExtensions.dll b/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.FileExtensions.dll
new file mode 100644
index 00000000..09a1d10f
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.FileExtensions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.FileExtensions.dll b/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.FileExtensions.dll
new file mode 100644
index 00000000..44db235d
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.FileExtensions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.FileExtensions.dll b/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.FileExtensions.dll
new file mode 100644
index 00000000..84eca598
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.FileExtensions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/Microsoft.Extensions.Configuration.FileProviderExtensions.nuspec b/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/Microsoft.Extensions.Configuration.FileProviderExtensions.nuspec
new file mode 100644
index 00000000..01f4f83a
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/Microsoft.Extensions.Configuration.FileProviderExtensions.nuspec
@@ -0,0 +1,38 @@
+
+
+
+ Microsoft.Extensions.Configuration.FileProviderExtensions
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Extension methods for using configuration with file providers.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.FileProviderExtensions.dll b/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.FileProviderExtensions.dll
new file mode 100644
index 00000000..3f459ef8
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.FileProviderExtensions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.FileProviderExtensions.dll b/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.FileProviderExtensions.dll
new file mode 100644
index 00000000..b76126ea
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.FileProviderExtensions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.FileProviderExtensions.dll b/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.FileProviderExtensions.dll
new file mode 100644
index 00000000..6c8b9d9e
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.FileProviderExtensions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.FileProviderExtensions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/Microsoft.Extensions.Configuration.Json.nuspec b/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/Microsoft.Extensions.Configuration.Json.nuspec
new file mode 100644
index 00000000..d8d4b5f9
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/Microsoft.Extensions.Configuration.Json.nuspec
@@ -0,0 +1,43 @@
+
+
+
+ Microsoft.Extensions.Configuration.Json
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ JSON configuration provider for the Configuration package.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.Json.dll b/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.Json.dll
new file mode 100644
index 00000000..1d7956cb
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.Json.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.Json.dll b/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.Json.dll
new file mode 100644
index 00000000..b793595f
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.Json.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.Json.dll b/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.Json.dll
new file mode 100644
index 00000000..46f51c67
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.Json.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.UserSecrets/1.0.0-rc1-final/Microsoft.Extensions.Configuration.UserSecrets.nuspec b/build/approot/packages/Microsoft.Extensions.Configuration.UserSecrets/1.0.0-rc1-final/Microsoft.Extensions.Configuration.UserSecrets.nuspec
new file mode 100644
index 00000000..9fac5637
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Configuration.UserSecrets/1.0.0-rc1-final/Microsoft.Extensions.Configuration.UserSecrets.nuspec
@@ -0,0 +1,31 @@
+
+
+
+ Microsoft.Extensions.Configuration.UserSecrets
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Configuration extensions to load user secrets.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.UserSecrets/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.UserSecrets.dll b/build/approot/packages/Microsoft.Extensions.Configuration.UserSecrets/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.UserSecrets.dll
new file mode 100644
index 00000000..94f2a15a
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.UserSecrets/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.UserSecrets.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration.UserSecrets/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.UserSecrets.dll b/build/approot/packages/Microsoft.Extensions.Configuration.UserSecrets/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.UserSecrets.dll
new file mode 100644
index 00000000..d54c9932
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration.UserSecrets/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.UserSecrets.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/Microsoft.Extensions.Configuration.nuspec b/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/Microsoft.Extensions.Configuration.nuspec
new file mode 100644
index 00000000..820d034b
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/Microsoft.Extensions.Configuration.nuspec
@@ -0,0 +1,49 @@
+
+
+
+ Microsoft.Extensions.Configuration
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Implementation of key-value pair based configuration. Includes the memory configuration provider.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.dll b/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.dll
new file mode 100644
index 00000000..f4692ff3
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Configuration.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.dll b/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.dll
new file mode 100644
index 00000000..c4d45d3b
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Configuration.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.dll b/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.dll
new file mode 100644
index 00000000..94904ca8
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Configuration/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Configuration.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.DependencyInjection.Abstractions.nuspec b/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.DependencyInjection.Abstractions.nuspec
new file mode 100644
index 00000000..18929e1d
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.DependencyInjection.Abstractions.nuspec
@@ -0,0 +1,43 @@
+
+
+
+ Microsoft.Extensions.DependencyInjection.Abstractions
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Contracts for dependency injection.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.DependencyInjection.Abstractions.dll b/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.DependencyInjection.Abstractions.dll
new file mode 100644
index 00000000..a6c5c964
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.DependencyInjection.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.DependencyInjection.Abstractions.dll b/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.DependencyInjection.Abstractions.dll
new file mode 100644
index 00000000..f1fde9e9
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.DependencyInjection.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.DependencyInjection.Abstractions.dll b/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.DependencyInjection.Abstractions.dll
new file mode 100644
index 00000000..af993840
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.DependencyInjection.Abstractions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.DependencyInjection.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/Microsoft.Extensions.DependencyInjection.nuspec b/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/Microsoft.Extensions.DependencyInjection.nuspec
new file mode 100644
index 00000000..73b130f3
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/Microsoft.Extensions.DependencyInjection.nuspec
@@ -0,0 +1,49 @@
+
+
+
+ Microsoft.Extensions.DependencyInjection
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Dependency injection abstraction and fallback implementation.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.DependencyInjection.dll b/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.DependencyInjection.dll
new file mode 100644
index 00000000..ae3afb3f
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.DependencyInjection.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.DependencyInjection.dll b/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.DependencyInjection.dll
new file mode 100644
index 00000000..14010cb8
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.DependencyInjection.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.DependencyInjection.dll b/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.DependencyInjection.dll
new file mode 100644
index 00000000..19624f06
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.DependencyInjection/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.DependencyInjection.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.FileSystemGlobbing/1.0.0-rc1-final/Microsoft.Extensions.FileSystemGlobbing.nuspec b/build/approot/packages/Microsoft.Extensions.FileSystemGlobbing/1.0.0-rc1-final/Microsoft.Extensions.FileSystemGlobbing.nuspec
new file mode 100644
index 00000000..45b105e4
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.FileSystemGlobbing/1.0.0-rc1-final/Microsoft.Extensions.FileSystemGlobbing.nuspec
@@ -0,0 +1,31 @@
+
+
+
+ Microsoft.Extensions.FileSystemGlobbing
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Implementation of ASP.NET 5 file system globbing.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.FileSystemGlobbing/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.FileSystemGlobbing.dll b/build/approot/packages/Microsoft.Extensions.FileSystemGlobbing/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.FileSystemGlobbing.dll
new file mode 100644
index 00000000..8d12d303
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.FileSystemGlobbing/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.FileSystemGlobbing.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.FileSystemGlobbing/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.FileSystemGlobbing.dll b/build/approot/packages/Microsoft.Extensions.FileSystemGlobbing/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.FileSystemGlobbing.dll
new file mode 100644
index 00000000..58790607
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.FileSystemGlobbing/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.FileSystemGlobbing.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Globalization.CultureInfoCache/1.0.0-rc1-final/Microsoft.Extensions.Globalization.CultureInfoCache.nuspec b/build/approot/packages/Microsoft.Extensions.Globalization.CultureInfoCache/1.0.0-rc1-final/Microsoft.Extensions.Globalization.CultureInfoCache.nuspec
new file mode 100644
index 00000000..f735bb5b
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Globalization.CultureInfoCache/1.0.0-rc1-final/Microsoft.Extensions.Globalization.CultureInfoCache.nuspec
@@ -0,0 +1,30 @@
+
+
+
+ Microsoft.Extensions.Globalization.CultureInfoCache
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides cached instances of CultureInfo using a generated list of known culture names for use in scenarios where unbounded CultureInfo creation is undesirable.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Globalization.CultureInfoCache/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Globalization.CultureInfoCache.dll b/build/approot/packages/Microsoft.Extensions.Globalization.CultureInfoCache/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Globalization.CultureInfoCache.dll
new file mode 100644
index 00000000..0d6ff1ac
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Globalization.CultureInfoCache/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Globalization.CultureInfoCache.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Globalization.CultureInfoCache/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Globalization.CultureInfoCache.dll b/build/approot/packages/Microsoft.Extensions.Globalization.CultureInfoCache/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Globalization.CultureInfoCache.dll
new file mode 100644
index 00000000..a9415902
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Globalization.CultureInfoCache/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Globalization.CultureInfoCache.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Localization.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.Localization.Abstractions.nuspec b/build/approot/packages/Microsoft.Extensions.Localization.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.Localization.Abstractions.nuspec
new file mode 100644
index 00000000..ed4c5f50
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Localization.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.Localization.Abstractions.nuspec
@@ -0,0 +1,31 @@
+
+
+
+ Microsoft.Extensions.Localization.Abstractions
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Abstractions of application localization services.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Localization.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Localization.Abstractions.dll b/build/approot/packages/Microsoft.Extensions.Localization.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Localization.Abstractions.dll
new file mode 100644
index 00000000..37ede9de
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Localization.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Localization.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Localization.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Localization.Abstractions.dll b/build/approot/packages/Microsoft.Extensions.Localization.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Localization.Abstractions.dll
new file mode 100644
index 00000000..f9b2aa30
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Localization.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Localization.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Localization/1.0.0-rc1-final/Microsoft.Extensions.Localization.nuspec b/build/approot/packages/Microsoft.Extensions.Localization/1.0.0-rc1-final/Microsoft.Extensions.Localization.nuspec
new file mode 100644
index 00000000..d8a5e59a
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Localization/1.0.0-rc1-final/Microsoft.Extensions.Localization.nuspec
@@ -0,0 +1,43 @@
+
+
+
+ Microsoft.Extensions.Localization
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Application localization services.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Localization/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Localization.dll b/build/approot/packages/Microsoft.Extensions.Localization/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Localization.dll
new file mode 100644
index 00000000..fa9a3ad1
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Localization/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Localization.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Localization/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Localization.dll b/build/approot/packages/Microsoft.Extensions.Localization/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Localization.dll
new file mode 100644
index 00000000..be3dbb47
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Localization/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Localization.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.Logging.Abstractions.nuspec b/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.Logging.Abstractions.nuspec
new file mode 100644
index 00000000..d3b1e1fa
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/Microsoft.Extensions.Logging.Abstractions.nuspec
@@ -0,0 +1,45 @@
+
+
+
+ Microsoft.Extensions.Logging.Abstractions
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Logging interface definitions.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.Abstractions.dll b/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.Abstractions.dll
new file mode 100644
index 00000000..4b0ddcc5
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.Abstractions.dll b/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.Abstractions.dll
new file mode 100644
index 00000000..1a6275b0
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.Abstractions.dll b/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.Abstractions.dll
new file mode 100644
index 00000000..aaf67da8
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging.Abstractions/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/Microsoft.Extensions.Logging.Console.nuspec b/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/Microsoft.Extensions.Logging.Console.nuspec
new file mode 100644
index 00000000..7ca3ef01
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/Microsoft.Extensions.Logging.Console.nuspec
@@ -0,0 +1,44 @@
+
+
+
+ Microsoft.Extensions.Logging.Console
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Console logger implementation.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.Console.dll b/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.Console.dll
new file mode 100644
index 00000000..b6779898
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.Console.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.Console.dll b/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.Console.dll
new file mode 100644
index 00000000..52881feb
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.Console.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.Console.dll b/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.Console.dll
new file mode 100644
index 00000000..a1c81b40
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging.Console/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.Console.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/Microsoft.Extensions.Logging.Debug.nuspec b/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/Microsoft.Extensions.Logging.Debug.nuspec
new file mode 100644
index 00000000..be23d2e5
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/Microsoft.Extensions.Logging.Debug.nuspec
@@ -0,0 +1,35 @@
+
+
+
+ Microsoft.Extensions.Logging.Debug
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Microsoft.Extensions.Logging.Debug
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.Debug.dll b/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.Debug.dll
new file mode 100644
index 00000000..050d2686
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.Debug.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.Debug.dll b/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.Debug.dll
new file mode 100644
index 00000000..91e1160e
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.Debug.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.Debug.dll b/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.Debug.dll
new file mode 100644
index 00000000..d49a0e91
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging.Debug/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.Debug.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/Microsoft.Extensions.Logging.nuspec b/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/Microsoft.Extensions.Logging.nuspec
new file mode 100644
index 00000000..a86d24d2
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/Microsoft.Extensions.Logging.nuspec
@@ -0,0 +1,50 @@
+
+
+
+ Microsoft.Extensions.Logging
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Logging infrastructure.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.dll b/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.dll
new file mode 100644
index 00000000..9cd47723
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Logging.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.dll b/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.dll
new file mode 100644
index 00000000..966f8e5a
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Logging.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.dll b/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.dll
new file mode 100644
index 00000000..0c4aebbe
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Logging/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Logging.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.MemoryPool/1.0.0-rc1-final/Microsoft.Extensions.MemoryPool.nuspec b/build/approot/packages/Microsoft.Extensions.MemoryPool/1.0.0-rc1-final/Microsoft.Extensions.MemoryPool.nuspec
new file mode 100644
index 00000000..df23e8a4
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.MemoryPool/1.0.0-rc1-final/Microsoft.Extensions.MemoryPool.nuspec
@@ -0,0 +1,27 @@
+
+
+
+ Microsoft.Extensions.MemoryPool
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Microsoft.Extensions.MemoryPool
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.MemoryPool/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.MemoryPool.dll b/build/approot/packages/Microsoft.Extensions.MemoryPool/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.MemoryPool.dll
new file mode 100644
index 00000000..5913d3a5
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.MemoryPool/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.MemoryPool.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.MemoryPool/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.MemoryPool.dll b/build/approot/packages/Microsoft.Extensions.MemoryPool/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.MemoryPool.dll
new file mode 100644
index 00000000..a61d595e
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.MemoryPool/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.MemoryPool.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Options/0.0.1-alpha/Microsoft.Extensions.Options.nuspec b/build/approot/packages/Microsoft.Extensions.Options/0.0.1-alpha/Microsoft.Extensions.Options.nuspec
new file mode 100644
index 00000000..7906b23a
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Options/0.0.1-alpha/Microsoft.Extensions.Options.nuspec
@@ -0,0 +1,14 @@
+
+
+
+ Microsoft.Extensions.Options
+ 0.0.1-alpha
+ true
+ aspnet
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Microsoft.Extensions.Options
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Options/0.0.1-alpha/content/Readme.txt b/build/approot/packages/Microsoft.Extensions.Options/0.0.1-alpha/content/Readme.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/Microsoft.Extensions.OptionsModel.nuspec b/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/Microsoft.Extensions.OptionsModel.nuspec
new file mode 100644
index 00000000..55a9f972
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/Microsoft.Extensions.OptionsModel.nuspec
@@ -0,0 +1,55 @@
+
+
+
+ Microsoft.Extensions.OptionsModel
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides a strongly typed way of specifying and accessing settings using dependency injection.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.OptionsModel.dll b/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.OptionsModel.dll
new file mode 100644
index 00000000..66339fc2
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.OptionsModel.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.OptionsModel.dll b/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.OptionsModel.dll
new file mode 100644
index 00000000..79d40e31
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.OptionsModel.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.OptionsModel.dll b/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.OptionsModel.dll
new file mode 100644
index 00000000..dc643975
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.OptionsModel/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.OptionsModel.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.PlatformAbstractions/1.0.0-rc1-final/Microsoft.Extensions.PlatformAbstractions.nuspec b/build/approot/packages/Microsoft.Extensions.PlatformAbstractions/1.0.0-rc1-final/Microsoft.Extensions.PlatformAbstractions.nuspec
new file mode 100644
index 00000000..fd57d062
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.PlatformAbstractions/1.0.0-rc1-final/Microsoft.Extensions.PlatformAbstractions.nuspec
@@ -0,0 +1,34 @@
+
+
+
+ Microsoft.Extensions.PlatformAbstractions
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Abstractions that unify behavior and API across .NET Framework, .NET Core and Mono
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.PlatformAbstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.PlatformAbstractions.dll b/build/approot/packages/Microsoft.Extensions.PlatformAbstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.PlatformAbstractions.dll
new file mode 100644
index 00000000..ad9a2c5b
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.PlatformAbstractions/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.PlatformAbstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.PlatformAbstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.PlatformAbstractions.dll b/build/approot/packages/Microsoft.Extensions.PlatformAbstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.PlatformAbstractions.dll
new file mode 100644
index 00000000..40527d4b
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.PlatformAbstractions/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.PlatformAbstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/Microsoft.Extensions.Primitives.nuspec b/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/Microsoft.Extensions.Primitives.nuspec
new file mode 100644
index 00000000..b4a2eaa9
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/Microsoft.Extensions.Primitives.nuspec
@@ -0,0 +1,33 @@
+
+
+
+ Microsoft.Extensions.Primitives
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ ASP.NET 5 primitives.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Primitives.dll b/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Primitives.dll
new file mode 100644
index 00000000..6190b35d
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.Primitives.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Primitives.dll b/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Primitives.dll
new file mode 100644
index 00000000..41571947
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.Primitives.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Primitives.dll b/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Primitives.dll
new file mode 100644
index 00000000..ba800cd3
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.Primitives/1.0.0-rc1-final/lib/netcore50/Microsoft.Extensions.Primitives.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.WebEncoders.Core/1.0.0-rc1-final/Microsoft.Extensions.WebEncoders.Core.nuspec b/build/approot/packages/Microsoft.Extensions.WebEncoders.Core/1.0.0-rc1-final/Microsoft.Extensions.WebEncoders.Core.nuspec
new file mode 100644
index 00000000..e96f0152
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.WebEncoders.Core/1.0.0-rc1-final/Microsoft.Extensions.WebEncoders.Core.nuspec
@@ -0,0 +1,33 @@
+
+
+
+ Microsoft.Extensions.WebEncoders.Core
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Contains core encoders for HTML, JavaScript strings, and URLs.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.WebEncoders.Core/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.WebEncoders.Core.dll b/build/approot/packages/Microsoft.Extensions.WebEncoders.Core/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.WebEncoders.Core.dll
new file mode 100644
index 00000000..bdf3e3b0
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.WebEncoders.Core/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.WebEncoders.Core.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.WebEncoders.Core/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.WebEncoders.Core.dll b/build/approot/packages/Microsoft.Extensions.WebEncoders.Core/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.WebEncoders.Core.dll
new file mode 100644
index 00000000..e7528057
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.WebEncoders.Core/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.WebEncoders.Core.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.WebEncoders/1.0.0-rc1-final/Microsoft.Extensions.WebEncoders.nuspec b/build/approot/packages/Microsoft.Extensions.WebEncoders/1.0.0-rc1-final/Microsoft.Extensions.WebEncoders.nuspec
new file mode 100644
index 00000000..401e137e
--- /dev/null
+++ b/build/approot/packages/Microsoft.Extensions.WebEncoders/1.0.0-rc1-final/Microsoft.Extensions.WebEncoders.nuspec
@@ -0,0 +1,33 @@
+
+
+
+ Microsoft.Extensions.WebEncoders
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Contains registration and configuration APIs for the core framework encoders.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Extensions.WebEncoders/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.WebEncoders.dll b/build/approot/packages/Microsoft.Extensions.WebEncoders/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.WebEncoders.dll
new file mode 100644
index 00000000..23859864
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.WebEncoders/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Extensions.WebEncoders.dll differ
diff --git a/build/approot/packages/Microsoft.Extensions.WebEncoders/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.WebEncoders.dll b/build/approot/packages/Microsoft.Extensions.WebEncoders/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.WebEncoders.dll
new file mode 100644
index 00000000..3940180b
Binary files /dev/null and b/build/approot/packages/Microsoft.Extensions.WebEncoders/1.0.0-rc1-final/lib/net451/Microsoft.Extensions.WebEncoders.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/Microsoft.Framework.Configuration.Abstractions.nuspec b/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/Microsoft.Framework.Configuration.Abstractions.nuspec
new file mode 100644
index 00000000..1d9cbfa7
--- /dev/null
+++ b/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/Microsoft.Framework.Configuration.Abstractions.nuspec
@@ -0,0 +1,37 @@
+
+
+
+ Microsoft.Framework.Configuration.Abstractions
+ 1.0.0-beta8
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Abstractions of key-value pair based configuration.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.Abstractions.dll b/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.Abstractions.dll
new file mode 100644
index 00000000..5a67139e
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.Abstractions.dll b/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.Abstractions.dll
new file mode 100644
index 00000000..829b2c7f
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.Abstractions.dll b/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.Abstractions.dll
new file mode 100644
index 00000000..005e83e0
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.Abstractions.dll b/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.Abstractions.dll
new file mode 100644
index 00000000..3c7f3539
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Abstractions/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/Microsoft.Framework.Configuration.Binder.nuspec b/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/Microsoft.Framework.Configuration.Binder.nuspec
new file mode 100644
index 00000000..099a97fb
--- /dev/null
+++ b/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/Microsoft.Framework.Configuration.Binder.nuspec
@@ -0,0 +1,48 @@
+
+
+
+ Microsoft.Framework.Configuration.Binder
+ 1.0.0-beta8
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Functionality to bind an object to data in configuration providers.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.Binder.dll b/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.Binder.dll
new file mode 100644
index 00000000..8a7c9028
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.Binder.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.Binder.dll b/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.Binder.dll
new file mode 100644
index 00000000..701cc7a1
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.Binder.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.Binder.dll b/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.Binder.dll
new file mode 100644
index 00000000..bc582260
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.Binder.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.Binder.dll b/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.Binder.dll
new file mode 100644
index 00000000..5da97404
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Binder/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.Binder.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/Microsoft.Framework.Configuration.FileExtensions.nuspec b/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/Microsoft.Framework.Configuration.FileExtensions.nuspec
new file mode 100644
index 00000000..14e82d3a
--- /dev/null
+++ b/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/Microsoft.Framework.Configuration.FileExtensions.nuspec
@@ -0,0 +1,36 @@
+
+
+
+ Microsoft.Framework.Configuration.FileExtensions
+ 1.0.0-beta8
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ File based provider configuration extensions for the Configuration package.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.FileExtensions.dll b/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.FileExtensions.dll
new file mode 100644
index 00000000..e11874d1
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.FileExtensions.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.FileExtensions.dll b/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.FileExtensions.dll
new file mode 100644
index 00000000..4399993d
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.FileExtensions.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.FileExtensions.dll b/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.FileExtensions.dll
new file mode 100644
index 00000000..87f9e794
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.FileExtensions/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.FileExtensions.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/Microsoft.Framework.Configuration.Json.nuspec b/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/Microsoft.Framework.Configuration.Json.nuspec
new file mode 100644
index 00000000..85eb6f0c
--- /dev/null
+++ b/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/Microsoft.Framework.Configuration.Json.nuspec
@@ -0,0 +1,52 @@
+
+
+
+ Microsoft.Framework.Configuration.Json
+ 1.0.0-beta8
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ JSON configuration provider for the Configuration package.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.Json.dll b/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.Json.dll
new file mode 100644
index 00000000..a6073da8
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.Json.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.Json.dll b/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.Json.dll
new file mode 100644
index 00000000..8a142786
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.Json.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.Json.dll b/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.Json.dll
new file mode 100644
index 00000000..2e7b232e
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.Json.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.Json.dll b/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.Json.dll
new file mode 100644
index 00000000..2f1ee8a3
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration.Json/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.Json.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/Microsoft.Framework.Configuration.nuspec b/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/Microsoft.Framework.Configuration.nuspec
new file mode 100644
index 00000000..24e220a7
--- /dev/null
+++ b/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/Microsoft.Framework.Configuration.nuspec
@@ -0,0 +1,55 @@
+
+
+
+ Microsoft.Framework.Configuration
+ 1.0.0-beta8
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Implementation of key-value pair based configuration. Includes the memory configuration provider.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.dll b/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.dll
new file mode 100644
index 00000000..91f236ef
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/dnx451/Microsoft.Framework.Configuration.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.dll b/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.dll
new file mode 100644
index 00000000..e4a9f3e7
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.Configuration.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.dll b/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.dll
new file mode 100644
index 00000000..df05b1ed
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/dotnet/Microsoft.Framework.Configuration.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.dll b/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.dll
new file mode 100644
index 00000000..7d094575
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Configuration/1.0.0-beta8/lib/net45/Microsoft.Framework.Configuration.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/Microsoft.Framework.ConfigurationModel.Interfaces.nuspec b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/Microsoft.Framework.ConfigurationModel.Interfaces.nuspec
new file mode 100644
index 00000000..72e95390
--- /dev/null
+++ b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/Microsoft.Framework.ConfigurationModel.Interfaces.nuspec
@@ -0,0 +1,45 @@
+
+
+
+ Microsoft.Framework.ConfigurationModel.Interfaces
+ 1.0.0-beta4
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Abstractions of key-value pair based configuration. Includes configuration sources for INI, command line, and environment variables.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/dnx451/Microsoft.Framework.ConfigurationModel.Interfaces.dll b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/dnx451/Microsoft.Framework.ConfigurationModel.Interfaces.dll
new file mode 100644
index 00000000..49c7d9be
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/dnx451/Microsoft.Framework.ConfigurationModel.Interfaces.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.ConfigurationModel.Interfaces.dll b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.ConfigurationModel.Interfaces.dll
new file mode 100644
index 00000000..cefe6a73
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.ConfigurationModel.Interfaces.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/net45/Microsoft.Framework.ConfigurationModel.Interfaces.dll b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/net45/Microsoft.Framework.ConfigurationModel.Interfaces.dll
new file mode 100644
index 00000000..4ef224c2
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/net45/Microsoft.Framework.ConfigurationModel.Interfaces.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/portable-net451+win81+wpa81/Microsoft.Framework.ConfigurationModel.Interfaces.dll b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/portable-net451+win81+wpa81/Microsoft.Framework.ConfigurationModel.Interfaces.dll
new file mode 100644
index 00000000..c2c22e64
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Interfaces/1.0.0-beta4/lib/portable-net451+win81+wpa81/Microsoft.Framework.ConfigurationModel.Interfaces.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/Microsoft.Framework.ConfigurationModel.Json.nuspec b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/Microsoft.Framework.ConfigurationModel.Json.nuspec
new file mode 100644
index 00000000..5cdae209
--- /dev/null
+++ b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/Microsoft.Framework.ConfigurationModel.Json.nuspec
@@ -0,0 +1,39 @@
+
+
+
+ Microsoft.Framework.ConfigurationModel.Json
+ 1.0.0-beta4
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ JSON configuration source for the ConfigurationModel package.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/lib/dnx451/Microsoft.Framework.ConfigurationModel.Json.dll b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/lib/dnx451/Microsoft.Framework.ConfigurationModel.Json.dll
new file mode 100644
index 00000000..59290b62
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/lib/dnx451/Microsoft.Framework.ConfigurationModel.Json.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.ConfigurationModel.Json.dll b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.ConfigurationModel.Json.dll
new file mode 100644
index 00000000..04934132
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.ConfigurationModel.Json.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/lib/net45/Microsoft.Framework.ConfigurationModel.Json.dll b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/lib/net45/Microsoft.Framework.ConfigurationModel.Json.dll
new file mode 100644
index 00000000..4ceb6893
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.ConfigurationModel.Json/1.0.0-beta4/lib/net45/Microsoft.Framework.ConfigurationModel.Json.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/Microsoft.Framework.ConfigurationModel.nuspec b/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/Microsoft.Framework.ConfigurationModel.nuspec
new file mode 100644
index 00000000..5b3f9df9
--- /dev/null
+++ b/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/Microsoft.Framework.ConfigurationModel.nuspec
@@ -0,0 +1,57 @@
+
+
+
+ Microsoft.Framework.ConfigurationModel
+ 1.0.0-beta4
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Implementation of key-value pair based configuration. Includes configuration sources for INI, command line, and environment variables.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/dnx451/Microsoft.Framework.ConfigurationModel.dll b/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/dnx451/Microsoft.Framework.ConfigurationModel.dll
new file mode 100644
index 00000000..be01ac7b
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/dnx451/Microsoft.Framework.ConfigurationModel.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.ConfigurationModel.dll b/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.ConfigurationModel.dll
new file mode 100644
index 00000000..31aea3da
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.ConfigurationModel.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/net45/Microsoft.Framework.ConfigurationModel.dll b/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/net45/Microsoft.Framework.ConfigurationModel.dll
new file mode 100644
index 00000000..a6204508
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/net45/Microsoft.Framework.ConfigurationModel.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/portable-net451+win81+wpa81/Microsoft.Framework.ConfigurationModel.dll b/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/portable-net451+win81+wpa81/Microsoft.Framework.ConfigurationModel.dll
new file mode 100644
index 00000000..e4b84506
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.ConfigurationModel/1.0.0-beta4/lib/portable-net451+win81+wpa81/Microsoft.Framework.ConfigurationModel.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/Microsoft.Framework.DependencyInjection.Abstractions.nuspec b/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/Microsoft.Framework.DependencyInjection.Abstractions.nuspec
new file mode 100644
index 00000000..60ce38d0
--- /dev/null
+++ b/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/Microsoft.Framework.DependencyInjection.Abstractions.nuspec
@@ -0,0 +1,48 @@
+
+
+
+ Microsoft.Framework.DependencyInjection.Abstractions
+ 1.0.0-beta8
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Contracts for dependency injection.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/dnx451/Microsoft.Framework.DependencyInjection.Abstractions.dll b/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/dnx451/Microsoft.Framework.DependencyInjection.Abstractions.dll
new file mode 100644
index 00000000..0450062f
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/dnx451/Microsoft.Framework.DependencyInjection.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.DependencyInjection.Abstractions.dll b/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.DependencyInjection.Abstractions.dll
new file mode 100644
index 00000000..c1a747c1
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.DependencyInjection.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/dotnet/Microsoft.Framework.DependencyInjection.Abstractions.dll b/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/dotnet/Microsoft.Framework.DependencyInjection.Abstractions.dll
new file mode 100644
index 00000000..f9dd8fe7
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/dotnet/Microsoft.Framework.DependencyInjection.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/net45/Microsoft.Framework.DependencyInjection.Abstractions.dll b/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/net45/Microsoft.Framework.DependencyInjection.Abstractions.dll
new file mode 100644
index 00000000..fff27004
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.DependencyInjection.Abstractions/1.0.0-beta8/lib/net45/Microsoft.Framework.DependencyInjection.Abstractions.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/Microsoft.Framework.DependencyInjection.nuspec b/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/Microsoft.Framework.DependencyInjection.nuspec
new file mode 100644
index 00000000..7dd624df
--- /dev/null
+++ b/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/Microsoft.Framework.DependencyInjection.nuspec
@@ -0,0 +1,56 @@
+
+
+
+ Microsoft.Framework.DependencyInjection
+ 1.0.0-beta8
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Dependency injection abstraction and fallback implementation.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/dnx451/Microsoft.Framework.DependencyInjection.dll b/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/dnx451/Microsoft.Framework.DependencyInjection.dll
new file mode 100644
index 00000000..310962f9
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/dnx451/Microsoft.Framework.DependencyInjection.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.DependencyInjection.dll b/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.DependencyInjection.dll
new file mode 100644
index 00000000..3445ff54
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/dnxcore50/Microsoft.Framework.DependencyInjection.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/dotnet/Microsoft.Framework.DependencyInjection.dll b/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/dotnet/Microsoft.Framework.DependencyInjection.dll
new file mode 100644
index 00000000..b92877fc
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/dotnet/Microsoft.Framework.DependencyInjection.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/net45/Microsoft.Framework.DependencyInjection.dll b/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/net45/Microsoft.Framework.DependencyInjection.dll
new file mode 100644
index 00000000..9e6a8d62
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.DependencyInjection/1.0.0-beta8/lib/net45/Microsoft.Framework.DependencyInjection.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Runtime.Interfaces/1.0.0-beta4/Microsoft.Framework.Runtime.Interfaces.nuspec b/build/approot/packages/Microsoft.Framework.Runtime.Interfaces/1.0.0-beta4/Microsoft.Framework.Runtime.Interfaces.nuspec
new file mode 100644
index 00000000..724791e8
--- /dev/null
+++ b/build/approot/packages/Microsoft.Framework.Runtime.Interfaces/1.0.0-beta4/Microsoft.Framework.Runtime.Interfaces.nuspec
@@ -0,0 +1,31 @@
+
+
+
+ Microsoft.Framework.Runtime.Interfaces
+ 1.0.0-beta4
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ ASP.NET 5 interfaces to take advantage of capabilities exposed by the runtime.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Framework.Runtime.Interfaces/1.0.0-beta4/lib/dnx451/Microsoft.Framework.Runtime.Interfaces.dll b/build/approot/packages/Microsoft.Framework.Runtime.Interfaces/1.0.0-beta4/lib/dnx451/Microsoft.Framework.Runtime.Interfaces.dll
new file mode 100644
index 00000000..4bbc8962
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Runtime.Interfaces/1.0.0-beta4/lib/dnx451/Microsoft.Framework.Runtime.Interfaces.dll differ
diff --git a/build/approot/packages/Microsoft.Framework.Runtime.Interfaces/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.Runtime.Interfaces.dll b/build/approot/packages/Microsoft.Framework.Runtime.Interfaces/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.Runtime.Interfaces.dll
new file mode 100644
index 00000000..10bec37d
Binary files /dev/null and b/build/approot/packages/Microsoft.Framework.Runtime.Interfaces/1.0.0-beta4/lib/dnxcore50/Microsoft.Framework.Runtime.Interfaces.dll differ
diff --git a/build/approot/packages/Microsoft.IdentityModel.Logging/1.0.0-rc1-211161024/Microsoft.IdentityModel.Logging.nuspec b/build/approot/packages/Microsoft.IdentityModel.Logging/1.0.0-rc1-211161024/Microsoft.IdentityModel.Logging.nuspec
new file mode 100644
index 00000000..e20d8d97
--- /dev/null
+++ b/build/approot/packages/Microsoft.IdentityModel.Logging/1.0.0-rc1-211161024/Microsoft.IdentityModel.Logging.nuspec
@@ -0,0 +1,28 @@
+
+
+
+ Microsoft.IdentityModel.Logging
+ 1.0.0-rc1-211161024
+ true
+ Microsoft
+ Microsoft
+ https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/master/LICENSE.txt
+ Includes Event Source based logging support.
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.IdentityModel.Logging/1.0.0-rc1-211161024/lib/dotnet5.4/Microsoft.IdentityModel.Logging.dll b/build/approot/packages/Microsoft.IdentityModel.Logging/1.0.0-rc1-211161024/lib/dotnet5.4/Microsoft.IdentityModel.Logging.dll
new file mode 100644
index 00000000..e13ca43b
Binary files /dev/null and b/build/approot/packages/Microsoft.IdentityModel.Logging/1.0.0-rc1-211161024/lib/dotnet5.4/Microsoft.IdentityModel.Logging.dll differ
diff --git a/build/approot/packages/Microsoft.IdentityModel.Logging/1.0.0-rc1-211161024/lib/net451/Microsoft.IdentityModel.Logging.dll b/build/approot/packages/Microsoft.IdentityModel.Logging/1.0.0-rc1-211161024/lib/net451/Microsoft.IdentityModel.Logging.dll
new file mode 100644
index 00000000..12222b16
Binary files /dev/null and b/build/approot/packages/Microsoft.IdentityModel.Logging/1.0.0-rc1-211161024/lib/net451/Microsoft.IdentityModel.Logging.dll differ
diff --git a/build/approot/packages/Microsoft.IdentityModel.Protocols.OpenIdConnect/2.0.0-rc1-211161024/Microsoft.IdentityModel.Protocols.OpenIdConnect.nuspec b/build/approot/packages/Microsoft.IdentityModel.Protocols.OpenIdConnect/2.0.0-rc1-211161024/Microsoft.IdentityModel.Protocols.OpenIdConnect.nuspec
new file mode 100644
index 00000000..867b94e9
--- /dev/null
+++ b/build/approot/packages/Microsoft.IdentityModel.Protocols.OpenIdConnect/2.0.0-rc1-211161024/Microsoft.IdentityModel.Protocols.OpenIdConnect.nuspec
@@ -0,0 +1,30 @@
+
+
+
+ Microsoft.IdentityModel.Protocols.OpenIdConnect
+ 2.0.0-rc1-211161024
+ true
+ Microsoft
+ Microsoft
+ https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/master/LICENSE.txt
+ Includes types that provide support for OpenIdConnect protocol.
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.IdentityModel.Protocols.OpenIdConnect/2.0.0-rc1-211161024/lib/dotnet5.4/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll b/build/approot/packages/Microsoft.IdentityModel.Protocols.OpenIdConnect/2.0.0-rc1-211161024/lib/dotnet5.4/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll
new file mode 100644
index 00000000..c5e57821
Binary files /dev/null and b/build/approot/packages/Microsoft.IdentityModel.Protocols.OpenIdConnect/2.0.0-rc1-211161024/lib/dotnet5.4/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll differ
diff --git a/build/approot/packages/Microsoft.IdentityModel.Protocols.OpenIdConnect/2.0.0-rc1-211161024/lib/net451/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll b/build/approot/packages/Microsoft.IdentityModel.Protocols.OpenIdConnect/2.0.0-rc1-211161024/lib/net451/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll
new file mode 100644
index 00000000..d80e8bd0
Binary files /dev/null and b/build/approot/packages/Microsoft.IdentityModel.Protocols.OpenIdConnect/2.0.0-rc1-211161024/lib/net451/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll differ
diff --git a/build/approot/packages/Microsoft.IdentityModel.Protocols/2.0.0-rc1-211161024/Microsoft.IdentityModel.Protocols.nuspec b/build/approot/packages/Microsoft.IdentityModel.Protocols/2.0.0-rc1-211161024/Microsoft.IdentityModel.Protocols.nuspec
new file mode 100644
index 00000000..afee59e9
--- /dev/null
+++ b/build/approot/packages/Microsoft.IdentityModel.Protocols/2.0.0-rc1-211161024/Microsoft.IdentityModel.Protocols.nuspec
@@ -0,0 +1,34 @@
+
+
+
+ Microsoft.IdentityModel.Protocols
+ 2.0.0-rc1-211161024
+ true
+ Microsoft
+ Microsoft
+ https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/master/LICENSE.txt
+ Provides types that are common across openidconnect and wsfed protocols.
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.IdentityModel.Protocols/2.0.0-rc1-211161024/lib/dotnet5.4/Microsoft.IdentityModel.Protocols.dll b/build/approot/packages/Microsoft.IdentityModel.Protocols/2.0.0-rc1-211161024/lib/dotnet5.4/Microsoft.IdentityModel.Protocols.dll
new file mode 100644
index 00000000..e9807e4f
Binary files /dev/null and b/build/approot/packages/Microsoft.IdentityModel.Protocols/2.0.0-rc1-211161024/lib/dotnet5.4/Microsoft.IdentityModel.Protocols.dll differ
diff --git a/build/approot/packages/Microsoft.IdentityModel.Protocols/2.0.0-rc1-211161024/lib/net451/Microsoft.IdentityModel.Protocols.dll b/build/approot/packages/Microsoft.IdentityModel.Protocols/2.0.0-rc1-211161024/lib/net451/Microsoft.IdentityModel.Protocols.dll
new file mode 100644
index 00000000..9313392b
Binary files /dev/null and b/build/approot/packages/Microsoft.IdentityModel.Protocols/2.0.0-rc1-211161024/lib/net451/Microsoft.IdentityModel.Protocols.dll differ
diff --git a/build/approot/packages/Microsoft.NETCore.Platforms/1.0.1-beta-23516/Microsoft.NETCore.Platforms.nuspec b/build/approot/packages/Microsoft.NETCore.Platforms/1.0.1-beta-23516/Microsoft.NETCore.Platforms.nuspec
new file mode 100644
index 00000000..35c9c0a1
--- /dev/null
+++ b/build/approot/packages/Microsoft.NETCore.Platforms/1.0.1-beta-23516/Microsoft.NETCore.Platforms.nuspec
@@ -0,0 +1,18 @@
+
+
+
+ Microsoft.NETCore.Platforms
+ 1.0.1-beta-23516
+ Microsoft.NETCore.Platforms
+ true
+ Microsoft
+ microsoft,dotnetframework
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides runtime information required to resolve target framework, platform, and runtime specific implementations of .NETCore packages. - 1548494
+ © Microsoft Corporation. All rights reserved.
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.NETCore.Platforms/1.0.1-beta-23516/runtime.json b/build/approot/packages/Microsoft.NETCore.Platforms/1.0.1-beta-23516/runtime.json
new file mode 100644
index 00000000..fb5d82a2
--- /dev/null
+++ b/build/approot/packages/Microsoft.NETCore.Platforms/1.0.1-beta-23516/runtime.json
@@ -0,0 +1,248 @@
+{
+ "runtimes": {
+ "base": {
+ },
+
+ "any": {
+ "#import": [ "base" ]
+ },
+
+ "win": {
+ "#import": [ "any" ]
+ },
+ "win-x86": {
+ "#import": [ "win" ]
+ },
+ "win-x64": {
+ "#import": [ "win" ]
+ },
+
+ "win7": {
+ "#import": [ "win" ]
+ },
+ "win7-x86": {
+ "#import": [ "win7", "win-x86" ]
+ },
+ "win7-x64": {
+ "#import": [ "win7", "win-x64" ]
+ },
+
+ "win8": {
+ "#import": [ "win7" ]
+ },
+ "win8-x86": {
+ "#import": [ "win8", "win7-x86" ]
+ },
+ "win8-x64": {
+ "#import": [ "win8", "win7-x64" ]
+ },
+ "win8-arm": {
+ "#import": [ "win8" ]
+ },
+
+ "win81": {
+ "#import": [ "win8" ]
+ },
+ "win81-x86": {
+ "#import": [ "win81", "win8-x86" ]
+ },
+ "win81-x64": {
+ "#import": [ "win81", "win8-x64" ]
+ },
+ "win81-arm": {
+ "#import": [ "win81", "win8-arm" ]
+ },
+
+ "win10": {
+ "#import": [ "win81" ]
+ },
+ "win10-x86": {
+ "#import": [ "win10", "win81-x86" ]
+ },
+ "win10-x64": {
+ "#import": [ "win10", "win81-x64" ]
+ },
+ "win10-arm": {
+ "#import": [ "win10", "win81-arm" ]
+ },
+
+
+ "aot": {
+ "#import": [ "any" ]
+ },
+
+ "win-aot": {
+ "#import": [ "win", "aot" ]
+ },
+ "win-x86-aot": {
+ "#import": [ "win-aot", "win-x86" ]
+ },
+ "win-x64-aot": {
+ "#import": [ "win-aot", "win-x64" ]
+ },
+
+ "win7-aot": {
+ "#import": [ "win-aot", "win7" ]
+ },
+ "win7-x86-aot": {
+ "#import": [ "win7-aot", "win7-x86" ]
+ },
+ "win7-x64-aot": {
+ "#import": [ "win7-aot", "win7-x64" ]
+ },
+
+ "win8-aot": {
+ "#import": [ "win8", "win7-aot" ]
+ },
+ "win8-x86-aot": {
+ "#import": [ "win8-aot", "win8-x86", "win7-x86-aot" ]
+ },
+ "win8-x64-aot": {
+ "#import": [ "win8-aot", "win8-x64", "win7-x64-aot" ]
+ },
+ "win8-arm-aot": {
+ "#import": [ "win8-aot", "win8-arm" ]
+ },
+
+ "win81-aot": {
+ "#import": [ "win81", "win8-aot" ]
+ },
+ "win81-x86-aot": {
+ "#import": [ "win81-aot", "win81-x86", "win8-x86-aot" ]
+ },
+ "win81-x64-aot": {
+ "#import": [ "win81-aot", "win81-x64", "win8-x64-aot" ]
+ },
+ "win81-arm-aot": {
+ "#import": [ "win81-aot", "win81-arm", "win8-arm-aot" ]
+ },
+
+ "win10-aot": {
+ "#import": [ "win10", "win81-aot" ]
+ },
+ "win10-x86-aot": {
+ "#import": [ "win10-aot", "win10-x86", "win81-x86-aot" ]
+ },
+ "win10-x64-aot": {
+ "#import": [ "win10-aot", "win10-x64", "win81-x64-aot" ]
+ },
+ "win10-arm-aot": {
+ "#import": [ "win10-aot", "win10-arm", "win81-arm-aot" ]
+ },
+
+ "unix": {
+ "#import": [ "any" ]
+ },
+ "unix-x64": {
+ "#import": [ "unix" ]
+ },
+
+ "osx": {
+ "#import": [ "unix" ]
+ },
+ "osx-x64": {
+ "#import": [ "osx", "unix-x64" ]
+ },
+
+ "osx.10.10": {
+ "#import": [ "osx" ]
+ },
+ "osx.10.10-x64": {
+ "#import": [ "osx.10.10", "osx-x64" ]
+ },
+
+ "osx.10.11": {
+ "#import": [ "osx.10.10" ]
+ },
+ "osx.10.11-x64": {
+ "#import": [ "osx.10.11", "osx.10.10-x64" ]
+ },
+
+ "linux": {
+ "#import": [ "unix" ]
+ },
+ "linux-x64": {
+ "#import": [ "unix", "unix-x64" ]
+ },
+
+ "centos": {
+ "#import": [ "linux" ]
+ },
+ "centos-x64": {
+ "#import": [ "centos", "linux-x64" ]
+ },
+
+ "centos.7.1": {
+ "#import": [ "centos" ]
+ },
+
+ "centos.7.1-x64": {
+ "#import": [ "centos.7.1", "centos-x64" ]
+ },
+
+ "centos.7": {
+ "#import": [ "centos.7.1" ]
+ },
+
+ "centos.7-x64": {
+ "#import": [ "centos.7", "centos.7.1-x64" ]
+ },
+
+ "ubuntu": {
+ "#import": [ "linux" ]
+ },
+ "ubuntu-x64": {
+ "#import": [ "ubuntu", "linux-x64" ]
+ },
+
+ "ubuntu.14.04": {
+ "#import": [ "ubuntu" ]
+ },
+ "ubuntu.14.04-x64": {
+ "#import": [ "ubuntu.14.04", "ubuntu-x64" ]
+ },
+
+ "ubuntu.14.10": {
+ "#import": [ "ubuntu.14.04" ]
+ },
+ "ubuntu.14.10-x64": {
+ "#import": [ "ubuntu.14.10", "ubuntu.14.04-x64" ]
+ },
+
+ "ubuntu.15.04": {
+ "#import": [ "ubuntu.14.10" ]
+ },
+ "ubuntu.15.04-x64": {
+ "#import": [ "ubuntu.15.04", "ubuntu.14.10-x64" ]
+ },
+
+ "linuxmint.17": {
+ "#import": [ "ubuntu.14.04" ]
+ },
+ "linuxmint.17-x64": {
+ "#import": [ "linuxmint.17", "ubuntu.14.04-x64" ]
+ },
+
+ "linuxmint.17.1": {
+ "#import": [ "linuxmint.17" ]
+ },
+ "linuxmint.17.1-x64": {
+ "#import": [ "linuxmint.17.1", "linuxmint.17-x64" ]
+ },
+
+ "linuxmint.17.2": {
+ "#import": [ "linuxmint.17.1" ]
+ },
+ "linuxmint.17.2-x64": {
+ "#import": [ "linuxmint.17.2", "linuxmint.17.1-x64" ]
+ },
+
+ "linuxmint.17.3": {
+ "#import": [ "linuxmint.17.2" ]
+ },
+ "linuxmint.17.2-x64": {
+ "#import": [ "linuxmint.17.3", "linuxmint.17.2-x64" ]
+ }
+ }
+ }
+
diff --git a/build/approot/packages/Microsoft.NETCore.Targets/1.0.1-beta-23516/Microsoft.NETCore.Targets.nuspec b/build/approot/packages/Microsoft.NETCore.Targets/1.0.1-beta-23516/Microsoft.NETCore.Targets.nuspec
new file mode 100644
index 00000000..f8824f03
--- /dev/null
+++ b/build/approot/packages/Microsoft.NETCore.Targets/1.0.1-beta-23516/Microsoft.NETCore.Targets.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ Microsoft.NETCore.Targets
+ 1.0.1-beta-23516
+ Microsoft.NETCore.Targets
+ true
+ Microsoft
+ microsoft,dotnetframework
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides supporting infrastructure for portable projects: support identifiers that define framework and runtime for support targets and packages that reference the minimum supported package versions when targeting these. - 1548494
+ © Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.NETCore.Targets/1.0.1-beta-23516/runtime.json b/build/approot/packages/Microsoft.NETCore.Targets/1.0.1-beta-23516/runtime.json
new file mode 100644
index 00000000..8ab9f48b
--- /dev/null
+++ b/build/approot/packages/Microsoft.NETCore.Targets/1.0.1-beta-23516/runtime.json
@@ -0,0 +1,27 @@
+{
+ "supports": {
+ "uwp.10.0.app": {
+ "uap10.0": [
+ "win10-x86",
+ "win10-x86-aot",
+ "win10-x64",
+ "win10-x64-aot",
+ "win10-arm",
+ "win10-arm-aot"
+ ]
+ },
+ "net46.app": {
+ "net46": [
+ "win-x86",
+ "win-x64"
+ ]
+ },
+ "dnxcore50.app": {
+ "dnxcore50": [
+ "win7-x86",
+ "win7-x64"
+ ]
+ }
+ }
+ }
+
diff --git a/build/approot/packages/Microsoft.Net.Http.Headers/1.0.0-rc1-final/Microsoft.Net.Http.Headers.nuspec b/build/approot/packages/Microsoft.Net.Http.Headers/1.0.0-rc1-final/Microsoft.Net.Http.Headers.nuspec
new file mode 100644
index 00000000..54d2270f
--- /dev/null
+++ b/build/approot/packages/Microsoft.Net.Http.Headers/1.0.0-rc1-final/Microsoft.Net.Http.Headers.nuspec
@@ -0,0 +1,33 @@
+
+
+
+ Microsoft.Net.Http.Headers
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ ASP.NET 5 HTTP header implementations.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Net.Http.Headers/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Net.Http.Headers.dll b/build/approot/packages/Microsoft.Net.Http.Headers/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Net.Http.Headers.dll
new file mode 100644
index 00000000..b36863ee
Binary files /dev/null and b/build/approot/packages/Microsoft.Net.Http.Headers/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Net.Http.Headers.dll differ
diff --git a/build/approot/packages/Microsoft.Net.Http.Headers/1.0.0-rc1-final/lib/net451/Microsoft.Net.Http.Headers.dll b/build/approot/packages/Microsoft.Net.Http.Headers/1.0.0-rc1-final/lib/net451/Microsoft.Net.Http.Headers.dll
new file mode 100644
index 00000000..c2b4465f
Binary files /dev/null and b/build/approot/packages/Microsoft.Net.Http.Headers/1.0.0-rc1-final/lib/net451/Microsoft.Net.Http.Headers.dll differ
diff --git a/build/approot/packages/Microsoft.Net.Http.Server/1.0.0-rc1-final/Microsoft.Net.Http.Server.nuspec b/build/approot/packages/Microsoft.Net.Http.Server/1.0.0-rc1-final/Microsoft.Net.Http.Server.nuspec
new file mode 100644
index 00000000..1588f36e
--- /dev/null
+++ b/build/approot/packages/Microsoft.Net.Http.Server/1.0.0-rc1-final/Microsoft.Net.Http.Server.nuspec
@@ -0,0 +1,40 @@
+
+
+
+ Microsoft.Net.Http.Server
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Implementation of WebListener, a successor to HttpListener. It is used in the WebListener server package.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Net.Http.Server/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Net.Http.Server.dll b/build/approot/packages/Microsoft.Net.Http.Server/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Net.Http.Server.dll
new file mode 100644
index 00000000..c1d4383f
Binary files /dev/null and b/build/approot/packages/Microsoft.Net.Http.Server/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Net.Http.Server.dll differ
diff --git a/build/approot/packages/Microsoft.Net.Http.Server/1.0.0-rc1-final/lib/net451/Microsoft.Net.Http.Server.dll b/build/approot/packages/Microsoft.Net.Http.Server/1.0.0-rc1-final/lib/net451/Microsoft.Net.Http.Server.dll
new file mode 100644
index 00000000..d7236540
Binary files /dev/null and b/build/approot/packages/Microsoft.Net.Http.Server/1.0.0-rc1-final/lib/net451/Microsoft.Net.Http.Server.dll differ
diff --git a/build/approot/packages/Microsoft.Net.WebSockets/1.0.0-rc1-final/Microsoft.Net.WebSockets.nuspec b/build/approot/packages/Microsoft.Net.WebSockets/1.0.0-rc1-final/Microsoft.Net.WebSockets.nuspec
new file mode 100644
index 00000000..2ea86492
--- /dev/null
+++ b/build/approot/packages/Microsoft.Net.WebSockets/1.0.0-rc1-final/Microsoft.Net.WebSockets.nuspec
@@ -0,0 +1,41 @@
+
+
+
+ Microsoft.Net.WebSockets
+ 1.0.0-rc1-final
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://www.asp.net/
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Implementation of WebSocket abstract base class. Used by WebListener.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Net.WebSockets/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Net.WebSockets.dll b/build/approot/packages/Microsoft.Net.WebSockets/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Net.WebSockets.dll
new file mode 100644
index 00000000..056fe825
Binary files /dev/null and b/build/approot/packages/Microsoft.Net.WebSockets/1.0.0-rc1-final/lib/dotnet5.4/Microsoft.Net.WebSockets.dll differ
diff --git a/build/approot/packages/Microsoft.Net.WebSockets/1.0.0-rc1-final/lib/net451/Microsoft.Net.WebSockets.dll b/build/approot/packages/Microsoft.Net.WebSockets/1.0.0-rc1-final/lib/net451/Microsoft.Net.WebSockets.dll
new file mode 100644
index 00000000..3fa25eb1
Binary files /dev/null and b/build/approot/packages/Microsoft.Net.WebSockets/1.0.0-rc1-final/lib/net451/Microsoft.Net.WebSockets.dll differ
diff --git a/build/approot/packages/Microsoft.Owin.Security/2.1.0/Microsoft.Owin.Security.nuspec b/build/approot/packages/Microsoft.Owin.Security/2.1.0/Microsoft.Owin.Security.nuspec
new file mode 100644
index 00000000..21c07900
--- /dev/null
+++ b/build/approot/packages/Microsoft.Owin.Security/2.1.0/Microsoft.Owin.Security.nuspec
@@ -0,0 +1,19 @@
+
+
+
+ Microsoft.Owin.Security
+ 2.1.0
+ Microsoft.Owin.Security
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_enu.htm
+ http://katanaproject.codeplex.com/
+ Common types which are shared by the various authentication middleware components.
+ Microsoft OWIN Katana
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Owin.Security/2.1.0/lib/net45/Microsoft.Owin.Security.XML b/build/approot/packages/Microsoft.Owin.Security/2.1.0/lib/net45/Microsoft.Owin.Security.XML
new file mode 100644
index 00000000..3e05c5c9
--- /dev/null
+++ b/build/approot/packages/Microsoft.Owin.Security/2.1.0/lib/net45/Microsoft.Owin.Security.XML
@@ -0,0 +1,452 @@
+
+
+
+ Microsoft.Owin.Security
+
+
+
+
+ Provides extensions methods for app.Property values that are only needed by implementations of authentication middleware.
+
+
+
+
+ Returns the previously set AuthenticationType that external sign in middleware should use when the
+ browser navigates back to their return url.
+
+ App builder passed to the application startup code
+
+
+
+
+ Called by middleware to change the name of the AuthenticationType that external middleware should use
+ when the browser navigates back to their return url.
+
+ App builder passed to the application startup code
+ AuthenticationType that external middleware should sign in as.
+
+
+
+ Controls the behavior of authentication middleware
+
+
+
+
+ In Active mode the authentication middleware will alter the user identity as the request arrives, and
+ will also alter a plain 401 as the response leaves.
+
+
+
+
+ In Passive mode the authentication middleware will only provide user identity when asked, and will only
+ alter 401 responses where the authentication type named in the extra challenge data.
+
+
+
+
+ Base Options for all authentication middleware
+
+
+
+
+ Initialize properties of AuthenticationOptions base class
+
+ Assigned to the AuthenticationType property
+
+
+
+ The AuthenticationType in the options corresponds to the IIdentity AuthenticationType property. A different
+ value may be assigned in order to use the same authentication middleware type more than once in a pipeline.
+
+
+
+
+ If Active the authentication middleware alter the request user coming in and
+ alter 401 Unauthorized responses going out. If Passive the authentication middleware will only provide
+ identity and alter responses when explicitly indicated by the AuthenticationType.
+
+
+
+
+ Additional information about the authentication type which is made available to the application.
+
+
+
+
+ String constants used only by the Security assembly
+
+
+
+
+ Used by middleware extension methods to coordinate the default value Options property SignInAsAuthenticationType
+
+
+
+
+ Factory used to create IDataProtection instances
+
+
+
+
+ Returns a new instance of IDataProtection for the provider.
+
+ Additional entropy used to ensure protected data may only be unprotected for the correct purposes.
+ An instance of a data protection service
+
+
+
+ Service used to protect and unprotect data
+
+
+
+
+ Called to protect user data.
+
+ The original data that must be protected
+ A different byte array that may be unprotected or altered only by software that has access to
+ the an identical IDataProtection service.
+
+
+
+ Called to unprotect user data
+
+ The byte array returned by a call to Protect on an identical IDataProtection service.
+ The byte array identical to the original userData passed to Protect.
+
+
+
+ Base class for the per-request work performed by most authentication middleware.
+
+ Specifies which type for of AuthenticationOptions property
+
+
+
+ Base class for the per-request work performed by most authentication middleware.
+
+
+
+
+ Called once per request after Initialize and Invoke.
+
+ async completion
+
+
+
+ Called once by common code after initialization. If an authentication middleware responds directly to
+ specifically known paths it must override this virtual, compare the request path to it's known paths,
+ provide any response information as appropriate, and true to stop further processing.
+
+ Returning false will cause the common code to call the next middleware in line. Returning true will
+ cause the common code to begin the async completion journey without calling the rest of the middleware
+ pipeline.
+
+
+
+ Causes the authentication logic in AuthenticateCore to be performed for the current request
+ at most once and returns the results. Calling Authenticate more than once will always return
+ the original value.
+
+ This method should always be called instead of calling AuthenticateCore directly.
+
+ The ticket data provided by the authentication logic
+
+
+
+ The core authentication logic which must be provided by the handler. Will be invoked at most
+ once per request. Do not call directly, call the wrapping Authenticate method instead.
+
+ The ticket data provided by the authentication logic
+
+
+
+ Causes the ApplyResponseCore to be invoked at most once per request. This method will be
+ invoked either earlier, when the response headers are sent as a result of a response write or flush,
+ or later, as the last step when the original async call to the middleware is returning.
+
+
+
+
+
+ Core method that may be overridden by handler. The default behavior is to call two common response
+ activities, one that deals with sign-in/sign-out concerns, and a second to deal with 401 challenges.
+
+
+
+
+
+ Override this method to dela with sign-in/sign-out concerns, if an authentication scheme in question
+ deals with grant/revoke as part of it's request flow. (like setting/deleting cookies)
+
+
+
+
+
+ Override this method to dela with 401 challenge concerns, if an authentication scheme in question
+ deals an authentication interaction as part of it's request flow. (like adding a response header, or
+ changing the 401 result to 302 of a login page or external sign-in location.)
+
+
+
+
+
+ Initialize is called once per request to contextualize this instance with appropriate state.
+
+ The original options passed by the application control behavior
+ The utility object to observe the current request and response
+ async completion
+
+
+
+ Contains user identity information as well as additional authentication state.
+
+
+
+
+ Initializes a new instance of the class
+
+
+
+
+
+
+ Gets the authenticated user identity.
+
+
+
+
+ Additional state values for the authentication session.
+
+
+
+
+ Interface for providing pinned certificate validation, which checks HTTPS
+ communication against a known good list of certificates to protect against
+ compromised or rogue CAs issuing certificates for hosts without the
+ knowledge of the host owner.
+
+
+
+
+ Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication.
+
+ An object that contains state information for this validation.
+ The certificate used to authenticate the remote party.
+ The chain of certificate authorities associated with the remote certificate.
+ One or more errors associated with the remote certificate.
+ A Boolean value that determines whether the specified certificate is accepted for authentication.
+
+
+
+ Provides pinned certificate validation based on the certificate thumbprint.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A set of thumbprints which are valid for an HTTPS request.
+
+
+
+ Validates that the certificate thumbprints in the signing chain match at least one whitelisted thumbprint.
+
+ An object that contains state information for this validation.
+ The certificate used to authenticate the remote party.
+ The chain of certificate authorities associated with the remote certificate.
+ One or more errors associated with the remote certificate.
+ A Boolean value that determines whether the specified certificate is accepted for authentication.
+
+
+
+ Used to provide the data protection services that are derived from the Data Protection API. It is the best choice of
+ data protection when you application is not hosted by ASP.NET and all processes are running as the same domain identity.
+
+
+
+
+ Initializes a new DpapiDataProtectionProvider with a random application
+ name. This is only useful to protect data for the duration of the
+ current application execution.
+
+
+
+
+ Initializes a new DpapiDataProtectionProvider which uses the given
+ appName as part of the protection algorithm
+
+ A user provided value needed to round-trip secured
+ data. The default value comes from the IAppBuilder.Properties["owin.AppName"]
+ when self-hosted.
+
+
+
+ Returns a new instance of IDataProtection for the provider.
+
+ Additional entropy used to ensure protected data may only be unprotected for the correct purposes.
+ An instance of a data protection service
+
+
+
+ Helper code used when implementing authentication middleware
+
+
+
+
+ Helper code used when implementing authentication middleware
+
+
+
+
+
+ Add an additional ClaimsIdentity to the ClaimsPrincipal in the "server.User" environment key
+
+
+
+
+
+ Find response challenge details for a specific authentication middleware
+
+ The authentication type to look for
+ The authentication mode the middleware is running under
+ The information instructing the middleware how it should behave
+
+
+
+ Find response sign-in details for a specific authentication middleware
+
+ The authentication type to look for
+ The information instructing the middleware how it should behave
+
+
+
+ Find response sign-out details for a specific authentication middleware
+
+ The authentication type to look for
+ The authentication mode the middleware is running under
+ The information instructing the middleware how it should behave
+
+
+
+ Base class used for certain event contexts
+
+
+
+
+ Base class used for certain event contexts
+
+
+
+
+ Creates an instance of this context
+
+
+
+
+ Prevents the request from being processed further by other components.
+ IsRequestCompleted becomes true after calling.
+
+
+
+
+ True if the request should not be processed further by other components.
+
+
+
+
+ A strongly-typed resource class, for looking up localized strings, etc.
+
+
+
+
+ Returns the cached ResourceManager instance used by this class.
+
+
+
+
+ Overrides the current thread's CurrentUICulture property for all
+ resource lookups using this strongly typed resource class.
+
+
+
+
+ Looks up a localized string similar to The AuthenticationTokenProvider's required synchronous events have not been registered..
+
+
+
+
+ Looks up a localized string similar to The default data protection provider may only be used when the IAppBuilder.Properties contains an appropriate 'host.AppName' key..
+
+
+
+
+ Looks up a localized string similar to A default value for SignInAsAuthenticationType was not found in IAppBuilder Properties. This can happen if your authentication middleware are added in the wrong order, or if one is missing..
+
+
+
+
+ Looks up a localized string similar to The state passed to UnhookAuthentication may only be the return value from HookAuthentication..
+
+
+
+
+ Provides pinned certificate validation based on the subject key identifier of the certificate.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A set of subject key identifiers which are valid for an HTTPS request.
+
+
+
+ Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication.
+
+ An object that contains state information for this validation.
+ The certificate used to authenticate the remote party.
+ The chain of certificate authorities associated with the remote certificate.
+ One or more errors associated with the remote certificate.
+ A Boolean value that determines whether the specified certificate is accepted for authentication.
+
+
+
+ The algorithm used to generate the subject public key information blob hashes.
+
+
+
+
+ Implements a cert pinning validator passed on
+ http://datatracker.ietf.org/doc/draft-ietf-websec-key-pinning/?include_text=1
+
+
+
+
+ Initializes a new instance of the class.
+
+ A collection of valid base64 encoded hashes of the certificate public key information blob.
+ The algorithm used to generate the hashes.
+
+
+
+ Validates at least one SPKI hash is known.
+
+ An object that contains state information for this validation.
+ The certificate used to authenticate the remote party.
+ The chain of certificate authorities associated with the remote certificate.
+ One or more errors associated with the remote certificate.
+ A Boolean value that determines whether the specified certificate is accepted for authentication.
+
+
+
+ Encodes a structure of the type indicated by the value of the lpszStructType parameter.
+
+ Type of encoding used.
+ The high-order word is zero, the low-order word specifies the integer identifier for the type of the specified structure so
+ we can use the constants in http://msdn.microsoft.com/en-us/library/windows/desktop/aa378145%28v=vs.85%29.aspx
+ A pointer to the structure to be encoded.
+ A pointer to a buffer to receive the encoded structure. This parameter can be NULL to retrieve the size of this information for memory allocation purposes.
+ A pointer to a DWORD variable that contains the size, in bytes, of the buffer pointed to by the pbEncoded parameter.
+
+
+
+
diff --git a/build/approot/packages/Microsoft.Owin.Security/2.1.0/lib/net45/Microsoft.Owin.Security.dll b/build/approot/packages/Microsoft.Owin.Security/2.1.0/lib/net45/Microsoft.Owin.Security.dll
new file mode 100644
index 00000000..e44dc6a4
Binary files /dev/null and b/build/approot/packages/Microsoft.Owin.Security/2.1.0/lib/net45/Microsoft.Owin.Security.dll differ
diff --git a/build/approot/packages/Microsoft.Owin/2.1.0/Microsoft.Owin.nuspec b/build/approot/packages/Microsoft.Owin/2.1.0/Microsoft.Owin.nuspec
new file mode 100644
index 00000000..316eb039
--- /dev/null
+++ b/build/approot/packages/Microsoft.Owin/2.1.0/Microsoft.Owin.nuspec
@@ -0,0 +1,18 @@
+
+
+
+ Microsoft.Owin
+ 2.1.0
+ Microsoft.Owin
+ true
+ Microsoft
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_enu.htm
+ http://katanaproject.codeplex.com/
+ Provides a set of helper types and abstractions for simplifying the creation of OWIN components.
+ Microsoft OWIN Katana
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Owin/2.1.0/lib/net40/Microsoft.Owin.XML b/build/approot/packages/Microsoft.Owin/2.1.0/lib/net40/Microsoft.Owin.XML
new file mode 100644
index 00000000..29bc2149
--- /dev/null
+++ b/build/approot/packages/Microsoft.Owin/2.1.0/lib/net40/Microsoft.Owin.XML
@@ -0,0 +1,2777 @@
+
+
+
+ Microsoft.Owin
+
+
+
+
+ Provided as a down-level stub for the 4.5 AssemblyMetaDataAttribute class.
+ All released assemblies should define [AssemblyMetadata("Serviceable", "True")].
+
+
+
+
+ Extension methods for .
+
+
+
+
+ Inserts a middleware into the OWIN pipeline.
+
+ The middleware type
+
+ Any additional arguments for the middleware constructor
+
+
+
+
+ Inserts into the OWIN pipeline a middleware which does not have a next middleware reference.
+
+
+ An app that handles all requests
+
+
+
+ Inserts a middleware into the OWIN pipeline.
+
+
+ An app that handles the request or calls the given next Func
+
+
+
+
+ Represents a middleware for executing in-line function middleware.
+
+
+
+
+ An abstract base class for a standard middleware pattern.
+
+
+
+
+ Instantiates the middleware with an optional pointer to the next component.
+
+
+
+
+
+ Process an individual request.
+
+
+
+
+
+
+ The optional next component.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The pointer to next middleware.
+ A function that handles all requests.
+
+
+
+ Initializes a new instance of the class.
+
+ The pointer to next middleware.
+ A function that handles the request or calls the given next function.
+
+
+
+ Invokes the handler for processing the request.
+
+ The OWIN context.
+ The object that represents the request operation.
+
+
+
+ Contains the parsed form values.
+
+
+
+
+ Accessors for query, forms, etc.
+
+
+
+
+ Accessors for headers, query, forms, etc.
+
+
+
+
+ Get the associated value from the collection. Multiple values will be merged.
+ Returns null if the key is not present.
+
+
+
+
+
+
+ Get the associated values from the collection in their original format.
+ Returns null if the key is not present.
+
+
+
+
+
+
+ Get the associated value from the collection. Multiple values will be merged.
+ Returns null if the key is not present.
+
+
+
+
+
+
+ Create a new wrapper
+
+
+
+
+
+ Get the associated value from the collection. Multiple values will be merged.
+ Returns null if the key is not present.
+
+
+
+
+
+
+ Get the associated values from the collection in their original format.
+ Returns null if the key is not present.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get the associated value from the collection. Multiple values will be merged.
+ Returns null if the key is not present.
+
+
+
+
+
+
+ Contains the parsed form values.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The store for the form.
+
+
+
+ Represents a wrapper for owin.RequestHeaders and owin.ResponseHeaders.
+
+
+
+
+ Represents a wrapper for owin.RequestHeaders and owin.ResponseHeaders.
+
+
+
+
+ Get the associated values from the collection separated into individual values.
+ Quoted values will not be split, and the quotes will be removed.
+
+ The header name.
+ the associated values from the collection separated into individual values, or null if the key is not present.
+
+
+
+ Add a new value. Appends to the header if already present
+
+ The header name.
+ The header value.
+
+
+
+ Add new values. Each item remains a separate array entry.
+
+ The header name.
+ The header values.
+
+
+
+ Quotes any values containing comas, and then coma joins all of the values with any existing values.
+
+ The header name.
+ The header values.
+
+
+
+ Sets a specific header value.
+
+ The header name.
+ The header value.
+
+
+
+ Sets the specified header values without modification.
+
+ The header name.
+ The header values.
+
+
+
+ Quotes any values containing comas, and then coma joins all of the values.
+
+ The header name.
+ The header values.
+
+
+
+ Get or sets the associated value from the collection as a single string.
+
+ The header name.
+ the associated value from the collection as a single string or null if the key is not present.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying data store.
+
+
+
+ Returns an enumerator that iterates through a collection.
+
+ An object that can be used to iterate through the collection.
+
+
+
+ Returns an enumerator that iterates through a collection.
+
+ An object that can be used to iterate through the collection.
+
+
+
+ Get the associated value from the collection as a single string.
+
+ The header name.
+ the associated value from the collection as a single string or null if the key is not present.
+
+
+
+ Get the associated values from the collection without modification.
+
+ The header name.
+ the associated value from the collection without modification, or null if the key is not present.
+
+
+
+ Get the associated values from the collection separated into individual values.
+ Quoted values will not be split, and the quotes will be removed.
+
+ The header name.
+ the associated values from the collection separated into individual values, or null if the key is not present.
+
+
+
+ Add a new value. Appends to the header if already present
+
+ The header name.
+ The header value.
+
+
+
+ Add new values. Each item remains a separate array entry.
+
+ The header name.
+ The header values.
+
+
+
+ Quotes any values containing comas, and then coma joins all of the values with any existing values.
+
+ The header name.
+ The header values.
+
+
+
+ Sets a specific header value.
+
+ The header name.
+ The header value.
+
+
+
+ Sets the specified header values without modification.
+
+ The header name.
+ The header values.
+
+
+
+ Quotes any values containing comas, and then coma joins all of the values.
+
+ The header name.
+ The header values.
+
+
+
+ Adds the given header and values to the collection.
+
+ The header name.
+ The header values.
+
+
+
+ Determines whether the contains a specific key.
+
+ The key.
+ true if the contains a specific key; otherwise, false.
+
+
+
+ Removes the given header from the collection.
+
+ The header name.
+ true if the specified object was removed from the collection; otherwise, false.
+
+
+
+ Retrieves a value from the dictionary.
+
+ The header name.
+ The value.
+ true if the contains the key; otherwise, false.
+
+
+
+ Adds a new list of items to the collection.
+
+ The item to add.
+
+
+
+ Clears the entire list of objects.
+
+
+
+
+ Returns a value indicating whether the specified object occurs within this collection.
+
+ The item.
+ true if the specified object occurs within this collection; otherwise, false.
+
+
+
+ Copies the elements to a one-dimensional Array instance at the specified index.
+
+ The one-dimensional Array that is the destination of the specified objects copied from the .
+ The zero-based index in at which copying begins.
+
+
+
+ Removes the given item from the the collection.
+
+ The item.
+ true if the specified object was removed from the collection; otherwise, false.
+
+
+
+ Gets an that contains the keys in the ;.
+
+ An that contains the keys in the .
+
+
+
+
+
+
+
+
+ Gets the number of elements contained in the ;.
+
+ The number of elements contained in the .
+
+
+
+ Gets a value that indicates whether the is in read-only mode.
+
+ true if the is in read-only mode; otherwise, false.
+
+
+
+ Get or sets the associated value from the collection as a single string.
+
+ The header name.
+ the associated value from the collection as a single string or null if the key is not present.
+
+
+
+ Throws KeyNotFoundException if the key is not present.
+
+ The header name.
+
+
+
+
+ Represents the host portion of a Uri can be used to construct Uri's properly formatted and encoded for use in
+ HTTP headers.
+
+
+
+
+ Creates a new HostString without modification. The value should be Unicode rather than punycode, and may have a port.
+ IPv4 and IPv6 addresses are also allowed, and also may have ports.
+
+
+
+
+
+ Returns the value as normalized by ToUriComponent().
+
+
+
+
+
+ Returns the value properly formatted and encoded for use in a URI in a HTTP header.
+ Any Unicode is converted to punycode. IPv6 addresses will have brackets added if they are missing.
+
+
+
+
+
+ Creates a new HostString from the given uri component.
+ Any punycode will be converted to Unicode.
+
+
+
+
+
+
+ Creates a new HostString from the host and port of the give Uri instance.
+ Punycode will be converted to Unicode.
+
+
+
+
+
+
+ Compares the equality of the Value property, ignoring case.
+
+
+
+
+
+
+ Compares against the given object only if it is a HostString.
+
+
+
+
+
+
+ Gets a hash code for the value.
+
+
+
+
+
+ Compares the two instances for equality.
+
+
+
+
+
+
+
+ Compares the two instances for inequality.
+
+
+
+
+
+
+
+ Returns the original value from the constructor.
+
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets a wrapper exposing request specific properties.
+
+ A wrapper exposing request specific properties.
+
+
+
+ Gets a wrapper exposing response specific properties.
+
+ A wrapper exposing response specific properties.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets or sets the host.TraceOutput environment value.
+
+ The host.TraceOutput TextWriter.
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets the request context.
+
+ The request context.
+
+
+
+ Gets or set the HTTP method.
+
+ The HTTP method.
+
+
+
+ Gets or set the HTTP request scheme from owin.RequestScheme.
+
+ The HTTP request scheme from owin.RequestScheme.
+
+
+
+ Returns true if the owin.RequestScheme is https.
+
+ true if this request is using https; otherwise, false.
+
+
+
+ Gets or set the Host header. May include the port.
+
+ The Host header.
+
+
+
+ Gets or set the owin.RequestPathBase.
+
+ The owin.RequestPathBase.
+
+
+
+ Gets or set the request path from owin.RequestPath.
+
+ The request path from owin.RequestPath.
+
+
+
+ Gets or set the query string from owin.RequestQueryString.
+
+ The query string from owin.RequestQueryString.
+
+
+
+ Gets the query value collection parsed from owin.RequestQueryString.
+
+ The query value collection parsed from owin.RequestQueryString.
+
+
+
+ Gets the uniform resource identifier (URI) associated with the request.
+
+ The uniform resource identifier (URI) associated with the request.
+
+
+
+ Gets or set the owin.RequestProtocol.
+
+ The owin.RequestProtocol.
+
+
+
+ Gets the request headers.
+
+ The request headers.
+
+
+
+ Gets the collection of Cookies for this request.
+
+ The collection of Cookies for this request.
+
+
+
+ Gets or sets the Content-Type header.
+
+ The Content-Type header.
+
+
+
+ Gets or sets the Cache-Control header.
+
+ The Cache-Control header.
+
+
+
+ Gets or sets the Media-Type header.
+
+ The Media-Type header.
+
+
+
+ Gets or set the Accept header.
+
+ The Accept header.
+
+
+
+ Gets or set the owin.RequestBody Stream.
+
+ The owin.RequestBody Stream.
+
+
+
+ Gets or sets the cancellation token for the request.
+
+ The cancellation token for the request.
+
+
+
+ Gets or set the server.LocalIpAddress.
+
+ The server.LocalIpAddress.
+
+
+
+ Gets or set the server.LocalPort.
+
+ The server.LocalPort.
+
+
+
+ Gets or set the server.RemoteIpAddress.
+
+ The server.RemoteIpAddress.
+
+
+
+ Gets or set the server.RemotePort.
+
+ The server.RemotePort.
+
+
+
+ Gets or set the server.User.
+
+ The server.User.
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Registers for an event that fires when the response headers are sent.
+
+ The callback method.
+ The callback state.
+
+
+
+ Sets a 302 response status code and the Location header.
+
+ The location where to redirect the client.
+
+
+
+ Writes the given text to the response body stream using UTF-8.
+
+ The response data.
+
+
+
+ Writes the given bytes to the response body stream.
+
+ The response data.
+
+
+
+ Writes the given bytes to the response body stream.
+
+ The response data.
+ The zero-based byte offset in the parameter at which to begin copying bytes.
+ The number of bytes to write.
+
+
+
+ Asynchronously writes the given text to the response body stream using UTF-8.
+
+ The response data.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given text to the response body stream using UTF-8.
+
+ The response data.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ The zero-based byte offset in the parameter at which to begin copying bytes.
+ The number of bytes to write.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets the request context.
+
+ The request context.
+
+
+
+ Gets or sets the optional owin.ResponseStatusCode.
+
+ The optional owin.ResponseStatusCode, or 200 if not set.
+
+
+
+ Gets or sets the the optional owin.ResponseReasonPhrase.
+
+ The the optional owin.ResponseReasonPhrase.
+
+
+
+ Gets or sets the owin.ResponseProtocol.
+
+ The owin.ResponseProtocol.
+
+
+
+ Gets the response header collection.
+
+ The response header collection.
+
+
+
+ Gets a collection used to manipulate the Set-Cookie header.
+
+ A collection used to manipulate the Set-Cookie header.
+
+
+
+ Gets or sets the Content-Length header.
+
+ The Content-Length header.
+
+
+
+ Gets or sets the Content-Type header.
+
+ The Content-Type header.
+
+
+
+ Gets or sets the Expires header.
+
+ The Expires header.
+
+
+
+ Gets or sets the E-Tag header.
+
+ The E-Tag header.
+
+
+
+ Gets or sets the owin.ResponseBody Stream.
+
+ The owin.ResponseBody Stream.
+
+
+
+ Used to mark which class in an assembly should be used for automatic startup.
+
+
+
+
+ Initializes a new instance of the class
+
+ The startup class
+
+
+
+ Initializes a new instance of the class
+
+ A non-default configuration, e.g. staging.
+ The startup class
+
+
+
+ Initializes a new instance of the class
+
+ The startup class
+ Specifies which method to call
+
+
+
+ Initializes a new instance of the class
+
+ A non-default configuration, e.g. staging.
+ The startup class
+ Specifies which method to call
+
+
+
+ A non-default configuration if any. e.g. Staging.
+
+
+
+
+ The startup class
+
+
+
+
+ The name of the configuration method
+
+
+
+
+ An ordered list of known Asp.Net integrated pipeline stages. More details on the ASP.NET integrated pipeline can be found at http://msdn.microsoft.com/en-us/library/system.web.httpapplication.aspx
+
+
+
+
+ Corresponds to the AuthenticateRequest stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PostAuthenticateRequest stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the AuthorizeRequest stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PostAuthorizeRequest stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the ResolveRequestCache stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PostResolveRequestCache stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the MapRequestHandler stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PostMapRequestHandler stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the AcquireRequestState stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PostAcquireRequestState stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PreRequestHandlerExecute stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Extension methods for the MapMiddleware
+
+
+
+
+ If the request path starts with the given pathMatch, execute the app configured via configuration parameter instead of
+ continuing to the next component in the pipeline.
+
+
+ The path to match
+ The branch to take for positive path matches
+
+
+
+
+ If the request path starts with the given pathMatch, execute the app configured via configuration parameter instead of
+ continuing to the next component in the pipeline.
+
+
+ The path to match
+ The branch to take for positive path matches
+
+
+
+
+ Used to create path based branches in your application pipeline.
+ The owin.RequestPathBase is not included in the evaluation, only owin.RequestPath.
+ Matching paths have the matching piece removed from owin.RequestPath and added to the owin.RequestPathBase.
+
+
+
+
+ Initializes a new instance of the class
+
+ The normal pipeline taken for a negative match
+
+
+
+
+ Process an individual request.
+
+
+
+
+
+
+ Options for the Map middleware
+
+
+
+
+ The path to match
+
+
+
+
+ The branch taken for a positive match
+
+
+
+
+ Extension methods for the MapWhenMiddleware
+
+
+
+
+ Branches the request pipeline based on the result of the given predicate.
+
+
+ Invoked with the request environment to determine if the branch should be taken
+ Configures a branch to take
+
+
+
+
+ Determines if the request should take a specific branch of the pipeline by passing the environment
+ to a user defined callback.
+
+
+
+
+ Initializes a new instance of the class
+
+ The normal application pipeline
+
+
+
+
+ Process an individual request.
+
+
+
+
+
+
+ Options for the MapWhen middleware
+
+
+
+
+ The user callback that determines if the branch should be taken
+
+
+
+
+ The branch taken for a positive match
+
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Create a new context with only request and response header collections.
+
+
+
+
+ Create a new wrapper.
+
+ OWIN environment dictionary which stores state information about the request, response and relevant server state.
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets a wrapper exposing request specific properties.
+
+ A wrapper exposing request specific properties.
+
+
+
+ Gets a wrapper exposing response specific properties.
+
+ A wrapper exposing response specific properties.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets or sets the host.TraceOutput environment value.
+
+ The host.TraceOutput TextWriter.
+
+
+
+ Provides correct escaping for Path and PathBase values when needed to reconstruct a request or redirect URI string
+
+
+
+
+ Represents the empty path. This field is read-only.
+
+
+
+
+ Initialize the path string with a given value. This value must be in un-escaped format. Use
+ PathString.FromUriComponent(value) if you have a path value which is in an escaped format.
+
+ The unescaped path to be assigned to the Value property.
+
+
+
+ Provides the path string escaped in a way which is correct for combining into the URI representation.
+
+ The escaped path value
+
+
+
+ Provides the path string escaped in a way which is correct for combining into the URI representation.
+
+ The escaped path value
+
+
+
+ Returns an PathString given the path as it is escaped in the URI format. The string MUST NOT contain any
+ value that is not a path.
+
+ The escaped path as it appears in the URI format.
+ The resulting PathString
+
+
+
+ Returns an PathString given the path as from a Uri object. Relative Uri objects are not supported.
+
+ The Uri object
+ The resulting PathString
+
+
+
+ Checks if this instance starts with or exactly matches the other instance. Only full segments are matched.
+
+
+
+
+
+
+ Checks if this instance starts with or exactly matches the other instance. Only full segments are matched.
+
+
+ Any remaining segments from this instance not included in the other instance.
+
+
+
+
+ Adds two PathString instances into a combined PathString value.
+
+ The combined PathString value
+
+
+
+ Combines a PathString and QueryString into the joined URI formatted string value.
+
+ The joined URI formatted string value
+
+
+
+ Compares this PathString value to another value. The default comparison is StringComparison.OrdinalIgnoreCase.
+
+ The second PathString for comparison.
+ True if both PathString values are equal
+
+
+
+ Compares this PathString value to another value using a specific StringComparison type
+
+ The second PathString for comparison
+ The StringComparison type to use
+ True if both PathString values are equal
+
+
+
+ Compares this PathString value to another value. The default comparison is StringComparison.OrdinalIgnoreCase.
+
+ The second PathString for comparison.
+ True if both PathString values are equal
+
+
+
+ Returns the hash code for the PathString value. The hash code is provided by the OrdinalIgnoreCase implementation.
+
+ The hash code
+
+
+
+ Operator call through to Equals
+
+ The left parameter
+ The right parameter
+ True if both PathString values are equal
+
+
+
+ Operator call through to Equals
+
+ The left parameter
+ The right parameter
+ True if both PathString values are not equal
+
+
+
+ Operator call through to Add
+
+ The left parameter
+ The right parameter
+ The PathString combination of both values
+
+
+
+ Operator call through to Add
+
+ The left parameter
+ The right parameter
+ The PathString combination of both values
+
+
+
+ The unescaped path value
+
+
+
+
+ True if the path is not empty
+
+
+
+
+ Provides correct handling for QueryString value when needed to reconstruct a request or redirect URI string
+
+
+
+
+ Represents the empty query string. This field is read-only.
+
+
+
+
+ Initalize the query string with a given value. This value must be in escaped and delimited format without
+ a leading '?' character.
+
+ The query string to be assigned to the Value property.
+
+
+
+ Initialize a query string with a single given parameter name and value. The value is
+
+ The unencoded parameter name
+ The unencoded parameter value
+
+
+
+ Provides the query string escaped in a way which is correct for combining into the URI representation.
+ A leading '?' character will be prepended unless the Value is null or empty. Characters which are potentally
+ dangerous are escaped.
+
+ The query string value
+
+
+
+ Provides the query string escaped in a way which is correct for combining into the URI representation.
+ A leading '?' character will be prepended unless the Value is null or empty. Characters which are potentially
+ dangerous are escaped.
+
+ The query string value
+
+
+
+ Returns an QueryString given the query as it is escaped in the URI format. The string MUST NOT contain any
+ value that is not a query.
+
+ The escaped query as it appears in the URI format.
+ The resulting QueryString
+
+
+
+ Returns an QueryString given the query as from a Uri object. Relative Uri objects are not supported.
+
+ The Uri object
+ The resulting QueryString
+
+
+
+ Indicates whether the current instance is equal to the other instance.
+
+
+
+
+
+
+ Indicates whether the current instance is equal to the other instance.
+
+
+
+
+
+
+ Returns the hash code for this instance.
+
+
+
+
+
+ Compares the two instances for equality.
+
+
+
+
+
+
+
+ Compares the two instances for inequality.
+
+
+
+
+
+
+
+ The unescaped query string without the leading '?' character
+
+
+
+
+ True if the query string is not empty
+
+
+
+
+ A wrapper for the request Cookie header
+
+
+
+
+ Create a new wrapper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns null rather than throwing KeyNotFoundException
+
+
+
+
+
+
+ A strongly-typed resource class, for looking up localized strings, etc.
+
+
+
+
+ Returns the cached ResourceManager instance used by this class.
+
+
+
+
+ Overrides the current thread's CurrentUICulture property for all
+ resource lookups using this strongly typed resource class.
+
+
+
+
+ Looks up a localized string similar to Conversion delegate must take one parameter..
+
+
+
+
+ Looks up a localized string similar to The type '{0}' does not match any known middleware pattern..
+
+
+
+
+ Looks up a localized string similar to The OWIN key 'server.OnSendingHeaders' is not available for this request..
+
+
+
+
+ Looks up a localized string similar to The class '{0}' does not have a constructor taking {1} arguments..
+
+
+
+
+ Looks up a localized string similar to No conversion available between {0} and {1}..
+
+
+
+
+ Looks up a localized string similar to The path must not end with a '/'.
+
+
+
+
+ Looks up a localized string similar to The path must start with a '/' followed by one or more characters..
+
+
+
+
+ Looks up a localized string similar to The path is required.
+
+
+
+
+ Looks up a localized string similar to The query string must start with a '?' unless null or empty..
+
+
+
+
+ A standard implementation of IAppBuilder
+
+
+
+
+ Initializes a new instance of the the type.
+
+
+
+
+
+
+
+
+
+
+
+ Adds a middleware node to the OWIN function pipeline. The middleware are
+ invoked in the order they are added: the first middleware passed to Use will
+ be the outermost function, and the last middleware passed to Use will be the
+ innermost.
+
+
+ The middleware parameter determines which behavior is being chained into the
+ pipeline.
+
+ If the middleware given to Use is a Delegate, then it will be invoked with the "next app" in
+ the chain as the first parameter. If the delegate takes more than the single argument,
+ then the additional values must be provided to Use in the args array.
+
+ If the middleware given to Use is a Type, then the public constructor will be
+ invoked with the "next app" in the chain as the first parameter. The resulting object
+ must have a public Invoke method. If the object has constructors which take more than
+ the single "next app" argument, then additional values may be provided in the args array.
+
+
+ Any additional args passed to Use will be passed as additional values, following the "next app"
+ parameter, when the OWIN call pipeline is build.
+
+ They are passed as additional parameters if the middleware parameter is a Delegate, or as additional
+ constructor arguments if the middle parameter is a Type.
+
+
+ The IAppBuilder itself is returned. This enables you to chain your use statements together.
+
+
+
+
+ The New method creates a new instance of an IAppBuilder. This is needed to create
+ a tree structure in your processing, rather than a linear pipeline. The new instance share the
+ same Properties, but will be created with a new, empty middleware list.
+
+ To create a tangent pipeline you would first call New, followed by several calls to Use on
+ the new builder, ending with a call to Build on the new builder. The return value from Build
+ will be the entry-point to your tangent pipeline. This entry-point may now be added to the
+ main pipeline as an argument to a switching middleware, which will either call the tangent
+ pipeline or the "next app", based on something in the request.
+
+ That said - all of that work is typically hidden by a middleware like Map, which will do that
+ for you.
+
+ The new instance of the IAppBuilder implementation
+
+
+
+ The Build is called at the point when all of the middleware should be chained
+ together. This is typically done by the hosting component which created the app builder,
+ and does not need to be called by the startup method if the IAppBuilder is passed in.
+
+
+ The Type argument indicates which calling convention should be returned, and
+ is typically typeof( ) for the OWIN
+ calling convention.
+
+
+ Returns an instance of the pipeline's entry point. This object may be safely cast to the
+ type which was provided
+
+
+
+
+ Contains arbitrary properties which may added, examined, and modified by
+ components during the startup sequence.
+
+ Returns .
+
+
+
+ Simple object used by AppBuilder as seed OWIN callable if the
+ builder.Properties["builder.DefaultApp"] is not set
+
+
+
+
+ Abstracts the system clock to facilitate testing.
+
+
+
+
+ Retrieves the current system time in UTC.
+
+
+
+
+ Provides access to the normal system clock.
+
+
+
+
+ Retrieves the current system time in UTC.
+
+
+
+
+ Response generation utilities.
+
+
+
+
+ Append the given query to the uri.
+
+ The base uri.
+ The query string to append, if any.
+ The combine result.
+
+
+
+ Append the given query key and value to the uri.
+
+ The base uri.
+ The name of the query key.
+ The query value.
+ The combine result.
+
+
+
+ Append the given query keys and values to the uri.
+
+ The base uri.
+ A collection of name value query pairs to append.
+ The combine result.
+
+
+
+ A wrapper for the response Set-Cookie header
+
+
+
+
+ Create a new wrapper
+
+
+
+
+
+ Add a new cookie and value
+
+
+
+
+
+
+ Add a new cookie
+
+
+
+
+
+
+
+ Sets an expired cookie
+
+
+
+
+
+ Sets an expired cookie
+
+
+
+
+
+
+ Extension methods used to indicate at which stage in the integrated pipeline prior middleware should run.
+
+
+
+
+ Call after other middleware to specify when they should run in the integrated pipeline.
+
+ The IAppBuilder.
+ The name of the integrated pipeline in which to run.
+ The original IAppBuilder for chaining.
+
+
+
+ Call after other middleware to specify when they should run in the integrated pipeline.
+
+ The IAppBuilder.
+ The stage of the integrated pipeline in which to run.
+ The original IAppBuilder for chaining.
+
+
+
+ Logging extension methods for IAppBuilder.
+
+
+
+
+ Sets the server.LoggerFactory in the Properties collection.
+
+
+
+
+
+
+ Retrieves the server.LoggerFactory from the Properties collection.
+
+
+
+
+
+
+ Creates a new ILogger instance from the server.LoggerFactory in the Properties collection.
+
+
+
+
+
+
+
+ Creates a new ILogger instance from the server.LoggerFactory in the Properties collection.
+
+
+
+
+
+
+
+ Creates a new ILogger instance from the server.LoggerFactory in the Properties collection.
+
+
+
+
+
+
+
+ Used to create logger instances of the given name.
+
+
+
+
+ Creates a new ILogger instance of the given name.
+
+
+
+
+
+
+ A generic interface for logging.
+
+
+
+
+ Aggregates most logging patterns to a single method. This must be compatible with the Func representation in the OWIN environment.
+
+ To check IsEnabled call WriteCore with only TraceEventType and check the return value, no event will be written.
+
+
+
+
+
+
+
+
+
+
+ Contains the parts of an address.
+
+
+
+
+ Initializes a new instance.
+
+
+
+
+
+ Initializes a new with the given parts.
+
+ The scheme.
+ The host.
+ The port.
+ The path.
+
+
+
+ Creates a new
+
+ A new
+
+
+
+ Determines whether the specified object is equal to the current object.
+
+ The other object.
+ true if the specified object is equal to the current object; otherwise, false.
+
+
+
+ Determines whether the specified object is equal to the current object.
+
+ The other object.
+ true if the specified object is equal to the current object; otherwise, false.
+
+
+
+ Returns the hash code for this instance.
+
+ The hash code for this instance.
+
+
+
+ Determines whether two specified instances of are equal.
+
+ The first object to compare.
+ The second object to compare.
+ true if left and right represent the same address; otherwise, false.
+
+
+
+ Determines whether two specified instances of are not equal.
+
+ The first object to compare.
+ The second object to compare.
+ true if left and right do not represent the same address; otherwise, false.
+
+
+
+ Gets a specified key and value from the underlying dictionary.
+
+
+ The key.
+
+
+
+
+ Sets a specified key and value in the underlying dictionary.
+
+ The key.
+ The value.
+
+
+
+
+ Gets the internal dictionary for this collection.
+
+ The internal dictionary for this collection.
+
+
+
+ The uri scheme.
+
+
+
+
+ The uri host.
+
+
+
+
+ The uri port.
+
+
+
+
+ The uri path.
+
+
+
+
+ Wraps the host.Addresses list.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The address list to set to the collection.
+
+
+
+ Adds the specified address to the collection.
+
+ The address to add to the collection.
+
+
+
+ Gets the enumerator that iterates through the collection.
+
+ The enumerator that can be used to iterate through the collection.
+
+
+
+ Gets the enumerator that iterates through the collection.
+
+ The enumerator that can be used to iterate through the collection.
+
+
+
+ Creates a new empty instance of .
+
+ A new empty instance of .
+
+
+
+ Determines whether the current collection is equal to the specified collection.
+
+ The other collection to compare to the current collection.
+ true if current collection is equal to the specified collection; otherwise, false.
+
+
+
+ Determines whether the current collection is equal to the specified object.
+
+ The object to compare to the current collection.
+ true if current collection is equal to the specified object; otherwise, false.
+
+
+
+ Gets the hash code for this instance.
+
+ The hash code for this instance.
+
+
+
+ Determines whether the first collection is equal to the second collection.
+
+ The first collection to compare.
+ The second collection to compare.
+ true if both collections are equal; otherwise, false.
+
+
+
+ Determines whether the first collection is not equal to the second collection.
+
+ The first collection to compare.
+ The second collection to compare.
+ true if both collections are not equal; otherwise, false.
+
+
+
+ Gets the underlying address list.
+
+ The underlying address list.
+
+
+
+ Gets the number of elements in the collection.
+
+ The number of elements in the collection.
+
+
+
+ Gets the item with the specified index from the collection.
+
+ The index.
+ The item with the specified index.
+
+
+
+ A wrapper for the IDictionary.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+ Determines whether the current AppProperties is equal to the specified AppProperties.
+
+ The other AppProperties to compare with the current instance.
+ true if the current AppProperties is equal to the specified AppProperties; otherwise, false.
+
+
+
+ Determines whether the current AppProperties is equal to the specified object.
+
+ The object to compare with the current instance.
+ true if the current AppProperties is equal to the specified object; otherwise, false.
+
+
+
+ Returns the hash code for this instance.
+
+ The hash code for this instance.
+
+
+
+ Determines whether the first AppPProperties is equal to the second AppProperties.
+
+ The first AppPropeties to compare.
+ The second AppPropeties to compare.
+ true if both AppProperties are equal; otherwise, false.
+
+
+
+ Determines whether the first AppPProperties is not equal to the second AppProperties.
+
+ The first AppPropeties to compare.
+ The second AppPropeties to compare.
+ true if both AppProperties are not equal; otherwise, false.
+
+
+
+ Gets the value from the dictionary with the specified key.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key.
+
+
+
+ Sets the value with the specified key.
+
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets or sets the string value for “owin.Version”.
+
+ The string value for “owin.Version”.
+
+
+
+ Gets or sets the function delegate for “builder.DefaultApp”.
+
+ The function delegate for “builder.DefaultApp”.
+
+
+
+ Gets or sets the action delegate for “builder.AddSignatureConversion”.
+
+ The action delegate for “builder.AddSignatureConversion”.
+
+
+
+ Gets or sets the string value for “host.AppName”.
+
+ The string value for “host.AppName”.
+
+
+
+ Gets or sets the text writer for “host.TraceOutput”.
+
+ The text writer for “host.TraceOutput”.
+
+
+
+ Gets or sets the cancellation token for “host.OnAppDisposing”.
+
+ The cancellation token for “host.OnAppDisposing”.
+
+
+
+ Gets or sets the address collection for “host.Addresses”.
+
+ The address collection for “host.Addresses”.
+
+
+
+ Gets or sets the list of “server.Capabilities”.
+
+ The list of “server.Capabilities”.
+
+
+
+ Gets the underlying dictionary for this instance.
+
+ The underlying dictionary for this instance.
+
+
+
+ Represents the capabilities for the builder properties.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ A new instance of the class.
+
+
+
+ Determines whether the current Capabilities instance is equal to the specified Capabilities.
+
+ The other Capabilities to compare with the current instance.
+ true if the specified object is equal to the current object; otherwise, false.
+
+
+
+ Determines whether the current Capabilities is equal to the specified object.
+
+ The object to compare with the current instance.
+ true if the current Capabilities is equal to the specified object; otherwise, false.
+
+
+
+ Returns the hash code for this instance.
+
+ The hash code for this instance.
+
+
+
+ Determines whether two specified instances of are equal.
+
+ The first object to compare.
+ The second object to compare.
+ true if the two specified instances of are equal; otherwise, false.
+
+
+
+ Determines whether two specified instances of are not equal.
+
+ The first object to compare.
+ The second object to compare.
+ true if the two specified instances of are not equal; otherwise, false.
+
+
+
+ Gets the value from the dictionary with the specified key.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key.
+
+
+
+ Sets the given key and value in the underlying dictionary.
+
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ The underling IDictionary
+
+
+
+
+ Gets or sets the string value for "sendfile.Version"
+
+ the string value for "sendfile.Version"
+
+
+
+ Gets or sets the websocket version.
+
+ The websocket version.
+
+
+
+ Options used to create a new cookie.
+
+
+
+
+ Creates a default cookie with a path of '/'.
+
+
+
+
+ Gets or sets the domain to associate the cookie with.
+
+ The domain to associate the cookie with.
+
+
+
+ Gets or sets the cookie path.
+
+ The cookie path.
+
+
+
+ Gets or sets the expiration date and time for the cookie.
+
+ The expiration date and time for the cookie.
+
+
+
+ Gets or sets a value that indicates whether to transmit the cookie using Secure Sockets Layer (SSL)—that is, over HTTPS only.
+
+ true to transmit the cookie only over an SSL connection (HTTPS); otherwise, false.
+
+
+
+ Gets or sets a value that indicates whether a cookie is accessible by client-side script.
+
+ true if a cookie is accessible by client-side script; otherwise, false.
+
+
+
+ Provides a default ILoggerFactory.
+
+
+
+
+ Provides a default ILoggerFactory based on System.Diagnostics.TraceSorce.
+
+
+
+
+ Extension methods for IAppBuilder.
+
+
+
+
+ The Build is called at the point when all of the middleware should be chained
+ together. May be called to build pipeline branches.
+
+
+ The request processing entry point for this section of the pipeline.
+
+
+
+ The Build is called at the point when all of the middleware should be chained
+ together. May be called to build pipeline branches.
+
+ The application signature.
+
+ The request processing entry point for this section of the pipeline.
+
+
+
+ Adds converters for adapting between disparate application signatures.
+
+
+
+
+
+
+ Adds converters for adapting between disparate application signatures.
+
+
+
+
+
+
+
+
+ Converts between an OwinMiddlware and an .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Transitions between and OwinMiddleware.
+
+
+
+
+
+
+
+
+
+
+
+
+ OWIN environment dictionary which stores state information about the request, response and relevant server state.
+
+
+
+
+ Adds adapters between and OwinMiddleware.
+
+
+
+
+ Adds adapters between and OwinMiddleware.
+
+
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Create a new context with only request and response header collections.
+
+
+
+
+ Create a new environment wrapper exposing request properties.
+
+ OWIN environment dictionary which stores state information about the request, response and relevant server state.
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets the request context.
+
+ The request context.
+
+
+
+ Gets or set the HTTP method.
+
+ The HTTP method.
+
+
+
+ Gets or set the HTTP request scheme from owin.RequestScheme.
+
+ The HTTP request scheme from owin.RequestScheme.
+
+
+
+ Returns true if the owin.RequestScheme is https.
+
+ true if this request is using https; otherwise, false.
+
+
+
+ Gets or set the Host header. May include the port.
+
+ The Host header.
+
+
+
+ Gets or set the owin.RequestPathBase.
+
+ The owin.RequestPathBase.
+
+
+
+ Gets or set the request path from owin.RequestPath.
+
+ The request path from owin.RequestPath.
+
+
+
+ Gets or set the query string from owin.RequestQueryString.
+
+ The query string from owin.RequestQueryString.
+
+
+
+ Gets the query value collection parsed from owin.RequestQueryString.
+
+ The query value collection parsed from owin.RequestQueryString.
+
+
+
+ Gets the uniform resource identifier (URI) associated with the request.
+
+ The uniform resource identifier (URI) associated with the request.
+
+
+
+ Gets or set the owin.RequestProtocol.
+
+ The owin.RequestProtocol.
+
+
+
+ Gets the request headers.
+
+ The request headers.
+
+
+
+ Gets the collection of Cookies for this request.
+
+ The collection of Cookies for this request.
+
+
+
+ Gets or sets the Content-Type header.
+
+ The Content-Type header.
+
+
+
+ Gets or sets the Cache-Control header.
+
+ The Cache-Control header.
+
+
+
+ Gets or sets the Media-Type header.
+
+ The Media-Type header.
+
+
+
+ Gets or set the Accept header.
+
+ The Accept header.
+
+
+
+ Gets or set the owin.RequestBody Stream.
+
+ The owin.RequestBody Stream.
+
+
+
+ Gets or sets the cancellation token for the request.
+
+ The cancellation token for the request.
+
+
+
+ Gets or set the server.LocalIpAddress.
+
+ The server.LocalIpAddress.
+
+
+
+ Gets or set the server.LocalPort.
+
+ The server.LocalPort.
+
+
+
+ Gets or set the server.RemoteIpAddress.
+
+ The server.RemoteIpAddress.
+
+
+
+ Gets or set the server.RemotePort.
+
+ The server.RemotePort.
+
+
+
+ Gets or set the server.User.
+
+ The server.User.
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Create a new context with only request and response header collections.
+
+
+
+
+ Creates a new environment wrapper exposing response properties.
+
+ OWIN environment dictionary which stores state information about the request, response and relevant server state.
+
+
+
+ Registers for an event that fires when the response headers are sent.
+
+ The callback method.
+ The callback state.
+
+
+
+ Sets a 302 response status code and the Location header.
+
+ The location where to redirect the client.
+
+
+
+ Writes the given text to the response body stream using UTF-8.
+
+ The response data.
+
+
+
+ Writes the given bytes to the response body stream.
+
+ The response data.
+
+
+
+ Writes the given bytes to the response body stream.
+
+ The response data.
+ The zero-based byte offset in the parameter at which to begin copying bytes.
+ The number of bytes to write.
+
+
+
+ Asynchronously writes the given text to the response body stream using UTF-8.
+
+ The response data.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given text to the response body stream using UTF-8.
+
+ The response data.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ The zero-based byte offset in the parameter at which to begin copying bytes.
+ The number of bytes to write.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets the request context.
+
+ The request context.
+
+
+
+ Gets or sets the optional owin.ResponseStatusCode.
+
+ The optional owin.ResponseStatusCode, or 200 if not set.
+
+
+
+ Gets or sets the the optional owin.ResponseReasonPhrase.
+
+ The the optional owin.ResponseReasonPhrase.
+
+
+
+ Gets or sets the owin.ResponseProtocol.
+
+ The owin.ResponseProtocol.
+
+
+
+ Gets the response header collection.
+
+ The response header collection.
+
+
+
+ Gets a collection used to manipulate the Set-Cookie header.
+
+ A collection used to manipulate the Set-Cookie header.
+
+
+
+ Gets or sets the Content-Length header.
+
+ The Content-Length header.
+
+
+
+ Gets or sets the Content-Type header.
+
+ The Content-Type header.
+
+
+
+ Gets or sets the Expires header.
+
+ The Expires header.
+
+
+
+ Gets or sets the E-Tag header.
+
+ The E-Tag header.
+
+
+
+ Gets or sets the owin.ResponseBody Stream.
+
+ The owin.ResponseBody Stream.
+
+
+
+ Provides an ILoggerFactory based on System.Diagnostics.TraceSource.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ Creates a factory named "Microsoft.Owin".
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+
+ Creates a new DiagnosticsLogger for the given component name.
+
+
+
+
+
+
+ ILogger extension methods for common scenarios.
+
+
+
+
+ Checks if the given TraceEventType is enabled.
+
+
+
+
+
+
+
+ Writes a verbose log message.
+
+
+
+
+
+
+ Writes an informational log message.
+
+
+
+
+
+
+ Writes a warning log message.
+
+
+
+
+
+
+
+ Writes a warning log message.
+
+
+
+
+
+
+
+ Writes an error log message.
+
+
+
+
+
+
+ Writes an error log message.
+
+
+
+
+
+
+
+ Writes a critical log message.
+
+
+
+
+
+
+ Writes a critical log message.
+
+
+
+
+
+
+
diff --git a/build/approot/packages/Microsoft.Owin/2.1.0/lib/net40/Microsoft.Owin.dll b/build/approot/packages/Microsoft.Owin/2.1.0/lib/net40/Microsoft.Owin.dll
new file mode 100644
index 00000000..d706512b
Binary files /dev/null and b/build/approot/packages/Microsoft.Owin/2.1.0/lib/net40/Microsoft.Owin.dll differ
diff --git a/build/approot/packages/Microsoft.Owin/2.1.0/lib/net45/Microsoft.Owin.XML b/build/approot/packages/Microsoft.Owin/2.1.0/lib/net45/Microsoft.Owin.XML
new file mode 100644
index 00000000..57861669
--- /dev/null
+++ b/build/approot/packages/Microsoft.Owin/2.1.0/lib/net45/Microsoft.Owin.XML
@@ -0,0 +1,3150 @@
+
+
+
+ Microsoft.Owin
+
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets the Authentication middleware functionality available on the current request.
+
+ The authentication middleware functionality available on the current request.
+
+
+
+ Gets a wrapper exposing request specific properties.
+
+ A wrapper exposing request specific properties.
+
+
+
+ Gets a wrapper exposing response specific properties.
+
+ A wrapper exposing response specific properties.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets or sets the host.TraceOutput environment value.
+
+ The host.TraceOutput TextWriter.
+
+
+
+ Extension methods for .
+
+
+
+
+ Inserts a middleware into the OWIN pipeline.
+
+ The middleware type
+
+ Any additional arguments for the middleware constructor
+
+
+
+
+ Inserts into the OWIN pipeline a middleware which does not have a next middleware reference.
+
+
+ An app that handles all requests
+
+
+
+ Inserts a middleware into the OWIN pipeline.
+
+
+ An app that handles the request or calls the given next Func
+
+
+
+
+ Represents a middleware for executing in-line function middleware.
+
+
+
+
+ An abstract base class for a standard middleware pattern.
+
+
+
+
+ Instantiates the middleware with an optional pointer to the next component.
+
+
+
+
+
+ Process an individual request.
+
+
+
+
+
+
+ The optional next component.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The pointer to next middleware.
+ A function that handles all requests.
+
+
+
+ Initializes a new instance of the class.
+
+ The pointer to next middleware.
+ A function that handles the request or calls the given next function.
+
+
+
+ Invokes the handler for processing the request.
+
+ The OWIN context.
+ The object that represents the request operation.
+
+
+
+ Contains the parsed form values.
+
+
+
+
+ Accessors for query, forms, etc.
+
+
+
+
+ Accessors for headers, query, forms, etc.
+
+
+
+
+ Get the associated value from the collection. Multiple values will be merged.
+ Returns null if the key is not present.
+
+
+
+
+
+
+ Get the associated values from the collection in their original format.
+ Returns null if the key is not present.
+
+
+
+
+
+
+ Get the associated value from the collection. Multiple values will be merged.
+ Returns null if the key is not present.
+
+
+
+
+
+
+ Create a new wrapper
+
+
+
+
+
+ Get the associated value from the collection. Multiple values will be merged.
+ Returns null if the key is not present.
+
+
+
+
+
+
+ Get the associated values from the collection in their original format.
+ Returns null if the key is not present.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get the associated value from the collection. Multiple values will be merged.
+ Returns null if the key is not present.
+
+
+
+
+
+
+ Contains the parsed form values.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The store for the form.
+
+
+
+ Represents a wrapper for owin.RequestHeaders and owin.ResponseHeaders.
+
+
+
+
+ Represents a wrapper for owin.RequestHeaders and owin.ResponseHeaders.
+
+
+
+
+ Get the associated values from the collection separated into individual values.
+ Quoted values will not be split, and the quotes will be removed.
+
+ The header name.
+ the associated values from the collection separated into individual values, or null if the key is not present.
+
+
+
+ Add a new value. Appends to the header if already present
+
+ The header name.
+ The header value.
+
+
+
+ Add new values. Each item remains a separate array entry.
+
+ The header name.
+ The header values.
+
+
+
+ Quotes any values containing comas, and then coma joins all of the values with any existing values.
+
+ The header name.
+ The header values.
+
+
+
+ Sets a specific header value.
+
+ The header name.
+ The header value.
+
+
+
+ Sets the specified header values without modification.
+
+ The header name.
+ The header values.
+
+
+
+ Quotes any values containing comas, and then coma joins all of the values.
+
+ The header name.
+ The header values.
+
+
+
+ Get or sets the associated value from the collection as a single string.
+
+ The header name.
+ the associated value from the collection as a single string or null if the key is not present.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying data store.
+
+
+
+ Returns an enumerator that iterates through a collection.
+
+ An object that can be used to iterate through the collection.
+
+
+
+ Returns an enumerator that iterates through a collection.
+
+ An object that can be used to iterate through the collection.
+
+
+
+ Get the associated value from the collection as a single string.
+
+ The header name.
+ the associated value from the collection as a single string or null if the key is not present.
+
+
+
+ Get the associated values from the collection without modification.
+
+ The header name.
+ the associated value from the collection without modification, or null if the key is not present.
+
+
+
+ Get the associated values from the collection separated into individual values.
+ Quoted values will not be split, and the quotes will be removed.
+
+ The header name.
+ the associated values from the collection separated into individual values, or null if the key is not present.
+
+
+
+ Add a new value. Appends to the header if already present
+
+ The header name.
+ The header value.
+
+
+
+ Add new values. Each item remains a separate array entry.
+
+ The header name.
+ The header values.
+
+
+
+ Quotes any values containing comas, and then coma joins all of the values with any existing values.
+
+ The header name.
+ The header values.
+
+
+
+ Sets a specific header value.
+
+ The header name.
+ The header value.
+
+
+
+ Sets the specified header values without modification.
+
+ The header name.
+ The header values.
+
+
+
+ Quotes any values containing comas, and then coma joins all of the values.
+
+ The header name.
+ The header values.
+
+
+
+ Adds the given header and values to the collection.
+
+ The header name.
+ The header values.
+
+
+
+ Determines whether the contains a specific key.
+
+ The key.
+ true if the contains a specific key; otherwise, false.
+
+
+
+ Removes the given header from the collection.
+
+ The header name.
+ true if the specified object was removed from the collection; otherwise, false.
+
+
+
+ Retrieves a value from the dictionary.
+
+ The header name.
+ The value.
+ true if the contains the key; otherwise, false.
+
+
+
+ Adds a new list of items to the collection.
+
+ The item to add.
+
+
+
+ Clears the entire list of objects.
+
+
+
+
+ Returns a value indicating whether the specified object occurs within this collection.
+
+ The item.
+ true if the specified object occurs within this collection; otherwise, false.
+
+
+
+ Copies the elements to a one-dimensional Array instance at the specified index.
+
+ The one-dimensional Array that is the destination of the specified objects copied from the .
+ The zero-based index in at which copying begins.
+
+
+
+ Removes the given item from the the collection.
+
+ The item.
+ true if the specified object was removed from the collection; otherwise, false.
+
+
+
+ Gets an that contains the keys in the ;.
+
+ An that contains the keys in the .
+
+
+
+
+
+
+
+
+ Gets the number of elements contained in the ;.
+
+ The number of elements contained in the .
+
+
+
+ Gets a value that indicates whether the is in read-only mode.
+
+ true if the is in read-only mode; otherwise, false.
+
+
+
+ Get or sets the associated value from the collection as a single string.
+
+ The header name.
+ the associated value from the collection as a single string or null if the key is not present.
+
+
+
+ Throws KeyNotFoundException if the key is not present.
+
+ The header name.
+
+
+
+
+ Represents the host portion of a Uri can be used to construct Uri's properly formatted and encoded for use in
+ HTTP headers.
+
+
+
+
+ Creates a new HostString without modification. The value should be Unicode rather than punycode, and may have a port.
+ IPv4 and IPv6 addresses are also allowed, and also may have ports.
+
+
+
+
+
+ Returns the value as normalized by ToUriComponent().
+
+
+
+
+
+ Returns the value properly formatted and encoded for use in a URI in a HTTP header.
+ Any Unicode is converted to punycode. IPv6 addresses will have brackets added if they are missing.
+
+
+
+
+
+ Creates a new HostString from the given uri component.
+ Any punycode will be converted to Unicode.
+
+
+
+
+
+
+ Creates a new HostString from the host and port of the give Uri instance.
+ Punycode will be converted to Unicode.
+
+
+
+
+
+
+ Compares the equality of the Value property, ignoring case.
+
+
+
+
+
+
+ Compares against the given object only if it is a HostString.
+
+
+
+
+
+
+ Gets a hash code for the value.
+
+
+
+
+
+ Compares the two instances for equality.
+
+
+
+
+
+
+
+ Compares the two instances for inequality.
+
+
+
+
+
+
+
+ Returns the original value from the constructor.
+
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Asynchronously reads and parses the request body as a form.
+
+ The parsed form data.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets the request context.
+
+ The request context.
+
+
+
+ Gets or set the HTTP method.
+
+ The HTTP method.
+
+
+
+ Gets or set the HTTP request scheme from owin.RequestScheme.
+
+ The HTTP request scheme from owin.RequestScheme.
+
+
+
+ Returns true if the owin.RequestScheme is https.
+
+ true if this request is using https; otherwise, false.
+
+
+
+ Gets or set the Host header. May include the port.
+
+ The Host header.
+
+
+
+ Gets or set the owin.RequestPathBase.
+
+ The owin.RequestPathBase.
+
+
+
+ Gets or set the request path from owin.RequestPath.
+
+ The request path from owin.RequestPath.
+
+
+
+ Gets or set the query string from owin.RequestQueryString.
+
+ The query string from owin.RequestQueryString.
+
+
+
+ Gets the query value collection parsed from owin.RequestQueryString.
+
+ The query value collection parsed from owin.RequestQueryString.
+
+
+
+ Gets the uniform resource identifier (URI) associated with the request.
+
+ The uniform resource identifier (URI) associated with the request.
+
+
+
+ Gets or set the owin.RequestProtocol.
+
+ The owin.RequestProtocol.
+
+
+
+ Gets the request headers.
+
+ The request headers.
+
+
+
+ Gets the collection of Cookies for this request.
+
+ The collection of Cookies for this request.
+
+
+
+ Gets or sets the Content-Type header.
+
+ The Content-Type header.
+
+
+
+ Gets or sets the Cache-Control header.
+
+ The Cache-Control header.
+
+
+
+ Gets or sets the Media-Type header.
+
+ The Media-Type header.
+
+
+
+ Gets or set the Accept header.
+
+ The Accept header.
+
+
+
+ Gets or set the owin.RequestBody Stream.
+
+ The owin.RequestBody Stream.
+
+
+
+ Gets or sets the cancellation token for the request.
+
+ The cancellation token for the request.
+
+
+
+ Gets or set the server.LocalIpAddress.
+
+ The server.LocalIpAddress.
+
+
+
+ Gets or set the server.LocalPort.
+
+ The server.LocalPort.
+
+
+
+ Gets or set the server.RemoteIpAddress.
+
+ The server.RemoteIpAddress.
+
+
+
+ Gets or set the server.RemotePort.
+
+ The server.RemotePort.
+
+
+
+ Gets or set the server.User.
+
+ The server.User.
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Registers for an event that fires when the response headers are sent.
+
+ The callback method.
+ The callback state.
+
+
+
+ Sets a 302 response status code and the Location header.
+
+ The location where to redirect the client.
+
+
+
+ Writes the given text to the response body stream using UTF-8.
+
+ The response data.
+
+
+
+ Writes the given bytes to the response body stream.
+
+ The response data.
+
+
+
+ Writes the given bytes to the response body stream.
+
+ The response data.
+ The zero-based byte offset in the parameter at which to begin copying bytes.
+ The number of bytes to write.
+
+
+
+ Asynchronously writes the given text to the response body stream using UTF-8.
+
+ The response data.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given text to the response body stream using UTF-8.
+
+ The response data.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ The zero-based byte offset in the parameter at which to begin copying bytes.
+ The number of bytes to write.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets the request context.
+
+ The request context.
+
+
+
+ Gets or sets the optional owin.ResponseStatusCode.
+
+ The optional owin.ResponseStatusCode, or 200 if not set.
+
+
+
+ Gets or sets the the optional owin.ResponseReasonPhrase.
+
+ The the optional owin.ResponseReasonPhrase.
+
+
+
+ Gets or sets the owin.ResponseProtocol.
+
+ The owin.ResponseProtocol.
+
+
+
+ Gets the response header collection.
+
+ The response header collection.
+
+
+
+ Gets a collection used to manipulate the Set-Cookie header.
+
+ A collection used to manipulate the Set-Cookie header.
+
+
+
+ Gets or sets the Content-Length header.
+
+ The Content-Length header.
+
+
+
+ Gets or sets the Content-Type header.
+
+ The Content-Type header.
+
+
+
+ Gets or sets the Expires header.
+
+ The Expires header.
+
+
+
+ Gets or sets the E-Tag header.
+
+ The E-Tag header.
+
+
+
+ Gets or sets the owin.ResponseBody Stream.
+
+ The owin.ResponseBody Stream.
+
+
+
+ Used to mark which class in an assembly should be used for automatic startup.
+
+
+
+
+ Initializes a new instance of the class
+
+ The startup class
+
+
+
+ Initializes a new instance of the class
+
+ A non-default configuration, e.g. staging.
+ The startup class
+
+
+
+ Initializes a new instance of the class
+
+ The startup class
+ Specifies which method to call
+
+
+
+ Initializes a new instance of the class
+
+ A non-default configuration, e.g. staging.
+ The startup class
+ Specifies which method to call
+
+
+
+ A non-default configuration if any. e.g. Staging.
+
+
+
+
+ The startup class
+
+
+
+
+ The name of the configuration method
+
+
+
+
+ An ordered list of known Asp.Net integrated pipeline stages. More details on the ASP.NET integrated pipeline can be found at http://msdn.microsoft.com/en-us/library/system.web.httpapplication.aspx
+
+
+
+
+ Corresponds to the AuthenticateRequest stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PostAuthenticateRequest stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the AuthorizeRequest stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PostAuthorizeRequest stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the ResolveRequestCache stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PostResolveRequestCache stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the MapRequestHandler stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PostMapRequestHandler stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the AcquireRequestState stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PostAcquireRequestState stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Corresponds to the PreRequestHandlerExecute stage of the ASP.NET integrated pipeline.
+
+
+
+
+ Extension methods for the MapMiddleware
+
+
+
+
+ If the request path starts with the given pathMatch, execute the app configured via configuration parameter instead of
+ continuing to the next component in the pipeline.
+
+
+ The path to match
+ The branch to take for positive path matches
+
+
+
+
+ If the request path starts with the given pathMatch, execute the app configured via configuration parameter instead of
+ continuing to the next component in the pipeline.
+
+
+ The path to match
+ The branch to take for positive path matches
+
+
+
+
+ Used to create path based branches in your application pipeline.
+ The owin.RequestPathBase is not included in the evaluation, only owin.RequestPath.
+ Matching paths have the matching piece removed from owin.RequestPath and added to the owin.RequestPathBase.
+
+
+
+
+ Initializes a new instance of the class
+
+ The normal pipeline taken for a negative match
+
+
+
+
+ Process an individual request.
+
+
+
+
+
+
+ Options for the Map middleware
+
+
+
+
+ The path to match
+
+
+
+
+ The branch taken for a positive match
+
+
+
+
+ Extension methods for the MapWhenMiddleware
+
+
+
+
+ Branches the request pipeline based on the result of the given predicate.
+
+
+ Invoked with the request environment to determine if the branch should be taken
+ Configures a branch to take
+
+
+
+
+ Branches the request pipeline based on the async result of the given predicate.
+
+
+ Invoked asynchronously with the request environment to determine if the branch should be taken
+ Configures a branch to take
+
+
+
+
+ Determines if the request should take a specific branch of the pipeline by passing the environment
+ to a user defined callback.
+
+
+
+
+ Initializes a new instance of the class
+
+ The normal application pipeline
+
+
+
+
+ Process an individual request.
+
+
+
+
+
+
+ Options for the MapWhen middleware
+
+
+ Options for the MapWhen middleware
+
+
+
+
+ The user callback that determines if the branch should be taken
+
+
+
+
+ The branch taken for a positive match
+
+
+
+
+ The async user callback that determines if the branch should be taken
+
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Create a new context with only request and response header collections.
+
+
+
+
+ Create a new wrapper.
+
+ OWIN environment dictionary which stores state information about the request, response and relevant server state.
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets a wrapper exposing request specific properties.
+
+ A wrapper exposing request specific properties.
+
+
+
+ Gets a wrapper exposing response specific properties.
+
+ A wrapper exposing response specific properties.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets or sets the host.TraceOutput environment value.
+
+ The host.TraceOutput TextWriter.
+
+
+
+ Gets the Authentication middleware functionality available on the current request.
+
+ The authentication middleware functionality available on the current request.
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Asynchronously reads and parses the request body as a form.
+
+ The parsed form data.
+
+
+
+ Create a new context with only request and response header collections.
+
+
+
+
+ Create a new environment wrapper exposing request properties.
+
+ OWIN environment dictionary which stores state information about the request, response and relevant server state.
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets the request context.
+
+ The request context.
+
+
+
+ Gets or set the HTTP method.
+
+ The HTTP method.
+
+
+
+ Gets or set the HTTP request scheme from owin.RequestScheme.
+
+ The HTTP request scheme from owin.RequestScheme.
+
+
+
+ Returns true if the owin.RequestScheme is https.
+
+ true if this request is using https; otherwise, false.
+
+
+
+ Gets or set the Host header. May include the port.
+
+ The Host header.
+
+
+
+ Gets or set the owin.RequestPathBase.
+
+ The owin.RequestPathBase.
+
+
+
+ Gets or set the request path from owin.RequestPath.
+
+ The request path from owin.RequestPath.
+
+
+
+ Gets or set the query string from owin.RequestQueryString.
+
+ The query string from owin.RequestQueryString.
+
+
+
+ Gets the query value collection parsed from owin.RequestQueryString.
+
+ The query value collection parsed from owin.RequestQueryString.
+
+
+
+ Gets the uniform resource identifier (URI) associated with the request.
+
+ The uniform resource identifier (URI) associated with the request.
+
+
+
+ Gets or set the owin.RequestProtocol.
+
+ The owin.RequestProtocol.
+
+
+
+ Gets the request headers.
+
+ The request headers.
+
+
+
+ Gets the collection of Cookies for this request.
+
+ The collection of Cookies for this request.
+
+
+
+ Gets or sets the Content-Type header.
+
+ The Content-Type header.
+
+
+
+ Gets or sets the Cache-Control header.
+
+ The Cache-Control header.
+
+
+
+ Gets or sets the Media-Type header.
+
+ The Media-Type header.
+
+
+
+ Gets or set the Accept header.
+
+ The Accept header.
+
+
+
+ Gets or set the owin.RequestBody Stream.
+
+ The owin.RequestBody Stream.
+
+
+
+ Gets or sets the cancellation token for the request.
+
+ The cancellation token for the request.
+
+
+
+ Gets or set the server.LocalIpAddress.
+
+ The server.LocalIpAddress.
+
+
+
+ Gets or set the server.LocalPort.
+
+ The server.LocalPort.
+
+
+
+ Gets or set the server.RemoteIpAddress.
+
+ The server.RemoteIpAddress.
+
+
+
+ Gets or set the server.RemotePort.
+
+ The server.RemotePort.
+
+
+
+ Gets or set the server.User.
+
+ The server.User.
+
+
+
+ Provides correct escaping for Path and PathBase values when needed to reconstruct a request or redirect URI string
+
+
+
+
+ Represents the empty path. This field is read-only.
+
+
+
+
+ Initialize the path string with a given value. This value must be in un-escaped format. Use
+ PathString.FromUriComponent(value) if you have a path value which is in an escaped format.
+
+ The unescaped path to be assigned to the Value property.
+
+
+
+ Provides the path string escaped in a way which is correct for combining into the URI representation.
+
+ The escaped path value
+
+
+
+ Provides the path string escaped in a way which is correct for combining into the URI representation.
+
+ The escaped path value
+
+
+
+ Returns an PathString given the path as it is escaped in the URI format. The string MUST NOT contain any
+ value that is not a path.
+
+ The escaped path as it appears in the URI format.
+ The resulting PathString
+
+
+
+ Returns an PathString given the path as from a Uri object. Relative Uri objects are not supported.
+
+ The Uri object
+ The resulting PathString
+
+
+
+ Checks if this instance starts with or exactly matches the other instance. Only full segments are matched.
+
+
+
+
+
+
+ Checks if this instance starts with or exactly matches the other instance. Only full segments are matched.
+
+
+ Any remaining segments from this instance not included in the other instance.
+
+
+
+
+ Adds two PathString instances into a combined PathString value.
+
+ The combined PathString value
+
+
+
+ Combines a PathString and QueryString into the joined URI formatted string value.
+
+ The joined URI formatted string value
+
+
+
+ Compares this PathString value to another value. The default comparison is StringComparison.OrdinalIgnoreCase.
+
+ The second PathString for comparison.
+ True if both PathString values are equal
+
+
+
+ Compares this PathString value to another value using a specific StringComparison type
+
+ The second PathString for comparison
+ The StringComparison type to use
+ True if both PathString values are equal
+
+
+
+ Compares this PathString value to another value. The default comparison is StringComparison.OrdinalIgnoreCase.
+
+ The second PathString for comparison.
+ True if both PathString values are equal
+
+
+
+ Returns the hash code for the PathString value. The hash code is provided by the OrdinalIgnoreCase implementation.
+
+ The hash code
+
+
+
+ Operator call through to Equals
+
+ The left parameter
+ The right parameter
+ True if both PathString values are equal
+
+
+
+ Operator call through to Equals
+
+ The left parameter
+ The right parameter
+ True if both PathString values are not equal
+
+
+
+ Operator call through to Add
+
+ The left parameter
+ The right parameter
+ The PathString combination of both values
+
+
+
+ Operator call through to Add
+
+ The left parameter
+ The right parameter
+ The PathString combination of both values
+
+
+
+ The unescaped path value
+
+
+
+
+ True if the path is not empty
+
+
+
+
+ Provides correct handling for QueryString value when needed to reconstruct a request or redirect URI string
+
+
+
+
+ Represents the empty query string. This field is read-only.
+
+
+
+
+ Initalize the query string with a given value. This value must be in escaped and delimited format without
+ a leading '?' character.
+
+ The query string to be assigned to the Value property.
+
+
+
+ Initialize a query string with a single given parameter name and value. The value is
+
+ The unencoded parameter name
+ The unencoded parameter value
+
+
+
+ Provides the query string escaped in a way which is correct for combining into the URI representation.
+ A leading '?' character will be prepended unless the Value is null or empty. Characters which are potentally
+ dangerous are escaped.
+
+ The query string value
+
+
+
+ Provides the query string escaped in a way which is correct for combining into the URI representation.
+ A leading '?' character will be prepended unless the Value is null or empty. Characters which are potentially
+ dangerous are escaped.
+
+ The query string value
+
+
+
+ Returns an QueryString given the query as it is escaped in the URI format. The string MUST NOT contain any
+ value that is not a query.
+
+ The escaped query as it appears in the URI format.
+ The resulting QueryString
+
+
+
+ Returns an QueryString given the query as from a Uri object. Relative Uri objects are not supported.
+
+ The Uri object
+ The resulting QueryString
+
+
+
+ Indicates whether the current instance is equal to the other instance.
+
+
+
+
+
+
+ Indicates whether the current instance is equal to the other instance.
+
+
+
+
+
+
+ Returns the hash code for this instance.
+
+
+
+
+
+ Compares the two instances for equality.
+
+
+
+
+
+
+
+ Compares the two instances for inequality.
+
+
+
+
+
+
+
+ The unescaped query string without the leading '?' character
+
+
+
+
+ True if the query string is not empty
+
+
+
+
+ A wrapper for the request Cookie header
+
+
+
+
+ Create a new wrapper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns null rather than throwing KeyNotFoundException
+
+
+
+
+
+
+ A strongly-typed resource class, for looking up localized strings, etc.
+
+
+
+
+ Returns the cached ResourceManager instance used by this class.
+
+
+
+
+ Overrides the current thread's CurrentUICulture property for all
+ resource lookups using this strongly typed resource class.
+
+
+
+
+ Looks up a localized string similar to Conversion delegate must take one parameter..
+
+
+
+
+ Looks up a localized string similar to The type '{0}' does not match any known middleware pattern..
+
+
+
+
+ Looks up a localized string similar to The OWIN key 'server.OnSendingHeaders' is not available for this request..
+
+
+
+
+ Looks up a localized string similar to The class '{0}' does not have a constructor taking {1} arguments..
+
+
+
+
+ Looks up a localized string similar to No conversion available between {0} and {1}..
+
+
+
+
+ Looks up a localized string similar to The path must not end with a '/'.
+
+
+
+
+ Looks up a localized string similar to The path must start with a '/' followed by one or more characters..
+
+
+
+
+ Looks up a localized string similar to The path is required.
+
+
+
+
+ Looks up a localized string similar to The query string must start with a '?' unless null or empty..
+
+
+
+
+ A standard implementation of IAppBuilder
+
+
+
+
+ Initializes a new instance of the the type.
+
+
+
+
+
+
+
+
+
+
+
+ Adds a middleware node to the OWIN function pipeline. The middleware are
+ invoked in the order they are added: the first middleware passed to Use will
+ be the outermost function, and the last middleware passed to Use will be the
+ innermost.
+
+
+ The middleware parameter determines which behavior is being chained into the
+ pipeline.
+
+ If the middleware given to Use is a Delegate, then it will be invoked with the "next app" in
+ the chain as the first parameter. If the delegate takes more than the single argument,
+ then the additional values must be provided to Use in the args array.
+
+ If the middleware given to Use is a Type, then the public constructor will be
+ invoked with the "next app" in the chain as the first parameter. The resulting object
+ must have a public Invoke method. If the object has constructors which take more than
+ the single "next app" argument, then additional values may be provided in the args array.
+
+
+ Any additional args passed to Use will be passed as additional values, following the "next app"
+ parameter, when the OWIN call pipeline is build.
+
+ They are passed as additional parameters if the middleware parameter is a Delegate, or as additional
+ constructor arguments if the middle parameter is a Type.
+
+
+ The IAppBuilder itself is returned. This enables you to chain your use statements together.
+
+
+
+
+ The New method creates a new instance of an IAppBuilder. This is needed to create
+ a tree structure in your processing, rather than a linear pipeline. The new instance share the
+ same Properties, but will be created with a new, empty middleware list.
+
+ To create a tangent pipeline you would first call New, followed by several calls to Use on
+ the new builder, ending with a call to Build on the new builder. The return value from Build
+ will be the entry-point to your tangent pipeline. This entry-point may now be added to the
+ main pipeline as an argument to a switching middleware, which will either call the tangent
+ pipeline or the "next app", based on something in the request.
+
+ That said - all of that work is typically hidden by a middleware like Map, which will do that
+ for you.
+
+ The new instance of the IAppBuilder implementation
+
+
+
+ The Build is called at the point when all of the middleware should be chained
+ together. This is typically done by the hosting component which created the app builder,
+ and does not need to be called by the startup method if the IAppBuilder is passed in.
+
+
+ The Type argument indicates which calling convention should be returned, and
+ is typically typeof( ) for the OWIN
+ calling convention.
+
+
+ Returns an instance of the pipeline's entry point. This object may be safely cast to the
+ type which was provided
+
+
+
+
+ Contains arbitrary properties which may added, examined, and modified by
+ components during the startup sequence.
+
+ Returns .
+
+
+
+ Simple object used by AppBuilder as seed OWIN callable if the
+ builder.Properties["builder.DefaultApp"] is not set
+
+
+
+
+ Abstracts the system clock to facilitate testing.
+
+
+
+
+ Retrieves the current system time in UTC.
+
+
+
+
+ Provides access to the normal system clock.
+
+
+
+
+ Retrieves the current system time in UTC.
+
+
+
+
+ Response generation utilities.
+
+
+
+
+ Append the given query to the uri.
+
+ The base uri.
+ The query string to append, if any.
+ The combine result.
+
+
+
+ Append the given query key and value to the uri.
+
+ The base uri.
+ The name of the query key.
+ The query value.
+ The combine result.
+
+
+
+ Append the given query keys and values to the uri.
+
+ The base uri.
+ A collection of name value query pairs to append.
+ The combine result.
+
+
+
+ A wrapper for the response Set-Cookie header
+
+
+
+
+ Create a new wrapper
+
+
+
+
+
+ Add a new cookie and value
+
+
+
+
+
+
+ Add a new cookie
+
+
+
+
+
+
+
+ Sets an expired cookie
+
+
+
+
+
+ Sets an expired cookie
+
+
+
+
+
+
+ Acts as the return value from calls to the IAuthenticationManager's AuthenticeAsync methods.
+
+
+
+
+ Create an instance of the result object
+
+ Assigned to Identity. May be null.
+ Assigned to Properties. Contains extra information carried along with the identity.
+ Assigned to Description. Contains information describing the authentication provider.
+
+
+
+ Contains the claims that were authenticated by the given AuthenticationType. If the authentication
+ type was not successful the Identity property will be null.
+
+
+
+
+ Contains extra values that were provided with the original SignIn call.
+
+
+
+
+ Contains description properties for the middleware authentication type in general. Does not
+ vary per request.
+
+
+
+
+ Contains information describing an authentication provider.
+
+
+
+
+ Initializes a new instance of the class
+
+
+
+
+ Initializes a new instance of the class
+
+
+
+
+
+ Contains metadata about the authentication provider.
+
+
+
+
+ Gets or sets the name used to reference the authentication middleware instance.
+
+
+
+
+ Gets or sets the display name for the authentication provider.
+
+
+
+
+ Extension methods used to indicate at which stage in the integrated pipeline prior middleware should run.
+
+
+
+
+ Call after other middleware to specify when they should run in the integrated pipeline.
+
+ The IAppBuilder.
+ The name of the integrated pipeline in which to run.
+ The original IAppBuilder for chaining.
+
+
+
+ Call after other middleware to specify when they should run in the integrated pipeline.
+
+ The IAppBuilder.
+ The stage of the integrated pipeline in which to run.
+ The original IAppBuilder for chaining.
+
+
+
+ Logging extension methods for IAppBuilder.
+
+
+
+
+ Sets the server.LoggerFactory in the Properties collection.
+
+
+
+
+
+
+ Retrieves the server.LoggerFactory from the Properties collection.
+
+
+
+
+
+
+ Creates a new ILogger instance from the server.LoggerFactory in the Properties collection.
+
+
+
+
+
+
+
+ Creates a new ILogger instance from the server.LoggerFactory in the Properties collection.
+
+
+
+
+
+
+
+ Creates a new ILogger instance from the server.LoggerFactory in the Properties collection.
+
+
+
+
+
+
+
+ Used to create logger instances of the given name.
+
+
+
+
+ Creates a new ILogger instance of the given name.
+
+
+
+
+
+
+ A generic interface for logging.
+
+
+
+
+ Aggregates most logging patterns to a single method. This must be compatible with the Func representation in the OWIN environment.
+
+ To check IsEnabled call WriteCore with only TraceEventType and check the return value, no event will be written.
+
+
+
+
+
+
+
+
+
+
+ Contains the parts of an address.
+
+
+
+
+ Initializes a new instance.
+
+
+
+
+
+ Initializes a new with the given parts.
+
+ The scheme.
+ The host.
+ The port.
+ The path.
+
+
+
+ Creates a new
+
+ A new
+
+
+
+ Determines whether the specified object is equal to the current object.
+
+ The other object.
+ true if the specified object is equal to the current object; otherwise, false.
+
+
+
+ Determines whether the specified object is equal to the current object.
+
+ The other object.
+ true if the specified object is equal to the current object; otherwise, false.
+
+
+
+ Returns the hash code for this instance.
+
+ The hash code for this instance.
+
+
+
+ Determines whether two specified instances of are equal.
+
+ The first object to compare.
+ The second object to compare.
+ true if left and right represent the same address; otherwise, false.
+
+
+
+ Determines whether two specified instances of are not equal.
+
+ The first object to compare.
+ The second object to compare.
+ true if left and right do not represent the same address; otherwise, false.
+
+
+
+ Gets a specified key and value from the underlying dictionary.
+
+
+ The key.
+
+
+
+
+ Sets a specified key and value in the underlying dictionary.
+
+ The key.
+ The value.
+
+
+
+
+ Gets the internal dictionary for this collection.
+
+ The internal dictionary for this collection.
+
+
+
+ The uri scheme.
+
+
+
+
+ The uri host.
+
+
+
+
+ The uri port.
+
+
+
+
+ The uri path.
+
+
+
+
+ Wraps the host.Addresses list.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The address list to set to the collection.
+
+
+
+ Adds the specified address to the collection.
+
+ The address to add to the collection.
+
+
+
+ Gets the enumerator that iterates through the collection.
+
+ The enumerator that can be used to iterate through the collection.
+
+
+
+ Gets the enumerator that iterates through the collection.
+
+ The enumerator that can be used to iterate through the collection.
+
+
+
+ Creates a new empty instance of .
+
+ A new empty instance of .
+
+
+
+ Determines whether the current collection is equal to the specified collection.
+
+ The other collection to compare to the current collection.
+ true if current collection is equal to the specified collection; otherwise, false.
+
+
+
+ Determines whether the current collection is equal to the specified object.
+
+ The object to compare to the current collection.
+ true if current collection is equal to the specified object; otherwise, false.
+
+
+
+ Gets the hash code for this instance.
+
+ The hash code for this instance.
+
+
+
+ Determines whether the first collection is equal to the second collection.
+
+ The first collection to compare.
+ The second collection to compare.
+ true if both collections are equal; otherwise, false.
+
+
+
+ Determines whether the first collection is not equal to the second collection.
+
+ The first collection to compare.
+ The second collection to compare.
+ true if both collections are not equal; otherwise, false.
+
+
+
+ Gets the underlying address list.
+
+ The underlying address list.
+
+
+
+ Gets the number of elements in the collection.
+
+ The number of elements in the collection.
+
+
+
+ Gets the item with the specified index from the collection.
+
+ The index.
+ The item with the specified index.
+
+
+
+ A wrapper for the IDictionary.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+ Determines whether the current AppProperties is equal to the specified AppProperties.
+
+ The other AppProperties to compare with the current instance.
+ true if the current AppProperties is equal to the specified AppProperties; otherwise, false.
+
+
+
+ Determines whether the current AppProperties is equal to the specified object.
+
+ The object to compare with the current instance.
+ true if the current AppProperties is equal to the specified object; otherwise, false.
+
+
+
+ Returns the hash code for this instance.
+
+ The hash code for this instance.
+
+
+
+ Determines whether the first AppPProperties is equal to the second AppProperties.
+
+ The first AppPropeties to compare.
+ The second AppPropeties to compare.
+ true if both AppProperties are equal; otherwise, false.
+
+
+
+ Determines whether the first AppPProperties is not equal to the second AppProperties.
+
+ The first AppPropeties to compare.
+ The second AppPropeties to compare.
+ true if both AppProperties are not equal; otherwise, false.
+
+
+
+ Gets the value from the dictionary with the specified key.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key.
+
+
+
+ Sets the value with the specified key.
+
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets or sets the string value for “owin.Version”.
+
+ The string value for “owin.Version”.
+
+
+
+ Gets or sets the function delegate for “builder.DefaultApp”.
+
+ The function delegate for “builder.DefaultApp”.
+
+
+
+ Gets or sets the action delegate for “builder.AddSignatureConversion”.
+
+ The action delegate for “builder.AddSignatureConversion”.
+
+
+
+ Gets or sets the string value for “host.AppName”.
+
+ The string value for “host.AppName”.
+
+
+
+ Gets or sets the text writer for “host.TraceOutput”.
+
+ The text writer for “host.TraceOutput”.
+
+
+
+ Gets or sets the cancellation token for “host.OnAppDisposing”.
+
+ The cancellation token for “host.OnAppDisposing”.
+
+
+
+ Gets or sets the address collection for “host.Addresses”.
+
+ The address collection for “host.Addresses”.
+
+
+
+ Gets or sets the list of “server.Capabilities”.
+
+ The list of “server.Capabilities”.
+
+
+
+ Gets the underlying dictionary for this instance.
+
+ The underlying dictionary for this instance.
+
+
+
+ Represents the capabilities for the builder properties.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ A new instance of the class.
+
+
+
+ Determines whether the current Capabilities instance is equal to the specified Capabilities.
+
+ The other Capabilities to compare with the current instance.
+ true if the specified object is equal to the current object; otherwise, false.
+
+
+
+ Determines whether the current Capabilities is equal to the specified object.
+
+ The object to compare with the current instance.
+ true if the current Capabilities is equal to the specified object; otherwise, false.
+
+
+
+ Returns the hash code for this instance.
+
+ The hash code for this instance.
+
+
+
+ Determines whether two specified instances of are equal.
+
+ The first object to compare.
+ The second object to compare.
+ true if the two specified instances of are equal; otherwise, false.
+
+
+
+ Determines whether two specified instances of are not equal.
+
+ The first object to compare.
+ The second object to compare.
+ true if the two specified instances of are not equal; otherwise, false.
+
+
+
+ Gets the value from the dictionary with the specified key.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key.
+
+
+
+ Sets the given key and value in the underlying dictionary.
+
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ The underling IDictionary
+
+
+
+
+ Gets or sets the string value for "sendfile.Version"
+
+ the string value for "sendfile.Version"
+
+
+
+ Gets or sets the websocket version.
+
+ The websocket version.
+
+
+
+ Options used to create a new cookie.
+
+
+
+
+ Creates a default cookie with a path of '/'.
+
+
+
+
+ Gets or sets the domain to associate the cookie with.
+
+ The domain to associate the cookie with.
+
+
+
+ Gets or sets the cookie path.
+
+ The cookie path.
+
+
+
+ Gets or sets the expiration date and time for the cookie.
+
+ The expiration date and time for the cookie.
+
+
+
+ Gets or sets a value that indicates whether to transmit the cookie using Secure Sockets Layer (SSL)—that is, over HTTPS only.
+
+ true to transmit the cookie only over an SSL connection (HTTPS); otherwise, false.
+
+
+
+ Gets or sets a value that indicates whether a cookie is accessible by client-side script.
+
+ true if a cookie is accessible by client-side script; otherwise, false.
+
+
+
+ Provides a default ILoggerFactory.
+
+
+
+
+ Provides a default ILoggerFactory based on System.Diagnostics.TraceSorce.
+
+
+
+
+ Extension methods for IAppBuilder.
+
+
+
+
+ The Build is called at the point when all of the middleware should be chained
+ together. May be called to build pipeline branches.
+
+
+ The request processing entry point for this section of the pipeline.
+
+
+
+ The Build is called at the point when all of the middleware should be chained
+ together. May be called to build pipeline branches.
+
+ The application signature.
+
+ The request processing entry point for this section of the pipeline.
+
+
+
+ Adds converters for adapting between disparate application signatures.
+
+
+
+
+
+
+ Adds converters for adapting between disparate application signatures.
+
+
+
+
+
+
+
+
+ Provides helper methods for processing requests.
+
+
+
+
+ Parses an HTTP form body.
+
+ The HTTP form body to parse.
+ The object containing the parsed HTTP form body.
+
+
+
+ Converts between an OwinMiddlware and an .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Transitions between and OwinMiddleware.
+
+
+
+
+
+
+
+
+
+
+
+
+ OWIN environment dictionary which stores state information about the request, response and relevant server state.
+
+
+
+
+ Adds adapters between and OwinMiddleware.
+
+
+
+
+ Adds adapters between and OwinMiddleware.
+
+
+
+
+
+ This wraps OWIN environment dictionary and provides strongly typed accessors.
+
+
+
+
+ Create a new context with only request and response header collections.
+
+
+
+
+ Creates a new environment wrapper exposing response properties.
+
+ OWIN environment dictionary which stores state information about the request, response and relevant server state.
+
+
+
+ Registers for an event that fires when the response headers are sent.
+
+ The callback method.
+ The callback state.
+
+
+
+ Sets a 302 response status code and the Location header.
+
+ The location where to redirect the client.
+
+
+
+ Writes the given text to the response body stream using UTF-8.
+
+ The response data.
+
+
+
+ Writes the given bytes to the response body stream.
+
+ The response data.
+
+
+
+ Writes the given bytes to the response body stream.
+
+ The response data.
+ The zero-based byte offset in the parameter at which to begin copying bytes.
+ The number of bytes to write.
+
+
+
+ Asynchronously writes the given text to the response body stream using UTF-8.
+
+ The response data.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given text to the response body stream using UTF-8.
+
+ The response data.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Asynchronously writes the given bytes to the response body stream.
+
+ The response data.
+ The zero-based byte offset in the parameter at which to begin copying bytes.
+ The number of bytes to write.
+ A token used to indicate cancellation.
+ A Task tracking the state of the write operation.
+
+
+
+ Gets a value from the OWIN environment, or returns default(T) if not present.
+
+ The type of the value.
+ The key of the value to get.
+ The value with the specified key or the default(T) if not present.
+
+
+
+ Sets the given key and value in the OWIN environment.
+
+ The type of the value.
+ The key of the value to set.
+ The value to set.
+ This instance.
+
+
+
+ Gets the OWIN environment.
+
+ The OWIN environment.
+
+
+
+ Gets the request context.
+
+ The request context.
+
+
+
+ Gets or sets the optional owin.ResponseStatusCode.
+
+ The optional owin.ResponseStatusCode, or 200 if not set.
+
+
+
+ Gets or sets the the optional owin.ResponseReasonPhrase.
+
+ The the optional owin.ResponseReasonPhrase.
+
+
+
+ Gets or sets the owin.ResponseProtocol.
+
+ The owin.ResponseProtocol.
+
+
+
+ Gets the response header collection.
+
+ The response header collection.
+
+
+
+ Gets a collection used to manipulate the Set-Cookie header.
+
+ A collection used to manipulate the Set-Cookie header.
+
+
+
+ Gets or sets the Content-Length header.
+
+ The Content-Length header.
+
+
+
+ Gets or sets the Content-Type header.
+
+ The Content-Type header.
+
+
+
+ Gets or sets the Expires header.
+
+ The Expires header.
+
+
+
+ Gets or sets the E-Tag header.
+
+ The E-Tag header.
+
+
+
+ Gets or sets the owin.ResponseBody Stream.
+
+ The owin.ResponseBody Stream.
+
+
+
+ Used to interact with authentication middleware that have been chained in the pipeline
+
+
+
+
+ Lists all of the description data provided by authentication middleware that have been chained
+
+ The authentication descriptions
+
+
+
+ Lists the description data of all of the authentication middleware which are true for a given predicate
+
+ A function provided by the caller which returns true for descriptions that should be in the returned list
+ The authentication descriptions
+
+
+
+ Call back through the middleware to ask for a specific form of authentication to be performed
+ on the current request
+
+ Identifies which middleware should respond to the request
+ for authentication. This value is compared to the middleware's Options.AuthenticationType property.
+ Returns an object with the results of the authentication. The AuthenticationResult.Identity
+ may be null if authentication failed. Even if the Identity property is null, there may still be
+ AuthenticationResult.properties and AuthenticationResult.Description information returned.
+
+
+
+ Called to perform any number of authentication mechanisms on the current request.
+
+ Identifies one or more middleware which should attempt to respond
+ Returns the AuthenticationResult information from the middleware which responded. The
+ order is determined by the order the middleware are in the pipeline. Latest added is first in the list.
+
+
+
+ Add information into the response environment that will cause the authentication middleware to challenge
+ the caller to authenticate. This also changes the status code of the response to 401. The nature of that
+ challenge varies greatly, and ranges from adding a response header or changing the 401 status code to
+ a 302 redirect.
+
+ Additional arbitrary values which may be used by particular authentication types.
+ Identify which middleware should perform their alterations on the
+ response. If the authenticationTypes is null or empty, that means the
+ AuthenticationMode.Active middleware should perform their alterations on the response.
+
+
+
+ Add information into the response environment that will cause the authentication middleware to challenge
+ the caller to authenticate. This also changes the status code of the response to 401. The nature of that
+ challenge varies greatly, and ranges from adding a response header or changing the 401 status code to
+ a 302 redirect.
+
+ Identify which middleware should perform their alterations on the
+ response. If the authenticationTypes is null or empty, that means the
+ AuthenticationMode.Active middleware should perform their alterations on the response.
+
+
+
+ Add information to the response environment that will cause the appropriate authentication middleware
+ to grant a claims-based identity to the recipient of the response. The exact mechanism of this may vary.
+ Examples include setting a cookie, to adding a fragment on the redirect url, or producing an OAuth2
+ access code or token response.
+
+ Contains additional properties the middleware are expected to persist along with
+ the claims. These values will be returned as the AuthenticateResult.properties collection when AuthenticateAsync
+ is called on subsequent requests.
+ Determines which claims are granted to the signed in user. The
+ ClaimsIdentity.AuthenticationType property is compared to the middleware's Options.AuthenticationType
+ value to determine which claims are granted by which middleware. The recommended use is to have a single
+ ClaimsIdentity which has the AuthenticationType matching a specific middleware.
+
+
+
+ Add information to the response environment that will cause the appropriate authentication middleware
+ to grant a claims-based identity to the recipient of the response. The exact mechanism of this may vary.
+ Examples include setting a cookie, to adding a fragment on the redirect url, or producing an OAuth2
+ access code or token response.
+
+ Determines which claims are granted to the signed in user. The
+ ClaimsIdentity.AuthenticationType property is compared to the middleware's Options.AuthenticationType
+ value to determine which claims are granted by which middleware. The recommended use is to have a single
+ ClaimsIdentity which has the AuthenticationType matching a specific middleware.
+
+
+
+ Add information to the response environment that will cause the appropriate authentication middleware
+ to revoke any claims identity associated the the caller. The exact method varies.
+
+ Identifies which middleware should perform the work to sign out.
+ Multiple authentication types may be provided to clear out more than one cookie at a time, or to clear
+ cookies and redirect to an external single-sign out url.
+
+
+
+ Returns the current user for the request
+
+
+
+
+ Exposes the security.Challenge environment value as a strong type.
+
+
+
+
+ Exposes the security.SignIn environment value as a strong type.
+
+
+
+
+ Exposes the security.SignOut environment value as a strong type.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Exposes the security.Challenge environment value as a strong type.
+
+
+
+
+ Exposes the security.SignIn environment value as a strong type.
+
+
+
+
+ Exposes the security.SignOut environment value as a strong type.
+
+
+
+
+ Dictionary used to store state values about the authentication session.
+
+
+
+
+ Initializes a new instance of the class
+
+
+
+
+ Initializes a new instance of the class
+
+
+
+
+
+ State values about the authentication session.
+
+
+
+
+ Gets or sets whether the authentication session is persisted across multiple requests.
+
+
+
+
+ Gets or sets the full path or absolute URI to be used as an http redirect response value.
+
+
+
+
+ Gets or sets the time at which the authentication ticket was issued.
+
+
+
+
+ Gets or sets the time at which the authentication ticket expires.
+
+
+
+
+ Exposes the security.Challenge environment value as a strong type.
+
+
+
+
+ Initializes a new instance of the class
+
+
+
+
+
+
+ List of the authentication types that should send a challenge in the response.
+
+
+
+
+ Dictionary used to store state values about the authentication session.
+
+
+
+
+ Exposes the security.SignIn environment value as a strong type.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+
+ The identity associated with the user sign in.
+
+
+
+
+ The security principal associated with the user sign in.
+
+
+
+
+ Dictionary used to store state values about the authentication session.
+
+
+
+
+ Exposes the security.SignOut environment value as a strong type.
+
+
+
+
+ Initializes a new instance of the class
+
+
+
+
+
+ List of the authentication types that should be revoked on sign out.
+
+
+
+
+ Provides an ILoggerFactory based on System.Diagnostics.TraceSource.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ Creates a factory named "Microsoft.Owin".
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+
+ Creates a new DiagnosticsLogger for the given component name.
+
+
+
+
+
+
+ ILogger extension methods for common scenarios.
+
+
+
+
+ Checks if the given TraceEventType is enabled.
+
+
+
+
+
+
+
+ Writes a verbose log message.
+
+
+
+
+
+
+ Writes an informational log message.
+
+
+
+
+
+
+ Writes a warning log message.
+
+
+
+
+
+
+
+ Writes a warning log message.
+
+
+
+
+
+
+
+ Writes an error log message.
+
+
+
+
+
+
+ Writes an error log message.
+
+
+
+
+
+
+
+ Writes a critical log message.
+
+
+
+
+
+
+ Writes a critical log message.
+
+
+
+
+
+
+
diff --git a/build/approot/packages/Microsoft.Owin/2.1.0/lib/net45/Microsoft.Owin.dll b/build/approot/packages/Microsoft.Owin/2.1.0/lib/net45/Microsoft.Owin.dll
new file mode 100644
index 00000000..6a04e4d8
Binary files /dev/null and b/build/approot/packages/Microsoft.Owin/2.1.0/lib/net45/Microsoft.Owin.dll differ
diff --git a/build/approot/packages/Microsoft.Web.Infrastructure/1.0.0/Microsoft.Web.Infrastructure.nuspec b/build/approot/packages/Microsoft.Web.Infrastructure/1.0.0/Microsoft.Web.Infrastructure.nuspec
new file mode 100644
index 00000000..1ee23707
--- /dev/null
+++ b/build/approot/packages/Microsoft.Web.Infrastructure/1.0.0/Microsoft.Web.Infrastructure.nuspec
@@ -0,0 +1,16 @@
+
+
+
+ Microsoft.Web.Infrastructure
+ 1.0.0
+ Microsoft.Web.Infrastructure
+ false
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkID=214339
+ http://www.asp.net/
+ This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time.
+ en-US
+ ASPNETWEBPAGES
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Microsoft.Web.Infrastructure/1.0.0/lib/net40/Microsoft.Web.Infrastructure.dll b/build/approot/packages/Microsoft.Web.Infrastructure/1.0.0/lib/net40/Microsoft.Web.Infrastructure.dll
new file mode 100644
index 00000000..85f1138c
Binary files /dev/null and b/build/approot/packages/Microsoft.Web.Infrastructure/1.0.0/lib/net40/Microsoft.Web.Infrastructure.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/MimeKit.nuspec b/build/approot/packages/MimeKit/1.3.0-beta7/MimeKit.nuspec
new file mode 100644
index 00000000..ee9a4f55
--- /dev/null
+++ b/build/approot/packages/MimeKit/1.3.0-beta7/MimeKit.nuspec
@@ -0,0 +1,103 @@
+
+
+
+ MimeKit
+ 1.3.0-beta7
+ MimeKit
+ false
+ Jeffrey Stedfast
+ Jeffrey Stedfast
+ http://opensource.org/licenses/MIT
+ http://github.com/jstedfast/MimeKit
+ https://raw.github.com/jstedfast/MimeKit/master/nuget/mimekit-50.png
+ MimeKit is an Open Source library for creating and parsing MIME, S/MIME and PGP messages on desktop and mobile platforms. It also supports parsing of Unix mbox files.
+
+Unlike any other .NET MIME parser, MimeKit's parser does not need to parse string input nor does it use a TextReader. Instead, it parses raw byte streams, thus allowing it to better support undeclared 8bit text in headers as well as message bodies. It also means that MimeKit's parser is significantly faster than other .NET MIME parsers (more than 25x faster than OpenPOP.NET and over 100x faster than AE.Net.Mail and MailSystem.NET).
+
+MimeKit's parser also uses a real tokenizer when parsing the headers rather than regex or string.Split() like most other .NET MIME parsers. This means that MimeKit is much more RFC-compliant than any other .NET MIME parser out there, including the commercial implementations.
+
+In addition to having a far superior parser implementation, MimeKit's object tree is not a derivative of System.Net.Mail objects and thus does not suffer from System.Net.Mail's massive limitations or bugs.
+
+API documentation can be found on the web at http://www.mimekit.net/docs
+
+For those that need SMTP, POP3 or IMAP support, check out https://github.com/jstedfast/MailKit
+ An Open Source library for creating and parsing MIME, S/MIME and PGP messages on desktop and mobile platforms.
+ * Added a new SecureMimeContext.Verify() overload that returns the extracted content stream.
+* Exposed the SecureMimeContext.GetDigitalSignatures() method as protected, allowing custom
+ subclasses to implement their own Verify() methods.
+* Fixed X509CertificateDatabase to store the X509Certificate NotBefore and NotAfter DateTimes
+ in UTC rather than LocalTime.
+* Added a work-around for GoDaddy's ASP.NET web host which does not support the iso-8859-1
+ System.Text.Encoding (used as a fallback encoding within MimeKit) by falling back to
+ Windows-1252 instead.
+* Added new convenience .ctors for CmsSigner and CmsRecipient for loading certificates from a
+ file or stream.
+* Fixed UrlScanner to properly deal with IPv6 literals in email addresses.
+* Added a MultipartReport class for multipart/report.
+* Fixed serialization for embedded message/* parts. (issue #228)
+* Fixed MimeMessage.WriteTo() to only make sure that the stream ends with a newline if it
+ wasn't parsed. (issue #227)
+* Fixed MimeMessage to only set a MIME-Version if the message was not produced by the parser.
+* Ignore timezones outside the range of -1200 to +1400.
+* Added InternetAddress.Clone() to allow addresses to be cloned.
+* Properly serialize message/rfc822 parts that contain an mbox marker.
+* Fixed MimeMessage.DkimSign() to not enforce 7bit encoding of the body. (issue #224)
+* Fixed ParameterList.IndexOf(string) to be case insensitive.
+ Xamarin Inc.
+ en-US
+ mime encryption dkim security smime s/mime openpgp pgp mbox mail email parser tnef dnxcore50 net35 net40 net45 xamarin android ios monodroid monotouch win8 wp81
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/MonoAndroid10/BouncyCastle.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/MonoAndroid10/BouncyCastle.dll
new file mode 100644
index 00000000..60ce2a9a
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/MonoAndroid10/BouncyCastle.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/MonoAndroid10/MimeKit.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/MonoAndroid10/MimeKit.dll
new file mode 100644
index 00000000..99961555
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/MonoAndroid10/MimeKit.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/Xamarin.iOS10/BouncyCastle.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/Xamarin.iOS10/BouncyCastle.dll
new file mode 100644
index 00000000..025d90b0
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/Xamarin.iOS10/BouncyCastle.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/Xamarin.iOS10/MimeKit.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/Xamarin.iOS10/MimeKit.dll
new file mode 100644
index 00000000..c731450f
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/Xamarin.iOS10/MimeKit.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/dotnet5.4/MimeKit.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/dotnet5.4/MimeKit.dll
new file mode 100644
index 00000000..f474f810
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/dotnet5.4/MimeKit.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net35/BouncyCastle.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net35/BouncyCastle.dll
new file mode 100644
index 00000000..ee732537
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net35/BouncyCastle.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net35/BouncyCastle.xml b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net35/BouncyCastle.xml
new file mode 100644
index 00000000..33e81f46
--- /dev/null
+++ b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net35/BouncyCastle.xml
@@ -0,0 +1,24206 @@
+
+
+
+ BouncyCastle
+
+
+
+ Base class for both the compress and decompress classes.
+ Holds common arrays, and static data.
+
+ @author Keiron Liddle
+
+
+ An input stream that decompresses from the BZip2 format (with the file
+ header chars) to be read as any other stream.
+
+ @author Keiron Liddle
+
+ NB: note this class has been modified to read the leading BZ from the
+ start of the BZIP2 stream to make it compatible with other PGP programs.
+
+
+ An output stream that compresses into the BZip2 format (with the file
+ header chars) into another stream.
+
+ @author Keiron Liddle
+
+ TODO: Update to BZip2 1.0.1
+ NB: note this class has been modified to add a leading BZ to the
+ start of the BZIP2 stream to make it compatible with other PGP programs.
+
+
+
+ modified by Oliver Merkel, 010128
+
+
+
+ A simple class the hold and calculate the CRC for sanity checking
+ of the data.
+
+ @author Keiron Liddle
+
+
+ Return the DER encoding of the object, null if the DER encoding can not be made.
+
+ @return a DER byte array, null otherwise.
+
+
+ a general purpose ASN.1 decoder - note: this class differs from the
+ others in that it returns null after it has read the last object in
+ the stream. If an ASN.1 Null is encountered a Der/BER Null object is
+ returned.
+
+
+ Create an ASN1InputStream where no DER object will be longer than limit.
+
+ @param input stream containing ASN.1 encoded data.
+ @param limit maximum size of a DER encoded object.
+
+
+ Create an ASN1InputStream based on the input byte array. The length of DER objects in
+ the stream is automatically limited to the length of the input array.
+
+ @param input array containing ASN.1 encoded data.
+
+
+ build an object given its tag and the number of bytes to construct it from.
+
+
+ A Null object.
+
+
+ Create a base ASN.1 object from a byte array.
+ The byte array to parse.
+ The base ASN.1 object represented by the byte array.
+ If there is a problem parsing the data.
+
+
+ Read a base ASN.1 object from a stream.
+ The stream to parse.
+ The base ASN.1 object represented by the byte array.
+ If there is a problem parsing the data.
+
+
+ return an Octet string from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return an Octet string from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ @param string the octets making up the octet string.
+
+
+ return an Asn1Sequence from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Return an ASN1 sequence from a tagged object. There is a special
+ case here, if an object appears to have been explicitly tagged on
+ reading but we were expecting it to be implicitly tagged in the
+ normal course of events it indicates that we lost the surrounding
+ sequence - so we need to add it back (this will happen if the tagged
+ object is a sequence that contains other sequences). If you are
+ dealing with implicitly tagged sequences you really should
+ be using this method.
+
+ @param obj the tagged object.
+ @param explicitly true if the object is meant to be explicitly tagged,
+ false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return the object at the sequence position indicated by index.
+
+ @param index the sequence number (starting at zero) of the object
+ @return the object at the sequence position indicated by index.
+
+
+ return an ASN1Set from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Return an ASN1 set from a tagged object. There is a special
+ case here, if an object appears to have been explicitly tagged on
+ reading but we were expecting it to be implicitly tagged in the
+ normal course of events it indicates that we lost the surrounding
+ set - so we need to add it back (this will happen if the tagged
+ object is a sequence that contains other sequences). If you are
+ dealing with implicitly tagged sets you really should
+ be using this method.
+
+ @param obj the tagged object.
+ @param explicitly true if the object is meant to be explicitly tagged
+ false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return the object at the set position indicated by index.
+
+ @param index the set number (starting at zero) of the object
+ @return the object at the set position indicated by index.
+
+
+ ASN.1 TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if the object is explicitly tagged.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ return whether or not the object may be explicitly tagged.
+
+ Note: if the object has been read from an input stream, the only
+ time you can be sure if isExplicit is returning the true state of
+ affairs is if it returns false. An implicitly tagged object may appear
+ to be explicitly tagged, so you need to understand the context under
+ which the reading was done as well, see GetObject below.
+
+
+ return whatever was following the tag.
+
+ Note: tagged objects are generally context dependent if you're
+ trying to extract a tagged object you should be going via the
+ appropriate GetInstance method.
+
+
+ Return the object held in this tagged object as a parser assuming it has
+ the type of the passed in tag. If the object doesn't have a parser
+ associated with it, the base object is returned.
+
+
+ A BER Null object.
+
+
+ convert a vector of octet strings into a single byte string
+
+
+ The octets making up the octet string.
+
+
+ return the DER octets that make up this string.
+
+
+ create an empty sequence
+
+
+ create a sequence containing one object
+
+
+ create a sequence containing a vector of objects.
+
+
+ create an empty sequence
+
+
+ create a set containing one object
+
+
+ create a set containing a vector of objects.
+
+
+ BER TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if an explicitly tagged object.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ create an implicitly tagged object that contains a zero
+ length sequence.
+
+
+ Class representing the DER-type External
+
+
+ Creates a new instance of DerExternal
+ See X.690 for more informations about the meaning of these parameters
+ @param directReference The direct reference or null if not set.
+ @param indirectReference The indirect reference or null if not set.
+ @param dataValueDescriptor The data value descriptor or null if not set.
+ @param externalData The external data in its encoded form.
+
+
+ Creates a new instance of DerExternal.
+ See X.690 for more informations about the meaning of these parameters
+ @param directReference The direct reference or null if not set.
+ @param indirectReference The indirect reference or null if not set.
+ @param dataValueDescriptor The data value descriptor or null if not set.
+ @param encoding The encoding to be used for the external data
+ @param externalData The external data
+
+
+ The encoding of the content. Valid values are
+
+ 0 single-ASN1-type
+ 1 OCTET STRING
+ 2 BIT STRING
+
+
+
+ Base class for an application specific object
+
+
+ Return the enclosed object assuming explicit tagging.
+
+ @return the resulting object
+ @throws IOException if reconstruction fails.
+
+
+ Return the enclosed object assuming implicit tagging.
+
+ @param derTagNo the type tag that should be applied to the object's contents.
+ @return the resulting object
+ @throws IOException if reconstruction fails.
+
+
+ Der BMPString object.
+
+
+ return a BMP string from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a BMP string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ return a Bit string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Bit string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ @param data the octets making up the bit string.
+ @param padBits the number of extra bits at the end of the string.
+
+
+ Return the octets contained in this BIT STRING, checking that this BIT STRING really
+ does represent an octet aligned string. Only use this method when the standard you are
+ following dictates that the BIT STRING will be octet aligned.
+
+ @return a copy of the octet aligned data.
+
+
+ @return the value of the bit string as an int (truncating if necessary)
+
+
+ return a bool from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a DerBoolean from the passed in bool.
+
+
+ return a Boolean from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return an integer from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Enumerated from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ Generalized time object.
+
+
+ return a generalized time from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Generalized Time object from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ The correct format for this is YYYYMMDDHHMMSS[.f]Z, or without the Z
+ for local time, or Z+-HHMM on the end, for difference between local
+ time and UTC time. The fractional second amount f must consist of at
+ least one number with trailing zeroes removed.
+
+ @param time the time string.
+ @exception ArgumentException if string is an illegal format.
+
+
+ base constructor from a local time object
+
+
+ Return the time.
+ @return The time string as it appeared in the encoded object.
+
+
+ return the time - always in the form of
+ YYYYMMDDhhmmssGMT(+hh:mm|-hh:mm).
+
+ Normally in a certificate we would expect "Z" rather than "GMT",
+ however adding the "GMT" means we can just use:
+
+ dateF = new SimpleDateFormat("yyyyMMddHHmmssz");
+
+ To read in the time and Get a date which is compatible with our local
+ time zone.
+
+
+ return a Graphic String from the passed in object
+
+ @param obj a DerGraphicString or an object that can be converted into one.
+ @exception IllegalArgumentException if the object cannot be converted.
+ @return a DerGraphicString instance, or null.
+
+
+ return a Graphic String from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the tagged object cannot
+ be converted.
+ @return a DerGraphicString instance, or null.
+
+
+ basic constructor - with bytes.
+ @param string the byte encoding of the characters making up the string.
+
+
+ Der IA5String object - this is an ascii string.
+
+
+ return a IA5 string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an IA5 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - without validation.
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in an IA5String.
+
+
+ return true if the passed in String can be represented without
+ loss as an IA5String, false otherwise.
+
+ @return true if in printable set, false otherwise.
+
+
+ return an integer from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Integer from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ in some cases positive values Get crammed into a space,
+ that's not quite big enough...
+
+
+ A Null object.
+
+
+ Der NumericString object - this is an ascii string of characters {0,1,2,3,4,5,6,7,8,9, }.
+
+
+ return a Numeric string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Numeric string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - without validation..
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in a NumericString.
+
+
+ Return true if the string can be represented as a NumericString ('0'..'9', ' ')
+
+ @param str string to validate.
+ @return true if numeric, fale otherwise.
+
+
+ return an Oid from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an object Identifier from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ Return true if this oid is an extension of the passed in branch, stem.
+ @param stem the arc or branch that is a possible parent.
+ @return true if the branch is on the passed in stem, false otherwise.
+
+
+ The octets making up the octet string.
+
+
+ Der PrintableString object.
+
+
+ return a printable string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Printable string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor - this does not validate the string
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in a PrintableString.
+
+
+ return true if the passed in String can be represented without
+ loss as a PrintableString, false otherwise.
+
+ @return true if in printable set, false otherwise.
+
+
+ create an empty sequence
+
+
+ create a sequence containing one object
+
+
+ create a sequence containing a vector of objects.
+
+
+ A Der encoded set object
+
+
+ create an empty set
+
+
+ @param obj - a single object that makes up the set.
+
+
+ @param v - a vector of objects making up the set.
+
+
+ Der T61String (also the teletex string) - 8-bit characters
+
+
+ return a T61 string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an T61 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - with string.
+
+
+ DER TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if an explicitly tagged object.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ create an implicitly tagged object that contains a zero
+ length sequence.
+
+
+ UTC time object.
+
+
+ return an UTC Time from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an UTC Time from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ The correct format for this is YYMMDDHHMMSSZ (it used to be that seconds were
+ never encoded. When you're creating one of these objects from scratch, that's
+ what you want to use, otherwise we'll try to deal with whatever Gets read from
+ the input stream... (this is why the input format is different from the GetTime()
+ method output).
+
+ @param time the time string.
+
+
+ base constructor from a DateTime object
+
+
+ return the time as a date based on whatever a 2 digit year will return. For
+ standardised processing use ToAdjustedDateTime().
+
+ @return the resulting date
+ @exception ParseException if the date string cannot be parsed.
+
+
+ return the time as an adjusted date
+ in the range of 1950 - 2049.
+
+ @return a date in the range of 1950 to 2049.
+ @exception ParseException if the date string cannot be parsed.
+
+
+ return the time - always in the form of
+ YYMMDDhhmmssGMT(+hh:mm|-hh:mm).
+
+ Normally in a certificate we would expect "Z" rather than "GMT",
+ however adding the "GMT" means we can just use:
+
+ dateF = new SimpleDateFormat("yyMMddHHmmssz");
+
+ To read in the time and Get a date which is compatible with our local
+ time zone.
+
+ Note: In some cases, due to the local date processing, this
+ may lead to unexpected results. If you want to stick the normal
+ convention of 1950 to 2049 use the GetAdjustedTime() method.
+
+
+
+ Return a time string as an adjusted date with a 4 digit year.
+ This goes in the range of 1950 - 2049.
+
+
+
+ Der UTF8String object.
+
+
+ return an UTF8 string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an UTF8 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ Der UniversalString object.
+
+
+ return a Universal string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Universal string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ return a Videotex String from the passed in object
+
+ @param obj a DERVideotexString or an object that can be converted into one.
+ @exception IllegalArgumentException if the object cannot be converted.
+ @return a DERVideotexString instance, or null.
+
+
+ return a Videotex String from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the tagged object cannot
+ be converted.
+ @return a DERVideotexString instance, or null.
+
+
+ basic constructor - with bytes.
+ @param string the byte encoding of the characters making up the string.
+
+
+ Der VisibleString object.
+
+
+ return a Visible string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Visible string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ Marker interface for CHOICE objects - if you implement this in a roll-your-own
+ object, any attempt to tag the object implicitly will convert the tag to an
+ explicit one as the encoding rules require.
+
+ If you use this interface your class should also implement the getInstance
+ pattern which takes a tag object and the tagging mode used.
+
+
+
+ basic interface for Der string objects.
+
+
+ class for breaking up an Oid into it's component tokens, ala
+ java.util.StringTokenizer. We need this class as some of the
+ lightweight Java environment don't support classes like
+ StringTokenizer.
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+
+ CAKeyUpdAnnContent ::= SEQUENCE {
+ oldWithNew CmpCertificate, -- old pub signed with new priv
+ newWithOld CmpCertificate, -- new pub signed with old priv
+ newWithNew CmpCertificate -- new pub signed with new priv
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertConfirmContent ::= SEQUENCE OF CertStatus
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertOrEncCert ::= CHOICE {
+ certificate [0] CMPCertificate,
+ encryptedCert [1] EncryptedValue
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertRepMessage ::= SEQUENCE {
+ caPubs [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+ OPTIONAL,
+ response SEQUENCE OF CertResponse
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertResponse ::= SEQUENCE {
+ certReqId INTEGER,
+ -- to match this response with corresponding request (a value
+ -- of -1 is to be used if certReqId is not specified in the
+ -- corresponding request)
+ status PKIStatusInfo,
+ certifiedKeyPair CertifiedKeyPair OPTIONAL,
+ rspInfo OCTET STRING OPTIONAL
+ -- analogous to the id-regInfo-utf8Pairs string defined
+ -- for regInfo in CertReqMsg [CRMF]
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertStatus ::= SEQUENCE {
+ certHash OCTET STRING,
+ -- the hash of the certificate, using the same hash algorithm
+ -- as is used to create and verify the certificate signature
+ certReqId INTEGER,
+ -- to match this confirmation with the corresponding req/rep
+ statusInfo PKIStatusInfo OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertifiedKeyPair ::= SEQUENCE {
+ certOrEncCert CertOrEncCert,
+ privateKey [0] EncryptedValue OPTIONAL,
+ -- see [CRMF] for comment on encoding
+ publicationInfo [1] PKIPublicationInfo OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ Challenge ::= SEQUENCE {
+ owf AlgorithmIdentifier OPTIONAL,
+
+ -- MUST be present in the first Challenge; MAY be omitted in
+ -- any subsequent Challenge in POPODecKeyChallContent (if
+ -- omitted, then the owf used in the immediately preceding
+ -- Challenge is to be used).
+
+ witness OCTET STRING,
+ -- the result of applying the one-way function (owf) to a
+ -- randomly-generated INTEGER, A. [Note that a different
+ -- INTEGER MUST be used for each Challenge.]
+ challenge OCTET STRING
+ -- the encryption (under the public key for which the cert.
+ -- request is being made) of Rand, where Rand is specified as
+ -- Rand ::= SEQUENCE {
+ -- int INTEGER,
+ -- - the randomly-generated INTEGER A (above)
+ -- sender GeneralName
+ -- - the sender's name (as included in PKIHeader)
+ -- }
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Note: the addition of attribute certificates is a BC extension.
+
+
+
+ CMPCertificate ::= CHOICE {
+ x509v3PKCert Certificate
+ x509v2AttrCert [1] AttributeCertificate
+ }
+
+ Note: the addition of attribute certificates is a BC extension.
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CrlAnnContent ::= SEQUENCE OF CertificateList
+
+ @return a basic ASN.1 object representation.
+
+
+
+ ErrorMsgContent ::= SEQUENCE {
+ pKIStatusInfo PKIStatusInfo,
+ errorCode INTEGER OPTIONAL,
+ -- implementation-specific error codes
+ errorDetails PKIFreeText OPTIONAL
+ -- implementation-specific error details
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+
+ GenRepContent ::= SEQUENCE OF InfoTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+ Example InfoTypeAndValue contents include, but are not limited
+ to, the following (un-comment in this ASN.1 module and use as
+ appropriate for a given environment):
+
+ id-it-caProtEncCert OBJECT IDENTIFIER ::= {id-it 1}
+ CAProtEncCertValue ::= CMPCertificate
+ id-it-signKeyPairTypes OBJECT IDENTIFIER ::= {id-it 2}
+ SignKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ id-it-encKeyPairTypes OBJECT IDENTIFIER ::= {id-it 3}
+ EncKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ id-it-preferredSymmAlg OBJECT IDENTIFIER ::= {id-it 4}
+ PreferredSymmAlgValue ::= AlgorithmIdentifier
+ id-it-caKeyUpdateInfo OBJECT IDENTIFIER ::= {id-it 5}
+ CAKeyUpdateInfoValue ::= CAKeyUpdAnnContent
+ id-it-currentCRL OBJECT IDENTIFIER ::= {id-it 6}
+ CurrentCRLValue ::= CertificateList
+ id-it-unsupportedOIDs OBJECT IDENTIFIER ::= {id-it 7}
+ UnsupportedOIDsValue ::= SEQUENCE OF OBJECT IDENTIFIER
+ id-it-keyPairParamReq OBJECT IDENTIFIER ::= {id-it 10}
+ KeyPairParamReqValue ::= OBJECT IDENTIFIER
+ id-it-keyPairParamRep OBJECT IDENTIFIER ::= {id-it 11}
+ KeyPairParamRepValue ::= AlgorithmIdentifer
+ id-it-revPassphrase OBJECT IDENTIFIER ::= {id-it 12}
+ RevPassphraseValue ::= EncryptedValue
+ id-it-implicitConfirm OBJECT IDENTIFIER ::= {id-it 13}
+ ImplicitConfirmValue ::= NULL
+ id-it-confirmWaitTime OBJECT IDENTIFIER ::= {id-it 14}
+ ConfirmWaitTimeValue ::= GeneralizedTime
+ id-it-origPKIMessage OBJECT IDENTIFIER ::= {id-it 15}
+ OrigPKIMessageValue ::= PKIMessages
+ id-it-suppLangTags OBJECT IDENTIFIER ::= {id-it 16}
+ SuppLangTagsValue ::= SEQUENCE OF UTF8String
+
+ where
+
+ id-pkix OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3)
+ dod(6) internet(1) security(5) mechanisms(5) pkix(7)}
+ and
+ id-it OBJECT IDENTIFIER ::= {id-pkix 4}
+
+
+
+
+ InfoTypeAndValue ::= SEQUENCE {
+ infoType OBJECT IDENTIFIER,
+ infoValue ANY DEFINED BY infoType OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ KeyRecRepContent ::= SEQUENCE {
+ status PKIStatusInfo,
+ newSigCert [0] CMPCertificate OPTIONAL,
+ caCerts [1] SEQUENCE SIZE (1..MAX) OF
+ CMPCertificate OPTIONAL,
+ keyPairHist [2] SEQUENCE SIZE (1..MAX) OF
+ CertifiedKeyPair OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ OobCertHash ::= SEQUENCE {
+ hashAlg [0] AlgorithmIdentifier OPTIONAL,
+ certId [1] CertId OPTIONAL,
+ hashVal BIT STRING
+ -- hashVal is calculated over the Der encoding of the
+ -- self-signed certificate with the identifier certID.
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PkiBody.
+ @param type one of the TYPE_* constants
+ @param content message content
+
+
+
+ PkiBody ::= CHOICE { -- message-specific body elements
+ ir [0] CertReqMessages, --Initialization Request
+ ip [1] CertRepMessage, --Initialization Response
+ cr [2] CertReqMessages, --Certification Request
+ cp [3] CertRepMessage, --Certification Response
+ p10cr [4] CertificationRequest, --imported from [PKCS10]
+ popdecc [5] POPODecKeyChallContent, --pop Challenge
+ popdecr [6] POPODecKeyRespContent, --pop Response
+ kur [7] CertReqMessages, --Key Update Request
+ kup [8] CertRepMessage, --Key Update Response
+ krr [9] CertReqMessages, --Key Recovery Request
+ krp [10] KeyRecRepContent, --Key Recovery Response
+ rr [11] RevReqContent, --Revocation Request
+ rp [12] RevRepContent, --Revocation Response
+ ccr [13] CertReqMessages, --Cross-Cert. Request
+ ccp [14] CertRepMessage, --Cross-Cert. Response
+ ckuann [15] CAKeyUpdAnnContent, --CA Key Update Ann.
+ cann [16] CertAnnContent, --Certificate Ann.
+ rann [17] RevAnnContent, --Revocation Ann.
+ crlann [18] CRLAnnContent, --CRL Announcement
+ pkiconf [19] PKIConfirmContent, --Confirmation
+ nested [20] NestedMessageContent, --Nested Message
+ genm [21] GenMsgContent, --General Message
+ genp [22] GenRepContent, --General Response
+ error [23] ErrorMsgContent, --Error Message
+ certConf [24] CertConfirmContent, --Certificate confirm
+ pollReq [25] PollReqContent, --Polling request
+ pollRep [26] PollRepContent --Polling response
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiConfirmContent ::= NULL
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PKIFailureInfo ::= BIT STRING {
+ badAlg (0),
+ -- unrecognized or unsupported Algorithm Identifier
+ badMessageCheck (1), -- integrity check failed (e.g., signature did not verify)
+ badRequest (2),
+ -- transaction not permitted or supported
+ badTime (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+ badCertId (4), -- no certificate could be found matching the provided criteria
+ badDataFormat (5),
+ -- the data submitted has the wrong format
+ wrongAuthority (6), -- the authority indicated in the request is different from the one creating the response token
+ incorrectData (7), -- the requester's data is incorrect (for notary services)
+ missingTimeStamp (8), -- when the timestamp is missing but should be there (by policy)
+ badPOP (9) -- the proof-of-possession failed
+ certRevoked (10),
+ certConfirmed (11),
+ wrongIntegrity (12),
+ badRecipientNonce (13),
+ timeNotAvailable (14),
+ -- the TSA's time source is not available
+ unacceptedPolicy (15),
+ -- the requested TSA policy is not supported by the TSA
+ unacceptedExtension (16),
+ -- the requested extension is not supported by the TSA
+ addInfoNotAvailable (17)
+ -- the additional information requested could not be understood
+ -- or is not available
+ badSenderNonce (18),
+ badCertTemplate (19),
+ signerNotTrusted (20),
+ transactionIdInUse (21),
+ unsupportedVersion (22),
+ notAuthorized (23),
+ systemUnavail (24),
+ systemFailure (25),
+ -- the request cannot be handled due to system failure
+ duplicateCertReq (26)
+
+
+
+ Basic constructor.
+
+
+ Return the number of string elements present.
+
+ @return number of elements present.
+
+
+ Return the UTF8STRING at index.
+
+ @param index index of the string of interest
+ @return the string at index.
+
+
+
+ PkiFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String
+
+
+
+ Value for a "null" recipient or sender.
+
+
+
+ PkiHeader ::= SEQUENCE {
+ pvno INTEGER { cmp1999(1), cmp2000(2) },
+ sender GeneralName,
+ -- identifies the sender
+ recipient GeneralName,
+ -- identifies the intended recipient
+ messageTime [0] GeneralizedTime OPTIONAL,
+ -- time of production of this message (used when sender
+ -- believes that the transport will be "suitable"; i.e.,
+ -- that the time will still be meaningful upon receipt)
+ protectionAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used for calculation of protection bits
+ senderKID [2] KeyIdentifier OPTIONAL,
+ recipKID [3] KeyIdentifier OPTIONAL,
+ -- to identify specific keys used for protection
+ transactionID [4] OCTET STRING OPTIONAL,
+ -- identifies the transaction; i.e., this will be the same in
+ -- corresponding request, response, certConf, and PKIConf
+ -- messages
+ senderNonce [5] OCTET STRING OPTIONAL,
+ recipNonce [6] OCTET STRING OPTIONAL,
+ -- nonces used to provide replay protection, senderNonce
+ -- is inserted by the creator of this message; recipNonce
+ -- is a nonce previously inserted in a related message by
+ -- the intended recipient of this message
+ freeText [7] PKIFreeText OPTIONAL,
+ -- this may be used to indicate context-specific instructions
+ -- (this field is intended for human consumption)
+ generalInfo [8] SEQUENCE SIZE (1..MAX) OF
+ InfoTypeAndValue OPTIONAL
+ -- this may be used to convey context-specific information
+ -- (this field not primarily intended for human consumption)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PKIHeader ::= SEQUENCE {
+ pvno INTEGER { cmp1999(1), cmp2000(2) },
+ sender GeneralName,
+ -- identifies the sender
+ recipient GeneralName,
+ -- identifies the intended recipient
+ messageTime [0] GeneralizedTime OPTIONAL,
+ -- time of production of this message (used when sender
+ -- believes that the transport will be "suitable"; i.e.,
+ -- that the time will still be meaningful upon receipt)
+ protectionAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used for calculation of protection bits
+ senderKID [2] KeyIdentifier OPTIONAL,
+ recipKID [3] KeyIdentifier OPTIONAL,
+ -- to identify specific keys used for protection
+ transactionID [4] OCTET STRING OPTIONAL,
+ -- identifies the transaction; i.e., this will be the same in
+ -- corresponding request, response, certConf, and PKIConf
+ -- messages
+ senderNonce [5] OCTET STRING OPTIONAL,
+ recipNonce [6] OCTET STRING OPTIONAL,
+ -- nonces used to provide replay protection, senderNonce
+ -- is inserted by the creator of this message; recipNonce
+ -- is a nonce previously inserted in a related message by
+ -- the intended recipient of this message
+ freeText [7] PKIFreeText OPTIONAL,
+ -- this may be used to indicate context-specific instructions
+ -- (this field is intended for human consumption)
+ generalInfo [8] SEQUENCE SIZE (1..MAX) OF
+ InfoTypeAndValue OPTIONAL
+ -- this may be used to convey context-specific information
+ -- (this field not primarily intended for human consumption)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PkiMessage.
+
+ @param header message header
+ @param body message body
+ @param protection message protection (may be null)
+ @param extraCerts extra certificates (may be null)
+
+
+
+ PkiMessage ::= SEQUENCE {
+ header PKIHeader,
+ body PKIBody,
+ protection [0] PKIProtection OPTIONAL,
+ extraCerts [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+ OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiMessages ::= SEQUENCE SIZE (1..MAX) OF PkiMessage
+
+ @return a basic ASN.1 object representation.
+
+
+ @param status
+
+
+ @param status
+ @param statusString
+
+
+
+ PkiStatusInfo ::= SEQUENCE {
+ status PKIStatus, (INTEGER)
+ statusString PkiFreeText OPTIONAL,
+ failInfo PkiFailureInfo OPTIONAL (BIT STRING)
+ }
+
+ PKIStatus:
+ granted (0), -- you got exactly what you asked for
+ grantedWithMods (1), -- you got something like what you asked for
+ rejection (2), -- you don't get it, more information elsewhere in the message
+ waiting (3), -- the request body part has not yet been processed, expect to hear more later
+ revocationWarning (4), -- this message contains a warning that a revocation is imminent
+ revocationNotification (5), -- notification that a revocation has occurred
+ keyUpdateWarning (6) -- update already done for the oldCertId specified in CertReqMsg
+
+ PkiFailureInfo:
+ badAlg (0), -- unrecognized or unsupported Algorithm Identifier
+ badMessageCheck (1), -- integrity check failed (e.g., signature did not verify)
+ badRequest (2), -- transaction not permitted or supported
+ badTime (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+ badCertId (4), -- no certificate could be found matching the provided criteria
+ badDataFormat (5), -- the data submitted has the wrong format
+ wrongAuthority (6), -- the authority indicated in the request is different from the one creating the response token
+ incorrectData (7), -- the requester's data is incorrect (for notary services)
+ missingTimeStamp (8), -- when the timestamp is missing but should be there (by policy)
+ badPOP (9) -- the proof-of-possession failed
+
+
+
+
+
+ PbmParameter ::= SEQUENCE {
+ salt OCTET STRING,
+ -- note: implementations MAY wish to limit acceptable sizes
+ -- of this string to values appropriate for their environment
+ -- in order to reduce the risk of denial-of-service attacks
+ owf AlgorithmIdentifier,
+ -- AlgId for a One-Way Function (SHA-1 recommended)
+ iterationCount INTEGER,
+ -- number of times the OWF is applied
+ -- note: implementations MAY wish to limit acceptable sizes
+ -- of this integer to values appropriate for their environment
+ -- in order to reduce the risk of denial-of-service attacks
+ mac AlgorithmIdentifier
+ -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
+ } -- or HMAC [RFC2104, RFC2202])
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PollRepContent ::= SEQUENCE OF SEQUENCE {
+ certReqId INTEGER,
+ checkAfter INTEGER, -- time in seconds
+ reason PKIFreeText OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PollReqContent ::= SEQUENCE OF SEQUENCE {
+ certReqId INTEGER
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoDecKeyChallContent ::= SEQUENCE OF Challenge
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoDecKeyRespContent ::= SEQUENCE OF INTEGER
+
+ @return a basic ASN.1 object representation.
+
+
+
+ ProtectedPart ::= SEQUENCE {
+ header PKIHeader,
+ body PKIBody
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevAnnContent ::= SEQUENCE {
+ status PKIStatus,
+ certId CertId,
+ willBeRevokedAt GeneralizedTime,
+ badSinceDate GeneralizedTime,
+ crlDetails Extensions OPTIONAL
+ -- extra CRL details (e.g., crl number, reason, location, etc.)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevDetails ::= SEQUENCE {
+ certDetails CertTemplate,
+ -- allows requester to specify as much as they can about
+ -- the cert. for which revocation is requested
+ -- (e.g., for cases in which serialNumber is not available)
+ crlEntryDetails Extensions OPTIONAL
+ -- requested crlEntryExtensions
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevRepContent ::= SEQUENCE {
+ status SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
+ -- in same order as was sent in RevReqContent
+ revCerts [0] SEQUENCE SIZE (1..MAX) OF CertId OPTIONAL,
+ -- IDs for which revocation was requested
+ -- (same order as status)
+ crls [1] SEQUENCE SIZE (1..MAX) OF CertificateList OPTIONAL
+ -- the resulting CRLs (there may be more than one)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevReqContent ::= SEQUENCE OF RevDetails
+
+ @return a basic ASN.1 object representation.
+
+
+ return an Attribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attribute ::= SEQUENCE {
+ attrType OBJECT IDENTIFIER,
+ attrValues SET OF AttributeValue
+ }
+
+
+
+ Return the first attribute matching the given OBJECT IDENTIFIER
+
+
+ Return all the attributes matching the OBJECT IDENTIFIER oid. The vector will be
+ empty if there are no attributes of the required type present.
+
+ @param oid type of attribute required.
+ @return a vector of all the attributes found of type oid.
+
+
+ Return a new table with the passed in attribute added.
+
+ @param attrType
+ @param attrValue
+ @return
+
+
+
+ Attributes ::=
+ SET SIZE(1..MAX) OF Attribute -- according to RFC 5652
+
+ @return
+
+
+ return an AuthEnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthEnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthEnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ authEncryptedContentInfo EncryptedContentInfo,
+ authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+ AuthEnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ authEncryptedContentInfo EncryptedContentInfo,
+ authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+
+
+
+ return an AuthenticatedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthenticatedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthenticatedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ macAlgorithm MessageAuthenticationCodeAlgorithm,
+ digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+ encapContentInfo EncapsulatedContentInfo,
+ authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+
+ AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ MessageAuthenticationCode ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthenticatedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ macAlgorithm MessageAuthenticationCodeAlgorithm,
+ digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+ encapContentInfo EncapsulatedContentInfo,
+ authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+
+ AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ MessageAuthenticationCode ::= OCTET STRING
+
+
+
+ The other Revocation Info arc
+ id-ri OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
+ dod(6) internet(1) security(5) mechanisms(5) pkix(7) ri(16) }
+
+
+ RFC 3274 - CMS Compressed Data.
+
+ CompressedData ::= Sequence {
+ version CMSVersion,
+ compressionAlgorithm CompressionAlgorithmIdentifier,
+ encapContentInfo EncapsulatedContentInfo
+ }
+
+
+
+ return a CompressedData object from a tagged object.
+
+ @param ato the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a CompressedData object from the given object.
+
+ @param _obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ RFC 3274 - CMS Compressed Data.
+
+ CompressedData ::= SEQUENCE {
+ version CMSVersion,
+ compressionAlgorithm CompressionAlgorithmIdentifier,
+ encapContentInfo EncapsulatedContentInfo
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= Sequence {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= SEQUENCE {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ return an EncryptedContentInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EncryptedContentInfo ::= Sequence {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+
+
+
+ EncryptedContentInfo ::= SEQUENCE {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+
+
+
+ EncryptedData ::= SEQUENCE {
+ version CMSVersion,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ return an EnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an EnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EnvelopedData ::= Sequence {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+ }
+
+
+
+ return a KekIdentifier object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KekIdentifier object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KekIdentifier ::= Sequence {
+ keyIdentifier OCTET STRING,
+ date GeneralizedTime OPTIONAL,
+ other OtherKeyAttribute OPTIONAL
+ }
+
+
+
+ return a KekRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KekRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KekRecipientInfo ::= Sequence {
+ version CMSVersion, -- always set to 4
+ kekID KekIdentifier,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+ return an KeyAgreeRecipientIdentifier object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an KeyAgreeRecipientIdentifier object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeyAgreeRecipientIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ rKeyId [0] IMPLICIT RecipientKeyIdentifier
+ }
+
+
+
+ return a KeyAgreeRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KeyAgreeRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * KeyAgreeRecipientInfo ::= Sequence {
+ * version CMSVersion, -- always set to 3
+ * originator [0] EXPLICIT OriginatorIdentifierOrKey,
+ * ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
+ * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ * recipientEncryptedKeys RecipientEncryptedKeys
+ * }
+ *
+ * UserKeyingMaterial ::= OCTET STRING
+ *
+
+
+ return a KeyTransRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeyTransRecipientInfo ::= Sequence {
+ version CMSVersion, -- always set to 0 or 2
+ rid RecipientIdentifier,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+
+ MetaData ::= SEQUENCE {
+ hashProtected BOOLEAN,
+ fileName UTF8String OPTIONAL,
+ mediaType IA5String OPTIONAL,
+ otherMetaData Attributes OPTIONAL
+ }
+
+ @return
+
+
+ return an OriginatorIdentifierOrKey object from a tagged object.
+
+ @param o the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorIdentifierOrKey object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorIdentifierOrKey ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier,
+ originatorKey [1] OriginatorPublicKey
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ return an OriginatorInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorInfo ::= Sequence {
+ certs [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL
+ }
+
+
+
+ return an OriginatorPublicKey object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorPublicKey object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorPublicKey ::= Sequence {
+ algorithm AlgorithmIdentifier,
+ publicKey BIT STRING
+ }
+
+
+
+ return an OtherKeyAttribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherKeyAttribute ::= Sequence {
+ keyAttrId OBJECT IDENTIFIER,
+ keyAttr ANY DEFINED BY keyAttrId OPTIONAL
+ }
+
+
+
+ return a OtherRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a OtherRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherRecipientInfo ::= Sequence {
+ oriType OBJECT IDENTIFIER,
+ oriValue ANY DEFINED BY oriType }
+
+
+
+ return a OtherRevocationInfoFormat object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a OtherRevocationInfoFormat object from the given object.
+
+ @param obj the object we want converted.
+ @exception IllegalArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an ASN1OutputStream.
+
+ OtherRevocationInfoFormat ::= SEQUENCE {
+ otherRevInfoFormat OBJECT IDENTIFIER,
+ otherRevInfo ANY DEFINED BY otherRevInfoFormat }
+
+
+
+ return a PasswordRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a PasswordRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ PasswordRecipientInfo ::= Sequence {
+ version CMSVersion, -- Always set to 0
+ keyDerivationAlgorithm [0] KeyDerivationAlgorithmIdentifier
+ OPTIONAL,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey }
+
+
+
+ return an RecipientEncryptedKey object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a RecipientEncryptedKey object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientEncryptedKey ::= SEQUENCE {
+ rid KeyAgreeRecipientIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+ return a RecipientIdentifier object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientInfo ::= CHOICE {
+ ktri KeyTransRecipientInfo,
+ kari [1] KeyAgreeRecipientInfo,
+ kekri [2] KekRecipientInfo,
+ pwri [3] PasswordRecipientInfo,
+ ori [4] OtherRecipientInfo }
+
+
+
+ return a RecipientKeyIdentifier object from a tagged object.
+
+ @param _ato the tagged object holding the object we want.
+ @param _explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a RecipientKeyIdentifier object from the given object.
+
+ @param _obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientKeyIdentifier ::= Sequence {
+ subjectKeyIdentifier SubjectKeyIdentifier,
+ date GeneralizedTime OPTIONAL,
+ other OtherKeyAttribute OPTIONAL
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+
+ ScvpReqRes ::= SEQUENCE {
+ request [0] EXPLICIT ContentInfo OPTIONAL,
+ response ContentInfo }
+
+ @return the ASN.1 primitive representation.
+
+
+ a signed data object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignedData ::= Sequence {
+ version CMSVersion,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ encapContentInfo EncapsulatedContentInfo,
+ certificates [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos
+ }
+
+
+
+
+ SignedData ::= SEQUENCE {
+ version CMSVersion,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ encapContentInfo EncapsulatedContentInfo,
+ certificates [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos
+ }
+
+
+
+ return a SignerIdentifier object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerInfo ::= Sequence {
+ version Version,
+ SignerIdentifier sid,
+ digestAlgorithm DigestAlgorithmIdentifier,
+ authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+ digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+ encryptedDigest EncryptedDigest,
+ unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+ }
+
+ EncryptedDigest ::= OCTET STRING
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+
+ DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+
+
+
+ creates a time object from a given date - if the date is between 1950
+ and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime
+ is used.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Time ::= CHOICE {
+ utcTime UTCTime,
+ generalTime GeneralizedTime }
+
+
+
+
+ TimeStampAndCRL ::= SEQUENCE {
+ timeStamp TimeStampToken, -- according to RFC 3161
+ crl CertificateList OPTIONAL -- according to RFC 5280
+ }
+
+ @return
+
+
+
+ TimeStampTokenEvidence ::=
+ SEQUENCE SIZE(1..MAX) OF TimeStampAndCrl
+
+ @return
+
+
+
+ TimeStampedData ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ dataUri IA5String OPTIONAL,
+ metaData MetaData OPTIONAL,
+ content OCTET STRING OPTIONAL,
+ temporalEvidence Evidence
+ }
+
+ @return
+
+
+ return an AuthEnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthEnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ MQVuserKeyingMaterial ::= SEQUENCE {
+ ephemeralPublicKey OriginatorPublicKey,
+ addedukm [0] EXPLICIT UserKeyingMaterial OPTIONAL }
+
+
+
+
+ AttributeTypeAndValue ::= SEQUENCE {
+ type OBJECT IDENTIFIER,
+ value ANY DEFINED BY type }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertId ::= SEQUENCE {
+ issuer GeneralName,
+ serialNumber INTEGER }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertReqMessages ::= SEQUENCE SIZE (1..MAX) OF CertReqMsg
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new CertReqMsg.
+ @param certReq CertRequest
+ @param popo may be null
+ @param regInfo may be null
+
+
+
+ CertReqMsg ::= SEQUENCE {
+ certReq CertRequest,
+ pop ProofOfPossession OPTIONAL,
+ -- content depends upon key type
+ regInfo SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertRequest ::= SEQUENCE {
+ certReqId INTEGER, -- ID for matching request and reply
+ certTemplate CertTemplate, -- Selected fields of cert to be issued
+ controls Controls OPTIONAL } -- Attributes affecting issuance
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertTemplate ::= SEQUENCE {
+ version [0] Version OPTIONAL,
+ serialNumber [1] INTEGER OPTIONAL,
+ signingAlg [2] AlgorithmIdentifier OPTIONAL,
+ issuer [3] Name OPTIONAL,
+ validity [4] OptionalValidity OPTIONAL,
+ subject [5] Name OPTIONAL,
+ publicKey [6] SubjectPublicKeyInfo OPTIONAL,
+ issuerUID [7] UniqueIdentifier OPTIONAL,
+ subjectUID [8] UniqueIdentifier OPTIONAL,
+ extensions [9] Extensions OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ Sets the X.509 version. Note: for X509v3, use 2 here.
+
+
+ Sets the issuer unique ID (deprecated in X.509v3)
+
+
+ Sets the subject unique ID (deprecated in X.509v3)
+
+
+
+ CertTemplate ::= SEQUENCE {
+ version [0] Version OPTIONAL,
+ serialNumber [1] INTEGER OPTIONAL,
+ signingAlg [2] AlgorithmIdentifier OPTIONAL,
+ issuer [3] Name OPTIONAL,
+ validity [4] OptionalValidity OPTIONAL,
+ subject [5] Name OPTIONAL,
+ publicKey [6] SubjectPublicKeyInfo OPTIONAL,
+ issuerUID [7] UniqueIdentifier OPTIONAL,
+ subjectUID [8] UniqueIdentifier OPTIONAL,
+ extensions [9] Extensions OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ Controls ::= SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+
+ EncKeyWithID ::= SEQUENCE {
+ privateKey PrivateKeyInfo,
+ identifier CHOICE {
+ string UTF8String,
+ generalName GeneralName
+ } OPTIONAL
+ }
+
+ @return
+
+
+
+ EncryptedKey ::= CHOICE {
+ encryptedValue EncryptedValue, -- deprecated
+ envelopedData [0] EnvelopedData }
+ -- The encrypted private key MUST be placed in the envelopedData
+ -- encryptedContentInfo encryptedContent OCTET STRING.
+
+
+
+
+ EncryptedValue ::= SEQUENCE {
+ intendedAlg [0] AlgorithmIdentifier OPTIONAL,
+ -- the intended algorithm for which the value will be used
+ symmAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- the symmetric algorithm used to encrypt the value
+ encSymmKey [2] BIT STRING OPTIONAL,
+ -- the (encrypted) symmetric key used to encrypt the value
+ keyAlg [3] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used to encrypt the symmetric key
+ valueHint [4] OCTET STRING OPTIONAL,
+ -- a brief description or identifier of the encValue content
+ -- (may be meaningful only to the sending entity, and used only
+ -- if EncryptedValue might be re-examined by the sending entity
+ -- in the future)
+ encValue BIT STRING }
+ -- the encrypted value itself
+
+ @return a basic ASN.1 object representation.
+
+
+
+ OptionalValidity ::= SEQUENCE {
+ notBefore [0] Time OPTIONAL,
+ notAfter [1] Time OPTIONAL } --at least one MUST be present
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiArchiveOptions ::= CHOICE {
+ encryptedPrivKey [0] EncryptedKey,
+ -- the actual value of the private key
+ keyGenParameters [1] KeyGenParameters,
+ -- parameters which allow the private key to be re-generated
+ archiveRemGenPrivKey [2] BOOLEAN }
+ -- set to TRUE if sender wishes receiver to archive the private
+ -- key of a key pair that the receiver generates in response to
+ -- this request; set to FALSE if no archival is desired.
+
+
+
+
+ PkiPublicationInfo ::= SEQUENCE {
+ action INTEGER {
+ dontPublish (0),
+ pleasePublish (1) },
+ pubInfos SEQUENCE SIZE (1..MAX) OF SinglePubInfo OPTIONAL }
+ -- pubInfos MUST NOT be present if action is "dontPublish"
+ -- (if action is "pleasePublish" and pubInfos is omitted,
+ -- "dontCare" is assumed)
+
+ @return a basic ASN.1 object representation.
+
+
+ Password-based MAC value for use with POPOSigningKeyInput.
+
+
+ Creates a new PKMACValue.
+ @param params parameters for password-based MAC
+ @param value MAC of the DER-encoded SubjectPublicKeyInfo
+
+
+ Creates a new PKMACValue.
+ @param aid CMPObjectIdentifiers.passwordBasedMAC, with PBMParameter
+ @param value MAC of the DER-encoded SubjectPublicKeyInfo
+
+
+
+ PKMACValue ::= SEQUENCE {
+ algId AlgorithmIdentifier,
+ -- algorithm value shall be PasswordBasedMac 1.2.840.113533.7.66.13
+ -- parameter value is PBMParameter
+ value BIT STRING }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoPrivKey ::= CHOICE {
+ thisMessage [0] BIT STRING, -- Deprecated
+ -- possession is proven in this message (which contains the private
+ -- key itself (encrypted for the CA))
+ subsequentMessage [1] SubsequentMessage,
+ -- possession will be proven in a subsequent message
+ dhMAC [2] BIT STRING, -- Deprecated
+ agreeMAC [3] PKMACValue,
+ encryptedKey [4] EnvelopedData }
+
+
+
+ Creates a new Proof of Possession object for a signing key.
+ @param poposkIn the PopoSigningKeyInput structure, or null if the
+ CertTemplate includes both subject and publicKey values.
+ @param aid the AlgorithmIdentifier used to sign the proof of possession.
+ @param signature a signature over the DER-encoded value of poposkIn,
+ or the DER-encoded value of certReq if poposkIn is null.
+
+
+
+ PopoSigningKey ::= SEQUENCE {
+ poposkInput [0] PopoSigningKeyInput OPTIONAL,
+ algorithmIdentifier AlgorithmIdentifier,
+ signature BIT STRING }
+ -- The signature (using "algorithmIdentifier") is on the
+ -- DER-encoded value of poposkInput. NOTE: If the CertReqMsg
+ -- certReq CertTemplate contains the subject and publicKey values,
+ -- then poposkInput MUST be omitted and the signature MUST be
+ -- computed on the DER-encoded value of CertReqMsg certReq. If
+ -- the CertReqMsg certReq CertTemplate does not contain the public
+ -- key and subject values, then poposkInput MUST be present and
+ -- MUST be signed. This strategy ensures that the public key is
+ -- not present in both the poposkInput and CertReqMsg certReq
+ -- CertTemplate fields.
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PopoSigningKeyInput with sender name as authInfo.
+
+
+ Creates a new PopoSigningKeyInput using password-based MAC.
+
+
+ Returns the sender field, or null if authInfo is publicKeyMac
+
+
+ Returns the publicKeyMac field, or null if authInfo is sender
+
+
+
+ PopoSigningKeyInput ::= SEQUENCE {
+ authInfo CHOICE {
+ sender [0] GeneralName,
+ -- used only if an authenticated identity has been
+ -- established for the sender (e.g., a DN from a
+ -- previously-issued and currently-valid certificate
+ publicKeyMac PKMacValue },
+ -- used if no authenticated GeneralName currently exists for
+ -- the sender; publicKeyMac contains a password-based MAC
+ -- on the DER-encoded value of publicKey
+ publicKey SubjectPublicKeyInfo } -- from CertTemplate
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a ProofOfPossession with type raVerified.
+
+
+ Creates a ProofOfPossession for a signing key.
+
+
+ Creates a ProofOfPossession for key encipherment or agreement.
+ @param type one of TYPE_KEY_ENCIPHERMENT or TYPE_KEY_AGREEMENT
+
+
+
+ ProofOfPossession ::= CHOICE {
+ raVerified [0] NULL,
+ -- used if the RA has already verified that the requester is in
+ -- possession of the private key
+ signature [1] PopoSigningKey,
+ keyEncipherment [2] PopoPrivKey,
+ keyAgreement [3] PopoPrivKey }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ SinglePubInfo ::= SEQUENCE {
+ pubMethod INTEGER {
+ dontCare (0),
+ x500 (1),
+ web (2),
+ ldap (3) },
+ pubLocation GeneralName OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ table of the available named parameters for GOST 3410-2001.
+
+
+ return the ECDomainParameters object for the given OID, null if it
+ isn't present.
+
+ @param oid an object identifier representing a named parameters, if present.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+
+ Gost28147-89-Parameters ::=
+ SEQUENCE {
+ iv Gost28147-89-IV,
+ encryptionParamSet OBJECT IDENTIFIER
+ }
+
+ Gost28147-89-IV ::= OCTET STRING (SIZE (8))
+
+
+
+ table of the available named parameters for GOST 3410-94.
+
+
+ return the GOST3410ParamSetParameters object for the given OID, null if it
+ isn't present.
+
+ @param oid an object identifier representing a named parameters, if present.
+
+
+ returns an enumeration containing the name strings for parameters
+ contained in this structure.
+
+
+
+ RFC 3126: 4.3.1 Certificate Values Attribute Definition
+
+ CertificateValues ::= SEQUENCE OF Certificate
+
+
+
+
+
+ CommitmentTypeIndication ::= SEQUENCE {
+ commitmentTypeId CommitmentTypeIdentifier,
+ commitmentTypeQualifier SEQUENCE SIZE (1..MAX) OF
+ CommitmentTypeQualifier OPTIONAL }
+
+
+
+ Commitment type qualifiers, used in the Commitment-Type-Indication attribute (RFC3126).
+
+
+ CommitmentTypeQualifier ::= SEQUENCE {
+ commitmentTypeIdentifier CommitmentTypeIdentifier,
+ qualifier ANY DEFINED BY commitmentTypeIdentifier OPTIONAL }
+
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param commitmentTypeIdentifier a CommitmentTypeIdentifier value
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param commitmentTypeIdentifier a CommitmentTypeIdentifier value
+ @param qualifier the qualifier, defined by the above field.
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param as CommitmentTypeQualifier structure
+ encoded as an Asn1Sequence.
+
+
+ Returns a DER-encodable representation of this instance.
+
+ @return a Asn1Object value
+
+
+
+ RFC 3126: 4.2.1 Complete Certificate Refs Attribute Definition
+
+ CompleteCertificateRefs ::= SEQUENCE OF OtherCertID
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CompleteRevocationRefs ::= SEQUENCE OF CrlOcspRef
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlIdentifier ::= SEQUENCE
+ {
+ crlissuer Name,
+ crlIssuedTime UTCTime,
+ crlNumber INTEGER OPTIONAL
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CRLListID ::= SEQUENCE
+ {
+ crls SEQUENCE OF CrlValidatedID
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlOcspRef ::= SEQUENCE {
+ crlids [0] CRLListID OPTIONAL,
+ ocspids [1] OcspListID OPTIONAL,
+ otherRev [2] OtherRevRefs OPTIONAL
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlValidatedID ::= SEQUENCE {
+ crlHash OtherHash,
+ crlIdentifier CrlIdentifier OPTIONAL}
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspIdentifier ::= SEQUENCE {
+ ocspResponderID ResponderID,
+ -- As in OCSP response data
+ producedAt GeneralizedTime
+ -- As in OCSP response data
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspListID ::= SEQUENCE {
+ ocspResponses SEQUENCE OF OcspResponsesID
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspResponsesID ::= SEQUENCE {
+ ocspIdentifier OcspIdentifier,
+ ocspRepHash OtherHash OPTIONAL
+ }
+
+
+
+
+
+
+ OtherCertID ::= SEQUENCE {
+ otherCertHash OtherHash,
+ issuerSerial IssuerSerial OPTIONAL
+ }
+
+
+
+
+
+
+ OtherHash ::= CHOICE {
+ sha1Hash OtherHashValue, -- This contains a SHA-1 hash
+ otherHash OtherHashAlgAndValue
+ }
+
+ OtherHashValue ::= OCTET STRING
+
+
+
+
+
+ Summary description for OtherHashAlgAndValue.
+
+
+
+ OtherHashAlgAndValue ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashValue OtherHashValue
+ }
+
+ OtherHashValue ::= OCTET STRING
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OtherRevRefs ::= SEQUENCE
+ {
+ otherRevRefType OtherRevRefType,
+ otherRevRefs ANY DEFINED BY otherRevRefType
+ }
+
+ OtherRevRefType ::= OBJECT IDENTIFIER
+
+
+
+
+
+ RFC 3126: 4.3.2 Revocation Values Attribute Definition
+
+ OtherRevVals ::= SEQUENCE
+ {
+ otherRevValType OtherRevValType,
+ otherRevVals ANY DEFINED BY otherRevValType
+ }
+
+ OtherRevValType ::= OBJECT IDENTIFIER
+
+
+
+
+
+
+ OtherSigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF OtherCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+
+
+
+
+ RFC 5126: 6.3.4. revocation-values Attribute Definition
+
+ RevocationValues ::= SEQUENCE {
+ crlVals [0] SEQUENCE OF CertificateList OPTIONAL,
+ ocspVals [1] SEQUENCE OF BasicOCSPResponse OPTIONAL,
+ otherRevVals [2] OtherRevVals OPTIONAL
+ }
+
+
+
+
+
+
+ SigPolicyQualifierInfo ::= SEQUENCE {
+ sigPolicyQualifierId SigPolicyQualifierId,
+ sigQualifier ANY DEFINED BY sigPolicyQualifierId
+ }
+
+ SigPolicyQualifierId ::= OBJECT IDENTIFIER
+
+
+
+
+
+
+ SignaturePolicyId ::= SEQUENCE {
+ sigPolicyIdentifier SigPolicyId,
+ sigPolicyHash SigPolicyHash,
+ sigPolicyQualifiers SEQUENCE SIZE (1..MAX) OF SigPolicyQualifierInfo OPTIONAL
+ }
+
+ SigPolicyId ::= OBJECT IDENTIFIER
+
+ SigPolicyHash ::= OtherHashAlgAndValue
+
+
+
+
+
+
+ SignaturePolicyIdentifier ::= CHOICE {
+ SignaturePolicyId SignaturePolicyId,
+ SignaturePolicyImplied SignaturePolicyImplied
+ }
+
+ SignaturePolicyImplied ::= NULL
+
+
+
+
+
+
+ SignerAttribute ::= SEQUENCE OF CHOICE {
+ claimedAttributes [0] ClaimedAttributes,
+ certifiedAttributes [1] CertifiedAttributes }
+
+ ClaimedAttributes ::= SEQUENCE OF Attribute
+ CertifiedAttributes ::= AttributeCertificate -- as defined in RFC 3281: see clause 4.1.
+
+
+
+ Signer-Location attribute (RFC3126).
+
+
+ SignerLocation ::= SEQUENCE {
+ countryName [0] DirectoryString OPTIONAL,
+ localityName [1] DirectoryString OPTIONAL,
+ postalAddress [2] PostalAddress OPTIONAL }
+
+ PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+
+
+
+
+ SignerLocation ::= SEQUENCE {
+ countryName [0] DirectoryString OPTIONAL,
+ localityName [1] DirectoryString OPTIONAL,
+ postalAddress [2] PostalAddress OPTIONAL }
+
+ PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+
+ DirectoryString ::= CHOICE {
+ teletexString TeletexString (SIZE (1..MAX)),
+ printableString PrintableString (SIZE (1..MAX)),
+ universalString UniversalString (SIZE (1..MAX)),
+ utf8String UTF8String (SIZE (1.. MAX)),
+ bmpString BMPString (SIZE (1..MAX)) }
+
+
+
+ constructor
+
+
+
+ ContentHints ::= SEQUENCE {
+ contentDescription UTF8String (SIZE (1..MAX)) OPTIONAL,
+ contentType ContentType }
+
+
+
+ Create from OCTET STRING whose octets represent the identifier.
+
+
+ Create from byte array representing the identifier.
+
+
+ The definition of ContentIdentifier is
+
+ ContentIdentifier ::= OCTET STRING
+
+ id-aa-contentIdentifier OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 7 }
+
+
+ constructor
+
+
+
+ EssCertID ::= SEQUENCE {
+ certHash Hash,
+ issuerSerial IssuerSerial OPTIONAL }
+
+
+
+
+ EssCertIDv2 ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier
+ DEFAULT {algorithm id-sha256},
+ certHash Hash,
+ issuerSerial IssuerSerial OPTIONAL
+ }
+
+ Hash ::= OCTET STRING
+
+ IssuerSerial ::= SEQUENCE {
+ issuer GeneralNames,
+ serialNumber CertificateSerialNumber
+ }
+
+
+
+ constructor
+
+
+
+ OtherCertID ::= SEQUENCE {
+ otherCertHash OtherHash,
+ issuerSerial IssuerSerial OPTIONAL }
+
+ OtherHash ::= CHOICE {
+ sha1Hash OCTET STRING,
+ otherHash OtherHashAlgAndValue }
+
+ OtherHashAlgAndValue ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashValue OCTET STRING }
+
+
+
+
+ constructors
+
+
+ The definition of OtherSigningCertificate is
+
+ OtherSigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF OtherCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-ets-otherSigCert OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 19 }
+
+
+ constructors
+
+
+ The definition of SigningCertificate is
+
+ SigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF EssCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-signingCertificate OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 12 }
+
+
+ The definition of SigningCertificateV2 is
+
+ SigningCertificateV2 ::= SEQUENCE {
+ certs SEQUENCE OF EssCertIDv2,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-signingCertificateV2 OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 47 }
+
+
+ The CscaMasterList object. This object can be wrapped in a
+ CMSSignedData to be published in LDAP.
+
+
+ CscaMasterList ::= SEQUENCE {
+ version CscaMasterListVersion,
+ certList SET OF Certificate }
+
+ CscaMasterListVersion :: INTEGER {v0(0)}
+
+
+
+ The DataGroupHash object.
+
+ DataGroupHash ::= SEQUENCE {
+ dataGroupNumber DataGroupNumber,
+ dataGroupHashValue OCTET STRING }
+
+ DataGroupNumber ::= INTEGER {
+ dataGroup1 (1),
+ dataGroup1 (2),
+ dataGroup1 (3),
+ dataGroup1 (4),
+ dataGroup1 (5),
+ dataGroup1 (6),
+ dataGroup1 (7),
+ dataGroup1 (8),
+ dataGroup1 (9),
+ dataGroup1 (10),
+ dataGroup1 (11),
+ dataGroup1 (12),
+ dataGroup1 (13),
+ dataGroup1 (14),
+ dataGroup1 (15),
+ dataGroup1 (16) }
+
+
+
+
+ The LDSSecurityObject object (V1.8).
+
+ LDSSecurityObject ::= SEQUENCE {
+ version LDSSecurityObjectVersion,
+ hashAlgorithm DigestAlgorithmIdentifier,
+ dataGroupHashValues SEQUENCE SIZE (2..ub-DataGroups) OF DataHashGroup,
+ ldsVersionInfo LDSVersionInfo OPTIONAL
+ -- if present, version MUST be v1 }
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier,
+
+ LDSSecurityObjectVersion :: INTEGER {V0(0)}
+
+
+
+
+ LDSVersionInfo ::= SEQUENCE {
+ ldsVersion PRINTABLE STRING
+ unicodeVersion PRINTABLE STRING
+ }
+
+ @return
+
+
+ The id-isismtt-cp-accredited OID indicates that the certificate is a
+ qualified certificate according to Directive 1999/93/EC of the European
+ Parliament and of the Council of 13 December 1999 on a Community
+ Framework for Electronic Signatures, which additionally conforms the
+ special requirements of the SigG and has been issued by an accredited CA.
+
+
+ Certificate extensionDate of certificate generation
+
+
+ DateOfCertGenSyntax ::= GeneralizedTime
+
+
+
+ Attribute to indicate that the certificate holder may sign in the name of
+ a third person. May also be used as extension in a certificate.
+
+
+ Attribute to indicate admissions to certain professions. May be used as
+ attribute in attribute certificate or as extension in a certificate
+
+
+ Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST
+ be used in new certificates in place of the extension/attribute
+ MonetaryLimit since January 1, 2004. For the sake of backward
+ compatibility with certificates already in use, SigG conforming
+ components MUST support MonetaryLimit (as well as QcEuLimitValue).
+
+
+ A declaration of majority. May be used as attribute in attribute
+ certificate or as extension in a certificate
+
+
+
+ Serial number of the smart card containing the corresponding private key
+
+
+ ICCSNSyntax ::= OCTET STRING (SIZE(8..20))
+
+
+
+
+ Reference for a file of a smartcard that stores the public key of this
+ certificate and that is used as �security anchor�.
+
+
+ PKReferenceSyntax ::= OCTET STRING (SIZE(20))
+
+
+
+ Some other restriction regarding the usage of this certificate. May be
+ used as attribute in attribute certificate or as extension in a
+ certificate.
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.Restriction
+
+
+
+ (Single)Request extension: Clients may include this extension in a
+ (single) Request to request the responder to send the certificate in the
+ response message along with the status information. Besides the LDAP
+ service, this extension provides another mechanism for the distribution
+ of certificates, which MAY optionally be provided by certificate
+ repositories.
+
+
+ RetrieveIfAllowed ::= BOOLEAN
+
+
+
+ SingleOCSPResponse extension: The certificate requested by the client by
+ inserting the RetrieveIfAllowed extension in the request, will be
+ returned in this extension.
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.Ocsp.RequestedCertificate
+
+
+ Base ObjectIdentifier for naming authorities
+
+
+ SingleOCSPResponse extension: Date, when certificate has been published
+ in the directory and status information has become available. Currently,
+ accrediting authorities enforce that SigG-conforming OCSP servers include
+ this extension in the responses.
+
+
+ CertInDirSince ::= GeneralizedTime
+
+
+
+ Hash of a certificate in OCSP.
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.Ocsp.CertHash
+
+
+
+ NameAtBirth ::= DirectoryString(SIZE(1..64)
+
+
+ Used in
+ {@link Org.BouncyCastle.Asn1.X509.SubjectDirectoryAttributes SubjectDirectoryAttributes}
+
+
+ Some other information of non-restrictive nature regarding the usage of
+ this certificate. May be used as attribute in atribute certificate or as
+ extension in a certificate.
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdditionalInformationSyntax
+
+
+ Indicates that an attribute certificate exists, which limits the
+ usability of this public key certificate. Whenever verifying a signature
+ with the help of this certificate, the content of the corresponding
+ attribute certificate should be concerned. This extension MUST be
+ included in a PKC, if a corresponding attribute certificate (having the
+ PKC as base certificate) contains some attribute that restricts the
+ usability of the PKC too. Attribute certificates with restricting content
+ MUST always be included in the signed document.
+
+
+ LiabilityLimitationFlagSyntax ::= BOOLEAN
+
+
+
+ ISIS-MTT PROFILE: The responder may include this extension in a response to
+ send the hash of the requested certificate to the responder. This hash is
+ cryptographically bound to the certificate and serves as evidence that the
+ certificate is known to the responder (i.e. it has been issued and is present
+ in the directory). Hence, this extension is a means to provide a positive
+ statement of availability as described in T8.[8]. As explained in T13.[1],
+ clients may rely on this information to be able to validate signatures after
+ the expiry of the corresponding certificate. Hence, clients MUST support this
+ extension. If a positive statement of availability is to be delivered, this
+ extension syntax and OID MUST be used.
+
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type CertHash:
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param hashAlgorithm The hash algorithm identifier.
+ @param certificateHash The hash of the whole DER encoding of the certificate.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+ @return an Asn1Object
+
+
+ ISIS-MTT-Optional: The certificate requested by the client by inserting the
+ RetrieveIfAllowed extension in the request, will be returned in this
+ extension.
+
+ ISIS-MTT-SigG: The signature act allows publishing certificates only then,
+ when the certificate owner gives his isExplicit permission. Accordingly, there
+ may be �nondownloadable� certificates, about which the responder must provide
+ status information, but MUST NOT include them in the response. Clients may
+ get therefore the following three kind of answers on a single request
+ including the RetrieveIfAllowed extension:
+
+ a) the responder supports the extension and is allowed to publish the
+ certificate: RequestedCertificate returned including the requested
+ certificate
+ b) the responder supports the extension but is NOT allowed to publish
+ the certificate: RequestedCertificate returned including an empty OCTET
+ STRING
+ c) the responder does not support the extension: RequestedCertificate is
+ not included in the response
+
+ Clients requesting RetrieveIfAllowed MUST be able to handle these cases. If
+ any of the OCTET STRING options is used, it MUST contain the DER encoding of
+ the requested certificate.
+
+
+ RequestedCertificate ::= CHOICE {
+ Certificate Certificate,
+ publicKeyCertificate [0] EXPLICIT OCTET STRING,
+ attributeCertificate [1] EXPLICIT OCTET STRING
+ }
+
+
+
+ Constructor from a given details.
+
+ Only one parameter can be given. All other must be null.
+
+ @param certificate Given as Certificate
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ RequestedCertificate ::= CHOICE {
+ Certificate Certificate,
+ publicKeyCertificate [0] EXPLICIT OCTET STRING,
+ attributeCertificate [1] EXPLICIT OCTET STRING
+ }
+
+
+ @return an Asn1Object
+
+
+ Some other information of non-restrictive nature regarding the usage of this
+ certificate.
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+
+ Constructor from a given details.
+
+ @param information The describtion of the information.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+ @return an Asn1Object
+
+
+ Attribute to indicate admissions to certain professions.
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+
+ ISIS-MTT PROFILE: The relatively complex structure of AdmissionSyntax
+ supports the following concepts and requirements:
+
+ External institutions (e.g. professional associations, chambers, unions,
+ administrative bodies, companies, etc.), which are responsible for granting
+ and verifying professional admissions, are indicated by means of the data
+ field admissionAuthority. An admission authority is indicated by a
+ GeneralName object. Here an X.501 directory name (distinguished name) can be
+ indicated in the field directoryName, a URL address can be indicated in the
+ field uniformResourceIdentifier, and an object identifier can be indicated in
+ the field registeredId.
+ The names of authorities which are responsible for the administration of
+ title registers are indicated in the data field namingAuthority. The name of
+ the authority can be identified by an object identifier in the field
+ namingAuthorityId, by means of a text string in the field
+ namingAuthorityText, by means of a URL address in the field
+ namingAuthorityUrl, or by a combination of them. For example, the text string
+ can contain the name of the authority, the country and the name of the title
+ register. The URL-option refers to a web page which contains lists with
+ officially registered professions (text and possibly OID) as well as
+ further information on these professions. Object identifiers for the
+ component namingAuthorityId are grouped under the OID-branch
+ id-isis-at-namingAuthorities and must be applied for.
+ See http://www.teletrust.de/anwend.asp?Id=30200&Sprache=E_&HomePG=0
+ for an application form and http://www.teletrust.de/links.asp?id=30220,11
+ for an overview of registered naming authorities.
+ By means of the data type ProfessionInfo certain professions,
+ specializations, disciplines, fields of activity, etc. are identified. A
+ profession is represented by one or more text strings, resp. profession OIDs
+ in the fields professionItems and professionOIDs and by a registration number
+ in the field registrationNumber. An indication in text form must always be
+ present, whereas the other indications are optional. The component
+ addProfessionInfo may contain additional applicationspecific information in
+ DER-encoded form.
+
+
+ By means of different namingAuthority-OIDs or profession OIDs hierarchies of
+ professions, specializations, disciplines, fields of activity, etc. can be
+ expressed. The issuing admission authority should always be indicated (field
+ admissionAuthority), whenever a registration number is presented. Still,
+ information on admissions can be given without indicating an admission or a
+ naming authority by the exclusive use of the component professionItems. In
+ this case the certification authority is responsible for the verification of
+ the admission information.
+
+
+
+ This attribute is single-valued. Still, several admissions can be captured in
+ the sequence structure of the component contentsOfAdmissions of
+ AdmissionSyntax or in the component professionInfos of Admissions. The
+ component admissionAuthority of AdmissionSyntax serves as default value for
+ the component admissionAuthority of Admissions. Within the latter component
+ the default value can be overwritten, in case that another authority is
+ responsible. The component namingAuthority of Admissions serves as a default
+ value for the component namingAuthority of ProfessionInfo. Within the latter
+ component the default value can be overwritten, in case that another naming
+ authority needs to be recorded.
+
+ The length of the string objects is limited to 128 characters. It is
+ recommended to indicate a namingAuthorityURL in all issued attribute
+ certificates. If a namingAuthorityURL is indicated, the field professionItems
+ of ProfessionInfo should contain only registered titles. If the field
+ professionOIDs exists, it has to contain the OIDs of the professions listed
+ in professionItems in the same order. In general, the field professionInfos
+ should contain only one entry, unless the admissions that are to be listed
+ are logically connected (e.g. they have been issued under the same admission
+ number).
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.Admissions
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from given details.
+
+ @param admissionAuthority The admission authority.
+ @param contentsOfAdmissions The admissions.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ @return Returns the admissionAuthority if present, null otherwise.
+
+
+ @return Returns the contentsOfAdmissions.
+
+
+ An Admissions structure.
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ Parameter professionInfos is mandatory.
+
+ @param admissionAuthority The admission authority.
+ @param namingAuthority The naming authority.
+ @param professionInfos The profession infos.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+
+ @return an Asn1Object
+
+
+ A declaration of majority.
+
+
+ DeclarationOfMajoritySyntax ::= CHOICE
+ {
+ notYoungerThan [0] IMPLICIT INTEGER,
+ fullAgeAtCountry [1] IMPLICIT SEQUENCE
+ {
+ fullAge BOOLEAN DEFAULT TRUE,
+ country PrintableString (SIZE(2))
+ }
+ dateOfBirth [2] IMPLICIT GeneralizedTime
+ }
+
+
+ fullAgeAtCountry indicates the majority of the owner with respect to the laws
+ of a specific country.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ DeclarationOfMajoritySyntax ::= CHOICE
+ {
+ notYoungerThan [0] IMPLICIT INTEGER,
+ fullAgeAtCountry [1] IMPLICIT SEQUENCE
+ {
+ fullAge BOOLEAN DEFAULT TRUE,
+ country PrintableString (SIZE(2))
+ }
+ dateOfBirth [2] IMPLICIT GeneralizedTime
+ }
+
+
+ @return an Asn1Object
+
+
+ @return notYoungerThan if that's what we are, -1 otherwise
+
+
+ Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST be
+ used in new certificates in place of the extension/attribute MonetaryLimit
+ since January 1, 2004. For the sake of backward compatibility with
+ certificates already in use, components SHOULD support MonetaryLimit (as well
+ as QcEuLimitValue).
+
+ Indicates a monetary limit within which the certificate holder is authorized
+ to act. (This value DOES NOT express a limit on the liability of the
+ certification authority).
+
+
+ MonetaryLimitSyntax ::= SEQUENCE
+ {
+ currency PrintableString (SIZE(3)),
+ amount INTEGER,
+ exponent INTEGER
+ }
+
+
+ currency must be the ISO code.
+
+ value = amount�10*exponent
+
+
+ Constructor from a given details.
+
+
+ value = amount�10^exponent
+
+ @param currency The currency. Must be the ISO code.
+ @param amount The amount
+ @param exponent The exponent
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ MonetaryLimitSyntax ::= SEQUENCE
+ {
+ currency PrintableString (SIZE(3)),
+ amount INTEGER,
+ exponent INTEGER
+ }
+
+
+ @return an Asn1Object
+
+
+ Names of authorities which are responsible for the administration of title
+ registers.
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+
+
+
+ Profession OIDs should always be defined under the OID branch of the
+ responsible naming authority. At the time of this writing, the work group
+ �Recht, Wirtschaft, Steuern� (�Law, Economy, Taxes�) is registered as the
+ first naming authority under the OID id-isismtt-at-namingAuthorities.
+
+
+ Constructor from Asn1Sequence.
+
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ @return Returns the namingAuthorityID.
+
+
+ @return Returns the namingAuthorityText.
+
+
+ @return Returns the namingAuthorityUrl.
+
+
+ Constructor from given details.
+
+ All parameters can be combined.
+
+ @param namingAuthorityID ObjectIdentifier for naming authority.
+ @param namingAuthorityUrl URL for naming authority.
+ @param namingAuthorityText Textual representation of naming authority.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ Attribute to indicate that the certificate holder may sign in the name of a
+ third person.
+
+ ISIS-MTT PROFILE: The corresponding ProcurationSyntax contains either the
+ name of the person who is represented (subcomponent thirdPerson) or a
+ reference to his/her base certificate (in the component signingFor,
+ subcomponent certRef), furthermore the optional components country and
+ typeSubstitution to indicate the country whose laws apply, and respectively
+ the type of procuration (e.g. manager, procuration, custody).
+
+
+ ISIS-MTT PROFILE: The GeneralName MUST be of type directoryName and MAY only
+ contain: - RFC3039 attributes, except pseudonym (countryName, commonName,
+ surname, givenName, serialNumber, organizationName, organizationalUnitName,
+ stateOrProvincename, localityName, postalAddress) and - SubjectDirectoryName
+ attributes (title, dateOfBirth, placeOfBirth, gender, countryOfCitizenship,
+ countryOfResidence and NameAtBirth).
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+
+ Either generalName or certRef MUST be
+ null.
+
+ @param country The country code whose laws apply.
+ @param typeOfSubstitution The type of procuration.
+ @param certRef Reference to certificate of the person who is represented.
+
+
+ Constructor from a given details.
+
+
+ Either generalName or certRef MUST be
+ null.
+
+ @param country The country code whose laws apply.
+ @param typeOfSubstitution The type of procuration.
+ @param thirdPerson The GeneralName of the person who is represented.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+ @return an Asn1Object
+
+
+ Professions, specializations, disciplines, fields of activity, etc.
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+
+
+ Rechtsanw�ltin
+
+
+ Rechtsanwalt
+
+
+ Rechtsbeistand
+
+
+ Steuerberaterin
+
+
+ Steuerberater
+
+
+ Steuerbevollm�chtigte
+
+
+ Steuerbevollm�chtigter
+
+
+ Notarin
+
+
+ Notar
+
+
+ Notarvertreterin
+
+
+ Notarvertreter
+
+
+ Notariatsverwalterin
+
+
+ Notariatsverwalter
+
+
+ Wirtschaftspr�ferin
+
+
+ Wirtschaftspr�fer
+
+
+ Vereidigte Buchpr�ferin
+
+
+ Vereidigter Buchpr�fer
+
+
+ Patentanw�ltin
+
+
+ Patentanwalt
+
+
+ Constructor from Asn1Sequence.
+
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from given details.
+
+ professionItems is mandatory, all other parameters are
+ optional.
+
+ @param namingAuthority The naming authority.
+ @param professionItems Directory strings of the profession.
+ @param professionOids DERObjectIdentfier objects for the
+ profession.
+ @param registrationNumber Registration number.
+ @param addProfessionInfo Additional infos in encoded form.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ @return Returns the addProfessionInfo.
+
+
+ @return Returns the namingAuthority.
+
+
+ @return Returns the professionItems.
+
+
+ @return Returns the professionOids.
+
+
+ @return Returns the registrationNumber.
+
+
+ Some other restriction regarding the usage of this certificate.
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+
+ Constructor from DirectoryString.
+
+ The DirectoryString is of type RestrictionSyntax:
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+ @param restriction A IAsn1String.
+
+
+ Constructor from a given details.
+
+ @param restriction The description of the restriction.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+
+ @return an Asn1Object
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ cast5CBCParameters ::= Sequence {
+ iv OCTET STRING DEFAULT 0,
+ -- Initialization vector
+ keyLength Integer
+ -- Key length, in bits
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ IDEA-CBCPar ::= Sequence {
+ iv OCTET STRING OPTIONAL -- exactly 8 octets
+ }
+
+
+
+ The NetscapeCertType object.
+
+ NetscapeCertType ::= BIT STRING {
+ SSLClient (0),
+ SSLServer (1),
+ S/MIME (2),
+ Object Signing (3),
+ Reserved (4),
+ SSL CA (5),
+ S/MIME CA (6),
+ Object Signing CA (7) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (X509NetscapeCertType.sslCA | X509NetscapeCertType.smimeCA)
+
+
+ This is designed to parse
+ the PublicKeyAndChallenge created by the KEYGEN tag included by
+ Mozilla based browsers.
+
+ PublicKeyAndChallenge ::= SEQUENCE {
+ spki SubjectPublicKeyInfo,
+ challenge IA5STRING
+ }
+
+
+
+
+ Utility class for fetching curves using their NIST names as published in FIPS-PUB 186-3
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ From RFC 3657
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ BasicOcspResponse ::= Sequence {
+ tbsResponseData ResponseData,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT Sequence OF Certificate OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CertID ::= Sequence {
+ hashAlgorithm AlgorithmIdentifier,
+ issuerNameHash OCTET STRING, -- Hash of Issuer's DN
+ issuerKeyHash OCTET STRING, -- Hash of Issuers public key
+ serialNumber CertificateSerialNumber }
+
+
+
+ create a CertStatus object with a tag of zero.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CertStatus ::= CHOICE {
+ good [0] IMPLICIT Null,
+ revoked [1] IMPLICIT RevokedInfo,
+ unknown [2] IMPLICIT UnknownInfo }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CrlID ::= Sequence {
+ crlUrl [0] EXPLICIT IA5String OPTIONAL,
+ crlNum [1] EXPLICIT Integer OPTIONAL,
+ crlTime [2] EXPLICIT GeneralizedTime OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OcspRequest ::= Sequence {
+ tbsRequest TBSRequest,
+ optionalSignature [0] EXPLICIT Signature OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OcspResponse ::= Sequence {
+ responseStatus OcspResponseStatus,
+ responseBytes [0] EXPLICIT ResponseBytes OPTIONAL }
+
+
+
+ The OcspResponseStatus enumeration.
+
+ OcspResponseStatus ::= Enumerated {
+ successful (0), --Response has valid confirmations
+ malformedRequest (1), --Illegal confirmation request
+ internalError (2), --Internal error in issuer
+ tryLater (3), --Try again later
+ --(4) is not used
+ sigRequired (5), --Must sign the request
+ unauthorized (6) --Request unauthorized
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Request ::= Sequence {
+ reqCert CertID,
+ singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponderID ::= CHOICE {
+ byName [1] Name,
+ byKey [2] KeyHash }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponseBytes ::= Sequence {
+ responseType OBJECT IDENTIFIER,
+ response OCTET STRING }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponseData ::= Sequence {
+ version [0] EXPLICIT Version DEFAULT v1,
+ responderID ResponderID,
+ producedAt GeneralizedTime,
+ responses Sequence OF SingleResponse,
+ responseExtensions [1] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RevokedInfo ::= Sequence {
+ revocationTime GeneralizedTime,
+ revocationReason [0] EXPLICIT CRLReason OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ServiceLocator ::= Sequence {
+ issuer Name,
+ locator AuthorityInfoAccessSyntax OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Signature ::= Sequence {
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT Sequence OF Certificate OPTIONAL}
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SingleResponse ::= Sequence {
+ certID CertID,
+ certStatus CertStatus,
+ thisUpdate GeneralizedTime,
+ nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL,
+ singleExtensions [1] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ TBSRequest ::= Sequence {
+ version [0] EXPLICIT Version DEFAULT v1,
+ requestorName [1] EXPLICIT GeneralName OPTIONAL,
+ requestList Sequence OF Request,
+ requestExtensions [2] EXPLICIT Extensions OPTIONAL }
+
+
+
+ return an Attribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attr ::= Sequence {
+ attrType OBJECT IDENTIFIER,
+ attrValues Set OF AttributeValue
+ }
+
+
+
+ Pkcs10 Certfication request object.
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+
+
+ Pkcs10 CertificationRequestInfo object.
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= Sequence {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ The EncryptedData object.
+
+ EncryptedData ::= Sequence {
+ version Version,
+ encryptedContentInfo EncryptedContentInfo
+ }
+
+
+ EncryptedContentInfo ::= Sequence {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+ EncryptedContent ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EncryptedPrivateKeyInfo ::= Sequence {
+ encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
+ encryptedData EncryptedData
+ }
+
+ EncryptedData ::= OCTET STRING
+
+ KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
+ ... -- For local profiles
+ }
+
+
+
+
+ MacData ::= SEQUENCE {
+ mac DigestInfo,
+ macSalt OCTET STRING,
+ iterations INTEGER DEFAULT 1
+ -- Note: The default is for historic reasons and its use is deprecated. A
+ -- higher value, like 1024 is recommended.
+
+ @return the basic DERObject construction.
+
+
+ the infamous Pfx from Pkcs12
+
+
+ write out an RSA private key with its associated information
+ as described in Pkcs8.
+
+ PrivateKeyInfo ::= Sequence {
+ version Version,
+ privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}},
+ privateKey PrivateKey,
+ attributes [0] IMPLICIT Attributes OPTIONAL
+ }
+ Version ::= Integer {v1(0)} (v1,...)
+
+ PrivateKey ::= OCTET STRING
+
+ Attributes ::= Set OF Attr
+
+
+
+ The default version
+
+
+
+ RSAES-OAEP-params ::= SEQUENCE {
+ hashAlgorithm [0] OAEP-PSSDigestAlgorithms DEFAULT sha1,
+ maskGenAlgorithm [1] PKCS1MGFAlgorithms DEFAULT mgf1SHA1,
+ pSourceAlgorithm [2] PKCS1PSourceAlgorithms DEFAULT pSpecifiedEmpty
+ }
+
+ OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-sha1 PARAMETERS NULL }|
+ { OID id-sha256 PARAMETERS NULL }|
+ { OID id-sha384 PARAMETERS NULL }|
+ { OID id-sha512 PARAMETERS NULL },
+ ... -- Allows for future expansion --
+ }
+ PKCS1MGFAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+ ... -- Allows for future expansion --
+ }
+ PKCS1PSourceAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-pSpecified PARAMETERS OCTET STRING },
+ ... -- Allows for future expansion --
+ }
+
+ @return the asn1 primitive representing the parameters.
+
+
+ This outputs the key in Pkcs1v2 format.
+
+ RsaPrivateKey ::= Sequence {
+ version Version,
+ modulus Integer, -- n
+ publicExponent Integer, -- e
+ privateExponent Integer, -- d
+ prime1 Integer, -- p
+ prime2 Integer, -- q
+ exponent1 Integer, -- d mod (p-1)
+ exponent2 Integer, -- d mod (q-1)
+ coefficient Integer -- (inverse of q) mod p
+ }
+
+ Version ::= Integer
+
+ This routine is written to output Pkcs1 version 0, private keys.
+
+
+ The default version
+
+
+
+ RSASSA-PSS-params ::= SEQUENCE {
+ hashAlgorithm [0] OAEP-PSSDigestAlgorithms DEFAULT sha1,
+ maskGenAlgorithm [1] PKCS1MGFAlgorithms DEFAULT mgf1SHA1,
+ saltLength [2] INTEGER DEFAULT 20,
+ trailerField [3] TrailerField DEFAULT trailerFieldBC
+ }
+
+ OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-sha1 PARAMETERS NULL }|
+ { OID id-sha256 PARAMETERS NULL }|
+ { OID id-sha384 PARAMETERS NULL }|
+ { OID id-sha512 PARAMETERS NULL },
+ ... -- Allows for future expansion --
+ }
+
+ PKCS1MGFAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+ ... -- Allows for future expansion --
+ }
+
+ TrailerField ::= INTEGER { trailerFieldBC(1) }
+
+ @return the asn1 primitive representing the parameters.
+
+
+ a Pkcs#7 signed data object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignedData ::= Sequence {
+ version Version,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ contentInfo ContentInfo,
+ certificates
+ [0] IMPLICIT ExtendedCertificatesAndCertificates
+ OPTIONAL,
+ crls
+ [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos }
+
+
+
+ a Pkcs#7 signer info object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerInfo ::= Sequence {
+ version Version,
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ digestAlgorithm DigestAlgorithmIdentifier,
+ authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+ digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+ encryptedDigest EncryptedDigest,
+ unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+ }
+
+ EncryptedDigest ::= OCTET STRING
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+
+ DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+
+
+
+ the elliptic curve private key object from SEC 1
+
+
+ ECPrivateKey ::= SEQUENCE {
+ version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1),
+ privateKey OCTET STRING,
+ parameters [0] Parameters OPTIONAL,
+ publicKey [1] BIT STRING OPTIONAL }
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ EllipticCurve OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0)
+ }
+
+
+ Handler class for dealing with S/MIME Capabilities
+
+
+ general preferences
+
+
+ encryption algorithms preferences
+
+
+ return an Attr object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ returns an ArrayList with 0 or more objects of all the capabilities
+ matching the passed in capability Oid. If the Oid passed is null the
+ entire set is returned.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SMIMECapabilities ::= Sequence OF SMIMECapability
+
+
+
+ general preferences
+
+
+ encryption algorithms preferences
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SMIMECapability ::= Sequence {
+ capabilityID OBJECT IDENTIFIER,
+ parameters ANY DEFINED BY capabilityID OPTIONAL
+ }
+
+
+
+ Handler for creating a vector S/MIME Capabilities
+
+
+ The SmimeEncryptionKeyPreference object.
+
+ SmimeEncryptionKeyPreference ::= CHOICE {
+ issuerAndSerialNumber [0] IssuerAndSerialNumber,
+ receipentKeyId [1] RecipientKeyIdentifier,
+ subjectAltKeyIdentifier [2] SubjectKeyIdentifier
+ }
+
+
+
+ @param sKeyId the subjectKeyIdentifier value (normally the X.509 one)
+
+
+ elliptic curves defined in "ECC Brainpool Standard Curves and Curve Generation"
+ http://www.ecc-brainpool.org/download/draft_pkix_additional_ecc_dp.txt
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+
+ Accuracy ::= SEQUENCE {
+ seconds INTEGER OPTIONAL,
+ millis [0] INTEGER (1..999) OPTIONAL,
+ micros [1] INTEGER (1..999) OPTIONAL
+ }
+
+
+
+ @param o
+ @return a MessageImprint object.
+
+
+
+ MessageImprint ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashedMessage OCTET STRING }
+
+
+
+
+
+ TstInfo ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ policy TSAPolicyId,
+ messageImprint MessageImprint,
+ -- MUST have the same value as the similar field in
+ -- TimeStampReq
+ serialNumber INTEGER,
+ -- Time-Stamping users MUST be ready to accommodate integers
+ -- up to 160 bits.
+ genTime GeneralizedTime,
+ accuracy Accuracy OPTIONAL,
+ ordering BOOLEAN DEFAULT FALSE,
+ nonce INTEGER OPTIONAL,
+ -- MUST be present if the similar field was present
+ -- in TimeStampReq. In that case it MUST have the same value.
+ tsa [0] GeneralName OPTIONAL,
+ extensions [1] IMPLICIT Extensions OPTIONAL }
+
+
+
+
+
+ TimeStampReq ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ messageImprint MessageImprint,
+ --a hash algorithm OID and the hash value of the data to be
+ --time-stamped
+ reqPolicy TSAPolicyId OPTIONAL,
+ nonce INTEGER OPTIONAL,
+ certReq BOOLEAN DEFAULT FALSE,
+ extensions [0] IMPLICIT Extensions OPTIONAL
+ }
+
+
+
+
+ TimeStampResp ::= SEQUENCE {
+ status PkiStatusInfo,
+ timeStampToken TimeStampToken OPTIONAL }
+
+
+
+ dump a Der object as a formatted string with indentation
+
+ @param obj the Asn1Object to be dumped out.
+
+
+ dump out a DER object as a formatted string, in non-verbose mode
+
+ @param obj the Asn1Encodable to be dumped out.
+ @return the resulting string.
+
+
+ Dump out the object as a string
+
+ @param obj the Asn1Encodable to be dumped out.
+ @param verbose if true, dump out the contents of octet and bit strings.
+ @return the resulting string.
+
+
+
+ DirectoryString ::= CHOICE {
+ teletexString TeletexString (SIZE (1..MAX)),
+ printableString PrintableString (SIZE (1..MAX)),
+ universalString UniversalString (SIZE (1..MAX)),
+ utf8String UTF8String (SIZE (1..MAX)),
+ bmpString BMPString (SIZE (1..MAX)) }
+
+
+
+ The AccessDescription object.
+
+ AccessDescription ::= SEQUENCE {
+ accessMethod OBJECT IDENTIFIER,
+ accessLocation GeneralName }
+
+
+
+ create an AccessDescription with the oid and location provided.
+
+
+
+ @return the access method.
+
+
+
+ @return the access location
+
+
+
+ Return the OID in the Algorithm entry of this identifier.
+
+
+
+
+ Return the parameters structure in the Parameters entry of this identifier.
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AlgorithmIdentifier ::= Sequence {
+ algorithm OBJECT IDENTIFIER,
+ parameters ANY DEFINED BY algorithm OPTIONAL }
+
+
+
+
+ Don't use this one if you are trying to be RFC 3281 compliant.
+ Use it for v1 attribute certificates only.
+
+ Our GeneralNames structure
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttCertIssuer ::= CHOICE {
+ v1Form GeneralNames, -- MUST NOT be used in this
+ -- profile
+ v2Form [0] V2Form -- v2 only
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttCertValidityPeriod ::= Sequence {
+ notBeforeTime GeneralizedTime,
+ notAfterTime GeneralizedTime
+ }
+
+
+
+ return an Attr object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attr ::= Sequence {
+ attrType OBJECT IDENTIFIER,
+ attrValues Set OF AttributeValue
+ }
+
+
+
+ @param obj
+ @return
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttributeCertificate ::= Sequence {
+ acinfo AttributeCertificateInfo,
+ signatureAlgorithm AlgorithmIdentifier,
+ signatureValue BIT STRING
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttributeCertificateInfo ::= Sequence {
+ version AttCertVersion -- version is v2,
+ holder Holder,
+ issuer AttCertIssuer,
+ signature AlgorithmIdentifier,
+ serialNumber CertificateSerialNumber,
+ attrCertValidityPeriod AttCertValidityPeriod,
+ attributes Sequence OF Attr,
+ issuerUniqueID UniqueIdentifier OPTIONAL,
+ extensions Extensions OPTIONAL
+ }
+
+ AttCertVersion ::= Integer { v2(1) }
+
+
+
+ The AuthorityInformationAccess object.
+
+ id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 1 }
+
+ AuthorityInfoAccessSyntax ::=
+ Sequence SIZE (1..MAX) OF AccessDescription
+ AccessDescription ::= Sequence {
+ accessMethod OBJECT IDENTIFIER,
+ accessLocation GeneralName }
+
+ id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
+ id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 }
+ id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 }
+
+
+
+ create an AuthorityInformationAccess with the oid and location provided.
+
+
+ The AuthorityKeyIdentifier object.
+
+ id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 35 }
+
+ AuthorityKeyIdentifier ::= Sequence {
+ keyIdentifier [0] IMPLICIT KeyIdentifier OPTIONAL,
+ authorityCertIssuer [1] IMPLICIT GeneralNames OPTIONAL,
+ authorityCertSerialNumber [2] IMPLICIT CertificateSerialNumber OPTIONAL }
+
+ KeyIdentifier ::= OCTET STRING
+
+
+
+
+ *
+ * Calulates the keyidentifier using a SHA1 hash over the BIT STRING
+ * from SubjectPublicKeyInfo as defined in RFC2459.
+ *
+ * Example of making a AuthorityKeyIdentifier:
+ *
+ * SubjectPublicKeyInfo apki = new SubjectPublicKeyInfo((ASN1Sequence)new ASN1InputStream(
+ * publicKey.getEncoded()).readObject());
+ * AuthorityKeyIdentifier aki = new AuthorityKeyIdentifier(apki);
+ *
+ *
+ *
+
+
+ create an AuthorityKeyIdentifier with the GeneralNames tag and
+ the serial number provided as well.
+
+
+ create an AuthorityKeyIdentifier with the GeneralNames tag and
+ the serial number provided.
+
+
+ create an AuthorityKeyIdentifier with a precomputed key identifier
+
+
+ create an AuthorityKeyIdentifier with a precomupted key identifier
+ and the GeneralNames tag and the serial number provided as well.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+ create a cA=true object for the given path length constraint.
+
+ @param pathLenConstraint
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ BasicConstraints := Sequence {
+ cA Boolean DEFAULT FALSE,
+ pathLenConstraint Integer (0..MAX) OPTIONAL
+ }
+
+
+
+ Return the distribution points making up the sequence.
+
+ @return DistributionPoint[]
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CrlDistPoint ::= Sequence SIZE {1..MAX} OF DistributionPoint
+
+
+
+ The CRLNumber object.
+
+ CRLNumber::= Integer(0..MAX)
+
+
+
+ The CRLReason enumeration.
+
+ CRLReason ::= Enumerated {
+ unspecified (0),
+ keyCompromise (1),
+ cACompromise (2),
+ affiliationChanged (3),
+ superseded (4),
+ cessationOfOperation (5),
+ certificateHold (6),
+ removeFromCRL (8),
+ privilegeWithdrawn (9),
+ aACompromise (10)
+ }
+
+
+
+ CertPolicyId, used in the CertificatePolicies and PolicyMappings
+ X509V3 Extensions.
+
+
+ CertPolicyId ::= OBJECT IDENTIFIER
+
+
+
+ PKIX RFC-2459
+
+ The X.509 v2 CRL syntax is as follows. For signature calculation,
+ the data that is to be signed is ASN.1 Der encoded.
+
+
+ CertificateList ::= Sequence {
+ tbsCertList TbsCertList,
+ signatureAlgorithm AlgorithmIdentifier,
+ signatureValue BIT STRING }
+
+
+
+ This class helps to support crossCerfificatePairs in a LDAP directory
+ according RFC 2587
+
+
+ crossCertificatePairATTRIBUTE::={
+ WITH SYNTAX CertificatePair
+ EQUALITY MATCHING RULE certificatePairExactMatch
+ ID joint-iso-ccitt(2) ds(5) attributeType(4) crossCertificatePair(40)}
+
+
+ The forward elements of the crossCertificatePair attribute of a
+ CA's directory entry shall be used to store all, except self-issued
+ certificates issued to this CA. Optionally, the reverse elements of the
+ crossCertificatePair attribute, of a CA's directory entry may contain a
+ subset of certificates issued by this CA to other CAs. When both the forward
+ and the reverse elements are present in a single attribute value, issuer name
+ in one certificate shall match the subject name in the other and vice versa,
+ and the subject public key in one certificate shall be capable of verifying
+ the digital signature on the other certificate and vice versa.
+
+ When a reverse element is present, the forward element value and the reverse
+ element value need not be stored in the same attribute value; in other words,
+ they can be stored in either a single attribute value or two attribute
+ values.
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type CertificatePair:
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param forward Certificates issued to this CA.
+ @param reverse Certificates issued by this CA to other CAs.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+ @return a DERObject
+
+
+ @return Returns the forward.
+
+
+ @return Returns the reverse.
+
+
+ Construct a CertificatePolicies object containing one PolicyInformation.
+
+ @param name the name to be contained.
+
+
+ Produce an object suitable for an ASN1OutputStream.
+
+ CertificatePolicies ::= SEQUENCE SIZE {1..MAX} OF PolicyInformation
+
+
+
+ The DigestInfo object.
+
+ DigestInfo::=Sequence{
+ digestAlgorithm AlgorithmIdentifier,
+ digest OCTET STRING }
+
+
+
+ DisplayText class, used in
+ CertificatePolicies X509 V3 extensions (in policy qualifiers).
+
+ It stores a string in a chosen encoding.
+
+ DisplayText ::= CHOICE {
+ ia5String IA5String (SIZE (1..200)),
+ visibleString VisibleString (SIZE (1..200)),
+ bmpString BMPString (SIZE (1..200)),
+ utf8String UTF8String (SIZE (1..200)) }
+
+ @see PolicyQualifierInfo
+ @see PolicyInformation
+
+
+ Constant corresponding to ia5String encoding.
+
+
+
+ Constant corresponding to bmpString encoding.
+
+
+
+ Constant corresponding to utf8String encoding.
+
+
+
+ Constant corresponding to visibleString encoding.
+
+
+
+ Describe constant DisplayTextMaximumSize here.
+
+
+
+ Creates a new DisplayText instance.
+
+ @param type the desired encoding type for the text.
+ @param text the text to store. Strings longer than 200
+ characters are truncated.
+
+
+ Creates a new DisplayText instance.
+
+ @param text the text to encapsulate. Strings longer than 200
+ characters are truncated.
+
+
+ Creates a new DisplayText instance.
+ Useful when reading back a DisplayText class
+ from it's Asn1Encodable form.
+
+ @param contents an Asn1Encodable instance.
+
+
+ Returns the stored string object.
+
+ @return the stored text as a string.
+
+
+ The DistributionPoint object.
+
+ DistributionPoint ::= Sequence {
+ distributionPoint [0] DistributionPointName OPTIONAL,
+ reasons [1] ReasonFlags OPTIONAL,
+ cRLIssuer [2] GeneralNames OPTIONAL
+ }
+
+
+
+ The DistributionPointName object.
+
+ DistributionPointName ::= CHOICE {
+ fullName [0] GeneralNames,
+ nameRelativeToCRLIssuer [1] RDN
+ }
+
+
+
+ The extendedKeyUsage object.
+
+ extendedKeyUsage ::= Sequence SIZE (1..MAX) OF KeyPurposeId
+
+
+
+ Returns all extended key usages.
+ The returned ArrayList contains DerObjectIdentifier instances.
+ @return An ArrayList with all key purposes.
+
+
+ The GeneralName object.
+
+ GeneralName ::= CHOICE {
+ otherName [0] OtherName,
+ rfc822Name [1] IA5String,
+ dNSName [2] IA5String,
+ x400Address [3] ORAddress,
+ directoryName [4] Name,
+ ediPartyName [5] EDIPartyName,
+ uniformResourceIdentifier [6] IA5String,
+ iPAddress [7] OCTET STRING,
+ registeredID [8] OBJECT IDENTIFIER}
+
+ OtherName ::= Sequence {
+ type-id OBJECT IDENTIFIER,
+ value [0] EXPLICIT ANY DEFINED BY type-id }
+
+ EDIPartyName ::= Sequence {
+ nameAssigner [0] DirectoryString OPTIONAL,
+ partyName [1] DirectoryString }
+
+
+
+ When the subjectAltName extension contains an Internet mail address,
+ the address MUST be included as an rfc822Name. The format of an
+ rfc822Name is an "addr-spec" as defined in RFC 822 [RFC 822].
+
+ When the subjectAltName extension contains a domain name service
+ label, the domain name MUST be stored in the dNSName (an IA5String).
+ The name MUST be in the "preferred name syntax," as specified by RFC
+ 1034 [RFC 1034].
+
+ When the subjectAltName extension contains a URI, the name MUST be
+ stored in the uniformResourceIdentifier (an IA5String). The name MUST
+ be a non-relative URL, and MUST follow the URL syntax and encoding
+ rules specified in [RFC 1738]. The name must include both a scheme
+ (e.g., "http" or "ftp") and a scheme-specific-part. The scheme-
+ specific-part must include a fully qualified domain name or IP
+ address as the host.
+
+ When the subjectAltName extension contains a iPAddress, the address
+ MUST be stored in the octet string in "network byte order," as
+ specified in RFC 791 [RFC 791]. The least significant bit (LSB) of
+ each octet is the LSB of the corresponding byte in the network
+ address. For IP Version 4, as specified in RFC 791, the octet string
+ MUST contain exactly four octets. For IP Version 6, as specified in
+ RFC 1883, the octet string MUST contain exactly sixteen octets [RFC
+ 1883].
+
+
+ Create a GeneralName for the given tag from the passed in string.
+
+ This constructor can handle:
+
+ rfc822Name
+ iPAddress
+ directoryName
+ dNSName
+ uniformResourceIdentifier
+ registeredID
+
+ For x400Address, otherName and ediPartyName there is no common string
+ format defined.
+
+ Note: A directory name can be encoded in different ways into a byte
+ representation. Be aware of this if the byte representation is used for
+ comparing results.
+
+
+ @param tag tag number
+ @param name string representation of name
+ @throws ArgumentException if the string encoding is not correct or
+ not supported.
+
+
+ Construct a GeneralNames object containing one GeneralName.
+ The name to be contained.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ GeneralNames ::= Sequence SIZE {1..MAX} OF GeneralName
+
+
+
+ Class for containing a restriction object subtrees in NameConstraints. See
+ RFC 3280.
+
+
+
+ GeneralSubtree ::= SEQUENCE
+ {
+ baseName GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.NameConstraints
+
+
+
+ Constructor from a given details.
+
+ According RFC 3280, the minimum and maximum fields are not used with any
+ name forms, thus minimum MUST be zero, and maximum MUST be absent.
+
+ If minimum is null, zero is assumed, if
+ maximum is null, maximum is absent.
+
+ @param baseName
+ A restriction.
+ @param minimum
+ Minimum
+
+ @param maximum
+ Maximum
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ GeneralSubtree ::= SEQUENCE
+ {
+ baseName GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL
+ }
+
+
+ @return a DERObject
+
+
+ The Holder object.
+
+ For an v2 attribute certificate this is:
+
+
+ Holder ::= SEQUENCE {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+ For an v1 attribute certificate this is:
+
+
+ subject CHOICE {
+ baseCertificateID [0] IssuerSerial,
+ -- associated with a Public Key Certificate
+ subjectName [1] GeneralNames },
+ -- associated with a name
+
+
+
+
+ Constructor for a holder for an v1 attribute certificate.
+
+ @param tagObj The ASN.1 tagged holder object.
+
+
+ Constructor for a holder for an v2 attribute certificate. *
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructs a holder from a IssuerSerial.
+ @param baseCertificateID The IssuerSerial.
+ @param version The version of the attribute certificate.
+
+
+ Returns 1 for v2 attribute certificates or 0 for v1 attribute
+ certificates.
+ @return The version of the attribute certificate.
+
+
+ Constructs a holder with an entityName for v2 attribute certificates or
+ with a subjectName for v1 attribute certificates.
+
+ @param entityName The entity or subject name.
+
+
+ Constructs a holder with an entityName for v2 attribute certificates or
+ with a subjectName for v1 attribute certificates.
+
+ @param entityName The entity or subject name.
+ @param version The version of the attribute certificate.
+
+
+ Constructs a holder from an object digest info.
+
+ @param objectDigestInfo The object digest info object.
+
+
+ Returns the entityName for an v2 attribute certificate or the subjectName
+ for an v1 attribute certificate.
+
+ @return The entityname or subjectname.
+
+
+ The Holder object.
+
+ Holder ::= Sequence {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+ Implementation of IetfAttrSyntax as specified by RFC3281.
+
+
+
+
+
+
+
+
+ IetfAttrSyntax ::= Sequence {
+ policyAuthority [0] GeneralNames OPTIONAL,
+ values Sequence OF CHOICE {
+ octets OCTET STRING,
+ oid OBJECT IDENTIFIER,
+ string UTF8String
+ }
+ }
+
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ IssuerSerial ::= Sequence {
+ issuer GeneralNames,
+ serial CertificateSerialNumber,
+ issuerUid UniqueIdentifier OPTIONAL
+ }
+
+
+
+
+ IssuingDistributionPoint ::= SEQUENCE {
+ distributionPoint [0] DistributionPointName OPTIONAL,
+ onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE,
+ onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE,
+ onlySomeReasons [3] ReasonFlags OPTIONAL,
+ indirectCRL [4] BOOLEAN DEFAULT FALSE,
+ onlyContainsAttributeCerts [5] BOOLEAN DEFAULT FALSE }
+
+
+
+ Constructor from given details.
+
+ @param distributionPoint
+ May contain an URI as pointer to most current CRL.
+ @param onlyContainsUserCerts Covers revocation information for end certificates.
+ @param onlyContainsCACerts Covers revocation information for CA certificates.
+
+ @param onlySomeReasons
+ Which revocation reasons does this point cover.
+ @param indirectCRL
+ If true then the CRL contains revocation
+ information about certificates ssued by other CAs.
+ @param onlyContainsAttributeCerts Covers revocation information for attribute certificates.
+
+
+ Constructor from Asn1Sequence
+
+
+ @return Returns the distributionPoint.
+
+
+ @return Returns the onlySomeReasons.
+
+
+ The KeyPurposeID object.
+
+ KeyPurposeID ::= OBJECT IDENTIFIER
+
+
+
+ The KeyUsage object.
+
+ id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
+
+ KeyUsage ::= BIT STRING {
+ digitalSignature (0),
+ nonRepudiation (1),
+ keyEncipherment (2),
+ dataEncipherment (3),
+ keyAgreement (4),
+ keyCertSign (5),
+ cRLSign (6),
+ encipherOnly (7),
+ decipherOnly (8) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment)
+
+
+ Constructor from a given details.
+
+ permitted and excluded are Vectors of GeneralSubtree objects.
+
+ @param permitted Permitted subtrees
+ @param excluded Excluded subtrees
+
+
+ NoticeReference class, used in
+ CertificatePolicies X509 V3 extensions
+ (in policy qualifiers).
+
+
+ NoticeReference ::= Sequence {
+ organization DisplayText,
+ noticeNumbers Sequence OF Integer }
+
+
+
+ @see PolicyQualifierInfo
+ @see PolicyInformation
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization a String value
+ @param numbers a Vector value
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization a String value
+ @param noticeNumbers an ASN1EncodableVector value
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization displayText
+ @param noticeNumbers an ASN1EncodableVector value
+
+
+ Creates a new NoticeReference instance.
+ Useful for reconstructing a NoticeReference
+ instance from its encodable/encoded form.
+
+ @param as an Asn1Sequence value obtained from either
+ calling @{link ToAsn1Object()} for a NoticeReference
+ instance or from parsing it from a Der-encoded stream.
+
+
+ Describe ToAsn1Object method here.
+
+ @return a Asn1Object value
+
+
+ ObjectDigestInfo ASN.1 structure used in v2 attribute certificates.
+
+
+
+ ObjectDigestInfo ::= SEQUENCE {
+ digestedObjectType ENUMERATED {
+ publicKey (0),
+ publicKeyCert (1),
+ otherObjectTypes (2) },
+ -- otherObjectTypes MUST NOT
+ -- be used in this profile
+ otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
+ digestAlgorithm AlgorithmIdentifier,
+ objectDigest BIT STRING
+ }
+
+
+
+
+
+ The public key is hashed.
+
+
+ The public key certificate is hashed.
+
+
+ An other object is hashed.
+
+
+ Constructor from given details.
+
+ If digestedObjectType is not {@link #publicKeyCert} or
+ {@link #publicKey} otherObjectTypeID must be given,
+ otherwise it is ignored.
+
+ @param digestedObjectType The digest object type.
+ @param otherObjectTypeID The object type ID for
+ otherObjectDigest.
+ @param digestAlgorithm The algorithm identifier for the hash.
+ @param objectDigest The hash value.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+
+ ObjectDigestInfo ::= SEQUENCE {
+ digestedObjectType ENUMERATED {
+ publicKey (0),
+ publicKeyCert (1),
+ otherObjectTypes (2) },
+ -- otherObjectTypes MUST NOT
+ -- be used in this profile
+ otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
+ digestAlgorithm AlgorithmIdentifier,
+ objectDigest BIT STRING
+ }
+
+
+
+
+ PolicyMappings V3 extension, described in RFC3280.
+
+ PolicyMappings ::= Sequence SIZE (1..MAX) OF Sequence {
+ issuerDomainPolicy CertPolicyId,
+ subjectDomainPolicy CertPolicyId }
+
+
+ @see RFC 3280, section 4.2.1.6
+
+
+ Creates a new PolicyMappings instance.
+
+ @param seq an Asn1Sequence constructed as specified
+ in RFC 3280
+
+
+ Creates a new PolicyMappings instance.
+
+ @param mappings a HashMap value that maps
+ string oids
+ to other string oids.
+
+
+ PolicyQualifierId, used in the CertificatePolicies
+ X509V3 extension.
+
+
+ id-qt OBJECT IDENTIFIER ::= { id-pkix 2 }
+ id-qt-cps OBJECT IDENTIFIER ::= { id-qt 1 }
+ id-qt-unotice OBJECT IDENTIFIER ::= { id-qt 2 }
+ PolicyQualifierId ::=
+ OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
+
+
+
+ Policy qualifiers, used in the X509V3 CertificatePolicies
+ extension.
+
+
+ PolicyQualifierInfo ::= Sequence {
+ policyQualifierId PolicyQualifierId,
+ qualifier ANY DEFINED BY policyQualifierId }
+
+
+
+ Creates a new PolicyQualifierInfo instance.
+
+ @param policyQualifierId a PolicyQualifierId value
+ @param qualifier the qualifier, defined by the above field.
+
+
+ Creates a new PolicyQualifierInfo containing a
+ cPSuri qualifier.
+
+ @param cps the CPS (certification practice statement) uri as a
+ string.
+
+
+ Creates a new PolicyQualifierInfo instance.
+
+ @param as PolicyQualifierInfo X509 structure
+ encoded as an Asn1Sequence.
+
+
+ Returns a Der-encodable representation of this instance.
+
+ @return a Asn1Object value
+
+
+
+
+ PrivateKeyUsagePeriod ::= SEQUENCE
+ {
+ notBefore [0] GeneralizedTime OPTIONAL,
+ notAfter [1] GeneralizedTime OPTIONAL }
+
+
+
+
+ This outputs the key in Pkcs1v2 format.
+
+ RSAPublicKey ::= Sequence {
+ modulus Integer, -- n
+ publicExponent Integer, -- e
+ }
+
+
+
+ The ReasonFlags object.
+
+ ReasonFlags ::= BIT STRING {
+ unused(0),
+ keyCompromise(1),
+ cACompromise(2),
+ affiliationChanged(3),
+ superseded(4),
+ cessationOfOperation(5),
+ certficateHold(6)
+ }
+
+
+
+ @param reasons - the bitwise OR of the Key Reason flags giving the
+ allowed uses for the key.
+
+
+ Implementation of the RoleSyntax object as specified by the RFC3281.
+
+
+ RoleSyntax ::= SEQUENCE {
+ roleAuthority [0] GeneralNames OPTIONAL,
+ roleName [1] GeneralName
+ }
+
+
+
+ RoleSyntax factory method.
+ @param obj the object used to construct an instance of
+ RoleSyntax. It must be an instance of RoleSyntax
+ or Asn1Sequence.
+ @return the instance of RoleSyntax built from the
+ supplied object.
+ @throws java.lang.ArgumentException if the object passed
+ to the factory is not an instance of RoleSyntax or
+ Asn1Sequence.
+
+
+ Constructor.
+ @param roleAuthority the role authority of this RoleSyntax.
+ @param roleName the role name of this RoleSyntax.
+
+
+ Constructor. Invoking this constructor is the same as invoking
+ new RoleSyntax(null, roleName).
+ @param roleName the role name of this RoleSyntax.
+
+
+ Utility constructor. Takes a string argument representing
+ the role name, builds a GeneralName to hold the role name
+ and calls the constructor that takes a GeneralName.
+ @param roleName
+
+
+ Constructor that builds an instance of RoleSyntax by
+ extracting the encoded elements from the Asn1Sequence
+ object supplied.
+ @param seq an instance of Asn1Sequence that holds
+ the encoded elements used to build this RoleSyntax.
+
+
+ Gets the role authority of this RoleSyntax.
+ @return an instance of GeneralNames holding the
+ role authority of this RoleSyntax.
+
+
+ Gets the role name of this RoleSyntax.
+ @return an instance of GeneralName holding the
+ role name of this RoleSyntax.
+
+
+ Gets the role name as a java.lang.string object.
+ @return the role name of this RoleSyntax represented as a
+ string object.
+
+
+ Gets the role authority as a string[] object.
+ @return the role authority of this RoleSyntax represented as a
+ string[] array.
+
+
+ Implementation of the method ToAsn1Object as
+ required by the superclass ASN1Encodable.
+
+
+ RoleSyntax ::= SEQUENCE {
+ roleAuthority [0] GeneralNames OPTIONAL,
+ roleName [1] GeneralName
+ }
+
+
+
+ This extension may contain further X.500 attributes of the subject. See also
+ RFC 3039.
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @see org.bouncycastle.asn1.x509.X509Name for AttributeType ObjectIdentifiers.
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type SubjectDirectoryAttributes:
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @param seq
+ The ASN.1 sequence.
+
+
+ Constructor from an ArrayList of attributes.
+
+ The ArrayList consists of attributes of type {@link Attribute Attribute}
+
+ @param attributes The attributes.
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @return a DERObject
+
+
+ @return Returns the attributes.
+
+
+ The SubjectKeyIdentifier object.
+
+ SubjectKeyIdentifier::= OCTET STRING
+
+
+
+ Calculates the keyIdentifier using a SHA1 hash over the BIT STRING
+ from SubjectPublicKeyInfo as defined in RFC3280.
+
+ @param spki the subject public key info.
+
+
+ Return a RFC 3280 type 1 key identifier. As in:
+
+ (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the
+ value of the BIT STRING subjectPublicKey (excluding the tag,
+ length, and number of unused bits).
+
+ @param keyInfo the key info object containing the subjectPublicKey field.
+ @return the key identifier.
+
+
+ Return a RFC 3280 type 2 key identifier. As in:
+
+ (2) The keyIdentifier is composed of a four bit type field with
+ the value 0100 followed by the least significant 60 bits of the
+ SHA-1 hash of the value of the BIT STRING subjectPublicKey.
+
+ @param keyInfo the key info object containing the subjectPublicKey field.
+ @return the key identifier.
+
+
+ The object that contains the public key stored in a certficate.
+
+ The GetEncoded() method in the public keys in the JCE produces a DER
+ encoded one of these.
+
+
+ for when the public key is an encoded object - if the bitstring
+ can't be decoded this routine raises an IOException.
+
+ @exception IOException - if the bit string doesn't represent a Der
+ encoded object.
+
+
+ for when the public key is raw bits...
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SubjectPublicKeyInfo ::= Sequence {
+ algorithm AlgorithmIdentifier,
+ publicKey BIT STRING }
+
+
+
+ PKIX RFC-2459 - TbsCertList object.
+
+ TbsCertList ::= Sequence {
+ version Version OPTIONAL,
+ -- if present, shall be v2
+ signature AlgorithmIdentifier,
+ issuer Name,
+ thisUpdate Time,
+ nextUpdate Time OPTIONAL,
+ revokedCertificates Sequence OF Sequence {
+ userCertificate CertificateSerialNumber,
+ revocationDate Time,
+ crlEntryExtensions Extensions OPTIONAL
+ -- if present, shall be v2
+ } OPTIONAL,
+ crlExtensions [0] EXPLICIT Extensions OPTIONAL
+ -- if present, shall be v2
+ }
+
+
+
+ The TbsCertificate object.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ extensions [ 3 ] Extensions OPTIONAL
+ }
+
+
+ Note: issuerUniqueID and subjectUniqueID are both deprecated by the IETF. This class
+ will parse them, but you really shouldn't be creating new ones.
+
+
+ Target structure used in target information extension for attribute
+ certificates from RFC 3281.
+
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+
+
+ The targetCert field is currently not supported and must not be used
+ according to RFC 3281.
+
+
+ Creates an instance of a Target from the given object.
+
+ obj can be a Target or a {@link Asn1TaggedObject}
+
+ @param obj The object.
+ @return A Target instance.
+ @throws ArgumentException if the given object cannot be
+ interpreted as Target.
+
+
+ Constructor from Asn1TaggedObject.
+
+ @param tagObj The tagged object.
+ @throws ArgumentException if the encoding is wrong.
+
+
+ Constructor from given details.
+
+ Exactly one of the parameters must be not null.
+
+ @param type the choice type to apply to the name.
+ @param name the general name.
+ @throws ArgumentException if type is invalid.
+
+
+ @return Returns the targetGroup.
+
+
+ @return Returns the targetName.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+
+ @return an Asn1Object
+
+
+ Target information extension for attributes certificates according to RFC
+ 3281.
+
+
+ SEQUENCE OF Targets
+
+
+
+
+ Creates an instance of a TargetInformation from the given object.
+
+ obj can be a TargetInformation or a {@link Asn1Sequence}
+
+ @param obj The object.
+ @return A TargetInformation instance.
+ @throws ArgumentException if the given object cannot be interpreted as TargetInformation.
+
+
+ Constructor from a Asn1Sequence.
+
+ @param seq The Asn1Sequence.
+ @throws ArgumentException if the sequence does not contain
+ correctly encoded Targets elements.
+
+
+ Returns the targets in this target information extension.
+
+ The ArrayList is cloned before it is returned.
+
+ @return Returns the targets.
+
+
+ Constructs a target information from a single targets element.
+ According to RFC 3281 only one targets element must be produced.
+
+ @param targets A Targets instance.
+
+
+ According to RFC 3281 only one targets element must be produced. If
+ multiple targets are given they must be merged in
+ into one targets element.
+
+ @param targets An array with {@link Targets}.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ SEQUENCE OF Targets
+
+
+
+ According to RFC 3281 only one targets element must be produced. If
+ multiple targets are given in the constructor they are merged into one
+ targets element. If this was produced from a
+ {@link Org.BouncyCastle.Asn1.Asn1Sequence} the encoding is kept.
+
+ @return an Asn1Object
+
+
+ Targets structure used in target information extension for attribute
+ certificates from RFC 3281.
+
+
+ Targets ::= SEQUENCE OF Target
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+ TargetCert ::= SEQUENCE {
+ targetCertificate IssuerSerial,
+ targetName GeneralName OPTIONAL,
+ certDigestInfo ObjectDigestInfo OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.Target
+ @see org.bouncycastle.asn1.x509.TargetInformation
+
+
+ Creates an instance of a Targets from the given object.
+
+ obj can be a Targets or a {@link Asn1Sequence}
+
+ @param obj The object.
+ @return A Targets instance.
+ @throws ArgumentException if the given object cannot be interpreted as Target.
+
+
+ Constructor from Asn1Sequence.
+
+ @param targets The ASN.1 SEQUENCE.
+ @throws ArgumentException if the contents of the sequence are
+ invalid.
+
+
+ Constructor from given targets.
+
+ The ArrayList is copied.
+
+ @param targets An ArrayList of {@link Target}s.
+ @see Target
+ @throws ArgumentException if the ArrayList contains not only Targets.
+
+
+ Returns the targets in an ArrayList.
+
+ The ArrayList is cloned before it is returned.
+
+ @return Returns the targets.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Targets ::= SEQUENCE OF Target
+
+
+ @return an Asn1Object
+
+
+ creates a time object from a given date - if the date is between 1950
+ and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime
+ is used.
+
+
+
+ Return our time as DateTime.
+
+ A date time.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Time ::= CHOICE {
+ utcTime UTCTime,
+ generalTime GeneralizedTime }
+
+
+
+ UserNotice class, used in
+ CertificatePolicies X509 extensions (in policy
+ qualifiers).
+
+ UserNotice ::= Sequence {
+ noticeRef NoticeReference OPTIONAL,
+ explicitText DisplayText OPTIONAL}
+
+
+
+ @see PolicyQualifierId
+ @see PolicyInformation
+
+
+ Creates a new UserNotice instance.
+
+ @param noticeRef a NoticeReference value
+ @param explicitText a DisplayText value
+
+
+ Creates a new UserNotice instance.
+
+ @param noticeRef a NoticeReference value
+ @param str the explicitText field as a string.
+
+
+ Creates a new UserNotice instance.
+ Useful from reconstructing a UserNotice instance
+ from its encodable/encoded form.
+
+ @param as an ASN1Sequence value obtained from either
+ calling @{link toASN1Object()} for a UserNotice
+ instance or from parsing it from a DER-encoded stream.
+
+
+ Generator for Version 1 TbsCertificateStructures.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ }
+
+
+
+
+ Generator for Version 2 AttributeCertificateInfo
+
+ AttributeCertificateInfo ::= Sequence {
+ version AttCertVersion -- version is v2,
+ holder Holder,
+ issuer AttCertIssuer,
+ signature AlgorithmIdentifier,
+ serialNumber CertificateSerialNumber,
+ attrCertValidityPeriod AttCertValidityPeriod,
+ attributes Sequence OF Attr,
+ issuerUniqueID UniqueIdentifier OPTIONAL,
+ extensions Extensions OPTIONAL
+ }
+
+
+
+
+ @param attribute
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ V2Form ::= Sequence {
+ issuerName GeneralNames OPTIONAL,
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ objectDigestInfo [1] ObjectDigestInfo OPTIONAL
+ -- issuerName MUST be present in this profile
+ -- baseCertificateID and objectDigestInfo MUST NOT
+ -- be present in this profile
+ }
+
+
+
+ Generator for Version 2 TbsCertList structures.
+
+ TbsCertList ::= Sequence {
+ version Version OPTIONAL,
+ -- if present, shall be v2
+ signature AlgorithmIdentifier,
+ issuer Name,
+ thisUpdate Time,
+ nextUpdate Time OPTIONAL,
+ revokedCertificates Sequence OF Sequence {
+ userCertificate CertificateSerialNumber,
+ revocationDate Time,
+ crlEntryExtensions Extensions OPTIONAL
+ -- if present, shall be v2
+ } OPTIONAL,
+ crlExtensions [0] EXPLICIT Extensions OPTIONAL
+ -- if present, shall be v2
+ }
+
+
+ Note: This class may be subject to change
+
+
+ Generator for Version 3 TbsCertificateStructures.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ extensions [ 3 ] Extensions OPTIONAL
+ }
+
+
+
+
+ an X509Certificate structure.
+
+ Certificate ::= Sequence {
+ tbsCertificate TbsCertificate,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING
+ }
+
+
+
+ The default converter for X509 DN entries when going from their
+ string value to ASN.1 strings.
+
+
+ Apply default conversion for the given value depending on the oid
+ and the character range of the value.
+
+ @param oid the object identifier for the DN entry
+ @param value the value associated with it
+ @return the ASN.1 equivalent for the string value.
+
+
+ an object for the elements in the X.509 V3 extension block.
+
+
+ Convert the value of the passed in extension to an object.
+ The extension to parse.
+ The object the value string contains.
+ If conversion is not possible.
+
+
+ Subject Directory Attributes
+
+
+ Subject Key Identifier
+
+
+ Key Usage
+
+
+ Private Key Usage Period
+
+
+ Subject Alternative Name
+
+
+ Issuer Alternative Name
+
+
+ Basic Constraints
+
+
+ CRL Number
+
+
+ Reason code
+
+
+ Hold Instruction Code
+
+
+ Invalidity Date
+
+
+ Delta CRL indicator
+
+
+ Issuing Distribution Point
+
+
+ Certificate Issuer
+
+
+ Name Constraints
+
+
+ CRL Distribution Points
+
+
+ Certificate Policies
+
+
+ Policy Mappings
+
+
+ Authority Key Identifier
+
+
+ Policy Constraints
+
+
+ Extended Key Usage
+
+
+ Freshest CRL
+
+
+ Inhibit Any Policy
+
+
+ Authority Info Access
+
+
+ Subject Info Access
+
+
+ Logo Type
+
+
+ BiometricInfo
+
+
+ QCStatements
+
+
+ Audit identity extension in attribute certificates.
+
+
+ NoRevAvail extension in attribute certificates.
+
+
+ TargetInformation extension in attribute certificates.
+
+
+ Constructor from Asn1Sequence.
+
+ the extensions are a list of constructed sequences, either with (Oid, OctetString) or (Oid, Boolean, OctetString)
+
+
+ constructor from a table of extensions.
+
+ it's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from a table of extensions with ordering.
+
+ It's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from two vectors
+
+ @param objectIDs an ArrayList of the object identifiers.
+ @param values an ArrayList of the extension values.
+
+
+ constructor from a table of extensions.
+
+ it's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from a table of extensions with ordering.
+
+ It's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from two vectors
+
+ @param objectIDs an ArrayList of the object identifiers.
+ @param values an ArrayList of the extension values.
+
+
+ return an Enumeration of the extension field's object ids.
+
+
+ return the extension represented by the object identifier
+ passed in.
+
+ @return the extension if it's present, null otherwise.
+
+
+
+ Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
+
+ Extension ::= SEQUENCE {
+ extnId EXTENSION.&id ({ExtensionSet}),
+ critical BOOLEAN DEFAULT FALSE,
+ extnValue OCTET STRING }
+
+
+
+ Generator for X.509 extensions
+
+
+ Reset the generator
+
+
+
+ Add an extension with the given oid and the passed in value to be included
+ in the OCTET STRING associated with the extension.
+
+ OID for the extension.
+ True if critical, false otherwise.
+ The ASN.1 object to be included in the extension.
+
+
+
+ Add an extension with the given oid and the passed in byte array to be wrapped
+ in the OCTET STRING associated with the extension.
+
+ OID for the extension.
+ True if critical, false otherwise.
+ The byte array to be wrapped.
+
+
+ Return true if there are no extension present in this generator.
+ True if empty, false otherwise
+
+
+ Generate an X509Extensions object based on the current state of the generator.
+ An X509Extensions object
+
+
+
+ RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
+
+ RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
+
+ AttributeTypeAndValue ::= SEQUENCE {
+ type OBJECT IDENTIFIER,
+ value ANY }
+
+
+
+ country code - StringType(SIZE(2))
+
+
+ organization - StringType(SIZE(1..64))
+
+
+ organizational unit name - StringType(SIZE(1..64))
+
+
+ Title
+
+
+ common name - StringType(SIZE(1..64))
+
+
+ street - StringType(SIZE(1..64))
+
+
+ device serial number name - StringType(SIZE(1..64))
+
+
+ locality name - StringType(SIZE(1..64))
+
+
+ state, or province name - StringType(SIZE(1..64))
+
+
+ Naming attributes of type X520name
+
+
+ businessCategory - DirectoryString(SIZE(1..128)
+
+
+ postalCode - DirectoryString(SIZE(1..40)
+
+
+ dnQualifier - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z
+
+
+ RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)
+
+
+ RFC 3039 DateOfBirth - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"
+
+
+ RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166
+ codes only
+
+
+ RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166
+ codes only
+
+
+ ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF
+ DirectoryString(SIZE(1..30))
+
+
+ RFC 2256 dmdName
+
+
+ id-at-telephoneNumber
+
+
+ id-at-name
+
+
+ Email address (RSA PKCS#9 extension) - IA5String.
+ Note: if you're trying to be ultra orthodox, don't use this! It shouldn't be in here.
+
+
+ more from PKCS#9
+
+
+ email address in Verisign certificates
+
+
+ LDAP User id.
+
+
+ determines whether or not strings should be processed and printed
+ from back to front.
+
+
+ default look up table translating OID values into their common symbols following
+ the convention in RFC 2253 with a few extras
+
+
+ look up table translating OID values into their common symbols following the convention in RFC 2253
+
+
+ look up table translating OID values into their common symbols following the convention in RFC 1779
+
+
+
+ look up table translating common symbols into their OIDS.
+
+
+ Return a X509Name based on the passed in tagged object.
+
+ @param obj tag object holding name.
+ @param explicitly true if explicitly tagged false otherwise.
+ @return the X509Name
+
+
+ Constructor from Asn1Sequence
+
+ the principal will be a list of constructed sets, each containing an (OID, string) pair.
+
+
+ Constructor from a table of attributes with ordering.
+
+ it's is assumed the table contains OID/string pairs, and the contents
+ of the table are copied into an internal table as part of the
+ construction process. The ordering ArrayList should contain the OIDs
+ in the order they are meant to be encoded or printed in ToString.
+
+
+ Constructor from a table of attributes with ordering.
+
+ it's is assumed the table contains OID/string pairs, and the contents
+ of the table are copied into an internal table as part of the
+ construction process. The ordering ArrayList should contain the OIDs
+ in the order they are meant to be encoded or printed in ToString.
+
+ The passed in converter will be used to convert the strings into their
+ ASN.1 counterparts.
+
+
+ Takes two vectors one of the oids and the other of the values.
+
+
+ Takes two vectors one of the oids and the other of the values.
+
+ The passed in converter will be used to convert the strings into their
+ ASN.1 counterparts.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes with each
+ string value being converted to its associated ASN.1 type using the passed
+ in converter.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. If reverse
+ is true, create the encoded version of the sequence starting from the
+ last element in the string.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes with each
+ string value being converted to its associated ASN.1 type using the passed
+ in converter. If reverse is true the ASN.1 sequence representing the DN will
+ be built by starting at the end of the string, rather than the start.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. lookUp
+ should provide a table of lookups, indexed by lowercase only strings and
+ yielding a DerObjectIdentifier, other than that OID. and numeric oids
+ will be processed automatically.
+
+ If reverse is true, create the encoded version of the sequence
+ starting from the last element in the string.
+ @param reverse true if we should start scanning from the end (RFC 2553).
+ @param lookUp table of names and their oids.
+ @param dirName the X.500 string to be parsed.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. lookUp
+ should provide a table of lookups, indexed by lowercase only strings and
+ yielding a DerObjectIdentifier, other than that OID. and numeric oids
+ will be processed automatically. The passed in converter is used to convert the
+ string values to the right of each equals sign to their ASN.1 counterparts.
+
+ @param reverse true if we should start scanning from the end, false otherwise.
+ @param lookUp table of names and oids.
+ @param dirName the string dirName
+ @param converter the converter to convert string values into their ASN.1 equivalents
+
+
+ return an IList of the oids in the name, in the order they were found.
+
+
+ return an IList of the values found in the name, in the order they
+ were found.
+
+
+ return an IList of the values found in the name, in the order they
+ were found, with the DN label corresponding to passed in oid.
+
+
+ The X509Name object to test equivalency against.
+ If true, the order of elements must be the same,
+ as well as the values associated with each element.
+
+
+ test for equivalence - note: case is ignored.
+
+
+ convert the structure to a string - if reverse is true the
+ oids and values are listed out starting with the last element
+ in the sequence (ala RFC 2253), otherwise the string will begin
+ with the first element of the structure. If no string definition
+ for the oid is found in oidSymbols the string value of the oid is
+ added. Two standard symbol tables are provided DefaultSymbols, and
+ RFC2253Symbols as part of this class.
+
+ @param reverse if true start at the end of the sequence and work back.
+ @param oidSymbols look up table strings for oids.
+
+
+ * It turns out that the number of standard ways the fields in a DN should be
+ * encoded into their ASN.1 counterparts is rapidly approaching the
+ * number of machines on the internet. By default the X509Name class
+ * will produce UTF8Strings in line with the current recommendations (RFC 3280).
+ *
+ * An example of an encoder look like below:
+ *
+ * public class X509DirEntryConverter
+ * : X509NameEntryConverter
+ * {
+ * public Asn1Object GetConvertedValue(
+ * DerObjectIdentifier oid,
+ * string value)
+ * {
+ * if (str.Length() != 0 && str.charAt(0) == '#')
+ * {
+ * return ConvertHexEncoded(str, 1);
+ * }
+ * if (oid.Equals(EmailAddress))
+ * {
+ * return new DerIA5String(str);
+ * }
+ * else if (CanBePrintable(str))
+ * {
+ * return new DerPrintableString(str);
+ * }
+ * else if (CanBeUTF8(str))
+ * {
+ * return new DerUtf8String(str);
+ * }
+ * else
+ * {
+ * return new DerBmpString(str);
+ * }
+ * }
+ * }
+ *
+ *
+
+
+ Convert an inline encoded hex string rendition of an ASN.1
+ object back into its corresponding ASN.1 object.
+
+ @param str the hex encoded object
+ @param off the index at which the encoding starts
+ @return the decoded object
+
+
+ return true if the passed in string can be represented without
+ loss as a PrintableString, false otherwise.
+
+
+ Convert the passed in string value into the appropriate ASN.1
+ encoded object.
+
+ @param oid the oid associated with the value in the DN.
+ @param value the value of the particular DN component.
+ @return the ASN.1 equivalent for the value.
+
+
+ class for breaking up an X500 Name into it's component tokens, ala
+ java.util.StringTokenizer. We need this class as some of the
+ lightweight Java environment don't support classes like
+ StringTokenizer.
+
+
+ The BiometricData object.
+
+ BiometricData ::= SEQUENCE {
+ typeOfBiometricData TypeOfBiometricData,
+ hashAlgorithm AlgorithmIdentifier,
+ biometricDataHash OCTET STRING,
+ sourceDataUri IA5String OPTIONAL }
+
+
+
+ The Iso4217CurrencyCode object.
+
+ Iso4217CurrencyCode ::= CHOICE {
+ alphabetic PrintableString (SIZE 3), --Recommended
+ numeric INTEGER (1..999) }
+ -- Alphabetic or numeric currency code as defined in ISO 4217
+ -- It is recommended that the Alphabetic form is used
+
+
+
+ The MonetaryValue object.
+
+ MonetaryValue ::= SEQUENCE {
+ currency Iso4217CurrencyCode,
+ amount INTEGER,
+ exponent INTEGER }
+ -- value = amount * 10^exponent
+
+
+
+ The QCStatement object.
+
+ QCStatement ::= SEQUENCE {
+ statementId OBJECT IDENTIFIER,
+ statementInfo ANY DEFINED BY statementId OPTIONAL}
+
+
+
+ The SemanticsInformation object.
+
+ SemanticsInformation ::= SEQUENCE {
+ semanticsIdentifier OBJECT IDENTIFIER OPTIONAL,
+ nameRegistrationAuthorities NameRegistrationAuthorities
+ OPTIONAL }
+ (WITH COMPONENTS {..., semanticsIdentifier PRESENT}|
+ WITH COMPONENTS {..., nameRegistrationAuthorities PRESENT})
+
+ NameRegistrationAuthorities ::= SEQUENCE SIZE (1..MAX) OF
+ GeneralName
+
+
+
+ The TypeOfBiometricData object.
+
+ TypeOfBiometricData ::= CHOICE {
+ predefinedBiometricType PredefinedBiometricType,
+ biometricDataOid OBJECT IDENTIFIER }
+
+ PredefinedBiometricType ::= INTEGER {
+ picture(0),handwritten-signature(1)}
+ (picture|handwritten-signature)
+
+
+
+ Structure for a name or pseudonym.
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @see org.bouncycastle.asn1.x509.sigi.PersonalData
+
+
+
+ Constructor from DERString.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+ @param pseudonym pseudonym value to use.
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param pseudonym The pseudonym.
+
+
+ Constructor from a given details.
+
+ @param surname The surname.
+ @param givenName A sequence of directory strings making up the givenName
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @return an Asn1Object
+
+
+ Contains personal data for the otherName field in the subjectAltNames
+ extension.
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.sigi.NameOrPseudonym
+ @see org.bouncycastle.asn1.x509.sigi.SigIObjectIdentifiers
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param nameOrPseudonym Name or pseudonym.
+ @param nameDistinguisher Name distinguisher.
+ @param dateOfBirth Date of birth.
+ @param placeOfBirth Place of birth.
+ @param gender Gender.
+ @param postalAddress Postal Address.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ Object Identifiers of SigI specifciation (German Signature Law
+ Interoperability specification).
+
+
+ Key purpose IDs for German SigI (Signature Interoperability
+ Specification)
+
+
+ Certificate policy IDs for German SigI (Signature Interoperability
+ Specification)
+
+
+ Other Name IDs for German SigI (Signature Interoperability Specification)
+
+
+ To be used for for the generation of directory service certificates.
+
+
+ ID for PersonalData
+
+
+ Certificate is conform to german signature law.
+
+
+ A general class that reads all X9.62 style EC curve tables.
+
+
+ return a X9ECParameters object representing the passed in named
+ curve. The routine returns null if the curve is not present.
+
+ @param name the name of the curve requested
+ @return an X9ECParameters object or null if the curve is not available.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return a X9ECParameters object representing the passed in named
+ curve.
+
+ @param oid the object id of the curve requested
+ @return an X9ECParameters object or null if the curve is not available.
+
+
+ return an enumeration of the names of the available curves.
+
+ @return an enumeration of the names of the available curves.
+
+
+ ASN.1 def for Diffie-Hellman key exchange KeySpecificInfo structure. See
+ RFC 2631, or X9.42, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeySpecificInfo ::= Sequence {
+ algorithm OBJECT IDENTIFIER,
+ counter OCTET STRING SIZE (4..4)
+ }
+
+
+
+ ANS.1 def for Diffie-Hellman key exchange OtherInfo structure. See
+ RFC 2631, or X9.42, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherInfo ::= Sequence {
+ keyInfo KeySpecificInfo,
+ partyAInfo [0] OCTET STRING OPTIONAL,
+ suppPubInfo [2] OCTET STRING
+ }
+
+
+
+ table of the current named curves defined in X.962 EC-DSA.
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Parameters ::= CHOICE {
+ ecParameters ECParameters,
+ namedCurve CURVES.&id({CurveNames}),
+ implicitlyCA Null
+ }
+
+
+
+ ASN.1 def for Elliptic-Curve Curve structure. See
+ X9.62, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Curve ::= Sequence {
+ a FieldElement,
+ b FieldElement,
+ seed BIT STRING OPTIONAL
+ }
+
+
+
+ ASN.1 def for Elliptic-Curve ECParameters structure. See
+ X9.62, for further details.
+
+
+ Return the ASN.1 entry representing the Curve.
+
+ @return the X9Curve for the curve in these parameters.
+
+
+ Return the ASN.1 entry representing the FieldID.
+
+ @return the X9FieldID for the FieldID in these parameters.
+
+
+ Return the ASN.1 entry representing the base point G.
+
+ @return the X9ECPoint for the base point in these parameters.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ECParameters ::= Sequence {
+ version Integer { ecpVer1(1) } (ecpVer1),
+ fieldID FieldID {{FieldTypes}},
+ curve X9Curve,
+ base X9ECPoint,
+ order Integer,
+ cofactor Integer OPTIONAL
+ }
+
+
+
+ class for describing an ECPoint as a Der object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ECPoint ::= OCTET STRING
+
+
+ Octet string produced using ECPoint.GetEncoded().
+
+
+ Class for processing an ECFieldElement as a DER object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ FieldElement ::= OCTET STRING
+
+
+
+ if q is an odd prime then the field element is
+ processed as an Integer and converted to an octet string
+ according to x 9.62 4.3.1.
+ if q is 2m then the bit string
+ contained in the field element is converted into an octet
+ string with the same ordering padded at the front if necessary.
+
+
+
+
+
+ ASN.1 def for Elliptic-Curve Field ID structure. See
+ X9.62, for further details.
+
+
+ Constructor for elliptic curves over prime fields
+ F2 .
+ @param primeP The prime p defining the prime field.
+
+
+ Constructor for elliptic curves over binary fields
+ F2m .
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ Constructor for elliptic curves over binary fields
+ F2m .
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z)..
+
+
+ Produce a Der encoding of the following structure.
+
+ FieldID ::= Sequence {
+ fieldType FIELD-ID.&id({IOSet}),
+ parameters FIELD-ID.&Type({IOSet}{@fieldType})
+ }
+
+
+
+ id-dsa-with-sha1 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ us(840) x9-57 (10040) x9cm(4) 3 }
+
+
+ X9.63
+
+
+ X9.42
+
+
+ reader for Base64 armored objects - read the headers and then start returning
+ bytes when the data is reached. An IOException is thrown if the CRC check
+ fails.
+
+
+ decode the base 64 encoded input data.
+
+ @return the offset the data starts in out.
+
+
+ Create a stream for reading a PGP armoured message, parsing up to a header
+ and then reading the data that follows.
+
+ @param input
+
+
+ Create an armoured input stream which will assume the data starts
+ straight away, or parse for headers first depending on the value of
+ hasHeaders.
+
+ @param input
+ @param hasHeaders true if headers are to be looked for, false otherwise.
+
+
+ @return true if we are inside the clear text section of a PGP
+ signed message.
+
+
+ @return true if the stream is actually at end of file.
+
+
+ Return the armor header line (if there is one)
+ @return the armor header line, null if none present.
+
+
+ Return the armor headers (the lines after the armor header line),
+ @return an array of armor headers, null if there aren't any.
+
+
+ Basic output stream.
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+
+ Set an additional header entry.
+
+ @param name the name of the header entry.
+ @param v the value of the header entry.
+
+
+ Reset the headers to only contain a Version string.
+
+
+ Start a clear text signed message.
+ @param hashAlgorithm
+
+
+ Note : Close() does not close the underlying stream. So it is possible to write
+ multiple objects using armoring to a single stream.
+
+
+ Reader for PGP objects.
+
+
+ Returns the next packet tag in the stream.
+
+
+
+ A stream that overlays our input stream, allowing the user to only read a segment of it.
+ NB: dataLength will be negative if the segment length is in the upper range above 2**31.
+
+
+
+ Base class for a PGP object.
+
+
+ Basic output stream.
+
+
+ Create a stream representing a general packet.
+ Output stream to write to.
+
+
+ Create a stream representing an old style partial object.
+ Output stream to write to.
+ The packet tag for the object.
+
+
+ Create a stream representing a general packet.
+ Output stream to write to.
+ Packet tag.
+ Size of chunks making up the packet.
+ If true, the header is written out in old format.
+
+
+ Create a new style partial input stream buffered into chunks.
+ Output stream to write to.
+ Packet tag.
+ Size of chunks making up the packet.
+
+
+ Create a new style partial input stream buffered into chunks.
+ Output stream to write to.
+ Packet tag.
+ Buffer to use for collecting chunks.
+
+
+ Flush the underlying stream.
+
+
+ Finish writing out the current packet without closing the underlying stream.
+
+
+ Generic compressed data object.
+
+
+ The algorithm tag value.
+
+
+ Basic tags for compression algorithms.
+
+
+ Basic type for a PGP packet.
+
+
+ Base class for a DSA public key.
+
+
+ The stream to read the packet from.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for a DSA secret key.
+
+
+ @param in
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ @return x
+
+
+ Base class for an ECDH Public Key.
+
+
+ The stream to read the packet from.
+
+
+ Base class for an ECDSA Public Key.
+
+
+ The stream to read the packet from.
+
+
+ Base class for an EC Public Key.
+
+
+ The stream to read the packet from.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an EC Secret Key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an ElGamal public key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an ElGamal secret key.
+
+
+ @param in
+
+
+ @param x
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Basic packet for an experimental packet.
+
+
+ Basic tags for hash algorithms.
+
+
+ Base interface for a PGP key.
+
+
+
+ The base format for this key - in the case of the symmetric keys it will generally
+ be raw indicating that the key is just a straight byte representation, for an asymmetric
+ key the format will be PGP, indicating the key is a string of MPIs encoded in PGP format.
+
+ "RAW" or "PGP".
+
+
+ Note: you can only read from this once...
+
+
+ Generic literal data packet.
+
+
+ The format tag value.
+
+
+ The modification time of the file in milli-seconds (since Jan 1, 1970 UTC)
+
+
+ A multiple precision integer
+
+
+ Basic type for a marker packet.
+
+
+ Basic packet for a modification detection code packet.
+
+
+ Generic signature object
+
+
+ The encryption algorithm tag.
+
+
+ The hash algorithm tag.
+
+
+ Basic PGP packet tag types.
+
+
+ Public Key Algorithm tag numbers.
+
+
+ Basic packet for a PGP public key.
+
+
+ Basic packet for a PGP public key.
+
+
+ Construct a version 4 public key packet.
+
+
+ Basic packet for a PGP public subkey
+
+
+ Construct a version 4 public subkey packet.
+
+
+ Base class for an RSA public key.
+
+
+ Construct an RSA public key from the passed in stream.
+
+
+ The modulus.
+ The public exponent.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an RSA secret (or priate) key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ The string to key specifier class.
+
+
+ The hash algorithm.
+
+
+ The IV for the key generation algorithm.
+
+
+ The iteration count
+
+
+ The protection mode - only if GnuDummyS2K
+
+
+ Basic packet for a PGP secret key.
+
+
+ Basic packet for a PGP secret key.
+
+
+ Generic signature packet.
+
+
+ Generate a version 4 signature packet.
+
+ @param signatureType
+ @param keyAlgorithm
+ @param hashAlgorithm
+ @param hashedData
+ @param unhashedData
+ @param fingerprint
+ @param signature
+
+
+ Generate a version 2/3 signature packet.
+
+ @param signatureType
+ @param keyAlgorithm
+ @param hashAlgorithm
+ @param fingerprint
+ @param signature
+
+
+ return the keyId
+ @return the keyId that created the signature.
+
+
+ return the signature trailer that must be included with the data
+ to reconstruct the signature
+
+ @return byte[]
+
+
+ * return the signature as a set of integers - note this is normalised to be the
+ * ASN.1 encoding of what appears in the signature packet.
+
+
+ Return the byte encoding of the signature section.
+ @return uninterpreted signature bytes.
+
+
+ Return the creation time in milliseconds since 1 Jan., 1970 UTC.
+
+
+ Basic type for a PGP Signature sub-packet.
+
+
+ Return the generic data making up the packet.
+
+
+ Basic PGP signature sub-packet tag types.
+
+
+ reader for signature sub-packets
+
+
+ Basic type for a symmetric key encrypted packet.
+
+
+ Basic tags for symmetric key algorithms
+
+
+ Basic type for a symmetric encrypted session key packet
+
+
+ @return int
+
+
+ @return S2k
+
+
+ @return byte[]
+
+
+ @return int
+
+
+ Basic type for a trust packet.
+
+
+ Basic type for a user attribute packet.
+
+
+ Basic type for a user attribute sub-packet.
+
+
+ return the generic data making up the packet.
+
+
+ Basic PGP user attribute sub-packet tag types.
+
+
+ reader for user attribute sub-packets
+
+
+ Basic type for a user ID packet.
+
+
+ Basic type for a image attribute packet.
+
+
+ Packet embedded signature
+
+
+ packet giving signature creation time.
+
+
+ packet giving signature expiration time.
+
+
+ Identifier for the modification detection feature
+
+
+ Returns if modification detection is supported.
+
+
+ Returns if a particular feature is supported.
+
+
+ Sets support for a particular feature.
+
+
+ packet giving signature creation time.
+
+
+ packet giving time after creation at which the key expires.
+
+
+ Return the number of seconds after creation time a key is valid for.
+
+ @return second count for key validity.
+
+
+ Packet holding the key flag values.
+
+
+
+ Return the flag values contained in the first 4 octets (note: at the moment
+ the standard only uses the first one).
+
+
+
+ Class provided a NotationData object according to
+ RFC2440, Chapter 5.2.3.15. Notation Data
+
+
+ packet giving signature creation time.
+
+
+ packet giving whether or not the signature is signed using the primary user ID for the key.
+
+
+ packet giving whether or not is revocable.
+
+
+ packet giving signature creation time.
+
+
+ packet giving signature expiration time.
+
+
+ return time in seconds before signature expires after creation time.
+
+
+ packet giving the User ID of the signer.
+
+
+ packet giving trust.
+
+
+
+ Represents revocation key OpenPGP signature sub packet.
+
+
+
+
+ Represents revocation reason OpenPGP signature sub packet.
+
+
+
+ Compressed data objects
+
+
+ The algorithm used for compression
+
+
+ Get the raw input stream contained in the object.
+
+
+ Return an uncompressed input stream which allows reading of the compressed data.
+
+
+ Class for producing compressed data packets.
+
+
+
+
+ Return an output stream which will save the data being written to
+ the compressed object.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Stream to be used for output.
+ A Stream for output of the compressed data.
+
+
+
+
+
+
+
+ Return an output stream which will compress the data as it is written to it.
+ The stream will be written out in chunks according to the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+
+ Note : using this may break compatibility with RFC 1991 compliant tools.
+ Only recent OpenPGP implementations are capable of accepting these streams.
+
+
+ Stream to be used for output.
+ The buffer to use.
+ A Stream for output of the compressed data.
+
+
+
+
+
+
+ Close the compressed object. summary>
+
+
+
+ Thrown if the IV at the start of a data stream indicates the wrong key is being used.
+
+
+
+ Return the raw input stream for the data stream.
+
+
+ Return true if the message is integrity protected.
+ True, if there is a modification detection code namespace associated
+ with this stream.
+
+
+ Note: This can only be called after the message has been read.
+ True, if the message verifies, false otherwise
+
+
+ Generator for encrypted objects.
+
+
+ Existing SecureRandom constructor.
+ The symmetric algorithm to use.
+ Source of randomness.
+
+
+ Creates a cipher stream which will have an integrity packet associated with it.
+
+
+ Base constructor.
+ The symmetric algorithm to use.
+ Source of randomness.
+ PGP 2.6.x compatibility required.
+
+
+
+ Add a PBE encryption method to the encrypted object using the default algorithm (S2K_SHA1).
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ Add a public key encrypted session key to the encrypted object.
+
+
+
+
+ If buffer is non null stream assumed to be partial, otherwise the length will be used
+ to output a fixed length packet.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+
+
+
+
+ Return an output stream which will encrypt the data as it is written to it.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+
+
+
+
+ Return an output stream which will encrypt the data as it is written to it.
+ The stream will be written out in chunks according to the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+
+
+
+
+
+ Close off the encrypted object - this is equivalent to calling Close() on the stream
+ returned by the Open() method.
+
+
+ Note : This does not close the underlying output stream, only the stream on top of
+ it created by the Open() method.
+
+
+
+
+ A holder for a list of PGP encryption method packets.
+
+
+ Generic exception class for PGP encoding/decoding problems.
+
+
+ Key flag values for the KeyFlags subpacket.
+
+
+
+ General class to handle JCA key pairs and convert them into OpenPGP ones.
+
+ A word for the unwary, the KeyId for an OpenPGP public key is calculated from
+ a hash that includes the time of creation, if you pass a different date to the
+ constructor below with the same public private key pair the KeyIs will not be the
+ same as for previous generations of the key, so ideally you only want to do
+ this once.
+
+
+
+
+ Create a key pair from a PgpPrivateKey and a PgpPublicKey.
+ The public key.
+ The private key.
+
+
+ The keyId associated with this key pair.
+
+
+
+ Generator for a PGP master and subkey ring.
+ This class will generate both the secret and public key rings
+
+
+
+
+ Create a new key ring generator using old style checksumming. It is recommended to use
+ SHA1 checksumming where possible.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+
+ If true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+
+ If true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+ Add a subkey to the key ring to be generated with default certification.
+
+
+
+ Add a subkey to the key ring to be generated with default certification.
+
+ The key pair.
+ The hash algorithm.
+
+
+
+ Add a subkey with specific hashed and unhashed packets associated with it and
+ default certification.
+
+ Public/private key pair.
+ Hashed packet values to be included in certification.
+ Unhashed packets values to be included in certification.
+
+
+
+
+ Add a subkey with specific hashed and unhashed packets associated with it and
+ default certification.
+
+ Public/private key pair.
+ Hashed packet values to be included in certification.
+ Unhashed packets values to be included in certification.
+ The hash algorithm.
+ exception adding subkey:
+
+
+
+ Return the secret key ring.
+
+
+ Return the public key ring that corresponds to the secret key ring.
+
+
+
+ Thrown if the key checksum is invalid.
+
+
+
+ Class for processing literal data objects.
+
+
+ The special name indicating a "for your eyes only" packet.
+
+
+ The format of the data stream - Binary or Text
+
+
+ The file name that's associated with the data stream.
+
+
+ Return the file name as an unintrepreted byte array.
+
+
+ The modification time for the file.
+
+
+ The raw input stream for the data stream.
+
+
+ The input stream representing the data stream.
+
+
+ Class for producing literal data packets.
+
+
+ The special name indicating a "for your eyes only" packet.
+
+
+
+ Generates literal data objects in the old format.
+ This is important if you need compatibility with PGP 2.6.x.
+
+ If true, uses old format.
+
+
+
+
+ Open a literal data packet, returning a stream to store the data inside the packet.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ The stream we want the packet in.
+ The format we are using.
+ The name of the 'file'.
+ The length of the data we will write.
+ The time of last modification we want stored.
+
+
+
+
+ Open a literal data packet, returning a stream to store the data inside the packet,
+ as an indefinite length stream. The stream is written out as a series of partial
+ packets with a chunk size determined by the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+ The stream we want the packet in.
+ The format we are using.
+ The name of the 'file'.
+ The time of last modification we want stored.
+ The buffer to use for collecting data to put into chunks.
+
+
+
+
+ Open a literal data packet for the passed in FileInfo object, returning
+ an output stream for saving the file contents.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ The stream we want the packet in.
+ The format we are using.
+ The FileInfo object containg the packet details.
+
+
+
+ Close the literal data packet - this is equivalent to calling Close()
+ on the stream returned by the Open() method.
+
+
+
+
+ A PGP marker packet - in general these should be ignored other than where
+ the idea is to preserve the original input stream.
+
+
+
+
+ General class for reading a PGP object stream.
+
+ Note: if this class finds a PgpPublicKey or a PgpSecretKey it
+ will create a PgpPublicKeyRing, or a PgpSecretKeyRing for each
+ key found. If all you are trying to do is read a key ring file use
+ either PgpPublicKeyRingBundle or PgpSecretKeyRingBundle.
+
+
+
+ Return the next object in the stream, or null if the end is reached.
+ On a parse error
+
+
+
+ Return all available objects in a list.
+
+ An IList containing all objects from this factory, in order.
+
+
+ A one pass signature object.
+
+
+ Initialise the signature object for verification.
+
+
+ Verify the calculated signature against the passed in PgpSignature.
+
+
+ Holder for a list of PgpOnePassSignature objects.
+
+
+ Padding functions.
+
+
+ A password based encryption object.
+
+
+ Return the raw input stream for the data stream.
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ General class to contain a private key for use with other OpenPGP objects.
+
+
+
+ Create a PgpPrivateKey from a keyID, the associated public data packet, and a regular private key.
+
+ ID of the corresponding public key.
+ the public key data packet to be associated with this private key.
+ the private key data packet to be associated with this private key.
+
+
+ The keyId associated with the contained private key.
+
+
+ The public key packet associated with this private key, if available.
+
+
+ The contained private key.
+
+
+ General class to handle a PGP public key object.
+
+
+
+ Create a PgpPublicKey from the passed in lightweight one.
+
+
+ Note: the time passed in affects the value of the key's keyId, so you probably only want
+ to do this once for a lightweight key, or make sure you keep track of the time you used.
+
+ Asymmetric algorithm type representing the public key.
+ Actual public key to associate.
+ Date of creation.
+ If pubKey is not public.
+ On key creation problem.
+
+
+ Constructor for a sub-key.
+
+
+ Copy constructor.
+ The public key to copy.
+
+
+ The version of this key.
+
+
+ The creation time of this key.
+
+
+ The number of valid days from creation time - zero means no expiry.
+ WARNING: This method will return 1 for keys with version > 3 that expire in less than 1 day
+
+
+ Return the trust data associated with the public key, if present.
+ A byte array with trust data, null otherwise.
+
+
+ The number of valid seconds from creation time - zero means no expiry.
+
+
+ The keyId associated with the public key.
+
+
+ The fingerprint of the key
+
+
+
+ Check if this key has an algorithm type that makes it suitable to use for encryption.
+
+
+ Note: with version 4 keys KeyFlags subpackets should also be considered when present for
+ determining the preferred use of the key.
+
+
+ true if this key algorithm is suitable for encryption.
+
+
+
+ True, if this is a master key.
+
+
+ The algorithm code associated with the public key.
+
+
+ The strength of the key in bits.
+
+
+ The public key contained in the object.
+ A lightweight public key.
+ If the key algorithm is not recognised.
+
+
+ Allows enumeration of any user IDs associated with the key.
+ An IEnumerable of string objects.
+
+
+ Allows enumeration of any user attribute vectors associated with the key.
+ An IEnumerable of PgpUserAttributeSubpacketVector objects.
+
+
+ Allows enumeration of any signatures associated with the passed in id.
+ The ID to be matched.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of signatures associated with the passed in user attributes.
+ The vector of user attributes to be matched.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of signatures of the passed in type that are on this key.
+ The type of the signature to be returned.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of all signatures/certifications associated with this key.
+ An IEnumerable with all signatures/certifications.
+
+
+ Return all signatures/certifications directly associated with this key (ie, not to a user id).
+
+ @return an iterator (possibly empty) with all signatures/certifications.
+
+
+ Check whether this (sub)key has a revocation signature on it.
+ True, if this (sub)key has been revoked.
+
+
+ Add a certification for an id to the given public key.
+ The key the certification is to be added to.
+ The ID the certification is associated with.
+ The new certification.
+ The re-certified key.
+
+
+ Add a certification for the given UserAttributeSubpackets to the given public key.
+ The key the certification is to be added to.
+ The attributes the certification is associated with.
+ The new certification.
+ The re-certified key.
+
+
+
+ Remove any certifications associated with a user attribute subpacket on a key.
+
+ The key the certifications are to be removed from.
+ The attributes to be removed.
+
+ The re-certified key, or null if the user attribute subpacket was not found on the key.
+
+
+
+ Remove any certifications associated with a given ID on a key.
+ The key the certifications are to be removed from.
+ The ID that is to be removed.
+ The re-certified key, or null if the ID was not found on the key.
+
+
+ Remove a certification associated with a given ID on a key.
+ The key the certifications are to be removed from.
+ The ID that the certfication is to be removed from.
+ The certfication to be removed.
+ The re-certified key, or null if the certification was not found.
+
+
+ Remove a certification associated with a given user attributes on a key.
+ The key the certifications are to be removed from.
+ The user attributes that the certfication is to be removed from.
+ The certification to be removed.
+ The re-certified key, or null if the certification was not found.
+
+
+ Add a revocation or some other key certification to a key.
+ The key the revocation is to be added to.
+ The key signature to be added.
+ The new changed public key object.
+
+
+ Remove a certification from the key.
+ The key the certifications are to be removed from.
+ The certfication to be removed.
+ The modified key, null if the certification was not found.
+
+
+ A public key encrypted data object.
+
+
+ The key ID for the key used to encrypt the data.
+
+
+
+ Return the algorithm code for the symmetric algorithm used to encrypt the data.
+
+
+
+ Return the decrypted data stream for the packet.
+
+
+
+ Class to hold a single master public key and its subkeys.
+
+ Often PGP keyring files consist of multiple master keys, if you are trying to process
+ or construct one of these you should use the PgpPublicKeyRingBundle class.
+
+
+
+
+ Return the first public key in the ring.
+
+
+ Return the public key referred to by the passed in key ID if it is present.
+
+
+ Allows enumeration of all the public keys.
+ An IEnumerable of PgpPublicKey objects.
+
+
+
+ Returns a new key ring with the public key passed in either added or
+ replacing an existing one.
+
+ The public key ring to be modified.
+ The public key to be inserted.
+ A new PgpPublicKeyRing
+
+
+ Returns a new key ring with the public key passed in removed from the key ring.
+ The public key ring to be modified.
+ The public key to be removed.
+ A new PgpPublicKeyRing , or null if pubKey is not found.
+
+
+
+ Often a PGP key ring file is made up of a succession of master/sub-key key rings.
+ If you want to read an entire public key file in one hit this is the class for you.
+
+
+
+ Build a PgpPublicKeyRingBundle from the passed in input stream.
+ Input stream containing data.
+ If a problem parsing the stream occurs.
+ If an object is encountered which isn't a PgpPublicKeyRing.
+
+
+ Return the number of key rings in this collection.
+
+
+ Allow enumeration of the public key rings making up this collection.
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ If true, case is ignored in user ID comparisons.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Return the PGP public key associated with the given key id.
+ The ID of the public key to return.
+
+
+ Return the public key ring which contains the key referred to by keyId
+ key ID to match against
+
+
+
+ Return true if a key matching the passed in key ID is present, false otherwise.
+
+ key ID to look for.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle and
+ the passed in public key ring.
+
+ The PgpPublicKeyRingBundle the key ring is to be added to.
+ The key ring to be added.
+ A new PgpPublicKeyRingBundle merging the current one with the passed in key ring.
+ If the keyId for the passed in key ring is already present.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle with
+ the passed in public key ring removed.
+
+ The PgpPublicKeyRingBundle the key ring is to be removed from.
+ The key ring to be removed.
+ A new PgpPublicKeyRingBundle not containing the passed in key ring.
+ If the keyId for the passed in key ring is not present.
+
+
+ General class to handle a PGP secret key object.
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ If utf8PassPhrase is true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ If utf8PassPhrase is true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Check if this key has an algorithm type that makes it suitable to use for signing.
+
+
+ Note: with version 4 keys KeyFlags subpackets should also be considered when present for
+ determining the preferred use of the key.
+
+
+ true if this key algorithm is suitable for use with signing.
+
+
+
+ True, if this is a master key.
+
+
+ Detect if the Secret Key's Private Key is empty or not
+
+
+ The algorithm the key is encrypted with.
+
+
+ The key ID of the public key associated with this key.
+
+
+ Return the S2K usage associated with this key.
+
+
+ Return the S2K used to process this key.
+
+
+ The public key associated with this key.
+
+
+ Allows enumeration of any user IDs associated with the key.
+ An IEnumerable of string objects.
+
+
+ Allows enumeration of any user attribute vectors associated with the key.
+ An IEnumerable of string objects.
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+ Replace the passed the public key on the passed in secret key.
+ Secret key to change.
+ New public key.
+ A new secret key.
+ If KeyId's do not match.
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+
+
+ Class to hold a single master secret key and its subkeys.
+
+ Often PGP keyring files consist of multiple master keys, if you are trying to process
+ or construct one of these you should use the PgpSecretKeyRingBundle class.
+
+
+
+
+ Return the public key for the master key.
+
+
+ Return the master private key.
+
+
+ Allows enumeration of the secret keys.
+ An IEnumerable of PgpSecretKey objects.
+
+
+
+ Return an iterator of the public keys in the secret key ring that
+ have no matching private key. At the moment only personal certificate data
+ appears in this fashion.
+
+ An IEnumerable of unattached, or extra, public keys.
+
+
+
+ Replace the public key set on the secret ring with the corresponding key off the public ring.
+
+ Secret ring to be changed.
+ Public ring containing the new public key set.
+
+
+
+ Return a copy of the passed in secret key ring, with the master key and sub keys encrypted
+ using a new password and the passed in algorithm.
+
+ The PgpSecretKeyRing to be copied.
+ The current password for key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Returns a new key ring with the secret key passed in either added or
+ replacing an existing one with the same key ID.
+
+ The secret key ring to be modified.
+ The secret key to be inserted.
+ A new PgpSecretKeyRing
+
+
+ Returns a new key ring with the secret key passed in removed from the key ring.
+ The secret key ring to be modified.
+ The secret key to be removed.
+ A new PgpSecretKeyRing , or null if secKey is not found.
+
+
+
+ Often a PGP key ring file is made up of a succession of master/sub-key key rings.
+ If you want to read an entire secret key file in one hit this is the class for you.
+
+
+
+ Build a PgpSecretKeyRingBundle from the passed in input stream.
+ Input stream containing data.
+ If a problem parsing the stream occurs.
+ If an object is encountered which isn't a PgpSecretKeyRing.
+
+
+ Return the number of rings in this collection.
+
+
+ Allow enumeration of the secret key rings making up this collection.
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ If true, case is ignored in user ID comparisons.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Return the PGP secret key associated with the given key id.
+ The ID of the secret key to return.
+
+
+ Return the secret key ring which contains the key referred to by keyId
+ The ID of the secret key
+
+
+
+ Return true if a key matching the passed in key ID is present, false otherwise.
+
+ key ID to look for.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle and
+ the passed in secret key ring.
+
+ The PgpSecretKeyRingBundle the key ring is to be added to.
+ The key ring to be added.
+ A new PgpSecretKeyRingBundle merging the current one with the passed in key ring.
+ If the keyId for the passed in key ring is already present.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle with
+ the passed in secret key ring removed.
+
+ The PgpSecretKeyRingBundle the key ring is to be removed from.
+ The key ring to be removed.
+ A new PgpSecretKeyRingBundle not containing the passed in key ring.
+ If the keyId for the passed in key ring is not present.
+
+
+ A PGP signature object.
+
+
+ The OpenPGP version number for this signature.
+
+
+ The key algorithm associated with this signature.
+
+
+ The hash algorithm associated with this signature.
+
+
+
+ Verify the signature as certifying the passed in public key as associated
+ with the passed in user attributes.
+
+ User attributes the key was stored under.
+ The key to be verified.
+ True, if the signature matches, false otherwise.
+
+
+
+ Verify the signature as certifying the passed in public key as associated
+ with the passed in ID.
+
+ ID the key was stored under.
+ The key to be verified.
+ True, if the signature matches, false otherwise.
+
+
+ Verify a certification for the passed in key against the passed in master key.
+ The key we are verifying against.
+ The key we are verifying.
+ True, if the certification is valid, false otherwise.
+
+
+ Verify a key certification, such as revocation, for the passed in key.
+ The key we are checking.
+ True, if the certification is valid, false otherwise.
+
+
+ The ID of the key that created the signature.
+
+
+ The creation time of this signature.
+
+
+
+ Return true if the signature has either hashed or unhashed subpackets.
+
+
+
+ Generator for PGP signatures.
+
+
+ Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
+
+
+ Initialise the generator for signing.
+
+
+ Initialise the generator for signing.
+
+
+ Return the one pass header associated with the current signature.
+
+
+ Return a signature object containing the current signature state.
+
+
+ Generate a certification for the passed in ID and key.
+ The ID we are certifying against the public key.
+ The key we are certifying against the ID.
+ The certification.
+
+
+ Generate a certification for the passed in userAttributes.
+ The ID we are certifying against the public key.
+ The key we are certifying against the ID.
+ The certification.
+
+
+ Generate a certification for the passed in key against the passed in master key.
+ The key we are certifying against.
+ The key we are certifying.
+ The certification.
+
+
+ Generate a certification, such as a revocation, for the passed in key.
+ The key we are certifying.
+ The certification.
+
+
+ A list of PGP signatures - normally in the signature block after literal data.
+
+
+ Generator for signature subpackets.
+
+
+
+ Add a TrustSignature packet to the signature. The values for depth and trust are largely
+ installation dependent but there are some guidelines in RFC 4880 - 5.2.3.13.
+
+ true if the packet is critical.
+ depth level.
+ trust amount.
+
+
+
+ Set the number of seconds a key is valid for after the time of its creation.
+ A value of zero means the key never expires.
+
+ True, if should be treated as critical, false otherwise.
+ The number of seconds the key is valid, or zero if no expiry.
+
+
+
+ Set the number of seconds a signature is valid for after the time of its creation.
+ A value of zero means the signature never expires.
+
+ True, if should be treated as critical, false otherwise.
+ The number of seconds the signature is valid, or zero if no expiry.
+
+
+
+ Set the creation time for the signature.
+
+ Note: this overrides the generation of a creation time when the signature
+ is generated.
+
+
+
+
+ Sets revocation reason sub packet
+
+
+
+
+ Sets revocation key sub packet
+
+
+
+
+ Sets issuer key sub packet
+
+
+
+ Container for a list of signature subpackets.
+
+
+ Return true if a particular subpacket type exists.
+
+ @param type type to look for.
+ @return true if present, false otherwise.
+
+
+ Return all signature subpackets of the passed in type.
+ @param type subpacket type code
+ @return an array of zero or more matching subpackets.
+
+
+
+ Return the number of seconds a signature is valid for after its creation date.
+ A value of zero means the signature never expires.
+
+ Seconds a signature is valid for.
+
+
+
+ Return the number of seconds a key is valid for after its creation date.
+ A value of zero means the key never expires.
+
+ Seconds a signature is valid for.
+
+
+ Return the number of packets this vector contains.
+
+
+ Container for a list of user attribute subpackets.
+
+
+ Basic utility class.
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ Write out the passed in file as a literal data packet.
+
+
+ Write out the passed in file as a literal data packet in partial packet format.
+
+
+
+ Return either an ArmoredInputStream or a BcpgInputStream based on whether
+ the initial characters of the stream are binary PGP encodings or not.
+
+
+
+ Generator for old style PGP V3 Signatures.
+
+
+ Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
+
+
+ Initialise the generator for signing.
+
+
+ Initialise the generator for signing.
+
+
+ Return the one pass header associated with the current signature.
+
+
+ Return a V3 signature object containing the current signature state.
+
+
+ Utility functions for looking a S-expression keys. This class will move when it finds a better home!
+
+ Format documented here:
+ http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=agent/keyformat.txt;h=42c4b1f06faf1bbe71ffadc2fee0fad6bec91a97;hb=refs/heads/master
+
+
+
+
+ The 'Signature' parameter is only available when generating unsigned attributes.
+
+
+
+ containing class for an CMS AuthEnveloped Data object
+
+
+ containing class for an CMS Authenticated Data object
+
+
+ return the object identifier for the content MAC algorithm.
+
+
+ return a store of the intended recipients for this message
+
+
+ return the ContentInfo
+
+
+ return a table of the digested attributes indexed by
+ the OID of the attribute.
+
+
+ return a table of the undigested attributes indexed by
+ the OID of the attribute.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ General class for generating a CMS authenticated-data message.
+
+ A simple example of usage.
+
+
+ CMSAuthenticatedDataGenerator fact = new CMSAuthenticatedDataGenerator();
+
+ fact.addKeyTransRecipient(cert);
+
+ CMSAuthenticatedData data = fact.generate(content, algorithm, "BC");
+
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+ @param rand instance of SecureRandom to use
+
+
+ generate an enveloped object that contains an CMS Enveloped Data
+ object using the given provider and the passed in key generator.
+
+
+ generate an authenticated object that contains an CMS Authenticated Data object
+
+
+ Parsing class for an CMS Authenticated Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one recipient can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ Example of use - assuming the first recipient matches the private key we have.
+
+ CMSAuthenticatedDataParser ad = new CMSAuthenticatedDataParser(inputStream);
+
+ RecipientInformationStore recipients = ad.getRecipientInfos();
+
+ Collection c = recipients.getRecipients();
+ Iterator it = c.iterator();
+
+ if (it.hasNext())
+ {
+ RecipientInformation recipient = (RecipientInformation)it.next();
+
+ CMSTypedStream recData = recipient.getContentStream(privateKey, "BC");
+
+ processDataStream(recData.getContentStream());
+
+ if (!Arrays.equals(ad.getMac(), recipient.getMac())
+ {
+ System.err.println("Data corrupted!!!!");
+ }
+ }
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CMSAuthenticatedDataParser ep = new CMSAuthenticatedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+
+ return the object identifier for the mac algorithm.
+
+
+ return the ASN.1 encoded encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a store of the intended recipients for this message
+
+
+ return a table of the unauthenticated attributes indexed by
+ the OID of the attribute.
+ @exception java.io.IOException
+
+
+ return a table of the unauthenticated attributes indexed by
+ the OID of the attribute.
+ @exception java.io.IOException
+
+
+ General class for generating a CMS authenticated-data message stream.
+
+ A simple example of usage.
+
+ CMSAuthenticatedDataStreamGenerator edGen = new CMSAuthenticatedDataStreamGenerator();
+
+ edGen.addKeyTransRecipient(cert);
+
+ ByteArrayOutputStream bOut = new ByteArrayOutputStream();
+
+ OutputStream out = edGen.open(
+ bOut, CMSAuthenticatedDataGenerator.AES128_CBC, "BC");*
+ out.write(data);
+
+ out.close();
+
+
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+ @param rand instance of SecureRandom to use
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ Use a BER Set to store the recipient information
+
+
+ generate an enveloped object that contains an CMS Enveloped Data
+ object using the given provider and the passed in key generator.
+ @throws java.io.IOException
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+
+ @param rand instance of SecureRandom to use
+
+
+ containing class for an CMS Compressed Data object
+
+
+ Return the uncompressed content.
+
+ @return the uncompressed content
+ @throws CmsException if there is an exception uncompressing the data.
+
+
+ Return the uncompressed content, throwing an exception if the data size
+ is greater than the passed in limit. If the content is exceeded getCause()
+ on the CMSException will contain a StreamOverflowException
+
+ @param limit maximum number of bytes to read
+ @return the content read
+ @throws CMSException if there is an exception uncompressing the data.
+
+
+ return the ContentInfo
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ * General class for generating a compressed CMS message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * CMSCompressedDataGenerator fact = new CMSCompressedDataGenerator();
+ * CMSCompressedData data = fact.Generate(content, algorithm);
+ *
+ *
+
+
+ Generate an object that contains an CMS Compressed Data
+
+
+ Class for reading a CMS Compressed Data stream.
+
+ CMSCompressedDataParser cp = new CMSCompressedDataParser(inputStream);
+
+ process(cp.GetContent().GetContentStream());
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CMSCompressedDataParser ep = new CMSCompressedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+ General class for generating a compressed CMS message stream.
+
+ A simple example of usage.
+
+
+ CMSCompressedDataStreamGenerator gen = new CMSCompressedDataStreamGenerator();
+
+ Stream cOut = gen.Open(outputStream, CMSCompressedDataStreamGenerator.ZLIB);
+
+ cOut.Write(data);
+
+ cOut.Close();
+
+
+
+ base constructor
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ Close the underlying data stream.
+ @throws IOException if the close fails.
+
+
+ containing class for an CMS Enveloped Data object
+
+
+ return the object identifier for the content encryption algorithm.
+
+
+ return a store of the intended recipients for this message
+
+
+ return the ContentInfo
+
+
+ return a table of the unprotected attributes indexed by
+ the OID of the attribute.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+
+ General class for generating a CMS enveloped-data message.
+
+ A simple example of usage.
+
+
+ CmsEnvelopedDataGenerator fact = new CmsEnvelopedDataGenerator();
+
+ fact.AddKeyTransRecipient(cert);
+
+ CmsEnvelopedData data = fact.Generate(content, algorithm);
+
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+
+ Generate an enveloped object that contains a CMS Enveloped Data
+ object using the passed in key generator.
+
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data object.
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data object.
+
+
+ Parsing class for an CMS Enveloped Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one recipient can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ Example of use - assuming the first recipient matches the private key we have.
+
+ CmsEnvelopedDataParser ep = new CmsEnvelopedDataParser(inputStream);
+
+ RecipientInformationStore recipients = ep.GetRecipientInfos();
+
+ Collection c = recipients.getRecipients();
+ Iterator it = c.iterator();
+
+ if (it.hasNext())
+ {
+ RecipientInformation recipient = (RecipientInformation)it.next();
+
+ CMSTypedStream recData = recipient.getContentStream(privateKey);
+
+ processDataStream(recData.getContentStream());
+ }
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CmsEnvelopedDataParser ep = new CmsEnvelopedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+
+ return the object identifier for the content encryption algorithm.
+
+
+ return the ASN.1 encoded encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a store of the intended recipients for this message
+
+
+ return a table of the unprotected attributes indexed by
+ the OID of the attribute.
+ @throws IOException
+
+
+ General class for generating a CMS enveloped-data message stream.
+
+ A simple example of usage.
+
+ CmsEnvelopedDataStreamGenerator edGen = new CmsEnvelopedDataStreamGenerator();
+
+ edGen.AddKeyTransRecipient(cert);
+
+ MemoryStream bOut = new MemoryStream();
+
+ Stream out = edGen.Open(
+ bOut, CMSEnvelopedDataGenerator.AES128_CBC);*
+ out.Write(data);
+
+ out.Close();
+
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Set the underlying string size for encapsulated data.
+ Length of octet strings to buffer the data.
+
+
+ Use a BER Set to store the recipient information.
+
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data
+ object using the passed in key generator.
+
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+ @throws IOException
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+ @throws IOException
+
+
+ General class for generating a CMS enveloped-data message.
+
+ A simple example of usage.
+
+
+ CMSEnvelopedDataGenerator fact = new CMSEnvelopedDataGenerator();
+
+ fact.addKeyTransRecipient(cert);
+
+ CMSEnvelopedData data = fact.generate(content, algorithm, "BC");
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ add a recipient.
+
+ @param cert recipient's public key certificate
+ @exception ArgumentException if there is a problem with the certificate
+
+
+ add a recipient
+
+ @param key the public key used by the recipient
+ @param subKeyId the identifier for the recipient's public key
+ @exception ArgumentException if there is a problem with the key
+
+
+ add a KEK recipient.
+ @param key the secret key to use for wrapping
+ @param keyIdentifier the byte string that identifies the key
+
+
+ add a KEK recipient.
+ @param key the secret key to use for wrapping
+ @param keyIdentifier the byte string that identifies the key
+
+
+ Add a key agreement based recipient.
+
+ @param agreementAlgorithm key agreement algorithm to use.
+ @param senderPrivateKey private key to initialise sender side of agreement with.
+ @param senderPublicKey sender public key to include with message.
+ @param recipientCert recipient's public key certificate.
+ @param cekWrapAlgorithm OID for key wrapping algorithm to use.
+ @exception SecurityUtilityException if the algorithm requested cannot be found
+ @exception InvalidKeyException if the keys are inappropriate for the algorithm specified
+
+
+ Add multiple key agreement based recipients (sharing a single KeyAgreeRecipientInfo structure).
+
+ @param agreementAlgorithm key agreement algorithm to use.
+ @param senderPrivateKey private key to initialise sender side of agreement with.
+ @param senderPublicKey sender public key to include with message.
+ @param recipientCerts recipients' public key certificates.
+ @param cekWrapAlgorithm OID for key wrapping algorithm to use.
+ @exception SecurityUtilityException if the algorithm requested cannot be found
+ @exception InvalidKeyException if the keys are inappropriate for the algorithm specified
+
+
+
+ Generic routine to copy out the data we want processed.
+
+
+ This routine may be called multiple times.
+
+
+
+ a holding class for a byte array of data to be processed.
+
+
+ A clone of the byte array
+
+
+ a holding class for a file of data to be processed.
+
+
+ The file handle
+
+
+ general class for handling a pkcs7-signature message.
+
+ A simple example of usage - note, in the example below the validity of
+ the certificate isn't verified, just the fact that one of the certs
+ matches the given signer...
+
+
+ IX509Store certs = s.GetCertificates();
+ SignerInformationStore signers = s.GetSignerInfos();
+
+ foreach (SignerInformation signer in signers.GetSigners())
+ {
+ ArrayList certList = new ArrayList(certs.GetMatches(signer.SignerID));
+ X509Certificate cert = (X509Certificate) certList[0];
+
+ if (signer.Verify(cert.GetPublicKey()))
+ {
+ verified++;
+ }
+ }
+
+
+
+ Content with detached signature, digests precomputed
+
+ @param hashes a map of precomputed digests for content indexed by name of hash.
+ @param sigBlock the signature object.
+
+
+ base constructor - content with detached signature.
+
+ @param signedContent the content that was signed.
+ @param sigData the signature object.
+
+
+ base constructor - with encapsulated content
+
+
+ Return the version number for this object.
+
+
+ return the collection of signers that are associated with the
+ signatures for the message.
+
+
+ return a X509Store containing the attribute certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of attribute certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing the public key certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of public key certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing CRLs, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of CRLs
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+
+ Return the DerObjectIdentifier associated with the encapsulated
+ content info structure carried in the signed data.
+
+
+
+ return the ContentInfo
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Replace the signerinformation store associated with this
+ CmsSignedData object with the new one passed in. You would
+ probably only want to do this if you wanted to change the unsigned
+ attributes associated with a signer, or perhaps delete one.
+
+ @param signedData the signed data object to be used as a base.
+ @param signerInformationStore the new signer information store to use.
+ @return a new signed data object.
+
+
+ Replace the certificate and CRL information associated with this
+ CmsSignedData object with the new one passed in.
+
+ @param signedData the signed data object to be used as a base.
+ @param x509Certs the new certificates to be used.
+ @param x509Crls the new CRLs to be used.
+ @return a new signed data object.
+ @exception CmsException if there is an error processing the stores
+
+
+ * general class for generating a pkcs7-signature message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * IX509Store certs...
+ * IX509Store crls...
+ * CmsSignedDataGenerator gen = new CmsSignedDataGenerator();
+ *
+ * gen.AddSigner(privKey, cert, CmsSignedGenerator.DigestSha1);
+ * gen.AddCertificates(certs);
+ * gen.AddCrls(crls);
+ *
+ * CmsSignedData data = gen.Generate(content);
+ *
+ *
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ * add a signer - no attributes other than the default ones will be
+ * provided here.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param digestOID digest algorithm OID
+
+
+ add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be
+ provided here.
+
+ @param key signing key to use
+ @param cert certificate containing corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+
+
+ add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be
+ provided here.
+
+
+ * add a signer with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes.
+
+ @param key signing key to use
+ @param cert certificate containing corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+ @param signedAttr table of attributes to be included in signature
+ @param unsignedAttr table of attributes to be included as unsigned
+
+
+ * add a signer with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param subjectKeyID subjectKeyID of corresponding public key
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes.
+
+ @param key signing key to use
+ @param subjectKeyID subjectKeyID of corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+ @param signedAttr table of attributes to be included in signature
+ @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer with extra signed/unsigned attributes based on generators.
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes based on generators.
+
+
+ add a signer with extra signed/unsigned attributes based on generators.
+
+
+ add a signer, including digest encryption algorithm, with extra signed/unsigned attributes based on generators.
+
+
+ generate a signed object that for a CMS Signed Data object
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data".
+
+
+ generate a set of one or more SignerInformation objects representing counter signatures on
+ the passed in SignerInformation object.
+
+ @param signer the signer to be countersigned
+ @param sigProvider the provider to be used for counter signing.
+ @return a store containing the signers.
+
+
+ Parsing class for an CMS Signed Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one signer can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ A simple example of usage for an encapsulated signature.
+
+
+ Two notes: first, in the example below the validity of
+ the certificate isn't verified, just the fact that one of the certs
+ matches the given signer, and, second, because we are in a streaming
+ mode the order of the operations is important.
+
+
+ CmsSignedDataParser sp = new CmsSignedDataParser(encapSigData);
+
+ sp.GetSignedContent().Drain();
+
+ IX509Store certs = sp.GetCertificates();
+ SignerInformationStore signers = sp.GetSignerInfos();
+
+ foreach (SignerInformation signer in signers.GetSigners())
+ {
+ ArrayList certList = new ArrayList(certs.GetMatches(signer.SignerID));
+ X509Certificate cert = (X509Certificate) certList[0];
+
+ Console.WriteLine("verify returns: " + signer.Verify(cert));
+ }
+
+ Note also: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CmsSignedDataParser ep = new CmsSignedDataParser(new BufferedInputStream(encapSigData, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+ base constructor - with encapsulated content
+
+
+ base constructor
+
+ @param signedContent the content that was signed.
+ @param sigData the signature object.
+
+
+ Return the version number for the SignedData object
+
+ @return the version number
+
+
+ return the collection of signers that are associated with the
+ signatures for the message.
+ @throws CmsException
+
+
+ return a X509Store containing the attribute certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of attribute certificates
+ @exception org.bouncycastle.x509.NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing the public key certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of public key certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing CRLs, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of CRLs
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+
+ Return the DerObjectIdentifier associated with the encapsulated
+ content info structure carried in the signed data.
+
+
+
+ Replace the signerinformation store associated with the passed
+ in message contained in the stream original with the new one passed in.
+ You would probably only want to do this if you wanted to change the unsigned
+ attributes associated with a signer, or perhaps delete one.
+
+ The output stream is returned unclosed.
+
+ @param original the signed data stream to be used as a base.
+ @param signerInformationStore the new signer information store to use.
+ @param out the stream to Write the new signed data object to.
+ @return out.
+
+
+ Replace the certificate and CRL information associated with this
+ CMSSignedData object with the new one passed in.
+
+ The output stream is returned unclosed.
+
+ @param original the signed data stream to be used as a base.
+ @param certsAndCrls the new certificates and CRLs to be used.
+ @param out the stream to Write the new signed data object to.
+ @return out.
+ @exception CmsException if there is an error processing the CertStore
+
+
+ General class for generating a pkcs7-signature message stream.
+
+ A simple example of usage.
+
+
+ IX509Store certs...
+ CmsSignedDataStreamGenerator gen = new CmsSignedDataStreamGenerator();
+
+ gen.AddSigner(privateKey, cert, CmsSignedDataStreamGenerator.DIGEST_SHA1);
+
+ gen.AddCertificates(certs);
+
+ Stream sigOut = gen.Open(bOut);
+
+ sigOut.Write(Encoding.UTF8.GetBytes("Hello World!"));
+
+ sigOut.Close();
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer, specifying the digest encryption algorithm - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes - specifying digest
+ encryption algorithm.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ generate a signed object that for a CMS Signed Data object
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data".
+
+
+ generate a signed object that for a CMS Signed Data
+ object using the given provider - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data". If dataOutputStream is non null the data
+ being signed will be written to the stream as it is processed.
+ @param out stream the CMS object is to be written to.
+ @param encapsulate true if data should be encapsulated.
+ @param dataOutputStream output stream to copy the data being signed to.
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+
+
+ generate a signed object that for a CMS Signed Data
+ object using the given provider - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+ @param out stream the CMS object is to be written to.
+ @param signedContentType OID for data to be signed.
+ @param encapsulate true if data should be encapsulated.
+ @param dataOutputStream output stream to copy the data being signed to.
+
+
+ Default type for the signed data.
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Add the attribute certificates contained in the passed in store to the
+ generator.
+
+ @param store a store of Version 2 attribute certificates
+ @throws CmsException if an error occurse processing the store.
+
+
+ Add a store of precalculated signers to the generator.
+
+ @param signerStore store of signers
+
+
+ Return a map of oids and byte arrays representing the digests calculated on the content during
+ the last generate.
+
+ @return a map of oids (as String objects) and byte[] representing digests.
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+ Return the digest encryption algorithm using one of the standard
+ JCA string representations rather than the algorithm identifier (if
+ possible).
+
+
+ Default authenticated attributes generator.
+
+
+ Initialise to use all defaults
+
+
+ Initialise with some extra attributes or overrides.
+
+ @param attributeTable initial attribute table to use.
+
+
+ Create a standard attribute table from the passed in parameters - this will
+ normally include contentType and messageDigest. If the constructor
+ using an AttributeTable was used, entries in it for contentType and
+ messageDigest will override the generated ones.
+
+ @param parameters source parameters for table generation.
+
+ @return a filled in IDictionary of attributes.
+
+
+ @param parameters source parameters
+ @return the populated attribute table
+
+
+ Default signed attributes generator.
+
+
+ Initialise to use all defaults
+
+
+ Initialise with some extra attributes or overrides.
+
+ @param attributeTable initial attribute table to use.
+
+
+ Create a standard attribute table from the passed in parameters - this will
+ normally include contentType, signingTime, and messageDigest. If the constructor
+ using an AttributeTable was used, entries in it for contentType, signingTime, and
+ messageDigest will override the generated ones.
+
+ @param parameters source parameters for table generation.
+
+ @return a filled in Hashtable of attributes.
+
+
+ @param parameters source parameters
+ @return the populated attribute table
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using a secret key known to the other side.
+
+
+ decrypt the content and return an input stream.
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using key agreement.
+
+
+ decrypt the content and return an input stream.
+
+
+ the KeyTransRecipientInformation class for a recipient who has been sent a secret
+ key encrypted using their public key that needs to be used to
+ extract the message.
+
+
+ decrypt the content and return it as a byte array.
+
+
+ a basic index for an originator.
+
+
+ Return the certificates stored in the underlying OriginatorInfo object.
+
+ @return a Store of X509CertificateHolder objects.
+
+
+ Return the CRLs stored in the underlying OriginatorInfo object.
+
+ @return a Store of X509CRLHolder objects.
+
+
+ Return the underlying ASN.1 object defining this SignerInformation object.
+
+ @return a OriginatorInfo.
+
+
+
+ PKCS5 scheme-2 - password converted to bytes assuming ASCII.
+
+
+
+ PKCS5 scheme-2 - password converted to bytes using UTF-8.
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using a password.
+
+
+ return the object identifier for the key derivation algorithm, or null
+ if there is none present.
+
+ @return OID for key derivation algorithm, if present.
+
+
+ decrypt the content and return an input stream.
+
+
+
+ Generate a RecipientInfo object for the given key.
+
+
+ A
+
+
+ A
+
+
+ A
+
+
+
+
+ * return the object identifier for the key encryption algorithm.
+ *
+ * @return OID for key encryption algorithm.
+
+
+ * return the ASN.1 encoded key encryption algorithm parameters, or null if
+ * there aren't any.
+ *
+ * @return ASN.1 encoding of key encryption algorithm parameters.
+
+
+ Return the MAC calculated for the content stream. Note: this call is only meaningful once all
+ the content has been read.
+
+ @return byte array containing the mac.
+
+
+ Return the first RecipientInformation object that matches the
+ passed in selector. Null if there are no matches.
+
+ @param selector to identify a recipient
+ @return a single RecipientInformation object. Null if none matches.
+
+
+ Return the number of recipients in the collection.
+
+ @return number of recipients identified.
+
+
+ Return all recipients in the collection
+
+ @return a collection of recipients.
+
+
+ Return possible empty collection with recipients matching the passed in RecipientID
+
+ @param selector a recipient id to select against.
+ @return a collection of RecipientInformation objects.
+
+
+ a basic index for a signer.
+
+
+ If the passed in flag is true, the signer signature will be based on the data, not
+ a collection of signed attributes, and no signed attributes will be included.
+
+ @return the builder object
+
+
+ Provide a custom signed attribute generator.
+
+ @param signedGen a generator of signed attributes.
+ @return the builder object
+
+
+ Provide a generator of unsigned attributes.
+
+ @param unsignedGen a generator for signed attributes.
+ @return the builder object
+
+
+ Build a generator with the passed in certHolder issuer and serial number as the signerIdentifier.
+
+ @param contentSigner operator for generating the final signature in the SignerInfo with.
+ @param certHolder carrier for the X.509 certificate related to the contentSigner.
+ @return a SignerInfoGenerator
+ @throws OperatorCreationException if the generator cannot be built.
+
+
+ Build a generator with the passed in subjectKeyIdentifier as the signerIdentifier. If used you should
+ try to follow the calculation described in RFC 5280 section 4.2.1.2.
+
+ @param signerFactory operator factory for generating the final signature in the SignerInfo with.
+ @param subjectKeyIdentifier key identifier to identify the public key for verifying the signature.
+ @return a SignerInfoGenerator
+
+
+ an expanded SignerInfo block from a CMS Signed message
+
+
+ return the version number for this objects underlying SignerInfo structure.
+
+
+ return the object identifier for the signature.
+
+
+ return the signature parameters, or null if there aren't any.
+
+
+ return the content digest that was calculated during verification.
+
+
+ return the object identifier for the signature.
+
+
+ return the signature/encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a table of the signed attributes - indexed by
+ the OID of the attribute.
+
+
+ return a table of the unsigned attributes indexed by
+ the OID of the attribute.
+
+
+ return the encoded signature
+
+
+ Return a SignerInformationStore containing the counter signatures attached to this
+ signer. If no counter signatures are present an empty store is returned.
+
+
+ return the DER encoding of the signed attributes.
+ @throws IOException if an encoding error occurs.
+
+
+ verify that the given public key successfully handles and confirms the
+ signature associated with this signer.
+
+
+ verify that the given certificate successfully handles and confirms
+ the signature associated with this signer and, if a signingTime
+ attribute is available, that the certificate was valid at the time the
+ signature was generated.
+
+
+ Return the base ASN.1 CMS structure that this object contains.
+
+ @return an object containing a CMS SignerInfo structure.
+
+
+ Return a signer information object with the passed in unsigned
+ attributes replacing the ones that are current associated with
+ the object passed in.
+
+ @param signerInformation the signerInfo to be used as the basis.
+ @param unsignedAttributes the unsigned attributes to add.
+ @return a copy of the original SignerInformationObject with the changed attributes.
+
+
+ Return a signer information object with passed in SignerInformationStore representing counter
+ signatures attached as an unsigned attribute.
+
+ @param signerInformation the signerInfo to be used as the basis.
+ @param counterSigners signer info objects carrying counter signature.
+ @return a copy of the original SignerInformationObject with the changed attributes.
+
+
+ Create a store containing a single SignerInformation object.
+
+ @param signerInfo the signer information to contain.
+
+
+ Create a store containing a collection of SignerInformation objects.
+
+ @param signerInfos a collection signer information objects to contain.
+
+
+ Return the first SignerInformation object that matches the
+ passed in selector. Null if there are no matches.
+
+ @param selector to identify a signer
+ @return a single SignerInformation object. Null if none matches.
+
+
+ The number of signers in the collection.
+
+
+ An ICollection of all signers in the collection
+
+
+ Return possible empty collection with signers matching the passed in SignerID
+
+ @param selector a signer id to select against.
+ @return a collection of SignerInformation objects.
+
+
+ Basic generator that just returns a preconstructed attribute table
+
+
+ a holding class for public/private parameter pairs.
+
+
+ basic constructor.
+
+ @param publicParam a public key parameters object.
+ @param privateParam the corresponding private key parameters.
+
+
+ return the public key parameters.
+
+ @return the public key parameters.
+
+
+ return the private key parameters.
+
+ @return the private key parameters.
+
+
+ The AEAD block ciphers already handle buffering internally, so this class
+ just takes care of implementing IBufferedCipher methods.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the blocksize for the underlying cipher.
+
+ @return the blocksize for the underlying cipher.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output, or the input is not block size aligned and should be.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+ @exception DataLengthException if the input is not block size
+ aligned.
+
+
+ Reset the buffer and cipher. After resetting the object is in the same
+ state as it was after the last init (if there was one).
+
+
+ a buffer wrapper for an asymmetric block cipher, allowing input
+ to be accumulated in a piecemeal fashion until final processing.
+
+
+ base constructor.
+
+ @param cipher the cipher this buffering object wraps.
+
+
+ return the amount of data sitting in the buffer.
+
+ @return the amount of data sitting in the buffer.
+
+
+ initialise the buffer and the underlying cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+
+
+ process the contents of the buffer using the underlying
+ cipher.
+
+ @return the result of the encryption/decryption process on the
+ buffer.
+ @exception InvalidCipherTextException if we are given a garbage block.
+
+
+ Reset the buffer
+
+
+ A wrapper class that allows block ciphers to be used to process data in
+ a piecemeal fashion. The BufferedBlockCipher outputs a block only when the
+ buffer is full and more data is being added, or on a doFinal.
+
+ Note: in the case where the underlying cipher is either a CFB cipher or an
+ OFB one the last block may not be a multiple of the block size.
+
+
+
+ constructor for subclasses
+
+
+ Create a buffered block cipher without padding.
+
+ @param cipher the underlying block cipher this buffering object wraps.
+ false otherwise.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the blocksize for the underlying cipher.
+
+ @return the blocksize for the underlying cipher.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output, or the input is not block size aligned and should be.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+ @exception DataLengthException if the input is not block size
+ aligned.
+
+
+ Reset the buffer and cipher. After resetting the object is in the same
+ state as it was after the last init (if there was one).
+
+
+ The base class for symmetric, or secret, cipher key generators.
+
+
+ initialise the key generator.
+
+ @param param the parameters to be used for key generation
+
+
+ Generate a secret key.
+
+ @return a byte array containing the key value.
+
+
+ this exception is thrown if a buffer that is meant to have output
+ copied into it turns out to be too short, or if we've been given
+ insufficient input. In general this exception will Get thrown rather
+ than an ArrayOutOfBounds exception.
+
+
+ base constructor.
+
+
+ create a DataLengthException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+ Wrapper removes exposure to the IMemoable interface on an IDigest implementation.
+
+
+ Base constructor.
+
+ @param baseDigest underlying digest to use.
+ @exception IllegalArgumentException if baseDigest is null
+
+
+ implementation of GOST R 34.11-94
+
+
+ Standard constructor
+
+
+ Constructor to allow use of a particular sbox with GOST28147
+ @see GOST28147Engine#getSBox(String)
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ base implementation of MD4 family style digest as outlined in
+ "Handbook of Applied Cryptography", pages 344 - 347.
+
+
+
+ Implementation of Keccak based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+ Return the size of block that the compression function is applied to in bytes.
+
+ @return internal byte length of a block.
+
+
+ Base class for SHA-384 and SHA-512.
+
+
+ Constructor for variable length word
+
+
+ Copy constructor. We are using copy constructors in place
+ of the object.Clone() interface as this interface is not
+ supported by J2ME.
+
+
+ adjust the byte counts so that byteCount2 represents the
+ upper long (less 3 bits) word of the byte count.
+
+
+ implementation of MD2
+ as outlined in RFC1319 by B.Kaliski from RSA Laboratories April 1992
+
+
+ return the algorithm name
+
+ @return the algorithm name
+
+
+ Close the digest, producing the final digest value. The doFinal
+ call leaves the digest reset.
+
+ @param out the array the digest is to be copied into.
+ @param outOff the offset into the out array the digest is to start at.
+
+
+ reset the digest back to it's initial state.
+
+
+ update the message digest with a single byte.
+
+ @param in the input byte to be entered.
+
+
+ update the message digest with a block of bytes.
+
+ @param in the byte array containing the data.
+ @param inOff the offset into the byte array where the data starts.
+ @param len the length of the data.
+
+
+ implementation of MD4 as RFC 1320 by R. Rivest, MIT Laboratory for
+ Computer Science and RSA Data Security, Inc.
+
+ NOTE : This algorithm is only included for backwards compatibility
+ with legacy applications, it's not secure, don't use it for anything new!
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of MD5 as outlined in "Handbook of Applied Cryptography", pages 346 - 347.
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of RipeMD128
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of RipeMD see,
+ http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of RipeMD256.
+ Note: this algorithm offers the same level of security as RipeMD128.
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of RipeMD 320.
+ Note: this algorithm offers the same level of security as RipeMD160.
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of SHA-3 based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+
+ Implementation of Chinese SM3 digest as described at
+ http://tools.ietf.org/html/draft-shen-sm3-hash-00
+ and at .... ( Chinese PDF )
+
+
+ The specification says "process a bit stream",
+ but this is written to process bytes in blocks of 4,
+ meaning this will process 32-bit word groups.
+ But so do also most other digest specifications,
+ including the SHA-256 which was a origin for
+ this specification.
+
+
+
+
+ Standard constructor
+
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+
+ reset the chaining variables
+
+
+
+ implementation of SHA-1 as outlined in "Handbook of Applied Cryptography", pages 346 - 349.
+
+ It is interesting to ponder why the, apart from the extra IV, the other difference here from MD5
+ is the "endianness" of the word processing!
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ SHA-224 as described in RFC 3874
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-224 512 32 224
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-256. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-384. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-512. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ FIPS 180-4 implementation of SHA-512/t
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+
+ Implementation of SHAKE based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+ Wrapper class that reduces the output length of a particular digest to
+ only the first n bytes of the digest function.
+
+
+ Base constructor.
+
+ @param baseDigest underlying digest to use.
+ @param length length in bytes of the output of doFinal.
+ @exception ArgumentException if baseDigest is null, or length is greater than baseDigest.GetDigestSize().
+
+
+
+ Implementation of the Skein parameterised hash function in 256, 512 and 1024 bit block sizes,
+ based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+
+ Constructs a Skein digest with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/digest size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Optionally initialises the Skein digest with the provided parameters.
+
+ See for details on the parameterisation of the Skein hash function.
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+
+ Implementation of the Skein family of parameterised hash functions in 256, 512 and 1024 bit block
+ sizes, based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+ This implementation is the basis for and , implementing the
+ parameter based configuration system that allows Skein to be adapted to multiple applications.
+ Initialising the engine with allows standard and arbitrary parameters to
+ be applied during the Skein hash function.
+
+ Implemented:
+
+ 256, 512 and 1024 bit internal states.
+ Full 96 bit input length.
+ Parameters defined in the Skein specification, and arbitrary other pre and post message
+ parameters.
+ Arbitrary output size in 1 byte intervals.
+
+
+ Not implemented:
+
+ Sub-byte length input (bit padding).
+ Tree hashing.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+ The parameter type for the Skein key.
+
+
+ The parameter type for the Skein configuration block.
+
+
+ The parameter type for the message.
+
+
+ The parameter type for the output transformation.
+
+
+ Precalculated UBI(CFG) states for common state/output combinations without key or other
+ pre-message params.
+
+
+ Point at which position might overflow long, so switch to add with carry logic
+
+
+ Bit 127 = final
+
+
+ Bit 126 = first
+
+
+ UBI uses a 128 bit tweak
+
+
+ Whether 64 bit position exceeded
+
+
+ Advances the position in the tweak by the specified value.
+
+
+ The Unique Block Iteration chaining mode.
+
+
+ Buffer for the current block of message data
+
+
+ Offset into the current message block
+
+
+ Buffer for message words for feedback into encrypted block
+
+
+ Underlying Threefish tweakable block cipher
+
+
+ Size of the digest output, in bytes
+
+
+ The current chaining/state value
+
+
+ The initial state value
+
+
+ The (optional) key parameter
+
+
+ Parameters to apply prior to the message
+
+
+ Parameters to apply after the message, but prior to output
+
+
+ The current UBI operation
+
+
+ Buffer for single byte update method
+
+
+
+ Constructs a Skein digest with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/digest size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Creates a SkeinEngine as an exact copy of an existing instance.
+
+
+
+
+ Initialises the Skein engine with the provided parameters. See for
+ details on the parameterisation of the Skein hash function.
+
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+ Calculate the initial (pre message block) chaining state.
+
+
+
+ Reset the engine to the initial state (with the key and any pre-message parameters , ready to
+ accept message input.
+
+
+
+ implementation of Tiger based on:
+
+ http://www.cs.technion.ac.il/~biham/Reports/Tiger
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Implementation of WhirlpoolDigest, based on Java source published by Barreto
+ and Rijmen.
+
+
+
+ Copy constructor. This will copy the state of the provided message
+ digest.
+
+
+ Reset the chaining variables
+
+
+ initialise a Serpent cipher.
+
+ @param encrypting whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @throws IllegalArgumentException if the params argument is
+ inappropriate.
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @return the number of bytes processed and produced.
+ @throws DataLengthException if there isn't enough data in in, or
+ space in out.
+ @throws IllegalStateException if the cipher isn't initialised.
+
+
+ InvSO - {13, 3,11, 0,10, 6, 5,12, 1,14, 4, 7,15, 9, 8, 2 } - 15 terms.
+
+
+ S1 - {15,12, 2, 7, 9, 0, 5,10, 1,11,14, 8, 6,13, 3, 4 } - 14 terms.
+
+
+ InvS1 - { 5, 8, 2,14,15, 6,12, 3,11, 4, 7, 9, 1,13,10, 0 } - 14 steps.
+
+
+ S2 - { 8, 6, 7, 9, 3,12,10,15,13, 1,14, 4, 0,11, 5, 2 } - 16 terms.
+
+
+ InvS2 - {12, 9,15, 4,11,14, 1, 2, 0, 3, 6,13, 5, 8,10, 7 } - 16 steps.
+
+
+ S3 - { 0,15,11, 8,12, 9, 6, 3,13, 1, 2, 4,10, 7, 5,14 } - 16 terms.
+
+
+ InvS3 - { 0, 9,10, 7,11,14, 6,13, 3, 5,12, 2, 4, 8,15, 1 } - 15 terms
+
+
+ S4 - { 1,15, 8, 3,12, 0,11, 6, 2, 5, 4,10, 9,14, 7,13 } - 15 terms.
+
+
+ InvS4 - { 5, 0, 8, 3,10, 9, 7,14, 2,12,11, 6, 4,15,13, 1 } - 15 terms.
+
+
+ S5 - {15, 5, 2,11, 4,10, 9,12, 0, 3,14, 8,13, 6, 7, 1 } - 16 terms.
+
+
+ InvS5 - { 8,15, 2, 9, 4, 1,13,14,11, 6, 5, 3, 7,12,10, 0 } - 16 terms.
+
+
+ S6 - { 7, 2,12, 5, 8, 4, 6,11,14, 9, 1,15,13, 3,10, 0 } - 15 terms.
+
+
+ InvS6 - {15,10, 1,13, 5, 3, 6, 0, 4, 9,14, 7, 2,12, 8,11 } - 15 terms.
+
+
+ S7 - { 1,13,15, 0,14, 8, 2,11, 7, 4,12,10, 9, 3, 5, 6 } - 16 terms.
+
+
+ InvS7 - { 3, 0, 6,13, 9,14,15, 8, 5,12,11, 7,10, 1, 4, 2 } - 17 terms.
+
+
+ Apply the linear transformation to the register set.
+
+
+ Apply the inverse of the linear transformation to the register set.
+
+
+ Tnepres is a 128-bit 32-round block cipher with variable key lengths,
+ including 128, 192 and 256 bit keys conjectured to be at least as
+ secure as three-key triple-DES.
+
+ Tnepres is based on Serpent which was designed by Ross Anderson, Eli Biham and Lars Knudsen as a
+ candidate algorithm for the NIST AES Quest. Unfortunately there was an endianness issue
+ with test vectors in the AES submission and the resulting confusion lead to the Tnepres cipher
+ as well, which is a byte swapped version of Serpent.
+
+
+ For full details see The Serpent home page
+
+
+
+ Expand a user-supplied key material into a session key.
+
+ @param key The user-key bytes (multiples of 4) to use.
+ @exception ArgumentException
+
+
+ Encrypt one block of plaintext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ Decrypt one block of ciphertext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ an implementation of the AES (Rijndael), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor, they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations, 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each, for a total of 2Kbytes,
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first.
+
+ The slowest version uses no static tables at all and computes the values in each round.
+
+
+ This file contains the middle performance version with 2Kbytes of static tables for round precomputation.
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ an implementation of the AES (Rijndael)), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor), they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations), 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each), for a total of 2Kbytes),
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first
+
+ The slowest version uses no static tables at all and computes the values in each round
+
+
+ This file contains the fast version with 8Kbytes of static tables for round precomputation
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ an implementation of the AES (Rijndael), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor, they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations, 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each, for a total of 2Kbytes,
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first
+
+ The slowest version uses no static tables at all and computes the values
+ in each round.
+
+
+ This file contains the slowest performance version with no static tables
+ for round precomputation, but it has the smallest foot print.
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+
+ An implementation of the AES Key Wrapper from the NIST Key Wrap Specification.
+
+ For further details see: http://csrc.nist.gov/encryption/kms/key-wrap.pdf .
+
+
+
+ A class that provides Blowfish key encryption operations,
+ such as encoding data and generating keys.
+ All the algorithms herein are from Applied Cryptography
+ and implement a simplified cryptography interface.
+
+
+ initialise a Blowfish cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ apply the encryption cycle to each value pair in the table.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Camellia - based on RFC 3713.
+
+
+ Camellia - based on RFC 3713, smaller implementation, about half the size of CamelliaEngine.
+
+
+
+ An implementation of the Camellia key wrapper based on RFC 3657/RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc3657.txt .
+
+
+
+ A class that provides CAST key encryption operations,
+ such as encoding data and generating keys.
+
+ All the algorithms herein are from the Internet RFC's
+
+ RFC2144 - Cast5 (64bit block, 40-128bit key)
+ RFC2612 - CAST6 (128bit block, 128-256bit key)
+
+ and implement a simplified cryptography interface.
+
+
+ initialise a CAST cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ The first of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ The second of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ The third of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ Does the 16 rounds to encrypt the block.
+
+ @param L0 the LH-32bits of the plaintext block
+ @param R0 the RH-32bits of the plaintext block
+
+
+ A class that provides CAST6 key encryption operations,
+ such as encoding data and generating keys.
+
+ All the algorithms herein are from the Internet RFC
+
+ RFC2612 - CAST6 (128bit block, 128-256bit key)
+
+ and implement a simplified cryptography interface.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Does the 12 quad rounds rounds to encrypt the block.
+
+ @param A the 00-31 bits of the plaintext block
+ @param B the 32-63 bits of the plaintext block
+ @param C the 64-95 bits of the plaintext block
+ @param D the 96-127 bits of the plaintext block
+ @param result the resulting ciphertext
+
+
+ Does the 12 quad rounds rounds to decrypt the block.
+
+ @param A the 00-31 bits of the ciphertext block
+ @param B the 32-63 bits of the ciphertext block
+ @param C the 64-95 bits of the ciphertext block
+ @param D the 96-127 bits of the ciphertext block
+ @param result the resulting plaintext
+
+
+
+ Implementation of Daniel J. Bernstein's ChaCha stream cipher.
+
+
+
+
+ Creates a 20 rounds ChaCha engine.
+
+
+
+
+ Creates a ChaCha engine with a specific number of rounds.
+
+ the number of rounds (must be an even number).
+
+
+
+ ChacCha function.
+
+ The number of ChaCha rounds to execute
+ The input words.
+ The ChaCha state to modify.
+
+
+ A class that provides a basic DESede (or Triple DES) engine.
+
+
+ initialise a DESede cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ * Wrap keys according to
+ *
+ * draft-ietf-smime-key-wrap-01.txt .
+ *
+ * Note:
+ *
+ * this is based on a draft, and as such is subject to change - don't use this class for anything requiring long term storage.
+ * if you are using this to wrap triple-des keys you need to set the
+ * parity bits on the key and, if it's a two-key triple-des key, pad it
+ * yourself.
+ *
+ *
+
+
+ Field engine
+
+
+ Field param
+
+
+ Field paramPlusIV
+
+
+ Field iv
+
+
+ Field forWrapping
+
+
+ Field IV2
+
+
+ Method init
+
+ @param forWrapping
+ @param param
+
+
+ Method GetAlgorithmName
+
+ @return
+
+
+ Method wrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+
+
+ Method unwrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+ @throws InvalidCipherTextException
+
+
+ Some key wrap algorithms make use of the Key Checksum defined
+ in CMS [CMS-Algorithms]. This is used to provide an integrity
+ check value for the key being wrapped. The algorithm is
+
+ - Compute the 20 octet SHA-1 hash on the key being wrapped.
+ - Use the first 8 octets of this hash as the checksum value.
+
+ @param key
+ @return
+ @throws Exception
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ @param key
+ @param checksum
+ @return
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ A class that provides a basic DES engine.
+
+
+ initialise a DES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ what follows is mainly taken from "Applied Cryptography", by
+ Bruce Schneier, however it also bears great resemblance to Richard
+ Outerbridge's D3DES...
+
+
+ Generate an integer based working key based on our secret key
+ and what we processing we are planning to do.
+
+ Acknowledgements for this routine go to James Gillogly and Phil Karn.
+ (whoever, and wherever they are!).
+
+
+ the DES engine.
+
+
+ this does your basic ElGamal algorithm.
+
+
+ initialise the ElGamal engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary ElGamal key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For ElGamal this is always one byte less than the size of P on
+ encryption, and twice the length as the size of P on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For ElGamal this is always one byte less than the size of P on
+ decryption, and twice the length as the size of P on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic ElGamal algorithm.
+
+ @param in the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param length the length of the data to be processed.
+ @return the result of the ElGamal process.
+ @exception DataLengthException the input block is too large.
+
+
+ implementation of GOST 28147-89
+
+
+ standard constructor.
+
+
+ initialise an Gost28147 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is inappropriate.
+
+
+ Return the S-Box associated with SBoxName
+ @param sBoxName name of the S-Box
+ @return byte array representing the S-Box
+
+
+ HC-128 is a software-efficient stream cipher created by Hongjun Wu. It
+ generates keystream from a 128-bit secret key and a 128-bit initialization
+ vector.
+
+ http://www.ecrypt.eu.org/stream/p3ciphers/hc/hc128_p3.pdf
+
+ It is a third phase candidate in the eStream contest, and is patent-free.
+ No attacks are known as of today (April 2007). See
+
+ http://www.ecrypt.eu.org/stream/hcp3.html
+
+
+
+ Initialise a HC-128 cipher.
+
+ @param forEncryption whether or not we are for encryption. Irrelevant, as
+ encryption and decryption are the same.
+ @param params the parameters required to set up the cipher.
+ @throws ArgumentException if the params argument is
+ inappropriate (ie. the key is not 128 bit long).
+
+
+ HC-256 is a software-efficient stream cipher created by Hongjun Wu. It
+ generates keystream from a 256-bit secret key and a 256-bit initialization
+ vector.
+
+ http://www.ecrypt.eu.org/stream/p3ciphers/hc/hc256_p3.pdf
+
+ Its brother, HC-128, is a third phase candidate in the eStream contest.
+ The algorithm is patent-free. No attacks are known as of today (April 2007).
+ See
+
+ http://www.ecrypt.eu.org/stream/hcp3.html
+
+
+
+ Initialise a HC-256 cipher.
+
+ @param forEncryption whether or not we are for encryption. Irrelevant, as
+ encryption and decryption are the same.
+ @param params the parameters required to set up the cipher.
+ @throws ArgumentException if the params argument is
+ inappropriate (ie. the key is not 256 bit long).
+
+
+ Implementation of Bob Jenkin's ISAAC (Indirection Shift Accumulate Add and Count).
+ see: http://www.burtleburtle.net/bob/rand/isaacafa.html
+
+
+ initialise an ISAAC cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ A class that provides a basic International Data Encryption Algorithm (IDEA) engine.
+
+ This implementation is based on the "HOWTO: INTERNATIONAL DATA ENCRYPTION ALGORITHM"
+ implementation summary by Fauzan Mirza (F.U.Mirza@sheffield.ac.uk). (baring 1 typo at the
+ end of the mulinv function!).
+
+
+ It can be found at ftp://ftp.funet.fi/pub/crypt/cryptography/symmetric/idea/
+
+
+ Note 1: This algorithm is patented in the USA, Japan, and Europe including
+ at least Austria, France, Germany, Italy, Netherlands, Spain, Sweden, Switzerland
+ and the United Kingdom. Non-commercial use is free, however any commercial
+ products are liable for royalties. Please see
+ www.mediacrypt.com for
+ further details. This announcement has been included at the request of
+ the patent holders.
+
+
+ Note 2: Due to the requests concerning the above, this algorithm is now only
+ included in the extended assembly. It is not included in the default distributions.
+
+
+
+ standard constructor.
+
+
+ initialise an IDEA cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return x = x * y where the multiplication is done modulo
+ 65537 (0x10001) (as defined in the IDEA specification) and
+ a zero input is taken to be 65536 (0x10000).
+
+ @param x the x value
+ @param y the y value
+ @return x = x * y
+
+
+ The following function is used to expand the user key to the encryption
+ subkey. The first 16 bytes are the user key, and the rest of the subkey
+ is calculated by rotating the previous 16 bytes by 25 bits to the left,
+ and so on until the subkey is completed.
+
+
+ This function computes multiplicative inverse using Euclid's Greatest
+ Common Divisor algorithm. Zero and one are self inverse.
+
+ i.e. x * MulInv(x) == 1 (modulo BASE)
+
+
+
+ Return the additive inverse of x.
+
+ i.e. x + AddInv(x) == 0
+
+
+
+ The function to invert the encryption subkey to the decryption subkey.
+ It also involves the multiplicative inverse and the additive inverse functions.
+
+
+ support class for constructing intergrated encryption ciphers
+ for doing basic message exchanges on top of key agreement ciphers
+
+
+ set up for use with stream mode, where the key derivation function
+ is used to provide a stream of bytes to xor with the message.
+
+ @param agree the key agreement used as the basis for the encryption
+ @param kdf the key derivation function used for byte generation
+ @param mac the message authentication code generator for the message
+
+
+ set up for use in conjunction with a block cipher to handle the
+ message.
+
+ @param agree the key agreement used as the basis for the encryption
+ @param kdf the key derivation function used for byte generation
+ @param mac the message authentication code generator for the message
+ @param cipher the cipher to used for encrypting the message
+
+
+ Initialise the encryptor.
+
+ @param forEncryption whether or not this is encryption/decryption.
+ @param privParam our private key parameters
+ @param pubParam the recipient's/sender's public key parameters
+ @param param encoding and derivation parameters.
+
+
+ NaccacheStern Engine. For details on this cipher, please see
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Initializes this algorithm. Must be called before all other Functions.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#init(bool,
+ org.bouncycastle.crypto.CipherParameters)
+
+
+ Returns the input block size of this algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#GetInputBlockSize()
+
+
+ Returns the output block size of this algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#GetOutputBlockSize()
+
+
+ Process a single Block using the Naccache-Stern algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#ProcessBlock(byte[],
+ int, int)
+
+
+ Encrypts a BigInteger aka Plaintext with the public key.
+
+ @param plain
+ The BigInteger to encrypt
+ @return The byte[] representation of the encrypted BigInteger (i.e.
+ crypted.toByteArray())
+
+
+ Adds the contents of two encrypted blocks mod sigma
+
+ @param block1
+ the first encrypted block
+ @param block2
+ the second encrypted block
+ @return encrypt((block1 + block2) mod sigma)
+ @throws InvalidCipherTextException
+
+
+ Convenience Method for data exchange with the cipher.
+
+ Determines blocksize and splits data to blocksize.
+
+ @param data the data to be processed
+ @return the data after it went through the NaccacheSternEngine.
+ @throws InvalidCipherTextException
+
+
+ Computes the integer x that is expressed through the given primes and the
+ congruences with the chinese remainder theorem (CRT).
+
+ @param congruences
+ the congruences c_i
+ @param primes
+ the primes p_i
+ @return an integer x for that x % p_i == c_i
+
+
+ A Noekeon engine, using direct-key mode.
+
+
+ Create an instance of the Noekeon encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ The no-op engine that just copies bytes through, irrespective of whether encrypting and decrypting.
+ Provided for the sake of completeness.
+
+
+ an implementation of RC2 as described in RFC 2268
+ "A Description of the RC2(r) Encryption Algorithm" R. Rivest.
+
+
+ initialise a RC2 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the result rotating the 16 bit number in x left by y
+
+
+ Wrap keys according to RFC 3217 - RC2 mechanism
+
+
+ Field engine
+
+
+ Field param
+
+
+ Field paramPlusIV
+
+
+ Field iv
+
+
+ Field forWrapping
+
+
+ Field IV2
+
+
+ Method init
+
+ @param forWrapping
+ @param param
+
+
+ Method GetAlgorithmName
+
+ @return
+
+
+ Method wrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+
+
+ Method unwrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+ @throws InvalidCipherTextException
+
+
+ Some key wrap algorithms make use of the Key Checksum defined
+ in CMS [CMS-Algorithms]. This is used to provide an integrity
+ check value for the key being wrapped. The algorithm is
+
+ - Compute the 20 octet SHA-1 hash on the key being wrapped.
+ - Use the first 8 octets of this hash as the checksum value.
+
+ @param key
+ @return
+ @throws Exception
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ @param key
+ @param checksum
+ @return
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ initialise a RC4 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ The specification for RC5 came from the RC5 Encryption Algorithm
+ publication in RSA CryptoBytes, Spring of 1995.
+ http://www.rsasecurity.com/rsalabs/cryptobytes .
+
+ This implementation has a word size of 32 bits.
+
+
+ Create an instance of the RC5 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-32 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Encrypt the given block starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param in in byte buffer containing data to encrypt
+ @param inOff offset into src buffer
+ @param out out buffer where encrypted data is written
+ @param outOff offset into out buffer
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(32) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % 32
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(32) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % 32
+
+
+ The specification for RC5 came from the RC5 Encryption Algorithm
+ publication in RSA CryptoBytes, Spring of 1995.
+ http://www.rsasecurity.com/rsalabs/cryptobytes .
+
+ This implementation is set to work with a 64 bit word size.
+
+
+ Create an instance of the RC5 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-64 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Encrypt the given block starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param in in byte buffer containing data to encrypt
+ @param inOff offset into src buffer
+ @param out out buffer where encrypted data is written
+ @param outOff offset into out buffer
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ An RC6 engine.
+
+
+ Create an instance of the RC6 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-32 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param inKey the key to be used
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ an implementation of the RFC 3211 Key Wrap
+ Specification.
+
+
+
+ An implementation of the AES Key Wrapper from the NIST Key Wrap
+ Specification as described in RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc3394.txt
+ and http://csrc.nist.gov/encryption/kms/key-wrap.pdf .
+
+
+
+ this does your basic RSA algorithm with blinding
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic RSA algorithm.
+
+ @param inBuf the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @exception DataLengthException the input block is too large.
+
+
+ This does your basic RSA Chaum's blinding and unblinding as outlined in
+ "Handbook of Applied Cryptography", page 475. You need to use this if you are
+ trying to get another party to generate signatures without them being aware
+ of the message they are signing.
+
+
+ Initialise the blinding engine.
+
+ @param forEncryption true if we are encrypting (blinding), false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the RSA blinding algorithm.
+
+ @param in the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @throws DataLengthException the input block is too large.
+
+
+ this does your basic RSA algorithm.
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ an implementation of Rijndael, based on the documentation and reference implementation
+ by Paulo Barreto, Vincent Rijmen, for v2.0 August '99.
+
+ Note: this implementation is based on information prior to readonly NIST publication.
+
+
+
+ multiply two elements of GF(2^m)
+ needed for MixColumn and InvMixColumn
+
+
+ xor corresponding text input and round key input bytes
+
+
+ Row 0 remains unchanged
+ The other three rows are shifted a variable amount
+
+
+ Replace every byte of the input by the byte at that place
+ in the nonlinear S-box
+
+
+ Mix the bytes of every column in a linear way
+
+
+ Mix the bytes of every column in a linear way
+ This is the opposite operation of Mixcolumn
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on keyBits and blockBits
+
+
+ default constructor - 128 bit block size.
+
+
+ basic constructor - set the cipher up for a given blocksize
+
+ @param blocksize the blocksize in bits, must be 128, 192, or 256.
+
+
+ initialise a Rijndael cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ this does your basic RSA algorithm.
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic RSA algorithm.
+
+ @param inBuf the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @exception DataLengthException the input block is too large.
+
+
+ Implementation of the SEED algorithm as described in RFC 4009
+
+
+
+ An implementation of the SEED key wrapper based on RFC 4010/RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc4010.txt .
+
+
+
+
+ Implementation of Daniel J. Bernstein's Salsa20 stream cipher, Snuffle 2005
+
+
+
+ Constants
+
+
+
+ Creates a 20 round Salsa20 engine.
+
+
+
+
+ Creates a Salsa20 engine with a specific number of rounds.
+
+ the number of rounds (must be an even number).
+
+
+ Rotate left
+
+ @param x value to rotate
+ @param y amount to rotate x
+
+ @return rotated x
+
+
+ * Serpent is a 128-bit 32-round block cipher with variable key lengths,
+ * including 128, 192 and 256 bit keys conjectured to be at least as
+ * secure as three-key triple-DES.
+ *
+ * Serpent was designed by Ross Anderson, Eli Biham and Lars Knudsen as a
+ * candidate algorithm for the NIST AES Quest.
+ *
+ *
+ * For full details see The Serpent home page
+ *
+
+
+ Expand a user-supplied key material into a session key.
+
+ @param key The user-key bytes (multiples of 4) to use.
+ @exception ArgumentException
+
+
+ Encrypt one block of plaintext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ Decrypt one block of ciphertext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ a class that provides a basic SKIPJACK engine.
+
+
+ initialise a SKIPJACK cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ The G permutation
+
+
+ the inverse of the G permutation.
+
+
+ An TEA engine.
+
+
+ Create an instance of the TEA encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+
+ Implementation of the Threefish tweakable large block cipher in 256, 512 and 1024 bit block
+ sizes.
+
+
+ This is the 1.3 version of Threefish defined in the Skein hash function submission to the NIST
+ SHA-3 competition in October 2010.
+
+ Threefish was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+ This implementation inlines all round functions, unrolls 8 rounds, and uses 1.2k of static tables
+ to speed up key schedule injection.
+ 2 x block size state is retained by each cipher instance.
+
+
+
+
+ 256 bit block size - Threefish-256
+
+
+
+
+ 512 bit block size - Threefish-512
+
+
+
+
+ 1024 bit block size - Threefish-1024
+
+
+
+ Size of the tweak in bytes (always 128 bit/16 bytes)
+
+
+ Rounds in Threefish-256
+
+
+ Rounds in Threefish-512
+
+
+ Rounds in Threefish-1024
+
+
+ Max rounds of any of the variants
+
+
+ Key schedule parity constant
+
+
+ Block size in bytes
+
+
+ Block size in 64 bit words
+
+
+ Buffer for byte oriented processBytes to call internal word API
+
+
+ Tweak bytes (2 byte t1,t2, calculated t3 and repeat of t1,t2 for modulo free lookup
+
+
+ Key schedule words
+
+
+ The internal cipher implementation (varies by blocksize)
+
+
+
+ Constructs a new Threefish cipher, with a specified block size.
+
+ the block size in bits, one of , ,
+ .
+
+
+
+ Initialise the engine.
+
+ Initialise for encryption if true, for decryption if false.
+ an instance of or (to
+ use a 0 tweak)
+
+
+
+ Initialise the engine, specifying the key and tweak directly.
+
+ the cipher mode.
+ the words of the key, or null to use the current key.
+ the 2 word (128 bit) tweak, or null to use the current tweak.
+
+
+
+ Process a block of data represented as 64 bit words.
+
+ the number of 8 byte words processed (which will be the same as the block size).
+ a block sized buffer of words to process.
+ a block sized buffer of words to receive the output of the operation.
+ if either the input or output is not block sized
+ if this engine is not initialised
+
+
+
+ Read a single 64 bit word from input in LSB first order.
+
+
+
+
+ Write a 64 bit word to output in LSB first order.
+
+
+
+ Rotate left + xor part of the mix operation.
+
+
+ Rotate xor + rotate right part of the unmix operation.
+
+
+ The extended + repeated tweak words
+
+
+ The extended + repeated key words
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ A class that provides Twofish encryption operations.
+
+ This Java implementation is based on the Java reference
+ implementation provided by Bruce Schneier and developed
+ by Raif S. Naffah.
+
+
+ Define the fixed p0/p1 permutations used in keyed S-box lookup.
+ By changing the following constant definitions, the S-boxes will
+ automatically Get changed in the Twofish engine.
+
+
+ gSubKeys[] and gSBox[] are eventually used in the
+ encryption and decryption methods.
+
+
+ initialise a Twofish cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+ encryptBlock uses the pre-calculated gSBox[] and subKey[]
+ arrays.
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Use (12, 8) Reed-Solomon code over GF(256) to produce
+ a key S-box 32-bit entity from 2 key material 32-bit
+ entities.
+
+ @param k0 first 32-bit entity
+ @param k1 second 32-bit entity
+ @return Remainder polynomial Generated using RS code
+
+
+ * Reed-Solomon code parameters: (12,8) reversible code:
+ *
+ *
+ * G(x) = x^4 + (a+1/a)x^3 + ax^2 + (a+1/a)x + 1
+ *
+ * where a = primitive root of field generator 0x14D
+ *
+
+
+ initialise a VMPC cipher.
+
+ @param forEncryption
+ whether or not we are for encryption.
+ @param params
+ the parameters required to set up the cipher.
+ @exception ArgumentException
+ if the params argument is inappropriate.
+
+
+
+ Implementation of Daniel J. Bernstein's XSalsa20 stream cipher - Salsa20 with an extended nonce.
+
+
+ XSalsa20 requires a 256 bit key, and a 192 bit nonce.
+
+
+
+
+ XSalsa20 key generation: process 256 bit input key and 128 bits of the input nonce
+ using a core Salsa20 function without input addition to produce 256 bit working key
+ and use that with the remaining 64 bits of nonce to initialize a standard Salsa20 engine state.
+
+
+
+ An XTEA engine.
+
+
+ Create an instance of the TEA encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Base interface for a public/private key block cipher.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The maximum size, in bytes, an input block may be.
+
+
+ The maximum size, in bytes, an output block will be.
+
+
+ Process a block.
+ The input buffer.
+ The offset into inBuf that the input block begins.
+ The length of the input block.
+ Input decrypts improperly.
+ Input is too large for the cipher.
+
+
+ interface that a public/private key pair generator should conform to.
+
+
+ intialise the key pair generator.
+
+ @param the parameters the key pair is to be initialised with.
+
+
+ return an AsymmetricCipherKeyPair containing the Generated keys.
+
+ @return an AsymmetricCipherKeyPair containing the Generated keys.
+
+
+ The basic interface that basic Diffie-Hellman implementations
+ conforms to.
+
+
+ initialise the agreement engine.
+
+
+ return the field size for the agreement algorithm in bytes.
+
+
+ given a public key from a given party calculate the next
+ message in the agreement sequence.
+
+
+ Base interface for a symmetric key block cipher.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The block size for this cipher, in bytes.
+
+
+ Indicates whether this cipher can handle partial blocks.
+
+
+ Process a block.
+ The input buffer.
+ The offset into inBuf that the input block begins.
+ The output buffer.
+ The offset into outBuf to write the output block.
+ If input block is wrong size, or outBuf too small.
+ The number of bytes processed and produced.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+
+ Operators that reduce their input to a single block return an object
+ of this type.
+
+
+
+
+ Return the final result of the operation.
+
+ A block of bytes, representing the result of an operation.
+
+
+
+ Store the final result of the operation by copying it into the destination array.
+
+ The number of bytes copied into destination.
+ The byte array to copy the result into.
+ The offset into destination to start copying the result at.
+
+
+ Block cipher engines are expected to conform to this interface.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ If true the cipher is initialised for encryption,
+ if false for decryption.
+ The key and other data required by the cipher.
+
+
+
+ Reset the cipher. After resetting the cipher is in the same state
+ as it was after the last init (if there was one).
+
+
+
+ all parameter classes implement this.
+
+
+ interface for classes implementing the Digital Signature Algorithm
+
+
+ initialise the signer for signature generation or signature
+ verification.
+
+ @param forSigning true if we are generating a signature, false
+ otherwise.
+ @param param key parameters for signature generation.
+
+
+ sign the passed in message (usually the output of a hash function).
+
+ @param message the message to be signed.
+ @return two big integers representing the r and s values respectively.
+
+
+ verify the message message against the signature values r and s.
+
+ @param message the message that was supposed to have been signed.
+ @param r the r signature value.
+ @param s the s signature value.
+
+
+ base interface for general purpose byte derivation functions.
+
+
+ return the message digest used as the basis for the function
+
+
+ Parameters for key/byte stream derivation classes
+
+
+ interface that a message digest conforms to.
+
+
+ return the algorithm name
+
+ @return the algorithm name
+
+
+ return the size, in bytes, of the digest produced by this message digest.
+
+ @return the size, in bytes, of the digest produced by this message digest.
+
+
+ return the size, in bytes, of the internal buffer used by this digest.
+
+ @return the size, in bytes, of the internal buffer used by this digest.
+
+
+ update the message digest with a single byte.
+
+ @param inByte the input byte to be entered.
+
+
+ update the message digest with a block of bytes.
+
+ @param input the byte array containing the data.
+ @param inOff the offset into the byte array where the data starts.
+ @param len the length of the data.
+
+
+ Close the digest, producing the final digest value. The doFinal
+ call leaves the digest reset.
+
+ @param output the array the digest is to be copied into.
+ @param outOff the offset into the out array the digest is to start at.
+
+
+ reset the digest back to it's initial state.
+
+
+
+ Base interface describing an entropy source for a DRBG.
+
+
+
+
+ Return whether or not this entropy source is regarded as prediction resistant.
+
+ true if this instance is prediction resistant; otherwise, false .
+
+
+
+ Return a byte array of entropy.
+
+ The entropy bytes.
+
+
+
+ Return the number of bits of entropy this source can produce.
+
+ The size, in bits, of the return value of getEntropy.
+
+
+
+ Base interface describing a provider of entropy sources.
+
+
+
+
+ Return an entropy source providing a block of entropy.
+
+ The size of the block of entropy required.
+ An entropy source providing bitsRequired blocks of entropy.
+
+
+ The base interface for implementations of message authentication codes (MACs).
+
+
+ Initialise the MAC.
+
+ @param param the key and other data required by the MAC.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Return the name of the algorithm the MAC implements.
+
+ @return the name of the algorithm the MAC implements.
+
+
+ Return the block size for this MAC (in bytes).
+
+ @return the block size for this MAC in bytes.
+
+
+ add a single byte to the mac for processing.
+
+ @param in the byte to be processed.
+ @exception InvalidOperationException if the MAC is not initialised.
+
+
+ @param in the array containing the input.
+ @param inOff the index in the array the data begins at.
+ @param len the length of the input starting at inOff.
+ @exception InvalidOperationException if the MAC is not initialised.
+ @exception DataLengthException if there isn't enough data in in.
+
+
+ Compute the final stage of the MAC writing the output to the out
+ parameter.
+
+ doFinal leaves the MAC in the same state it was after the last init.
+
+ @param out the array the MAC is to be output to.
+ @param outOff the offset into the out buffer the output is to start at.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the MAC is not initialised.
+
+
+ Reset the MAC. At the end of resetting the MAC should be in the
+ in the same state it was after the last init (if there was one).
+
+
+
+ Base interface for operators that serve as stream-based signature calculators.
+
+
+
+ The algorithm details object for this calculator.
+
+
+
+ Create a stream calculator for this signature calculator. The stream
+ calculator is used for the actual operation of entering the data to be signed
+ and producing the signature block.
+
+ A calculator producing an IBlockResult with a signature in it.
+
+
+
+ Base interface for cryptographic operations such as Hashes, MACs, and Signatures which reduce a stream of data
+ to a single value.
+
+
+
+ Return a "sink" stream which only exists to update the implementing object.
+ A stream to write to in order to update the implementing object.
+
+
+
+ Return the result of processing the stream. This value is only available once the stream
+ has been closed.
+
+ The result of processing the stream.
+
+
+ Return the name of the algorithm the signer implements.
+
+ @return the name of the algorithm the signer implements.
+
+
+ Initialise the signer for signing or verification.
+
+ @param forSigning true if for signing, false otherwise
+ @param param necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+ reset the internal state
+
+
+ Signer with message recovery.
+
+
+ Returns true if the signer has recovered the full message as
+ part of signature verification.
+
+ @return true if full message recovered.
+
+
+ Returns a reference to what message was recovered (if any).
+
+ @return full/partial message, null if nothing.
+
+
+ Perform an update with the recovered message before adding any other data. This must
+ be the first update method called, and calling it will result in the signer assuming
+ that further calls to update will include message content past what is recoverable.
+
+ @param signature the signature that we are in the process of verifying.
+ @throws IllegalStateException
+
+
+ The interface stream ciphers conform to.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ If true the cipher is initialised for encryption,
+ if false for decryption.
+ The key and other data required by the cipher.
+
+ If the parameters argument is inappropriate.
+
+
+
+ encrypt/decrypt a single byte returning the result.
+ the byte to be processed.
+ the result of processing the input byte.
+
+
+
+ Process a block of bytes from input putting the result into output .
+
+ The input byte array.
+
+ The offset into input where the data to be processed starts.
+
+ The number of bytes to be processed.
+ The output buffer the processed bytes go into.
+
+ The offset into output the processed data starts at.
+
+ If the output buffer is too small.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+
+ Operators that reduce their input to the validation of a signature produce this type.
+
+
+
+
+ Return true if the passed in data matches what is expected by the verification result.
+
+ The bytes representing the signature.
+ true if the signature verifies, false otherwise.
+
+
+
+ Return true if the length bytes from off in the source array match the signature
+ expected by the verification result.
+
+ Byte array containing the signature.
+ The offset into the source array where the signature starts.
+ The number of bytes in source making up the signature.
+ true if the signature verifies, false otherwise.
+
+
+
+ Base interface for operators that serve as stream-based signature verifiers.
+
+
+
+ The algorithm details object for this verifier.
+
+
+
+ Create a stream calculator for this verifier. The stream
+ calculator is used for the actual operation of entering the data to be verified
+ and producing a result which can be used to verify the original signature.
+
+ A calculator producing an IVerifier which can verify the signature.
+
+
+
+ Base interface for a provider to support the dynamic creation of signature verifiers.
+
+
+
+
+ Return a signature verfier for signature algorithm described in the passed in algorithm details object.
+
+ The details of the signature algorithm verification is required for.
+ A new signature verifier.
+
+
+ The name of the algorithm this cipher implements.
+
+
+
+ With FIPS PUB 202 a new kind of message digest was announced which supported extendable output, or variable digest sizes.
+ This interface provides the extra method required to support variable output on a digest implementation.
+
+
+
+ Output the results of the final calculation for this digest to outLen number of bytes.
+
+ @param out output array to write the output bytes to.
+ @param outOff offset to start writing the bytes at.
+ @param outLen the number of output bytes requested.
+ @return the number of bytes written
+
+
+ this exception is thrown whenever we find something we don't expect in a
+ message.
+
+
+ base constructor.
+
+
+ create a InvalidCipherTextException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+ The base class for parameters to key generators.
+
+
+ initialise the generator with a source of randomness
+ and a strength (in bits).
+
+ @param random the random byte source.
+ @param strength the size, in bits, of the keys we want to produce.
+
+
+ return the random source associated with this
+ generator.
+
+ @return the generators random source.
+
+
+ return the bit strength for keys produced by this generator,
+
+ @return the strength of the keys this generator produces (in bits).
+
+
+
+ This exception is thrown whenever a cipher requires a change of key, iv
+ or similar after x amount of bytes enciphered
+
+
+
+ super class for all Password Based Encyrption (Pbe) parameter generator classes.
+
+
+ base constructor.
+
+
+ initialise the Pbe generator.
+
+ @param password the password converted into bytes (see below).
+ @param salt the salt to be mixed with the password.
+ @param iterationCount the number of iterations the "mixing" function
+ is to be applied for.
+
+
+ return the password byte array.
+
+ @return the password byte array.
+
+
+ return the salt byte array.
+
+ @return the salt byte array.
+
+
+ return the iteration count.
+
+ @return the iteration count.
+
+
+ Generate derived parameters for a key of length keySize.
+
+ @param keySize the length, in bits, of the key required.
+ @return a parameters object representing a key.
+
+
+ Generate derived parameters for a key of length keySize, and
+ an initialisation vector (IV) of length ivSize.
+
+ @param keySize the length, in bits, of the key required.
+ @param ivSize the length, in bits, of the iv required.
+ @return a parameters object representing a key and an IV.
+
+
+ Generate derived parameters for a key of length keySize, specifically
+ for use with a MAC.
+
+ @param keySize the length, in bits, of the key required.
+ @return a parameters object representing a key.
+
+
+ converts a password to a byte array according to the scheme in
+ Pkcs5 (ascii, no padding)
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ converts a password to a byte array according to the scheme in
+ PKCS5 (UTF-8, no padding)
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ converts a password to a byte array according to the scheme in
+ Pkcs12 (unicode, big endian, 2 zero pad bytes at the end).
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ An EntropySourceProvider where entropy generation is based on a SecureRandom output using SecureRandom.generateSeed().
+
+
+ Create a entropy source provider based on the passed in SecureRandom.
+
+ @param secureRandom the SecureRandom to base EntropySource construction on.
+ @param isPredictionResistant boolean indicating if the SecureRandom is based on prediction resistant entropy or not (true if it is).
+
+
+ Return an entropy source that will create bitsRequired bits of entropy on
+ each invocation of getEntropy().
+
+ @param bitsRequired size (in bits) of entropy to be created by the provided source.
+ @return an EntropySource that generates bitsRequired bits of entropy on each call to its getEntropy() method.
+
+
+ A SP800-90A CTR DRBG.
+
+
+ Construct a SP800-90A CTR DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param engine underlying block cipher to use to support DRBG
+ @param keySizeInBits size of the key to use with the block cipher.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each internal round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Pad out a key for TDEA, setting odd parity for each byte.
+
+ @param keyMaster
+ @param keyOff
+ @param tmp
+ @param tmpOff
+
+
+ Used by both Dual EC and Hash.
+
+
+ A SP800-90A Hash DRBG.
+
+
+ Construct a SP800-90A Hash DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param digest source digest to use for DRB stream.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each internal round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ A SP800-90A HMAC DRBG.
+
+
+ Construct a SP800-90A Hash DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param hMac Hash MAC to base the DRBG on.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Interface to SP800-90A deterministic random bit generators.
+
+
+ Return the block size of the DRBG.
+
+ @return the block size (in bits) produced by each round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Generate numBytes worth of entropy from the passed in entropy source.
+
+ @param entropySource the entropy source to request the data from.
+ @param numBytes the number of bytes of entropy requested.
+ @return a byte array populated with the random data.
+
+
+ Builder class for making SecureRandom objects based on SP 800-90A Deterministic Random Bit Generators (DRBG).
+
+
+ Basic constructor, creates a builder using an EntropySourceProvider based on the default SecureRandom with
+ predictionResistant set to false.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the default SecureRandom does for its generateSeed() call.
+
+
+
+ Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value
+ for prediction resistance.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the passed in SecureRandom does for its generateSeed() call.
+
+ @param entropySource
+ @param predictionResistant
+
+
+ Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.
+
+ Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored.
+
+ @param entropySourceProvider a provider of EntropySource objects.
+
+
+ Set the personalization string for DRBG SecureRandoms created by this builder
+ @param personalizationString the personalisation string for the underlying DRBG.
+ @return the current builder.
+
+
+ Set the security strength required for DRBGs used in building SecureRandom objects.
+
+ @param securityStrength the security strength (in bits)
+ @return the current builder.
+
+
+ Set the amount of entropy bits required for seeding and reseeding DRBGs used in building SecureRandom objects.
+
+ @param entropyBitsRequired the number of bits of entropy to be requested from the entropy source on each seed/reseed.
+ @return the current builder.
+
+
+ Build a SecureRandom based on a SP 800-90A Hash DRBG.
+
+ @param digest digest algorithm to use in the DRBG underneath the SecureRandom.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a Hash DRBG.
+
+
+ Build a SecureRandom based on a SP 800-90A CTR DRBG.
+
+ @param cipher the block cipher to base the DRBG on.
+ @param keySizeInBits key size in bits to be used with the block cipher.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a CTR DRBG.
+
+
+ Build a SecureRandom based on a SP 800-90A HMAC DRBG.
+
+ @param hMac HMAC algorithm to use in the DRBG underneath the SecureRandom.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a HMAC DRBG.
+
+
+
+ @param engine
+ @param entropySource
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the RNG.
+
+
+ Basic constructor, creates a builder using an EntropySourceProvider based on the default SecureRandom with
+ predictionResistant set to false.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the default SecureRandom does for its generateSeed() call.
+
+
+
+ Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value
+ for prediction resistance.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the passed in SecureRandom does for its generateSeed() call.
+
+ @param entropySource
+ @param predictionResistant
+
+
+ Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.
+
+ Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored.
+
+ @param entropySourceProvider a provider of EntropySource objects.
+
+
+ Construct a X9.31 secure random generator using the passed in engine and key. If predictionResistant is true the
+ generator will be reseeded on each request.
+
+ @param engine a block cipher to use as the operator.
+ @param key the block cipher key to initialise engine with.
+ @param predictionResistant true if engine to be reseeded on each use, false otherwise.
+ @return a SecureRandom.
+
+
+
+ Uses Microsoft's RNGCryptoServiceProvider
+
+
+
+ Random generation based on the digest with counter. Calling AddSeedMaterial will
+ always increase the entropy of the hash.
+
+ Internal access to the digest is synchronized so a single one of these can be shared.
+
+
+
+ Generic interface for objects generating random bytes.
+
+
+ Add more seed material to the generator.
+ A byte array to be mixed into the generator's state.
+
+
+ Add more seed material to the generator.
+ A long value to be mixed into the generator's state.
+
+
+ Fill byte array with random values.
+ Array to be filled.
+
+
+ Fill byte array with random values.
+ Array to receive bytes.
+ Index to start filling at.
+ Length of segment to fill.
+
+
+
+ Takes bytes generated by an underling RandomGenerator and reverses the order in
+ each small window (of configurable size).
+
+ Access to internals is synchronized so a single one of these can be shared.
+
+
+
+
+ Add more seed material to the generator.
+ A byte array to be mixed into the generator's state.
+
+
+ Add more seed material to the generator.
+ A long value to be mixed into the generator's state.
+
+
+ Fill byte array with random values.
+ Array to be filled.
+
+
+ Fill byte array with random values.
+ Array to receive bytes.
+ Index to start filling at.
+ Length of segment to fill.
+
+
+ A thread based seed generator - one source of randomness.
+
+ Based on an idea from Marcus Lippert.
+
+
+
+ Generate seed bytes. Set fast to false for best quality.
+
+ If fast is set to true, the code should be round about 8 times faster when
+ generating a long sequence of random bytes. 20 bytes of random values using
+ the fast mode take less than half a second on a Nokia e70. If fast is set to false,
+ it takes round about 2500 ms.
+
+ @param numBytes the number of bytes to generate
+ @param fast true if fast mode should be used
+
+
+
+ Permutation generated by code:
+
+ // First 1850 fractional digit of Pi number.
+ byte[] key = new BigInteger("14159265358979323846...5068006422512520511").ToByteArray();
+ s = 0;
+ P = new byte[256];
+ for (int i = 0; i < 256; i++)
+ {
+ P[i] = (byte) i;
+ }
+ for (int m = 0; m < 768; m++)
+ {
+ s = P[(s + P[m & 0xff] + key[m % key.length]) & 0xff];
+ byte temp = P[m & 0xff];
+ P[m & 0xff] = P[s & 0xff];
+ P[s & 0xff] = temp;
+ }
+
+
+
+ Value generated in the same way as P .
+
+
+ a wrapper for block ciphers with a single byte block size, so that they
+ can be treated like stream ciphers.
+
+
+ basic constructor.
+
+ @param cipher the block cipher to be wrapped.
+ @exception ArgumentException if the cipher has a block size other than
+ one.
+
+
+ initialise the underlying cipher.
+
+ @param forEncryption true if we are setting up for encryption, false otherwise.
+ @param param the necessary parameters for the underlying cipher to be initialised.
+
+
+ return the name of the algorithm we are wrapping.
+
+ @return the name of the algorithm we are wrapping.
+
+
+ encrypt/decrypt a single byte returning the result.
+
+ @param in the byte to be processed.
+ @return the result of processing the input byte.
+
+
+ process a block of bytes from in putting the result into out.
+
+ @param in the input byte array.
+ @param inOff the offset into the in array where the data to be processed starts.
+ @param len the number of bytes to be processed.
+ @param out the output buffer the processed bytes go into.
+ @param outOff the offset into the output byte array the processed data stars at.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ reset the underlying cipher. This leaves it in the same state
+ it was at after the last init (if there was one).
+
+
+ a Diffie-Hellman key exchange engine.
+
+ note: This uses MTI/A0 key agreement in order to make the key agreement
+ secure against passive attacks. If you're doing Diffie-Hellman and both
+ parties have long term public keys you should look at using this. For
+ further information have a look at RFC 2631.
+
+ It's possible to extend this to more than two parties as well, for the moment
+ that is left as an exercise for the reader.
+
+
+ calculate our initial message.
+
+
+ given a message from a given party and the corresponding public key
+ calculate the next message in the agreement sequence. In this case
+ this will represent the shared secret.
+
+
+ a Diffie-Hellman key agreement class.
+
+ note: This is only the basic algorithm, it doesn't take advantage of
+ long term public keys if they are available. See the DHAgreement class
+ for a "better" implementation.
+
+
+ given a short term public key from a given party calculate the next
+ message in the agreement sequence.
+
+
+ Standard Diffie-Hellman groups from various IETF specifications.
+
+
+ P1363 7.2.1 ECSVDP-DH
+
+ ECSVDP-DH is Elliptic Curve Secret Value Derivation Primitive,
+ Diffie-Hellman version. It is based on the work of [DH76], [Mil86],
+ and [Kob87]. This primitive derives a shared secret value from one
+ party's private key and another party's public key, where both have
+ the same set of EC domain parameters. If two parties correctly
+ execute this primitive, they will produce the same output. This
+ primitive can be invoked by a scheme to derive a shared secret key;
+ specifically, it may be used with the schemes ECKAS-DH1 and
+ DL/ECKAS-DH2. It assumes that the input keys are valid (see also
+ Section 7.2.2).
+
+
+ P1363 7.2.2 ECSVDP-DHC
+
+ ECSVDP-DHC is Elliptic Curve Secret Value Derivation Primitive,
+ Diffie-Hellman version with cofactor multiplication. It is based on
+ the work of [DH76], [Mil86], [Kob87], [LMQ98] and [Kal98a]. This
+ primitive derives a shared secret value from one party's private key
+ and another party's public key, where both have the same set of EC
+ domain parameters. If two parties correctly execute this primitive,
+ they will produce the same output. This primitive can be invoked by a
+ scheme to derive a shared secret key; specifically, it may be used
+ with the schemes ECKAS-DH1 and DL/ECKAS-DH2. It does not assume the
+ validity of the input public key (see also Section 7.2.1).
+
+ Note: As stated P1363 compatibility mode with ECDH can be preset, and
+ in this case the implementation doesn't have a ECDH compatibility mode
+ (if you want that just use ECDHBasicAgreement and note they both implement
+ BasicAgreement!).
+
+
+
+ A participant in a Password Authenticated Key Exchange by Juggling (J-PAKE) exchange.
+
+ The J-PAKE exchange is defined by Feng Hao and Peter Ryan in the paper
+
+ "Password Authenticated Key Exchange by Juggling, 2008."
+
+ The J-PAKE protocol is symmetric.
+ There is no notion of a client or server , but rather just two participants .
+ An instance of JPakeParticipant represents one participant, and
+ is the primary interface for executing the exchange.
+
+ To execute an exchange, construct a JPakeParticipant on each end,
+ and call the following 7 methods
+ (once and only once, in the given order, for each participant, sending messages between them as described):
+
+ CreateRound1PayloadToSend() - and send the payload to the other participant
+ ValidateRound1PayloadReceived(JPakeRound1Payload) - use the payload received from the other participant
+ CreateRound2PayloadToSend() - and send the payload to the other participant
+ ValidateRound2PayloadReceived(JPakeRound2Payload) - use the payload received from the other participant
+ CalculateKeyingMaterial()
+ CreateRound3PayloadToSend(BigInteger) - and send the payload to the other participant
+ ValidateRound3PayloadReceived(JPakeRound3Payload, BigInteger) - use the payload received from the other participant
+
+ Each side should derive a session key from the keying material returned by CalculateKeyingMaterial().
+ The caller is responsible for deriving the session key using a secure key derivation function (KDF).
+
+ Round 3 is an optional key confirmation process.
+ If you do not execute round 3, then there is no assurance that both participants are using the same key.
+ (i.e. if the participants used different passwords, then their session keys will differ.)
+
+ If the round 3 validation succeeds, then the keys are guaranteed to be the same on both sides.
+
+ The symmetric design can easily support the asymmetric cases when one party initiates the communication.
+ e.g. Sometimes the round1 payload and round2 payload may be sent in one pass.
+ Also, in some cases, the key confirmation payload can be sent together with the round2 payload.
+ These are the trivial techniques to optimize the communication.
+
+ The key confirmation process is implemented as specified in
+ NIST SP 800-56A Revision 1 ,
+ Section 8.2 Unilateral Key Confirmation for Key Agreement Schemes.
+
+ This class is stateful and NOT threadsafe.
+ Each instance should only be used for ONE complete J-PAKE exchange
+ (i.e. a new JPakeParticipant should be constructed for each new J-PAKE exchange).
+
+
+
+
+ Convenience constructor for a new JPakeParticipant that uses
+ the JPakePrimeOrderGroups#NIST_3072 prime order group,
+ a SHA-256 digest, and a default SecureRandom implementation.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+
+
+
+ Convenience constructor for a new JPakeParticipant that uses
+ a SHA-256 digest, and a default SecureRandom implementation.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+ Prime order group. See JPakePrimeOrderGroups for standard groups.
+
+
+
+ Constructor for a new JPakeParticipant.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+ Prime order group. See JPakePrimeOrderGroups for standard groups.
+ Digest to use during zero knowledge proofs and key confirmation
+ (SHA-256 or stronger preferred).
+ Source of secure random data for x1 and x2, and for the zero knowledge proofs.
+
+
+
+ Gets the current state of this participant.
+ See the STATE_* constants for possible values.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 1.
+
+ After execution, the State state} will be STATE_ROUND_1_CREATED}.
+
+
+
+
+ Validates the payload received from the other participant during round 1.
+
+ Must be called prior to CreateRound2PayloadToSend().
+
+ After execution, the State state will be STATE_ROUND_1_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws InvalidOperationException
+ if called multiple times.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 2.
+
+ ValidateRound1PayloadReceived(JPakeRound1Payload) must be called prior to this method.
+
+ After execution, the State state will be STATE_ROUND_2_CREATED.
+
+ Throws InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times
+
+
+
+
+ Validates the payload received from the other participant during round 2.
+ Note that this DOES NOT detect a non-common password.
+ The only indication of a non-common password is through derivation
+ of different keys (which can be detected explicitly by executing round 3 and round 4)
+
+ Must be called prior to CalculateKeyingMaterial().
+
+ After execution, the State state will be STATE_ROUND_2_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws
+ InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times
+
+
+
+
+ Calculates and returns the key material.
+ A session key must be derived from this key material using a secure key derivation function (KDF).
+ The KDF used to derive the key is handled externally (i.e. not by JPakeParticipant).
+
+ The keying material will be identical for each participant if and only if
+ each participant's password is the same. i.e. If the participants do not
+ share the same password, then each participant will derive a different key.
+ Therefore, if you immediately start using a key derived from
+ the keying material, then you must handle detection of incorrect keys.
+ If you want to handle this detection explicitly, you can optionally perform
+ rounds 3 and 4. See JPakeParticipant for details on how to execute
+ rounds 3 and 4.
+
+ The keying material will be in the range [0, p-1] .
+
+ ValidateRound2PayloadReceived(JPakeRound2Payload) must be called prior to this method.
+
+ As a side effect, the internal password array is cleared, since it is no longer needed.
+
+ After execution, the State state will be STATE_KEY_CALCULATED.
+
+ Throws InvalidOperationException if called prior to ValidateRound2PayloadReceived(JPakeRound2Payload),
+ or if called multiple times.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 3.
+
+ See JPakeParticipant for more details on round 3.
+
+ After execution, the State state} will be STATE_ROUND_3_CREATED.
+ Throws InvalidOperationException if called prior to CalculateKeyingMaterial, or multiple
+ times.
+
+ The keying material as returned from CalculateKeyingMaterial().
+
+
+
+ Validates the payload received from the other participant during round 3.
+
+ See JPakeParticipant for more details on round 3.
+
+ After execution, the State state will be STATE_ROUND_3_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws InvalidOperationException if called prior to
+ CalculateKeyingMaterial or multiple times
+
+ The round 3 payload received from the other participant.
+ The keying material as returned from CalculateKeyingMaterial().
+
+
+
+ A pre-computed prime order group for use during a J-PAKE exchange.
+
+ Typically a Schnorr group is used. In general, J-PAKE can use any prime order group
+ that is suitable for public key cryptography, including elliptic curve cryptography.
+
+ See JPakePrimeOrderGroups for convenient standard groups.
+
+ NIST publishes
+ many groups that can be used for the desired level of security.
+
+
+
+
+ Constructs a new JPakePrimeOrderGroup.
+
+ In general, you should use one of the pre-approved groups from
+ JPakePrimeOrderGroups, rather than manually constructing one.
+
+ The following basic checks are performed:
+
+ p-1 must be evenly divisible by q
+ g must be in [2, p-1]
+ g^q mod p must equal 1
+ p must be prime (within reasonably certainty)
+ q must be prime (within reasonably certainty)
+
+ The prime checks are performed using BigInteger#isProbablePrime(int),
+ and are therefore subject to the same probability guarantees.
+
+ These checks prevent trivial mistakes.
+ However, due to the small uncertainties if p and q are not prime,
+ advanced attacks are not prevented.
+ Use it at your own risk.
+
+ Throws NullReferenceException if any argument is null. Throws
+ InvalidOperationException is any of the above validations fail.
+
+
+
+
+ Constructor used by the pre-approved groups in JPakePrimeOrderGroups.
+ These pre-approved groups can avoid the expensive checks.
+ User-specified groups should not use this constructor.
+
+
+
+
+ Standard pre-computed prime order groups for use by J-PAKE.
+ (J-PAKE can use pre-computed prime order groups, same as DSA and Diffie-Hellman.)
+
+ This class contains some convenient constants for use as input for
+ constructing {@link JPAKEParticipant}s.
+
+ The prime order groups below are taken from Sun's JDK JavaDoc (docs/guide/security/CryptoSpec.html#AppB),
+ and from the prime order groups
+ published by NIST .
+
+
+
+
+ From Sun's JDK JavaDoc (docs/guide/security/CryptoSpec.html#AppB)
+ 1024-bit p, 160-bit q and 1024-bit g for 80-bit security.
+
+
+
+
+ From NIST.
+ 2048-bit p, 224-bit q and 2048-bit g for 112-bit security.
+
+
+
+
+ From NIST.
+ 3072-bit p, 256-bit q and 3072-bit g for 128-bit security.
+
+
+
+
+ The payload sent/received during the first round of a J-PAKE exchange.
+
+ Each JPAKEParticipant creates and sends an instance of this payload to
+ the other. The payload to send should be created via
+ JPAKEParticipant.CreateRound1PayloadToSend().
+
+ Each participant must also validate the payload received from the other.
+ The received payload should be validated via
+ JPAKEParticipant.ValidateRound1PayloadReceived(JPakeRound1Payload).
+
+
+
+
+ The id of the JPAKEParticipant who created/sent this payload.
+
+
+
+
+ The value of g^x1
+
+
+
+
+ The value of g^x2
+
+
+
+
+ The zero knowledge proof for x1.
+
+ This is a two element array, containing {g^v, r} for x1.
+
+
+
+
+ The zero knowledge proof for x2.
+
+ This is a two element array, containing {g^v, r} for x2.
+
+
+
+
+ The payload sent/received during the second round of a J-PAKE exchange.
+
+ Each JPAKEParticipant creates and sends an instance
+ of this payload to the other JPAKEParticipant.
+ The payload to send should be created via
+ JPAKEParticipant#createRound2PayloadToSend()
+
+ Each JPAKEParticipant must also validate the payload
+ received from the other JPAKEParticipant.
+ The received payload should be validated via
+ JPAKEParticipant#validateRound2PayloadReceived(JPakeRound2Payload)
+
+
+
+
+ The id of the JPAKEParticipant who created/sent this payload.
+
+
+
+
+ The value of A, as computed during round 2.
+
+
+
+
+ The zero knowledge proof for x2 * s.
+
+ This is a two element array, containing {g^v, r} for x2 * s.
+
+
+
+
+ The payload sent/received during the optional third round of a J-PAKE exchange,
+ which is for explicit key confirmation.
+
+ Each JPAKEParticipant creates and sends an instance
+ of this payload to the other JPAKEParticipant.
+ The payload to send should be created via
+ JPAKEParticipant#createRound3PayloadToSend(BigInteger)
+
+ Eeach JPAKEParticipant must also validate the payload
+ received from the other JPAKEParticipant.
+ The received payload should be validated via
+ JPAKEParticipant#validateRound3PayloadReceived(JPakeRound3Payload, BigInteger)
+
+
+
+
+ The id of the {@link JPAKEParticipant} who created/sent this payload.
+
+
+
+
+ The value of MacTag, as computed by round 3.
+
+ See JPAKEUtil#calculateMacTag(string, string, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, org.bouncycastle.crypto.Digest)
+
+
+
+
+ Primitives needed for a J-PAKE exchange.
+
+ The recommended way to perform a J-PAKE exchange is by using
+ two JPAKEParticipants. Internally, those participants
+ call these primitive operations in JPakeUtilities.
+
+ The primitives, however, can be used without a JPAKEParticipant if needed.
+
+
+
+
+ Return a value that can be used as x1 or x3 during round 1.
+ The returned value is a random value in the range [0, q-1].
+
+
+
+
+ Return a value that can be used as x2 or x4 during round 1.
+ The returned value is a random value in the range [1, q-1].
+
+
+
+
+ Converts the given password to a BigInteger
+ for use in arithmetic calculations.
+
+
+
+
+ Calculate g^x mod p as done in round 1.
+
+
+
+
+ Calculate ga as done in round 2.
+
+
+
+
+ Calculate x2 * s as done in round 2.
+
+
+
+
+ Calculate A as done in round 2.
+
+
+
+
+ Calculate a zero knowledge proof of x using Schnorr's signature.
+ The returned array has two elements {g^v, r = v-x*h} for x.
+
+
+
+
+ Validates that g^x4 is not 1.
+ throws CryptoException if g^x4 is 1
+
+
+
+
+ Validates that ga is not 1.
+
+ As described by Feng Hao...
+ Alice could simply check ga != 1 to ensure it is a generator.
+ In fact, as we will explain in Section 3, (x1 + x3 + x4 ) is random over Zq even in the face of active attacks.
+ Hence, the probability for ga = 1 is extremely small - on the order of 2^160 for 160-bit q.
+
+ throws CryptoException if ga is 1
+
+
+
+
+ Validates the zero knowledge proof (generated by
+ calculateZeroKnowledgeProof(BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, string, Digest, SecureRandom)
+ is correct.
+
+ throws CryptoException if the zero knowledge proof is not correct
+
+
+
+
+ Calculates the keying material, which can be done after round 2 has completed.
+ A session key must be derived from this key material using a secure key derivation function (KDF).
+ The KDF used to derive the key is handled externally (i.e. not by JPAKEParticipant).
+
+ KeyingMaterial = (B/g^{x2*x4*s})^x2
+
+
+
+
+ Validates that the given participant ids are not equal.
+ (For the J-PAKE exchange, each participant must use a unique id.)
+
+ Throws CryptoException if the participantId strings are equal.
+
+
+
+
+ Validates that the given participant ids are equal.
+ This is used to ensure that the payloads received from
+ each round all come from the same participant.
+
+
+
+
+ Validates that the given object is not null.
+ throws NullReferenceException if the object is null.
+
+ object in question
+ name of the object (to be used in exception message)
+
+
+
+ Calculates the MacTag (to be used for key confirmation), as defined by
+ NIST SP 800-56A Revision 1 ,
+ Section 8.2 Unilateral Key Confirmation for Key Agreement Schemes.
+
+ MacTag = HMAC(MacKey, MacLen, MacData)
+ MacKey = H(K || "JPAKE_KC")
+ MacData = "KC_1_U" || participantId || partnerParticipantId || gx1 || gx2 || gx3 || gx4
+
+ Note that both participants use "KC_1_U" because the sender of the round 3 message
+ is always the initiator for key confirmation.
+
+ HMAC = {@link HMac} used with the given {@link Digest}
+ H = The given {@link Digest}
+ MacLen = length of MacTag
+
+
+
+
+ Calculates the MacKey (i.e. the key to use when calculating the MagTag for key confirmation).
+
+ MacKey = H(K || "JPAKE_KC")
+
+
+
+
+ Validates the MacTag received from the partner participant.
+
+ throws CryptoException if the participantId strings are equal.
+
+
+
+ RFC 2631 Diffie-hellman KEK derivation function.
+
+
+ X9.63 based key derivation function for ECDH CMS.
+
+
+ Implements the client side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe.
+ This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper
+ "SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002"
+
+
+ Initialises the client to begin new authentication attempt
+ @param N The safe prime associated with the client's verifier
+ @param g The group parameter associated with the client's verifier
+ @param digest The digest algorithm associated with the client's verifier
+ @param random For key generation
+
+
+ Generates client's credentials given the client's salt, identity and password
+ @param salt The salt used in the client's verifier.
+ @param identity The user's identity (eg. username)
+ @param password The user's password
+ @return Client's public value to send to server
+
+
+ Generates client's verification message given the server's credentials
+ @param serverB The server's credentials
+ @return Client's verification message for the server
+ @throws CryptoException If server's credentials are invalid
+
+
+ Computes the client evidence message M1 using the previously received values.
+ To be called after calculating the secret S.
+ @return M1: the client side generated evidence message
+ @throws CryptoException
+
+
+ Authenticates the server evidence message M2 received and saves it only if correct.
+ @param M2: the server side generated evidence message
+ @return A boolean indicating if the server message M2 was the expected one.
+ @throws CryptoException
+
+
+ Computes the final session key as a result of the SRP successful mutual authentication
+ To be called after verifying the server evidence message M2.
+ @return Key: the mutually authenticated symmetric session key
+ @throws CryptoException
+
+
+ Implements the server side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe.
+ This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper
+ "SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002"
+
+
+ Initialises the server to accept a new client authentication attempt
+ @param N The safe prime associated with the client's verifier
+ @param g The group parameter associated with the client's verifier
+ @param v The client's verifier
+ @param digest The digest algorithm associated with the client's verifier
+ @param random For key generation
+
+
+ Generates the server's credentials that are to be sent to the client.
+ @return The server's public value to the client
+
+
+ Processes the client's credentials. If valid the shared secret is generated and returned.
+ @param clientA The client's credentials
+ @return A shared secret BigInteger
+ @throws CryptoException If client's credentials are invalid
+
+
+ Authenticates the received client evidence message M1 and saves it only if correct.
+ To be called after calculating the secret S.
+ @param M1: the client side generated evidence message
+ @return A boolean indicating if the client message M1 was the expected one.
+ @throws CryptoException
+
+
+ Computes the server evidence message M2 using the previously verified values.
+ To be called after successfully verifying the client evidence message M1.
+ @return M2: the server side generated evidence message
+ @throws CryptoException
+
+
+ Computes the final session key as a result of the SRP successful mutual authentication
+ To be called after calculating the server evidence message M2.
+ @return Key: the mutual authenticated symmetric session key
+ @throws CryptoException
+
+
+ Computes the client evidence message (M1) according to the standard routine:
+ M1 = H( A | B | S )
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param A The public client value
+ @param B The public server value
+ @param S The secret calculated by both sides
+ @return M1 The calculated client evidence message
+
+
+ Computes the server evidence message (M2) according to the standard routine:
+ M2 = H( A | M1 | S )
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param A The public client value
+ @param M1 The client evidence message
+ @param S The secret calculated by both sides
+ @return M2 The calculated server evidence message
+
+
+ Computes the final Key according to the standard routine: Key = H(S)
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param S The secret calculated by both sides
+ @return
+
+
+ Generates new SRP verifier for user
+
+
+ Initialises generator to create new verifiers
+ @param N The safe prime to use (see DHParametersGenerator)
+ @param g The group parameter to use (see DHParametersGenerator)
+ @param digest The digest to use. The same digest type will need to be used later for the actual authentication
+ attempt. Also note that the final session key size is dependent on the chosen digest.
+
+
+ Creates a new SRP verifier
+ @param salt The salt to use, generally should be large and random
+ @param identity The user's identifying information (eg. username)
+ @param password The user's password
+ @return A new verifier for use in future SRP authentication
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ ISO 9796-1 padding. Note in the light of recent results you should
+ only use this with RSA (rather than the "simpler" Rabin keys) and you
+ should never use it with anything other than a hash (ie. even if the
+ message is small don't sign the message, sign it's hash) or some "random"
+ value. See your favorite search engine for details.
+
+
+ return the input block size. The largest message we can process
+ is (key_size_in_bits + 3)/16, which in our world comes to
+ key_size_in_bytes / 2.
+
+
+ return the maximum possible size for the output.
+
+
+ set the number of bits in the next message to be treated as
+ pad bits.
+
+
+ retrieve the number of pad bits in the last decoded message.
+
+
+ @exception InvalidCipherTextException if the decrypted block is not a valid ISO 9796 bit string
+
+
+ Optimal Asymmetric Encryption Padding (OAEP) - see PKCS 1 V 2.
+
+
+ @exception InvalidCipherTextException if the decrypted block turns out to
+ be badly formatted.
+
+
+ int to octet string.
+
+
+ mask generator function, as described in PKCS1v2.
+
+
+ this does your basic Pkcs 1 v1.5 padding - whether or not you should be using this
+ depends on your application - see Pkcs1 Version 2 for details.
+
+
+ some providers fail to include the leading zero in PKCS1 encoded blocks. If you need to
+ work with one of these set the system property Org.BouncyCastle.Pkcs1.Strict to false.
+
+
+ The same effect can be achieved by setting the static property directly
+
+ The static property is checked during construction of the encoding object, it is set to
+ true by default.
+
+
+
+ Basic constructor.
+ @param cipher
+
+
+ Constructor for decryption with a fixed plaintext length.
+
+ @param cipher The cipher to use for cryptographic operation.
+ @param pLen Length of the expected plaintext.
+
+
+ Constructor for decryption with a fixed plaintext length and a fallback
+ value that is returned, if the padding is incorrect.
+
+ @param cipher
+ The cipher to use for cryptographic operation.
+ @param fallback
+ The fallback value, we don't to a arraycopy here.
+
+
+ Checks if the argument is a correctly PKCS#1.5 encoded Plaintext
+ for encryption.
+
+ @param encoded The Plaintext.
+ @param pLen Expected length of the plaintext.
+ @return Either 0, if the encoding is correct, or -1, if it is incorrect.
+
+
+ Decode PKCS#1.5 encoding, and return a random value if the padding is not correct.
+
+ @param in The encrypted block.
+ @param inOff Offset in the encrypted block.
+ @param inLen Length of the encrypted block.
+ @param pLen Length of the desired output.
+ @return The plaintext without padding, or a random value if the padding was incorrect.
+
+ @throws InvalidCipherTextException
+
+
+ @exception InvalidCipherTextException if the decrypted block is not in Pkcs1 format.
+
+
+ Basic KDF generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on ISO 18033/P1363a.
+
+
+ Construct a KDF Parameters generator.
+
+ @param counterStart value of counter.
+ @param digest the digest to be used as the source of derived keys.
+
+
+ return the underlying digest.
+
+
+ fill len bytes of the output buffer with bytes generated from
+ the derivation function.
+
+ @throws ArgumentException if the size of the request will cause an overflow.
+ @throws DataLengthException if the out buffer is too small.
+
+
+ a basic Diffie-Hellman key pair generator.
+
+ This generates keys consistent for use with the basic algorithm for
+ Diffie-Hellman.
+
+
+ a Diffie-Hellman key pair generator.
+
+ This generates keys consistent for use in the MTI/A0 key agreement protocol
+ as described in "Handbook of Applied Cryptography", Pages 516-519.
+
+
+ which Generates the p and g values from the given parameters,
+ returning the DHParameters object.
+
+ Note: can take a while...
+
+
+ initialise the key generator - if strength is set to zero
+ the key Generated will be 192 bits in size, otherwise
+ strength can be 128 or 192 (or 112 or 168 if you don't count
+ parity bits), depending on whether you wish to do 2-key or 3-key
+ triple DES.
+
+ @param param the parameters to be used for key generation
+
+
+ initialise the key generator - if strength is set to zero
+ the key generated will be 64 bits in size, otherwise
+ strength can be 64 or 56 bits (if you don't count the parity bits).
+
+ @param param the parameters to be used for key generation
+
+
+ a DSA key pair generator.
+
+ This Generates DSA keys in line with the method described
+ in FIPS 186-3 B.1 FFC Key Pair Generation .
+
+
+ Generate suitable parameters for DSA, in line with FIPS 186-2, or FIPS 186-3.
+
+
+ Initialise the generator
+ This form can only be used for older DSA (pre-DSA2) parameters
+ the size of keys in bits (from 512 up to 1024, and a multiple of 64)
+ measure of robustness of primes (at least 80 for FIPS 186-2 compliance)
+ the source of randomness to use
+
+
+ Initialise the generator for DSA 2
+ You must use this Init method if you need to generate parameters for DSA 2 keys
+ An instance of DsaParameterGenerationParameters used to configure this generator
+
+
+ Generates a set of DsaParameters
+ Can take a while...
+
+
+ generate suitable parameters for DSA, in line with
+ FIPS 186-3 A.1 Generation of the FFC Primes p and q .
+
+
+ Given the domain parameters this routine generates an EC key
+ pair in accordance with X9.62 section 5.2.1 pages 26, 27.
+
+
+ a ElGamal key pair generator.
+
+ This Generates keys consistent for use with ElGamal as described in
+ page 164 of "Handbook of Applied Cryptography".
+
+
+ * which Generates the p and g values from the given parameters,
+ * returning the ElGamalParameters object.
+ *
+ * Note: can take a while...
+ *
+
+
+ a GOST3410 key pair generator.
+ This generates GOST3410 keys in line with the method described
+ in GOST R 34.10-94.
+
+
+ generate suitable parameters for GOST3410.
+
+
+ initialise the key generator.
+
+ @param size size of the key
+ @param typeProcedure type procedure A,B = 1; A',B' - else
+ @param random random byte source.
+
+
+ Procedure C
+ procedure generates the a value from the given p,q,
+ returning the a value.
+
+
+ which generates the p , q and a values from the given parameters,
+ returning the Gost3410Parameters object.
+
+
+ KFD2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on IEEE P1363/ISO 18033.
+
+
+ Construct a KDF1 byte generator.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ KDF2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on IEEE P1363/ISO 18033.
+
+
+ Construct a KDF2 bytes generator. Generates key material
+ according to IEEE P1363 or ISO 18033 depending on the initialisation.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ Generator for MGF1 as defined in Pkcs 1v2
+
+
+ @param digest the digest to be used as the source of Generated bytes
+
+
+ return the underlying digest.
+
+
+ int to octet string.
+
+
+ fill len bytes of the output buffer with bytes Generated from
+ the derivation function.
+
+ @throws DataLengthException if the out buffer is too small.
+
+
+ Key generation parameters for NaccacheStern cipher. For details on this cipher, please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Generates a permuted ArrayList from the original one. The original List
+ is not modified
+
+ @param arr
+ the ArrayList to be permuted
+ @param rand
+ the source of Randomness for permutation
+ @return a new IList with the permuted elements.
+
+
+ Finds the first 'count' primes starting with 3
+
+ @param count
+ the number of primes to find
+ @return a vector containing the found primes as Integer
+
+
+ Generator for PBE derived keys and ivs as usd by OpenSSL.
+
+ The scheme is a simple extension of PKCS 5 V2.0 Scheme 1 using MD5 with an
+ iteration count of 1.
+
+
+
+ Construct a OpenSSL Parameters generator.
+
+
+ Initialise - note the iteration count for this algorithm is fixed at 1.
+
+ @param password password to use.
+ @param salt salt to use.
+
+
+ the derived key function, the ith hash of the password and the salt.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+ @exception ArgumentException if keySize + ivSize is larger than the base hash size.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 12 V1.0.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs12 Page
+
+
+
+ Construct a Pkcs 12 Parameters generator.
+
+ @param digest the digest to be used as the source of derived keys.
+ @exception ArgumentException if an unknown digest is passed in.
+
+
+ add a + b + 1, returning the result in a. The a value is treated
+ as a BigInteger of length (b.Length * 8) bits. The result is
+ modulo 2^b.Length in case of overflow.
+
+
+ generation of a derived key ala Pkcs12 V1.0.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 5 V2.0 Scheme 1.
+ Note this generator is limited to the size of the hash produced by the
+ digest used to drive it.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs5 Page
+
+
+
+ Construct a Pkcs 5 Scheme 1 Parameters generator.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ the derived key function, the ith hash of the mPassword and the mSalt.
+
+
+ Generate a key parameter derived from the mPassword, mSalt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the mPassword, mSalt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+ @exception ArgumentException if keySize + ivSize is larger than the base hash size.
+
+
+ Generate a key parameter for use with a MAC derived from the mPassword,
+ mSalt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 5 V2.0 Scheme 2.
+ This generator uses a SHA-1 HMac as the calculation function.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs5 Page
+
+
+ construct a Pkcs5 Scheme 2 Parameters generator.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+
+ Generates keys for the Poly1305 MAC.
+
+
+ Poly1305 keys are 256 bit keys consisting of a 128 bit secret key used for the underlying block
+ cipher followed by a 128 bit {@code r} value used for the polynomial portion of the Mac.
+ The {@code r} value has a specific format with some bits required to be cleared, resulting in an
+ effective 106 bit key.
+ A separately generated 256 bit key can be modified to fit the Poly1305 key format by using the
+ {@link #clamp(byte[])} method to clear the required bits.
+
+
+
+
+
+ Initialises the key generator.
+
+
+ Poly1305 keys are always 256 bits, so the key length in the provided parameters is ignored.
+
+
+
+
+ Generates a 256 bit key in the format required for Poly1305 - e.g.
+ k[0] ... k[15], r[0] ... r[15] with the required bits in r cleared
+ as per .
+
+
+
+
+ Modifies an existing 32 byte key value to comply with the requirements of the Poly1305 key by
+ clearing required bits in the r (second 16 bytes) portion of the key.
+ Specifically:
+
+ r[3], r[7], r[11], r[15] have top four bits clear (i.e., are {0, 1, . . . , 15})
+ r[4], r[8], r[12] have bottom two bits clear (i.e., are in {0, 4, 8, . . . , 252})
+
+
+ a 32 byte key value k[0] ... k[15], r[0] ... r[15]
+
+
+
+ Checks a 32 byte key for compliance with the Poly1305 key requirements, e.g.
+ k[0] ... k[15], r[0] ... r[15] with the required bits in r cleared
+ as per .
+
+ Key.
+ if the key is of the wrong length, or has invalid bits set
+ in the r portion of the key.
+
+
+ Generate a random factor suitable for use with RSA blind signatures
+ as outlined in Chaum's blinding and unblinding as outlined in
+ "Handbook of Applied Cryptography", page 475.
+
+
+ Initialise the factor generator
+
+ @param param the necessary RSA key parameters.
+
+
+ Generate a suitable blind factor for the public key the generator was initialised with.
+
+ @return a random blind factor
+
+
+ an RSA key pair generator.
+
+
+ Choose a random prime value for use with RSA
+ the bit-length of the returned prime
+ the RSA public exponent
+ a prime p, with (p-1) relatively prime to e
+
+
+ CMAC - as specified at www.nuee.nagoya-u.ac.jp/labs/tiwata/omac/omac.html
+
+ CMAC is analogous to OMAC1 - see also en.wikipedia.org/wiki/CMAC
+
+ CMAC is a NIST recomendation - see
+ csrc.nist.gov/CryptoToolkit/modes/800-38_Series_Publications/SP800-38B.pdf
+
+ CMAC/OMAC1 is a blockcipher-based message authentication code designed and
+ analyzed by Tetsu Iwata and Kaoru Kurosawa.
+
+ CMAC/OMAC1 is a simple variant of the CBC MAC (Cipher Block Chaining Message
+ Authentication Code). OMAC stands for One-Key CBC MAC.
+
+ It supports 128- or 64-bits block ciphers, with any key size, and returns
+ a MAC with dimension less or equal to the block size of the underlying
+ cipher.
+
+
+
+ create a standard MAC based on a CBC block cipher (64 or 128 bit block).
+ This will produce an authentication code the length of the block size
+ of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8 and @lt;= 128.
+
+
+ Reset the mac generator.
+
+
+ standard CBC Block Cipher MAC - if no padding is specified the default of
+ pad of zeroes is used.
+
+
+ create a standard MAC based on a CBC block cipher. This will produce an
+ authentication code half the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a CBC block cipher. This will produce an
+ authentication code half the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used to complete the last block.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding the padding to be used to complete the last block.
+
+
+ Reset the mac generator.
+
+
+ implements a Cipher-FeedBack (CFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ create a standard MAC based on a CFB block cipher. This will produce an
+ authentication code half the length of the block size of the cipher, with
+ the CFB mode set to 8 bits.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a CFB block cipher. This will produce an
+ authentication code half the length of the block size of the cipher, with
+ the CFB mode set to 8 bits.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CFB mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param cfbBitSize the size of an output block produced by the CFB mode.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CFB mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param cfbBitSize the size of an output block produced by the CFB mode.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding a padding to be used.
+
+
+ Reset the mac generator.
+
+
+
+ The GMAC specialisation of Galois/Counter mode (GCM) detailed in NIST Special Publication
+ 800-38D.
+
+
+ GMac is an invocation of the GCM mode where no data is encrypted (i.e. all input data to the Mac
+ is processed as additional authenticated data with the underlying GCM block cipher).
+
+
+
+
+ Creates a GMAC based on the operation of a block cipher in GCM mode.
+
+
+ This will produce an authentication code the length of the block size of the cipher.
+
+ the cipher to be used in GCM mode to generate the MAC.
+
+
+
+ Creates a GMAC based on the operation of a 128 bit block cipher in GCM mode.
+
+
+ This will produce an authentication code the length of the block size of the cipher.
+
+ the cipher to be used in GCM mode to generate the MAC.
+ the mac size to generate, in bits. Must be a multiple of 8, between 32 and 128 (inclusive).
+ Sizes less than 96 are not recommended, but are supported for specialized applications.
+
+
+
+ Initialises the GMAC - requires a
+ providing a and a nonce.
+
+
+
+ implementation of GOST 28147-89 MAC
+
+
+ HMAC implementation based on RFC2104
+
+ H(K XOR opad, H(K XOR ipad, text))
+
+
+ Reset the mac generator.
+
+
+ DES based CBC Block Cipher MAC according to ISO9797, algorithm 3 (ANSI X9.19 Retail MAC)
+
+ This could as well be derived from CBCBlockCipherMac, but then the property mac in the base
+ class must be changed to protected
+
+
+ create a Retail-MAC based on a CBC block cipher. This will produce an
+ authentication code of the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation. This must
+ be DESEngine.
+
+
+ create a Retail-MAC based on a CBC block cipher. This will produce an
+ authentication code of the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used to complete the last block.
+
+
+ create a Retail-MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses single DES CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses single DES CBC mode as the basis for the
+ MAC generation. The final block is decrypted and then encrypted using the
+ middle and right part of the key.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding the padding to be used to complete the last block.
+
+
+ Reset the mac generator.
+
+
+
+ Poly1305 message authentication code, designed by D. J. Bernstein.
+
+
+ Poly1305 computes a 128-bit (16 bytes) authenticator, using a 128 bit nonce and a 256 bit key
+ consisting of a 128 bit key applied to an underlying cipher, and a 128 bit key (with 106
+ effective key bits) used in the authenticator.
+
+ The polynomial calculation in this implementation is adapted from the public domain poly1305-donna-unrolled C implementation
+ by Andrew M (@floodyberry).
+
+
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Current block of buffered input
+
+
+ Current offset in input buffer
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Constructs a Poly1305 MAC, where the key passed to init() will be used directly.
+
+
+ Constructs a Poly1305 MAC, using a 128 bit block cipher.
+
+
+
+ Initialises the Poly1305 MAC.
+
+ a {@link ParametersWithIV} containing a 128 bit nonce and a {@link KeyParameter} with
+ a 256 bit key complying to the {@link Poly1305KeyGenerator Poly1305 key format}.
+
+
+
+ Implementation of SipHash as specified in "SipHash: a fast short-input PRF", by Jean-Philippe
+ Aumasson and Daniel J. Bernstein (https://131002.net/siphash/siphash.pdf).
+
+
+ "SipHash is a family of PRFs SipHash-c-d where the integer parameters c and d are the number of
+ compression rounds and the number of finalization rounds. A compression round is identical to a
+ finalization round and this round function is called SipRound. Given a 128-bit key k and a
+ (possibly empty) byte string m, SipHash-c-d returns a 64-bit value..."
+
+
+
+ SipHash-2-4
+
+
+ SipHash-c-d
+ the number of compression rounds
+ the number of finalization rounds
+
+
+
+ Implementation of the Skein parameterised MAC function in 256, 512 and 1024 bit block sizes,
+ based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+
+ Constructs a Skein MAC with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/MAC size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Optionally initialises the Skein digest with the provided parameters.
+
+ See for details on the parameterisation of the Skein hash function.
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+ implements Cipher-Block-Chaining (CBC) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of chaining.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CBC".
+
+
+ return the block size of the underlying cipher.
+
+ @return the block size of the underlying cipher.
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ Do the appropriate chaining step for CBC mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate chaining step for CBC mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the decrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Implements the Counter with Cipher Block Chaining mode (CCM) detailed in
+ NIST Special Publication 800-38C.
+
+ Note : this mode is a packet mode - it needs all the data up front.
+
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Returns a byte array containing the mac calculated as part of the
+ last encrypt or decrypt operation.
+
+ @return the last mac calculated.
+
+
+ Process a packet of data for either CCM decryption or encryption.
+
+ @param in data for processing.
+ @param inOff offset at which data starts in the input array.
+ @param inLen length of the data in the input array.
+ @return a byte array containing the processed input..
+ @throws IllegalStateException if the cipher is not appropriately set up.
+ @throws InvalidCipherTextException if the input data is truncated or the mac check fails.
+
+
+ Process a packet of data for either CCM decryption or encryption.
+
+ @param in data for processing.
+ @param inOff offset at which data starts in the input array.
+ @param inLen length of the data in the input array.
+ @param output output array.
+ @param outOff offset into output array to start putting processed bytes.
+ @return the number of bytes added to output.
+ @throws IllegalStateException if the cipher is not appropriately set up.
+ @throws InvalidCipherTextException if the input data is truncated or the mac check fails.
+ @throws DataLengthException if output buffer too short.
+
+
+ implements a Cipher-FeedBack (CFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ A Cipher Text Stealing (CTS) mode cipher. CTS allows block ciphers to
+ be used to produce cipher text which is the same outLength as the plain text.
+
+
+ Create a buffered block cipher that uses Cipher Text Stealing
+
+ @param cipher the underlying block cipher this buffering object wraps.
+
+
+ return the size of the output buffer required for an update of 'length' bytes.
+
+ @param length the outLength of the input.
+ @return the space required to accommodate a call to update
+ with length bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of length bytes.
+
+ @param length the outLength of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with length bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param length the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if cipher text decrypts wrongly (in
+ case the exception will never Get thrown).
+
+
+ A Two-Pass Authenticated-Encryption Scheme Optimized for Simplicity and
+ Efficiency - by M. Bellare, P. Rogaway, D. Wagner.
+
+ http://www.cs.ucdavis.edu/~rogaway/papers/eax.pdf
+
+ EAX is an AEAD scheme based on CTR and OMAC1/CMAC, that uses a single block
+ cipher to encrypt and authenticate data. It's on-line (the length of a
+ message isn't needed to begin processing it), has good performances, it's
+ simple and provably secure (provided the underlying block cipher is secure).
+
+ Of course, this implementations is NOT thread-safe.
+
+
+ Constructor that accepts an instance of a block cipher engine.
+
+ @param cipher the engine to use
+
+
+
+ Implements the Galois/Counter mode (GCM) detailed in
+ NIST Special Publication 800-38D.
+
+
+
+
+ MAC sizes from 32 bits to 128 bits (must be a multiple of 8) are supported. The default is 128 bits.
+ Sizes less than 96 are not recommended, but are supported for specialized applications.
+
+
+
+ implements the GOST 28147 OFB counter mode (GCTR).
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ counter mode (must have a 64 bit block size).
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param encrypting if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param parameters the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/GCTR"
+ and the block size in bits
+
+
+ return the block size we are operating at (in bytes).
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the feedback vector back to the IV and reset the underlying
+ cipher.
+
+
+
+ A block cipher mode that includes authenticated encryption with a streaming mode
+ and optional associated data.
+
+
+
+ The name of the algorithm this cipher implements.
+
+
+ The block cipher underlying this algorithm.
+
+
+ Initialise the cipher.
+ Parameter can either be an AeadParameters or a ParametersWithIV object.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The block size for this cipher, in bytes.
+
+
+ Add a single byte to the associated data check.
+ If the implementation supports it, this will be an online operation and will not retain the associated data.
+ The byte to be processed.
+
+
+ Add a sequence of bytes to the associated data check.
+ If the implementation supports it, this will be an online operation and will not retain the associated data.
+ The input byte array.
+ The offset into the input array where the data to be processed starts.
+ The number of bytes to be processed.
+
+
+ Encrypt/decrypt a single byte.
+
+ @param input the byte to be processed.
+ @param outBytes the output buffer the processed byte goes into.
+ @param outOff the offset into the output byte array the processed data starts at.
+ @return the number of bytes written to out.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ Process a block of bytes from in putting the result into out.
+
+ @param inBytes the input byte array.
+ @param inOff the offset into the in array where the data to be processed starts.
+ @param len the number of bytes to be processed.
+ @param outBytes the output buffer the processed bytes go into.
+ @param outOff the offset into the output byte array the processed data starts at.
+ @return the number of bytes written to out.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ Finish the operation either appending or verifying the MAC at the end of the data.
+
+ @param outBytes space for any resulting output data.
+ @param outOff offset into out to start copying the data at.
+ @return number of bytes written into out.
+ @throws InvalidOperationException if the cipher is in an inappropriate state.
+ @throws InvalidCipherTextException if the MAC fails to match.
+
+
+ Return the value of the MAC associated with the last stream processed.
+
+ @return MAC for plaintext data.
+
+
+ Return the size of the output buffer required for a ProcessBytes
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to ProcessBytes
+ with len bytes of input.
+
+
+ Return the size of the output buffer required for a ProcessBytes plus a
+ DoFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to ProcessBytes and DoFinal
+ with len bytes of input.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+ An implementation of RFC 7253 on The OCB
+ Authenticated-Encryption Algorithm , licensed per:
+
+ License for
+ Open-Source Software Implementations of OCB (Jan 9, 2013) - 'License 1'
+ Under this license, you are authorized to make, use, and distribute open-source software
+ implementations of OCB. This license terminates for you if you sue someone over their open-source
+ software implementation of OCB claiming that you have a patent covering their implementation.
+
+ This is a non-binding summary of a legal document (the link above). The parameters of the license
+ are specified in the license document and that document is controlling.
+
+
+ implements a Output-FeedBack (OFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/OFB"
+ and the block size in bits
+
+
+ return the block size we are operating at (in bytes).
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the feedback vector back to the IV and reset the underlying
+ cipher.
+
+
+ * Implements OpenPGP's rather strange version of Cipher-FeedBack (CFB) mode
+ * on top of a simple cipher. This class assumes the IV has been prepended
+ * to the data stream already, and just accomodates the reset after
+ * (blockSize + 2) bytes have been read.
+ *
+ * For further info see RFC 2440 .
+ *
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/PGPCFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param parameters the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt one byte of data according to CFB mode.
+ @param data the byte to encrypt
+ @param blockOff offset in the current block
+ @returns the encrypted byte
+
+
+ Do the appropriate processing for CFB IV mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB IV mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Implements the Segmented Integer Counter (SIC) mode on top of a simple
+ block cipher.
+
+
+ Basic constructor.
+
+ @param c the block cipher to be used.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Calculator factory class for signature generation in ASN.1 based profiles that use an AlgorithmIdentifier to preserve
+ signature algorithm details.
+
+
+
+
+ Base constructor.
+
+ The name of the signature algorithm to use.
+ The private key to be used in the signing operation.
+
+
+
+ Constructor which also specifies a source of randomness to be used if one is required.
+
+ The name of the signature algorithm to use.
+ The private key to be used in the signing operation.
+ The source of randomness to be used in signature calculation.
+
+
+
+ Allows enumeration of the signature names supported by the verifier provider.
+
+
+
+
+ Verifier class for signature verification in ASN.1 based profiles that use an AlgorithmIdentifier to preserve
+ signature algorithm details.
+
+
+
+
+ Base constructor.
+
+ The name of the signature algorithm to use.
+ The public key to be used in the verification operation.
+
+
+
+ Provider class which supports dynamic creation of signature verifiers.
+
+
+
+
+ Base constructor - specify the public key to be used in verification.
+
+ The public key to be used in creating verifiers provided by this object.
+
+
+
+ Allows enumeration of the signature names supported by the verifier provider.
+
+
+
+ Block cipher padders are expected to conform to this interface
+
+
+ Initialise the padder.
+
+ @param param parameters, if any required.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+ @exception InvalidCipherTextException if the padding is badly formed
+ or invalid.
+
+
+ A padder that adds ISO10126-2 padding to a block.
+
+
+ Initialise the padder.
+
+ @param random a SecureRandom if available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds the padding according to the scheme referenced in
+ ISO 7814-4 - scheme 2 from ISO 9797-1. The first byte is 0x80, rest is 0x00
+
+
+ Initialise the padder.
+
+ @param random - a SecureRandom if available.
+
+
+ Return the name of the algorithm the padder implements.
+
+ @return the name of the algorithm the padder implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A wrapper class that allows block ciphers to be used to process data in
+ a piecemeal fashion with padding. The PaddedBufferedBlockCipher
+ outputs a block only when the buffer is full and more data is being added,
+ or on a doFinal (unless the current block in the buffer is a pad block).
+ The default padding mechanism used is the one outlined in Pkcs5/Pkcs7.
+
+
+ Create a buffered block cipher with the desired padding.
+
+ @param cipher the underlying block cipher this buffering object wraps.
+ @param padding the padding type.
+
+
+ Create a buffered block cipher Pkcs7 padding
+
+ @param cipher the underlying block cipher this buffering object wraps.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the minimum size of the output buffer required for an update
+ plus a doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer. If the buffer is currently
+ full and padding needs to be added a call to doFinal will produce
+ 2 * GetBlockSize() bytes.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output or we are decrypting and the input is not block size aligned.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+
+
+ A padder that adds Pkcs7/Pkcs5 padding to a block.
+
+
+ Initialise the padder.
+
+ @param random - a SecureRandom if available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds Trailing-Bit-Compliment padding to a block.
+
+ This padding pads the block out compliment of the last bit
+ of the plain text.
+
+
+
+
+ Return the name of the algorithm the cipher implements.
+ the name of the algorithm the cipher implements.
+
+
+
+ Initialise the padder.
+ - a SecureRandom if available.
+
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+ Note: this assumes that the last block of plain text is always
+ passed to it inside in. i.e. if inOff is zero, indicating the
+ entire block is to be overwritten with padding the value of in
+ should be the same as the last block of plain text.
+
+
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds X9.23 padding to a block - if a SecureRandom is
+ passed in random padding is assumed, otherwise padding with zeros is used.
+
+
+ Initialise the padder.
+
+ @param random a SecureRandom if one is available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds Null byte padding to a block.
+
+
+ Return the name of the algorithm the cipher implements.
+
+
+ the name of the algorithm the cipher implements.
+
+
+
+ Initialise the padder.
+
+
+ - a SecureRandom if available.
+
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+
+ return the number of pad bytes present in the block.
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+ @param associatedText associated text, if any
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+ @param associatedText associated text, if any
+
+
+ The minimum bitlength of the private value.
+
+
+ The bitlength of the private value.
+
+
+ Construct without a usage index, this will do a random construction of G.
+
+ @param L desired length of prime P in bits (the effective key size).
+ @param N desired length of prime Q in bits.
+ @param certainty certainty level for prime number generation.
+ @param random the source of randomness to use.
+
+
+ Construct for a specific usage index - this has the effect of using verifiable canonical generation of G.
+
+ @param L desired length of prime P in bits (the effective key size).
+ @param N desired length of prime Q in bits.
+ @param certainty certainty level for prime number generation.
+ @param random the source of randomness to use.
+ @param usageIndex a valid usage index.
+
+
+ return true if the passed in key is a DES-EDE weak key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+ @param length number of bytes making up the key
+
+
+ return true if the passed in key is a DES-EDE weak key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 2/3 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 2 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 3 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ DES has 16 weak keys. This method will check
+ if the given DES key material is weak or semi-weak.
+ Key material that is too short is regarded as weak.
+
+ See "Applied
+ Cryptography" by Bruce Schneier for more information.
+
+ @return true if the given DES key material is weak or semi-weak,
+ false otherwise.
+
+
+ DES Keys use the LSB as the odd parity bit. This can
+ be used to check for corrupt keys.
+
+ @param bytes the byte array to set the parity on.
+
+
+ return the generator - g
+
+
+ return private value limit - l
+
+
+ parameters for Key derivation functions for ISO-18033
+
+
+ parameters for using an integrated cipher in stream mode.
+
+
+ @param derivation the derivation parameter for the KDF function.
+ @param encoding the encoding parameter for the KDF function.
+ @param macKeySize the size of the MAC key (in bits).
+
+
+ @param derivation the derivation parameter for the KDF function.
+ @param encoding the encoding parameter for the KDF function.
+ @param macKeySize the size of the MAC key (in bits).
+ @param cipherKeySize the size of the associated Cipher key (in bits).
+
+
+ parameters for Key derivation functions for IEEE P1363a
+
+
+ Parameters for mask derivation functions.
+
+
+ Parameters for NaccacheStern public private key generation. For details on
+ this cipher, please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Parameters for generating a NaccacheStern KeyPair.
+
+ @param random
+ The source of randomness
+ @param strength
+ The desired strength of the Key in Bits
+ @param certainty
+ the probability that the generated primes are not really prime
+ as integer: 2^(-certainty) is then the probability
+ @param countSmallPrimes
+ How many small key factors are desired
+
+
+ * Parameters for a NaccacheStern KeyPair.
+ *
+ * @param random
+ * The source of randomness
+ * @param strength
+ * The desired strength of the Key in Bits
+ * @param certainty
+ * the probability that the generated primes are not really prime
+ * as integer: 2^(-certainty) is then the probability
+ * @param cntSmallPrimes
+ * How many small key factors are desired
+ * @param debug
+ * Ignored
+
+
+ @return Returns the certainty.
+
+
+ @return Returns the countSmallPrimes.
+
+
+ Public key parameters for NaccacheStern cipher. For details on this cipher,
+ please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ @param privateKey
+
+
+ @return Returns the g.
+
+
+ @return Returns the lowerSigmaBound.
+
+
+ @return Returns the n.
+
+
+ Private key parameters for NaccacheStern cipher. For details on this cipher,
+ please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Constructs a NaccacheSternPrivateKey
+
+ @param g
+ the public enryption parameter g
+ @param n
+ the public modulus n = p*q
+ @param lowerSigmaBound
+ the public lower sigma bound up to which data can be encrypted
+ @param smallPrimes
+ the small primes, of which sigma is constructed in the right
+ order
+ @param phi_n
+ the private modulus phi(n) = (p-1)(q-1)
+
+
+ Cipher parameters with a fixed salt value associated with them.
+
+
+
+ Parameters for the Skein hash function - a series of byte[] strings identified by integer tags.
+
+
+ Parameterised Skein can be used for:
+
+ MAC generation, by providing a key .
+ Randomised hashing, by providing a nonce .
+ A hash function for digital signatures, associating a
+ public key with the message digest.
+ A key derivation function, by providing a
+ key identifier .
+ Personalised hashing, by providing a
+ recommended format or
+ arbitrary personalisation string.
+
+
+
+
+
+
+
+
+ The parameter type for a secret key, supporting MAC or KDF functions: 0
+
+
+
+
+ The parameter type for the Skein configuration block: 4
+
+
+
+
+ The parameter type for a personalisation string: 8
+
+
+
+
+ The parameter type for a public key: 12
+
+
+
+
+ The parameter type for a key identifier string: 16
+
+
+
+
+ The parameter type for a nonce: 20
+
+
+
+
+ The parameter type for the message: 48
+
+
+
+
+ The parameter type for the output transformation: 63
+
+
+
+
+ Obtains a map of type (int) to value (byte[]) for the parameters tracked in this object.
+
+
+
+
+ Obtains the value of the key parameter , or null if not
+ set.
+
+ The key.
+
+
+
+ Obtains the value of the personalisation parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the public key parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the key identifier parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the nonce parameter , or null if
+ not set.
+
+
+
+
+ A builder for .
+
+
+
+
+ Sets a parameters to apply to the Skein hash function.
+
+
+ Parameter types must be in the range 0,5..62, and cannot use the value 48
+ (reserved for message body).
+
+ Parameters with type < 48 are processed before
+ the message content, parameters with type > 48
+ are processed after the message and prior to output.
+
+ the type of the parameter, in the range 5..62.
+ the byte sequence of the parameter.
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Implements the recommended personalisation format for Skein defined in Section 4.11 of
+ the Skein 1.3 specification.
+
+
+ The format is YYYYMMDD email@address distinguisher, encoded to a byte
+ sequence using UTF-8 encoding.
+
+ the date the personalised application of the Skein was defined.
+ the email address of the creation of the personalised application.
+ an arbitrary personalisation string distinguishing the application.
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Constructs a new instance with the parameters provided to this
+ builder.
+
+
+
+
+ Parameters for tweakable block ciphers.
+
+
+
+
+ Gets the key.
+
+ the key to use, or null to use the current key.
+
+
+
+ Gets the tweak value.
+
+ The tweak to use, or null to use the current tweak.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ true if the internal state represents the signature described in the passed in array.
+
+
+ Reset the internal state
+
+
+ The Digital Signature Algorithm - as described in "Handbook of Applied
+ Cryptography", pages 452 - 453.
+
+
+ Default configuration, random K values.
+
+
+ Configuration with an alternate, possibly deterministic calculator of K.
+
+ @param kCalculator a K value calculator.
+
+
+ Generate a signature for the given message using the key we were
+ initialised with. For conventional DSA the message should be a SHA-1
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a DSA signature for
+ the passed in message for standard DSA the message should be a
+ SHA-1 hash of the real message to be verified.
+
+
+ EC-DSA as described in X9.62
+
+
+ Default configuration, random K values.
+
+
+ Configuration with an alternate, possibly deterministic calculator of K.
+
+ @param kCalculator a K value calculator.
+
+
+ Generate a signature for the given message using the key we were
+ initialised with. For conventional DSA the message should be a SHA-1
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a DSA signature for
+ the passed in message (for standard DSA the message should be
+ a SHA-1 hash of the real message to be verified).
+
+
+ GOST R 34.10-2001 Signature Algorithm
+
+
+ generate a signature for the given message using the key we were
+ initialised with. For conventional GOST3410 the message should be a GOST3411
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a GOST3410 signature for
+ the passed in message (for standard GOST3410 the message should be
+ a GOST3411 hash of the real message to be verified).
+
+
+ EC-NR as described in IEEE 1363-2000
+
+
+ generate a signature for the given message using the key we were
+ initialised with. Generally, the order of the curve should be at
+ least as long as the hash of the message of interest, and with
+ ECNR it *must* be at least as long.
+
+ @param digest the digest to be signed.
+ @exception DataLengthException if the digest is longer than the key allows
+
+
+ return true if the value r and s represent a signature for the
+ message passed in. Generally, the order of the curve should be at
+ least as long as the hash of the message of interest, and with
+ ECNR, it *must* be at least as long. But just in case the signer
+ applied mod(n) to the longer digest, this implementation will
+ apply mod(n) during verification.
+
+ @param digest the digest to be verified.
+ @param r the r value of the signature.
+ @param s the s value of the signature.
+ @exception DataLengthException if the digest is longer than the key allows
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ true if the internal state represents the signature described in the passed in array.
+
+
+ Reset the internal state
+
+
+ Gost R 34.10-94 Signature Algorithm
+
+
+ generate a signature for the given message using the key we were
+ initialised with. For conventional Gost3410 the message should be a Gost3411
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a Gost3410 signature for
+ the passed in message for standard Gost3410 the message should be a
+ Gost3411 hash of the real message to be verified.
+
+
+ initialise the signer for signing or verification.
+
+ @param forSigning
+ true if for signing, false otherwise
+ @param parameters
+ necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using the key
+ we were initialised with.
+
+
+ return true if the internal state represents the signature described in
+ the passed in array.
+
+
+ A deterministic K calculator based on the algorithm in section 3.2 of RFC 6979.
+
+
+ Base constructor.
+
+ @param digest digest to build the HMAC on.
+
+
+ Interface define calculators of K values for DSA/ECDSA.
+
+
+ Return true if this calculator is deterministic, false otherwise.
+
+ @return true if deterministic, otherwise false.
+
+
+ Non-deterministic initialiser.
+
+ @param n the order of the DSA group.
+ @param random a source of randomness.
+
+
+ Deterministic initialiser.
+
+ @param n the order of the DSA group.
+ @param d the DSA private value.
+ @param message the message being signed.
+
+
+ Return the next valid value of K.
+
+ @return a K value.
+
+
+ ISO9796-2 - mechanism using a hash function with recovery (scheme 2 and 3).
+
+ Note: the usual length for the salt is the length of the hash
+ function used in bytes.
+
+
+
+
+ Return a reference to the recoveredMessage message.
+
+ The full/partial recoveredMessage message.
+
+
+
+
+ Generate a signer with either implicit or explicit trailers for ISO9796-2, scheme 2 or 3.
+
+ base cipher to use for signature creation/verification
+ digest to use.
+ length of salt in bytes.
+ whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+
+ cipher to use.
+
+ digest to sign with.
+
+ length of salt in bytes.
+
+
+
+ Initialise the signer.
+ true if for signing, false if for verification.
+ parameters for signature generation/verification. If the
+ parameters are for generation they should be a ParametersWithRandom,
+ a ParametersWithSalt, or just an RsaKeyParameters object. If RsaKeyParameters
+ are passed in a SecureRandom will be created.
+
+ if wrong parameter type or a fixed
+ salt is passed in which is the wrong length.
+
+
+
+ compare two byte arrays - constant time.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+ Return true if the full message was recoveredMessage.
+
+ true on full message recovery, false otherwise, or if not sure.
+
+
+
+ int to octet string.
+ int to octet string.
+
+
+ long to octet string.
+
+
+ mask generator function, as described in Pkcs1v2.
+
+
+ ISO9796-2 - mechanism using a hash function with recovery (scheme 1)
+
+
+
+ Return a reference to the recoveredMessage message.
+
+ The full/partial recoveredMessage message.
+
+
+
+
+ Generate a signer with either implicit or explicit trailers for ISO9796-2.
+
+ base cipher to use for signature creation/verification
+ digest to use.
+ whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+
+ cipher to use.
+
+ digest to sign with.
+
+
+
+ compare two byte arrays - constant time.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+ Return true if the full message was recoveredMessage.
+
+ true on full message recovery, false otherwise.
+
+
+
+ RSA-PSS as described in Pkcs# 1 v 2.1.
+
+ Note: the usual value for the salt length is the number of
+ bytes in the hash function.
+
+
+
+ Basic constructor
+ the asymmetric cipher to use.
+ the digest to use.
+ the length of the salt to use (in bytes).
+
+
+ Basic constructor
+ the asymmetric cipher to use.
+ the digest to use.
+ the fixed salt to be used.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+
+ int to octet string.
+
+
+ mask generator function, as described in Pkcs1v2.
+
+
+
+ Load oid table.
+
+
+
+ Initialise the signer for signing or verification.
+
+ @param forSigning true if for signing, false otherwise
+ @param param necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+ X9.31-1998 - signing using a hash.
+
+ The message digest hash, H, is encapsulated to form a byte string as follows
+
+
+ EB = 06 || PS || 0xBA || H || TRAILER
+
+ where PS is a string of bytes all of value 0xBB of length such that |EB|=|n|, and TRAILER is the ISO/IEC 10118 part number†for the digest. The byte string, EB, is converted to an integer value, the message representative, f.
+
+
+ Generate a signer with either implicit or explicit trailers for X9.31.
+
+ @param cipher base cipher to use for signature creation/verification
+ @param digest digest to use.
+ @param implicit whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+ @param cipher cipher to use.
+ @param digest digest to sign with.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RFC 5246 7.2
+
+
+
+ This message notifies the recipient that the sender will not send any more messages on this
+ connection. Note that as of TLS 1.1, failure to properly close a connection no longer
+ requires that a session not be resumed. This is a change from TLS 1.0 ("The session becomes
+ unresumable if any connection is terminated without proper close_notify messages with level
+ equal to warning.") to conform with widespread implementation practice.
+
+
+ An inappropriate message was received. This alert is always fatal and should never be
+ observed in communication between proper implementations.
+
+
+ This alert is returned if a record is received with an incorrect MAC. This alert also MUST be
+ returned if an alert is sent because a TLSCiphertext decrypted in an invalid way: either it
+ wasn't an even multiple of the block length, or its padding values, when checked, weren't
+ correct. This message is always fatal and should never be observed in communication between
+ proper implementations (except when messages were corrupted in the network).
+
+
+ This alert was used in some earlier versions of TLS, and may have permitted certain attacks
+ against the CBC mode [CBCATT]. It MUST NOT be sent by compliant implementations.
+
+
+ A TLSCiphertext record was received that had a length more than 2^14+2048 bytes, or a record
+ decrypted to a TLSCompressed record with more than 2^14+1024 bytes. This message is always
+ fatal and should never be observed in communication between proper implementations (except
+ when messages were corrupted in the network).
+
+
+ The decompression function received improper input (e.g., data that would expand to excessive
+ length). This message is always fatal and should never be observed in communication between
+ proper implementations.
+
+
+ Reception of a handshake_failure alert message indicates that the sender was unable to
+ negotiate an acceptable set of security parameters given the options available. This is a
+ fatal error.
+
+
+ This alert was used in SSLv3 but not any version of TLS. It MUST NOT be sent by compliant
+ implementations.
+
+
+ A certificate was corrupt, contained signatures that did not verify correctly, etc.
+
+
+ A certificate was of an unsupported type.
+
+
+ A certificate was revoked by its signer.
+
+
+ A certificate has expired or is not currently valid.
+
+
+ Some other (unspecified) issue arose in processing the certificate, rendering it
+ unacceptable.
+
+
+ A field in the handshake was out of range or inconsistent with other fields. This message is
+ always fatal.
+
+
+ A valid certificate chain or partial chain was received, but the certificate was not accepted
+ because the CA certificate could not be located or couldn't be matched with a known, trusted
+ CA. This message is always fatal.
+
+
+ A valid certificate was received, but when access control was applied, the sender decided not
+ to proceed with negotiation. This message is always fatal.
+
+
+ A message could not be decoded because some field was out of the specified range or the
+ length of the message was incorrect. This message is always fatal and should never be
+ observed in communication between proper implementations (except when messages were corrupted
+ in the network).
+
+
+ A handshake cryptographic operation failed, including being unable to correctly verify a
+ signature or validate a Finished message. This message is always fatal.
+
+
+ This alert was used in some earlier versions of TLS. It MUST NOT be sent by compliant
+ implementations.
+
+
+ The protocol version the client has attempted to negotiate is recognized but not supported.
+ (For example, old protocol versions might be avoided for security reasons.) This message is
+ always fatal.
+
+
+ Returned instead of handshake_failure when a negotiation has failed specifically because the
+ server requires ciphers more secure than those supported by the client. This message is
+ always fatal.
+
+
+ An internal error unrelated to the peer or the correctness of the protocol (such as a memory
+ allocation failure) makes it impossible to continue. This message is always fatal.
+
+
+ This handshake is being canceled for some reason unrelated to a protocol failure. If the user
+ cancels an operation after the handshake is complete, just closing the connection by sending
+ a close_notify is more appropriate. This alert should be followed by a close_notify. This
+ message is generally a warning.
+
+
+ Sent by the client in response to a hello request or by the server in response to a client
+ hello after initial handshaking. Either of these would normally lead to renegotiation; when
+ that is not appropriate, the recipient should respond with this alert. At that point, the
+ original requester can decide whether to proceed with the connection. One case where this
+ would be appropriate is where a server has spawned a process to satisfy a request; the
+ process might receive security parameters (key length, authentication, etc.) at startup, and
+ it might be difficult to communicate changes to these parameters after that point. This
+ message is always a warning.
+
+
+ Sent by clients that receive an extended server hello containing an extension that they did
+ not put in the corresponding client hello. This message is always fatal.
+
+
+ This alert is sent by servers who are unable to retrieve a certificate chain from the URL
+ supplied by the client (see Section 3.3). This message MAY be fatal - for example if client
+ authentication is required by the server for the handshake to continue and the server is
+ unable to retrieve the certificate chain, it may send a fatal alert.
+
+
+ This alert is sent by servers that receive a server_name extension request, but do not
+ recognize the server name. This message MAY be fatal.
+
+
+ This alert is sent by clients that receive an invalid certificate status response (see
+ Section 3.6). This message is always fatal.
+
+
+ This alert is sent by servers when a certificate hash does not match a client provided
+ certificate_hash. This message is always fatal.
+
+
+ If the server does not recognize the PSK identity, it MAY respond with an
+ "unknown_psk_identity" alert message.
+
+
+ If TLS_FALLBACK_SCSV appears in ClientHello.cipher_suites and the highest protocol version
+ supported by the server is higher than the version indicated in ClientHello.client_version,
+ the server MUST respond with an inappropriate_fallback alert.
+
+
+
+ RFC 5246 7.2
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+ A queue for bytes.
+
+ This file could be more optimized.
+
+
+
+
+ The smallest number which can be written as 2^x which is bigger than i.
+
+
+ The initial size for our buffer.
+
+
+ The buffer where we store our data.
+
+
+ How many bytes at the beginning of the buffer are skipped.
+
+
+ How many bytes in the buffer are valid data.
+
+
+ Read data from the buffer.
+ The buffer where the read data will be copied to.
+ How many bytes to skip at the beginning of buf.
+ How many bytes to read at all.
+ How many bytes from our data to skip.
+
+
+ Add some data to our buffer.
+ A byte-array to read data from.
+ How many bytes to skip at the beginning of the array.
+ How many bytes to read from the array.
+
+
+ Remove some bytes from our data from the beginning.
+ How many bytes to remove.
+
+
+ The number of bytes which are available in this buffer.
+
+
+ Parsing and encoding of a Certificate struct from RFC 4346.
+
+
+ opaque ASN.1Cert<2^24-1>;
+
+ struct {
+ ASN.1Cert certificate_list<0..2^24-1>;
+ } Certificate;
+
+
+ @see Org.BouncyCastle.Asn1.X509.X509CertificateStructure
+
+
+ The certificates.
+
+
+ @return an array of {@link org.bouncycastle.asn1.x509.Certificate} representing a certificate
+ chain.
+
+
+ @return true if this certificate chain contains no certificates, or
+ false otherwise.
+
+
+ Encode this {@link Certificate} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link Certificate} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link Certificate} object.
+ @throws IOException
+
+
+ Parsing and encoding of a CertificateRequest struct from RFC 4346.
+
+
+ struct {
+ ClientCertificateType certificate_types<1..2^8-1>;
+ DistinguishedName certificate_authorities<3..2^16-1>
+ } CertificateRequest;
+
+
+ @see ClientCertificateType
+ @see X509Name
+
+
+ @param certificateTypes see {@link ClientCertificateType} for valid constants.
+ @param certificateAuthorities an {@link IList} of {@link X509Name}.
+
+
+ @return an array of certificate types
+ @see {@link ClientCertificateType}
+
+
+ @return an {@link IList} of {@link SignatureAndHashAlgorithm} (or null before TLS 1.2).
+
+
+ @return an {@link IList} of {@link X509Name}
+
+
+ Encode this {@link CertificateRequest} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateRequest} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateRequest} object.
+ @throws IOException
+
+
+ Encode this {@link CertificateStatus} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateStatus} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateStatus} object.
+ @throws IOException
+
+
+ Encode this {@link CertificateStatusRequest} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateStatusRequest} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateStatusRequest} object.
+ @throws IOException
+
+
+ @param type
+ see {@link CertChainType} for valid constants.
+ @param urlAndHashList
+ a {@link IList} of {@link UrlAndHash}.
+
+
+ @return {@link CertChainType}
+
+
+ @return an {@link IList} of {@link UrlAndHash}
+
+
+ Encode this {@link CertificateUrl} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateUrl} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateUrl} object.
+ @throws IOException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RFC 2246 A.5
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ A combined hash, which implements md5(m) || sha1(m).
+
+
+ @see org.bouncycastle.crypto.Digest#update(byte[], int, int)
+
+
+ @see org.bouncycastle.crypto.Digest#doFinal(byte[], int)
+
+
+ @see org.bouncycastle.crypto.Digest#reset()
+
+
+
+ RFC 2246 6.1
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 2246 6.2.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Accept only the group parameters specified in RFC 5054 Appendix A.
+
+
+ Specify a custom set of acceptable group parameters.
+
+ @param groups a {@link Vector} of acceptable {@link SRP6GroupParameters}
+
+
+ Buffers input until the hash algorithm is determined.
+
+
+ @return a {@link SignatureAndHashAlgorithm} (or null before TLS 1.2).
+
+
+ Encode this {@link DigitallySigned} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link DigitallySigned} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link DigitallySigned} object.
+ @throws IOException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Check that there are no "extra" messages left in the current inbound flight
+
+
+ RFC 4347 4.1.2.5 Anti-replay
+
+ Support fast rejection of duplicate records by maintaining a sliding receive window
+
+
+ Check whether a received record with the given sequence number should be rejected as a duplicate.
+
+ @param seq the 48-bit DTLSPlainText.sequence_number field of a received record.
+ @return true if the record should be discarded without further processing.
+
+
+ Report that a received record with the given sequence number passed authentication checks.
+
+ @param seq the 48-bit DTLSPlainText.sequence_number field of an authenticated record.
+
+
+ When a new epoch begins, sequence numbers begin again at 0
+
+
+ RFC 4492 5.4. (Errata ID: 2389)
+
+
+
+ RFC 4492 5.4
+
+
+
+ Indicates the elliptic curve domain parameters are conveyed verbosely, and the
+ underlying finite field is a prime field.
+
+
+ Indicates the elliptic curve domain parameters are conveyed verbosely, and the
+ underlying finite field is a characteristic-2 field.
+
+
+ Indicates that a named curve is used. This option SHOULD be used when applicable.
+
+
+
+ RFC 4492 5.1.2
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 5705
+
+
+ RFC 5246 7.4.1.4.1
+
+
+ Encode this {@link HeartbeatExtension} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link HeartbeatExtension} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link HeartbeatExtension} object.
+ @throws IOException
+
+
+ Encode this {@link HeartbeatMessage} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link HeartbeatMessage} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link HeartbeatMessage} object.
+ @throws IOException
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+ RFC 4492 5.1.1
+ The named curves defined here are those specified in SEC 2 [13]. Note that many of
+ these curves are also recommended in ANSI X9.62 [7] and FIPS 186-2 [11]. Values 0xFE00
+ through 0xFEFF are reserved for private use. Values 0xFF01 and 0xFF02 indicate that the
+ client supports arbitrary prime and characteristic-2 curves, respectively (the curve
+ parameters must be encoded explicitly in ECParameters).
+
+
+
+ Encode this {@link NewSessionTicket} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link NewSessionTicket} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link NewSessionTicket} object.
+ @throws IOException
+
+
+ RFC 3546 3.6
+
+
+ @param responderIDList
+ an {@link IList} of {@link ResponderID}, specifying the list of trusted OCSP
+ responders. An empty list has the special meaning that the responders are
+ implicitly known to the server - e.g., by prior arrangement.
+ @param requestExtensions
+ OCSP request extensions. A null value means that there are no extensions.
+
+
+ @return an {@link IList} of {@link ResponderID}
+
+
+ @return OCSP request extensions
+
+
+ Encode this {@link OcspStatusRequest} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link OcspStatusRequest} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return an {@link OcspStatusRequest} object.
+ @throws IOException
+
+
+ RFC 5246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+
+
+ An implementation of the TLS 1.0/1.1/1.2 record layer, allowing downgrade to SSLv3.
+
+
+ RFC 5246 E.1. "Earlier versions of the TLS specification were not fully clear on what the
+ record layer version number (TLSPlaintext.version) should contain when sending ClientHello
+ (i.e., before it is known which version of the protocol will be employed). Thus, TLS servers
+ compliant with this specification MUST accept any value {03,XX} as the record layer version
+ number for ClientHello."
+
+
+ @return {@link ConnectionEnd}
+
+
+ @return {@link CipherSuite}
+
+
+ @return {@link CompressionMethod}
+
+
+ @return {@link PRFAlgorithm}
+
+
+ Encode this {@link ServerDHParams} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerDHParams} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerDHParams} object.
+ @throws IOException
+
+
+ Encode this {@link ServerName} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerName} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerName} object.
+ @throws IOException
+
+
+ @param serverNameList an {@link IList} of {@link ServerName}.
+
+
+ @return an {@link IList} of {@link ServerName}.
+
+
+ Encode this {@link ServerNameList} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerNameList} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerNameList} object.
+ @throws IOException
+
+
+ Encode this {@link ServerSRPParams} to an {@link OutputStream}.
+
+ @param output
+ the {@link OutputStream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerSRPParams} from an {@link InputStream}.
+
+ @param input
+ the {@link InputStream} to parse from.
+ @return a {@link ServerSRPParams} object.
+ @throws IOException
+
+
+ RFC 5246 7.4.1.4.1 (in RFC 2246, there were no specific values assigned)
+
+
+ RFC 5246 7.4.1.4.1
+
+
+ @param hash {@link HashAlgorithm}
+ @param signature {@link SignatureAlgorithm}
+
+
+ @return {@link HashAlgorithm}
+
+
+ @return {@link SignatureAlgorithm}
+
+
+ Encode this {@link SignatureAndHashAlgorithm} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link SignatureAndHashAlgorithm} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link SignatureAndHashAlgorithm} object.
+ @throws IOException
+
+
+ An implementation of {@link TlsSRPIdentityManager} that simulates the existence of "unknown" identities
+ to obscure the fact that there is no verifier for them.
+
+
+ Create a {@link SimulatedTlsSRPIdentityManager} that implements the algorithm from RFC 5054 2.5.1.3
+
+ @param group the {@link SRP6GroupParameters} defining the group that SRP is operating in
+ @param seedKey the secret "seed key" referred to in RFC 5054 2.5.1.3
+ @return an instance of {@link SimulatedTlsSRPIdentityManager}
+
+
+ HMAC implementation based on original internet draft for HMAC (RFC 2104)
+
+ The difference is that padding is concatentated versus XORed with the key
+
+ H(K + opad, H(K + ipad, text))
+
+
+ Base constructor for one of the standard digest algorithms that the byteLength of
+ the algorithm is know for. Behaviour is undefined for digests other than MD5 or SHA1.
+
+ @param digest the digest.
+
+
+ Reset the mac generator.
+
+
+ RFC 4680
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called by the protocol handler to report the server certificate.
+
+
+ This method is responsible for certificate verification and validation
+
+ The server received
+
+
+
+
+ Return client credentials in response to server's certificate request
+
+
+ A containing server certificate request details
+
+
+ A to be used for client authentication
+ (or null for no client authentication)
+
+
+
+
+
+ A generic TLS 1.0-1.2 / SSLv3 block cipher. This can be used for AES or 3DES for example.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called at the start of a new TLS session, before any other methods.
+
+
+ A
+
+
+
+ Return the session this client wants to resume, if any.
+ Note that the peer's certificate chain for the session (if any) may need to be periodically revalidated.
+
+ A representing the resumable session to be used for this connection,
+ or null to use a new session.
+
+
+
+
+ Return the to use for the TLSPlaintext.version field prior to
+ receiving the server version. NOTE: This method is not called for DTLS.
+
+
+ See RFC 5246 E.1.: "TLS clients that wish to negotiate with older servers MAY send any value
+ {03,XX} as the record layer version number. Typical values would be {03,00}, the lowest
+ version number supported by the client, and the value of ClientHello.client_version. No
+ single value will guarantee interoperability with all old servers, but this is a complex
+ topic beyond the scope of this document."
+
+ The to use.
+
+
+
+ Get the list of cipher suites that this client supports.
+
+
+ An array of values, each specifying a supported cipher suite.
+
+
+
+
+ Get the list of compression methods that this client supports.
+
+
+ An array of values, each specifying a supported compression method.
+
+
+
+
+ Get the (optional) table of client extensions to be included in (extended) client hello.
+
+
+ A (Int32 -> byte[]). May be null.
+
+
+
+
+
+
+
+
+ Notifies the client of the session_id sent in the ServerHello.
+
+ An array of
+
+
+
+ Report the cipher suite that was selected by the server.
+
+
+ The protocol handler validates this value against the offered cipher suites
+
+
+
+ A
+
+
+
+
+ Report the compression method that was selected by the server.
+
+
+ The protocol handler validates this value against the offered compression methods
+
+
+
+ A
+
+
+
+
+ Report the extensions from an extended server hello.
+
+
+ Will only be called if we returned a non-null result from .
+
+
+ A (Int32 -> byte[])
+
+
+
+ A list of
+
+
+
+
+ Return an implementation of to negotiate the key exchange
+ part of the protocol.
+
+
+ A
+
+
+
+
+
+ Return an implementation of to handle authentication
+ part of the protocol.
+
+
+
+
+ A list of
+
+
+
+ RFC 5077 3.3. NewSessionTicket Handshake Message
+
+ This method will be called (only) when a NewSessionTicket handshake message is received. The
+ ticket is opaque to the client and clients MUST NOT examine the ticket under the assumption
+ that it complies with e.g. RFC 5077 4. Recommended Ticket Construction .
+
+ The ticket
+
+
+
+ Constructor for blocking mode.
+ @param stream The bi-directional stream of data to/from the server
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for blocking mode.
+ @param input The stream of data from the server
+ @param output The stream of data to the server
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for non-blocking mode.
+
+ When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to
+ provide the received ciphertext, then use
+ {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+
+ Similarly, when data needs to be sent, use
+ {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use
+ {@link #readOutput(byte[], int, int)} to get the corresponding
+ ciphertext.
+
+ @param secureRandom
+ Random number generator for various cryptographic functions
+
+
+ Initiates a TLS handshake in the role of client.
+
+ In blocking mode, this will not return until the handshake is complete.
+ In non-blocking mode, use {@link TlsPeer#NotifyHandshakeComplete()} to
+ receive a callback when the handshake is complete.
+
+ @param tlsClient The {@link TlsClient} to use for the handshake.
+ @throws IOException If in blocking mode and handshake was not successful.
+
+
+ Used to get the resumable session, if any, used by this connection. Only available after the
+ handshake has successfully completed.
+
+ @return A {@link TlsSession} representing the resumable session used by this connection, or
+ null if no resumable session available.
+ @see TlsPeer#NotifyHandshakeComplete()
+
+
+ Export keying material according to RFC 5705: "Keying Material Exporters for TLS".
+
+ @param asciiLabel indicates which application will use the exported keys.
+ @param context_value allows the application using the exporter to mix its own data with the TLS PRF for
+ the exporter output.
+ @param length the number of bytes to generate
+ @return a pseudorandom bit string of 'length' bytes generated from the master_secret.
+
+
+ (D)TLS DH key exchange.
+
+
+ (D)TLS ECDH key exchange (see RFC 4492).
+
+
+ (D)TLS ECDHE key exchange (see RFC 4492).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A generic interface for key exchange implementations in (D)TLS.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A generic TLS MAC implementation, acting as an HMAC based on some underlying Digest.
+
+
+
+ Generate a new instance of an TlsMac.
+
+ @param context the TLS client context
+ @param digest The digest to use.
+ @param key A byte-array where the key for this MAC is located.
+ @param keyOff The number of bytes to skip, before the key starts in the buffer.
+ @param keyLen The length of the key.
+
+
+ @return the MAC write secret
+
+
+ @return The output length of this MAC.
+
+
+ Calculate the MAC for some given data.
+
+ @param type The message type of the message.
+ @param message A byte-buffer containing the message.
+ @param offset The number of bytes to skip, before the message starts.
+ @param length The length of the message.
+ @return A new byte-buffer containing the MAC value.
+
+
+
+ A NULL CipherSuite, with optional MAC.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ draft-mathewson-no-gmtunixtime-00 2. "If existing users of a TLS implementation may rely on
+ gmt_unix_time containing the current time, we recommend that implementors MAY provide the
+ ability to set gmt_unix_time as an option only, off by default."
+
+
+ true if the current time should be used in the gmt_unix_time field of
+ Random, or false if gmt_unix_time should contain a cryptographically
+ random value.
+
+
+
+
+ Report whether the server supports secure renegotiation
+
+
+ The protocol handler automatically processes the relevant extensions
+
+
+ A , true if the server supports secure renegotiation
+
+
+
+
+
+ Return an implementation of to handle record compression.
+
+ A
+
+
+
+
+ Return an implementation of to use for encryption/decryption.
+
+ A
+
+
+
+ This method will be called when an alert is raised by the protocol.
+
+
+ A human-readable message explaining what caused this alert. May be null.
+ The Exception that caused this alert to be raised. May be null.
+
+
+ This method will be called when an alert is received from the remote peer.
+
+
+
+
+ Notifies the peer that the handshake has been successfully completed.
+
+
+
+ This method is called, when a change cipher spec message is received.
+
+ @throws IOException If the message has an invalid content or the handshake is not in the correct
+ state.
+
+
+ Read data from the network. The method will return immediately, if there is still some data
+ left in the buffer, or block until some application data has been read from the network.
+
+ @param buf The buffer where the data will be copied to.
+ @param offset The position where the data will be placed in the buffer.
+ @param len The maximum number of bytes to read.
+ @return The number of bytes read.
+ @throws IOException If something goes wrong during reading data.
+
+
+ Send some application data to the remote system.
+
+ The method will handle fragmentation internally.
+
+ @param buf The buffer with the data.
+ @param offset The position in the buffer where the data is placed.
+ @param len The length of the data.
+ @throws IOException If something goes wrong during sending.
+
+
+ The secure bidirectional stream for this connection
+ Only allowed in blocking mode.
+
+
+ Offer input from an arbitrary source. Only allowed in non-blocking mode.
+
+ After this method returns, the input buffer is "owned" by this object. Other code
+ must not attempt to do anything with it.
+
+ This method will decrypt and process all records that are fully available.
+ If only part of a record is available, the buffer will be retained until the
+ remainder of the record is offered.
+
+ If any records containing application data were processed, the decrypted data
+ can be obtained using {@link #readInput(byte[], int, int)}. If any records
+ containing protocol data were processed, a response may have been generated.
+ You should always check to see if there is any available output after calling
+ this method by calling {@link #getAvailableOutputBytes()}.
+ @param input The input buffer to offer
+ @throws IOException If an error occurs while decrypting or processing a record
+
+
+ Gets the amount of received application data. A call to {@link #readInput(byte[], int, int)}
+ is guaranteed to be able to return at least this much data.
+
+ Only allowed in non-blocking mode.
+ @return The number of bytes of available application data
+
+
+ Retrieves received application data. Use {@link #getAvailableInputBytes()} to check
+ how much application data is currently available. This method functions similarly to
+ {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data
+ is available, nothing will be copied and zero will be returned.
+
+ Only allowed in non-blocking mode.
+ @param buffer The buffer to hold the application data
+ @param offset The start offset in the buffer at which the data is written
+ @param length The maximum number of bytes to read
+ @return The total number of bytes copied to the buffer. May be less than the
+ length specified if the length was greater than the amount of available data.
+
+
+ Offer output from an arbitrary source. Only allowed in non-blocking mode.
+
+ After this method returns, the specified section of the buffer will have been
+ processed. Use {@link #readOutput(byte[], int, int)} to get the bytes to
+ transmit to the other peer.
+
+ This method must not be called until after the handshake is complete! Attempting
+ to call it before the handshake is complete will result in an exception.
+ @param buffer The buffer containing application data to encrypt
+ @param offset The offset at which to begin reading data
+ @param length The number of bytes of data to read
+ @throws IOException If an error occurs encrypting the data, or the handshake is not complete
+
+
+ Gets the amount of encrypted data available to be sent. A call to
+ {@link #readOutput(byte[], int, int)} is guaranteed to be able to return at
+ least this much data.
+
+ Only allowed in non-blocking mode.
+ @return The number of bytes of available encrypted data
+
+
+ Retrieves encrypted data to be sent. Use {@link #getAvailableOutputBytes()} to check
+ how much encrypted data is currently available. This method functions similarly to
+ {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data
+ is available, nothing will be copied and zero will be returned.
+
+ Only allowed in non-blocking mode.
+ @param buffer The buffer to hold the encrypted data
+ @param offset The start offset in the buffer at which the data is written
+ @param length The maximum number of bytes to read
+ @return The total number of bytes copied to the buffer. May be less than the
+ length specified if the length was greater than the amount of available data.
+
+
+ Terminate this connection with an alert. Can be used for normal closure too.
+
+ @param alertLevel
+ See {@link AlertLevel} for values.
+ @param alertDescription
+ See {@link AlertDescription} for values.
+ @throws IOException
+ If alert was fatal.
+
+
+ Closes this connection.
+
+ @throws IOException If something goes wrong during closing.
+
+
+ Make sure the InputStream 'buf' now empty. Fail otherwise.
+
+ @param buf The InputStream to check.
+ @throws IOException If 'buf' is not empty.
+
+
+ 'sender' only relevant to SSLv3
+
+
+ Both streams can be the same object
+
+
+ (D)TLS PSK key exchange (RFC 4279).
+
+
+ (D)TLS and SSLv3 RSA key exchange.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A (Int32 -> byte[]). Will never be null.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get the (optional) table of server extensions to be included in (extended) server hello.
+
+
+ A (Int32 -> byte[]). May be null.
+
+
+
+
+
+ A ( ). May be null.
+
+
+
+
+
+
+
+
+ This method will be called (only) if the server included an extension of type
+ "status_request" with empty "extension_data" in the extended server hello. See RFC 3546
+ 3.6. Certificate Status Request . If a non-null is returned, it
+ is sent to the client as a handshake message of type "certificate_status".
+
+ A to be sent to the client (or null for none).
+
+
+
+
+
+
+
+
+
+ ( )
+
+
+
+
+ Called by the protocol handler to report the client certificate, only if GetCertificateRequest
+ returned non-null.
+
+ Note: this method is responsible for certificate verification and validation.
+ the effective client certificate (may be an empty chain).
+
+
+
+ RFC 5077 3.3. NewSessionTicket Handshake Message.
+
+ This method will be called (only) if a NewSessionTicket extension was sent by the server. See
+ RFC 5077 4. Recommended Ticket Construction for recommended format and protection.
+
+ The ticket )
+
+
+
+ Constructor for blocking mode.
+ @param stream The bi-directional stream of data to/from the client
+ @param output The stream of data to the client
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for blocking mode.
+ @param input The stream of data from the client
+ @param output The stream of data to the client
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for non-blocking mode.
+
+ When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to
+ provide the received ciphertext, then use
+ {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+
+ Similarly, when data needs to be sent, use
+ {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use
+ {@link #readOutput(byte[], int, int)} to get the corresponding
+ ciphertext.
+
+ @param secureRandom
+ Random number generator for various cryptographic functions
+
+
+ Receives a TLS handshake in the role of server.
+
+ In blocking mode, this will not return until the handshake is complete.
+ In non-blocking mode, use {@link TlsPeer#notifyHandshakeComplete()} to
+ receive a callback when the handshake is complete.
+
+ @param tlsServer
+ @throws IOException If in blocking mode and handshake was not successful.
+
+
+
+
+
+ Check whether the given SRP group parameters are acceptable for use.
+
+ @param group the {@link SRP6GroupParameters} to check
+ @return true if (and only if) the specified group parameters are acceptable
+
+
+ Lookup the {@link TlsSRPLoginParameters} corresponding to the specified identity.
+
+ NOTE: To avoid "identity probing", unknown identities SHOULD be handled as recommended in RFC
+ 5054 2.5.1.3. {@link SimulatedTlsSRPIdentityManager} is provided for this purpose.
+
+ @param identity
+ the SRP identity sent by the connecting client
+ @return the {@link TlsSRPLoginParameters} for the specified identity, or else 'simulated'
+ parameters if the identity is not recognized. A null value is also allowed, but not
+ recommended.
+
+
+ (D)TLS SRP key exchange (RFC 5054).
+
+
+ RFC 5764 DTLS Extension to Establish Keys for SRTP.
+
+
+
+
+
+
+
+
+
+
+
+ Some helper functions for MicroTLS.
+
+
+ Add a 'signature_algorithms' extension to existing extensions.
+
+ @param extensions A {@link Hashtable} to add the extension to.
+ @param supportedSignatureAlgorithms {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @throws IOException
+
+
+ Get a 'signature_algorithms' extension from extensions.
+
+ @param extensions A {@link Hashtable} to get the extension from, if it is present.
+ @return A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}, or null.
+ @throws IOException
+
+
+ Create a 'signature_algorithms' extension value.
+
+ @param supportedSignatureAlgorithms A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @return A byte array suitable for use as an extension value.
+ @throws IOException
+
+
+ Read 'signature_algorithms' extension data.
+
+ @param extensionData The extension data.
+ @return A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @throws IOException
+
+
+ RFC 6066 5.
+
+
+ Encode this {@link UrlAndHash} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link UrlAndHash} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link UrlAndHash} object.
+ @throws IOException
+
+
+ RFC 5764 4.1.1
+
+
+ @param protectionProfiles see {@link SrtpProtectionProfile} for valid constants.
+ @param mki valid lengths from 0 to 255.
+
+
+ @return see {@link SrtpProtectionProfile} for valid constants.
+
+
+ @return valid lengths from 0 to 255.
+
+
+ RFC 4681
+
+
+ return a = a + b - b preserved.
+
+
+ unsigned comparison on two arrays - note the arrays may
+ start with leading zeros.
+
+
+ return z = x / y - done in place (z value preserved, x contains the
+ remainder)
+
+
+ return whether or not a BigInteger is probably prime with a
+ probability of 1 - (1/2)**certainty.
+ From Knuth Vol 2, pg 395.
+
+
+ Calculate the numbers u1, u2, and u3 such that:
+
+ u1 * a + u2 * b = u3
+
+ where u3 is the greatest common divider of a and b.
+ a and b using the extended Euclid algorithm (refer p. 323
+ of The Art of Computer Programming vol 2, 2nd ed).
+ This also seems to have the side effect of calculating
+ some form of multiplicative inverse.
+
+ @param a First number to calculate gcd for
+ @param b Second number to calculate gcd for
+ @param u1Out the return object for the u1 value
+ @return The greatest common divisor of a and b
+
+
+ return w with w = x * x - w is assumed to have enough space.
+
+
+ return x with x = y * z - x is assumed to have enough space.
+
+
+ Calculate mQuote = -m^(-1) mod b with b = 2^32 (32 = word size)
+
+
+ Montgomery multiplication: a = x * y * R^(-1) mod m
+
+ Based algorithm 14.36 of Handbook of Applied Cryptography.
+
+ m, x, y should have length n
+ a should have length (n + 1)
+ b = 2^32, R = b^n
+
+ The result is put in x
+
+ NOTE: the indices of x, y, m, a different in HAC and in Java
+
+
+ return x = x % y - done in place (y value preserved)
+
+
+ do a left shift - this returns a new array.
+
+
+ do a right shift - this does it in place.
+
+
+ do a right shift by one - this does it in place.
+
+
+ returns x = x - y - we assume x is >= y
+
+
+ Utility methods for generating primes and testing for primality.
+
+
+ Used to return the output from the
+ {@linkplain Primes#enhancedMRProbablePrimeTest(BigInteger, SecureRandom, int) Enhanced
+ Miller-Rabin Probabilistic Primality Test}
+
+
+ Used to return the output from the {@linkplain Primes#generateSTRandomPrime(Digest, int, byte[]) Shawe-Taylor Random_Prime Routine}
+
+
+ FIPS 186-4 C.6 Shawe-Taylor Random_Prime Routine
+
+ Construct a provable prime number using a hash function.
+
+ @param hash
+ the {@link Digest} instance to use (as "Hash()"). Cannot be null.
+ @param length
+ the length (in bits) of the prime to be generated. Must be at least 2.
+ @param inputSeed
+ the seed to be used for the generation of the requested prime. Cannot be null or
+ empty.
+ @return an {@link STOutput} instance containing the requested prime.
+
+
+ FIPS 186-4 C.3.2 Enhanced Miller-Rabin Probabilistic Primality Test
+
+ Run several iterations of the Miller-Rabin algorithm with randomly-chosen bases. This is an
+ alternative to {@link #isMRProbablePrime(BigInteger, SecureRandom, int)} that provides more
+ information about a composite candidate, which may be useful when generating or validating
+ RSA moduli.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param random
+ the source of randomness to use to choose bases.
+ @param iterations
+ the number of randomly-chosen bases to perform the test for.
+ @return an {@link MROutput} instance that can be further queried for details.
+
+
+ A fast check for small divisors, up to some implementation-specific limit.
+
+ @param candidate
+ the {@link BigInteger} instance to test for division by small factors.
+
+ @return true if the candidate is found to have any small factors,
+ false otherwise.
+
+
+ FIPS 186-4 C.3.1 Miller-Rabin Probabilistic Primality Test
+
+ Run several iterations of the Miller-Rabin algorithm with randomly-chosen bases.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param random
+ the source of randomness to use to choose bases.
+ @param iterations
+ the number of randomly-chosen bases to perform the test for.
+ @return false if any witness to compositeness is found amongst the chosen bases
+ (so candidate is definitely NOT prime), or else true
+ (indicating primality with some probability dependent on the number of iterations
+ that were performed).
+
+
+ FIPS 186-4 C.3.1 Miller-Rabin Probabilistic Primality Test (to a fixed base).
+
+ Run a single iteration of the Miller-Rabin algorithm against the specified base.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param baseValue
+ the base value to use for this iteration.
+ @return false if the specified base is a witness to compositeness (so
+ candidate is definitely NOT prime), or else true.
+
+
+ Simple shift-and-add multiplication. Serves as reference implementation
+ to verify (possibly faster) implementations, and for very small scalars.
+
+ @param p
+ The point to multiply.
+ @param k
+ The multiplier.
+ @return The result of the point multiplication kP.
+
+
+ Base class for an elliptic curve.
+
+
+ Adds PreCompInfo for a point on this curve, under a given name. Used by
+ ECMultipliers to save the precomputation for this ECPoint for use
+ by subsequent multiplication.
+
+ @param point
+ The ECPoint to store precomputations for.
+ @param name
+ A String used to index precomputations of different types.
+ @param preCompInfo
+ The values precomputed by the ECMultiplier.
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system. Where more
+ than one point is to be normalized, this method will generally be more efficient than
+ normalizing each point separately.
+
+ @param points
+ An array of points that will be updated in place with their normalized versions,
+ where necessary
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system. Where more
+ than one point is to be normalized, this method will generally be more efficient than
+ normalizing each point separately. An (optional) z-scaling factor can be applied; effectively
+ each z coordinate is scaled by this value prior to normalization (but only one
+ actual multiplication is needed).
+
+ @param points
+ An array of points that will be updated in place with their normalized versions,
+ where necessary
+ @param off
+ The start of the range of points to normalize
+ @param len
+ The length of the range of points to normalize
+ @param iso
+ The (optional) z-scaling factor - can be null
+
+
+ Sets the default ECMultiplier, unless already set.
+
+
+ Decode a point on this curve from its ASN.1 encoding. The different
+ encodings are taken account of, including point compression for
+ Fp (X9.62 s 4.2.1 pg 17).
+ @return The decoded point.
+
+
+ Elliptic curve over Fp
+
+
+ The auxiliary values s0 and
+ s1 used for partial modular reduction for
+ Koblitz curves.
+
+
+ Solves a quadratic equation z2 + z = beta(X9.62
+ D.1.6) The other solution is z + 1.
+
+ @param beta
+ The value to solve the qradratic equation for.
+ @return the solution for z2 + z = beta or
+ null if no solution exists.
+
+
+ @return the auxiliary values s0 and
+ s1 used for partial modular reduction for
+ Koblitz curves.
+
+
+ Returns true if this is a Koblitz curve (ABC curve).
+ @return true if this is a Koblitz curve (ABC curve), false otherwise
+
+
+ Elliptic curves over F2m. The Weierstrass equation is given by
+ y2 + xy = x3 + ax2 + b.
+
+
+ The exponent m of F2m .
+
+
+ TPB: The integer k where xm +
+ xk + 1 represents the reduction polynomial
+ f(z).
+ PPB: The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ TPB: Always set to 0
+ PPB: The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ TPB: Always set to 0
+ PPB: The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ The point at infinity on this curve.
+
+
+ Constructor for Trinomial Polynomial Basis (TPB).
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+
+
+ Constructor for Trinomial Polynomial Basis (TPB).
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param order The order of the main subgroup of the elliptic curve.
+ @param cofactor The cofactor of the elliptic curve, i.e.
+ #Ea (F2m ) = h * n.
+
+
+ Constructor for Pentanomial Polynomial Basis (PPB).
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+
+
+ Constructor for Pentanomial Polynomial Basis (PPB).
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param order The order of the main subgroup of the elliptic curve.
+ @param cofactor The cofactor of the elliptic curve, i.e.
+ #Ea (F2m ) = h * n.
+
+
+ Return true if curve uses a Trinomial basis.
+
+ @return true if curve Trinomial, false otherwise.
+
+
+ return the field name for this field.
+
+ @return the string "Fp".
+
+
+ return a sqrt root - the routine verifies that the calculation
+ returns the right value - if none exists it returns null.
+
+
+ Class representing the Elements of the finite field
+ F2m in polynomial basis (PB)
+ representation. Both trinomial (Tpb) and pentanomial (Ppb) polynomial
+ basis representations are supported. Gaussian normal basis (GNB)
+ representation is not supported.
+
+
+ Indicates gaussian normal basis representation (GNB). Number chosen
+ according to X9.62. GNB is not implemented at present.
+
+
+ Indicates trinomial basis representation (Tpb). Number chosen
+ according to X9.62.
+
+
+ Indicates pentanomial basis representation (Ppb). Number chosen
+ according to X9.62.
+
+
+ Tpb or Ppb.
+
+
+ The exponent m of F2m .
+
+
+ The LongArray holding the bits.
+
+
+ Constructor for Ppb.
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param x The BigInteger representing the value of the field element.
+
+
+ Constructor for Tpb.
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param x The BigInteger representing the value of the field element.
+
+
+ Checks, if the ECFieldElements a and b
+ are elements of the same field F2m
+ (having the same representation).
+ @param a field element.
+ @param b field element to be compared.
+ @throws ArgumentException if a and b
+ are not elements of the same field
+ F2m (having the same
+ representation).
+
+
+ @return the representation of the field
+ F2m , either of
+ {@link F2mFieldElement.Tpb} (trinomial
+ basis representation) or
+ {@link F2mFieldElement.Ppb} (pentanomial
+ basis representation).
+
+
+ @return the degree m of the reduction polynomial
+ f(z).
+
+
+ @return Tpb: The integer k where xm +
+ xk + 1 represents the reduction polynomial
+ f(z).
+ Ppb: The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ @return Tpb: Always returns 0
+ Ppb: The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ @return Tpb: Always set to 0
+ Ppb: The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ base class for points on elliptic curves.
+
+
+ Normalizes this point, and then returns the affine x-coordinate.
+
+ Note: normalization can be expensive, this method is deprecated in favour
+ of caller-controlled normalization.
+
+
+ Normalizes this point, and then returns the affine y-coordinate.
+
+ Note: normalization can be expensive, this method is deprecated in favour
+ of caller-controlled normalization.
+
+
+ Returns the affine x-coordinate after checking that this point is normalized.
+
+ @return The affine x-coordinate of this point
+ @throws IllegalStateException if the point is not normalized
+
+
+ Returns the affine y-coordinate after checking that this point is normalized
+
+ @return The affine y-coordinate of this point
+ @throws IllegalStateException if the point is not normalized
+
+
+ Returns the x-coordinate.
+
+ Caution: depending on the curve's coordinate system, this may not be the same value as in an
+ affine coordinate system; use Normalize() to get a point where the coordinates have their
+ affine values, or use AffineXCoord if you expect the point to already have been normalized.
+
+ @return the x-coordinate of this point
+
+
+ Returns the y-coordinate.
+
+ Caution: depending on the curve's coordinate system, this may not be the same value as in an
+ affine coordinate system; use Normalize() to get a point where the coordinates have their
+ affine values, or use AffineYCoord if you expect the point to already have been normalized.
+
+ @return the y-coordinate of this point
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system.
+
+ @return a new ECPoint instance representing the same point, but with normalized coordinates
+
+
+ return the field element encoded with point compression. (S 4.3.6)
+
+
+ Multiplies this ECPoint by the given number.
+ @param k The multiplicator.
+ @return k * this.
+
+
+ Elliptic curve points over Fp
+
+
+ Create a point which encodes without point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+
+
+ Create a point that encodes with or without point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+ @param withCompression if true encode with point compression
+
+
+ Elliptic curve points over F2m
+
+
+ @param curve base curve
+ @param x x point
+ @param y y point
+
+
+ @param curve base curve
+ @param x x point
+ @param y y point
+ @param withCompression true if encode with point compression.
+
+
+ Constructor for point at infinity
+
+
+ Class representing a simple version of a big decimal. A
+ SimpleBigDecimal is basically a
+ {@link java.math.BigInteger BigInteger} with a few digits on the right of
+ the decimal point. The number of (binary) digits on the right of the decimal
+ point is called the scale of the SimpleBigDecimal.
+ Unlike in {@link java.math.BigDecimal BigDecimal}, the scale is not adjusted
+ automatically, but must be set manually. All SimpleBigDecimals
+ taking part in the same arithmetic operation must have equal scale. The
+ result of a multiplication of two SimpleBigDecimals returns a
+ SimpleBigDecimal with double scale.
+
+
+ Returns a SimpleBigDecimal representing the same numerical
+ value as value.
+ @param value The value of the SimpleBigDecimal to be
+ created.
+ @param scale The scale of the SimpleBigDecimal to be
+ created.
+ @return The such created SimpleBigDecimal.
+
+
+ Constructor for SimpleBigDecimal. The value of the
+ constructed SimpleBigDecimal Equals bigInt /
+ 2scale .
+ @param bigInt The bigInt value parameter.
+ @param scale The scale of the constructed SimpleBigDecimal.
+
+
+ Class holding methods for point multiplication based on the window
+ τ-adic nonadjacent form (WTNAF). The algorithms are based on the
+ paper "Improved Algorithms for Arithmetic on Anomalous Binary Curves"
+ by Jerome A. Solinas. The paper first appeared in the Proceedings of
+ Crypto 1997.
+
+
+ The window width of WTNAF. The standard value of 4 is slightly less
+ than optimal for running time, but keeps space requirements for
+ precomputation low. For typical curves, a value of 5 or 6 results in
+ a better running time. When changing this value, the
+ αu 's must be computed differently, see
+ e.g. "Guide to Elliptic Curve Cryptography", Darrel Hankerson,
+ Alfred Menezes, Scott Vanstone, Springer-Verlag New York Inc., 2004,
+ p. 121-122
+
+
+ 24
+
+
+ The αu 's for a=0 as an array
+ of ZTauElements.
+
+
+ The αu 's for a=0 as an array
+ of TNAFs.
+
+
+ The αu 's for a=1 as an array
+ of ZTauElements.
+
+
+ The αu 's for a=1 as an array
+ of TNAFs.
+
+
+ Computes the norm of an element λ of
+ Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ].
+ @return The norm of λ.
+
+
+ Computes the norm of an element λ of
+ R [τ], where λ = u + vτ
+ and u and u are real numbers (elements of
+ R ).
+ @param mu The parameter μ of the elliptic curve.
+ @param u The real part of the element λ of
+ R [τ].
+ @param v The τ-adic part of the element
+ λ of R [τ].
+ @return The norm of λ.
+
+
+ Rounds an element λ of R [τ]
+ to an element of Z [τ], such that their difference
+ has minimal norm. λ is given as
+ λ = λ0 + λ1 τ.
+ @param lambda0 The component λ0 .
+ @param lambda1 The component λ1 .
+ @param mu The parameter μ of the elliptic curve. Must
+ equal 1 or -1.
+ @return The rounded element of Z [τ].
+ @throws ArgumentException if lambda0 and
+ lambda1 do not have same scale.
+
+
+ Approximate division by n. For an integer
+ k, the value λ = s k / n is
+ computed to c bits of accuracy.
+ @param k The parameter k.
+ @param s The curve parameter s0 or
+ s1 .
+ @param vm The Lucas Sequence element Vm .
+ @param a The parameter a of the elliptic curve.
+ @param m The bit length of the finite field
+ F m .
+ @param c The number of bits of accuracy, i.e. the scale of the returned
+ SimpleBigDecimal.
+ @return The value λ = s k / n computed to
+ c bits of accuracy.
+
+
+ Computes the τ-adic NAF (non-adjacent form) of an
+ element λ of Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ].
+ @return The τ-adic NAF of λ.
+
+
+ Applies the operation τ() to an
+ AbstractF2mPoint.
+ @param p The AbstractF2mPoint to which τ() is applied.
+ @return τ(p)
+
+
+ Returns the parameter μ of the elliptic curve.
+ @param curve The elliptic curve from which to obtain μ.
+ The curve must be a Koblitz curve, i.e. a Equals
+ 0 or 1 and b Equals
+ 1.
+ @return μ of the elliptic curve.
+ @throws ArgumentException if the given ECCurve is not a Koblitz
+ curve.
+
+
+ Calculates the Lucas Sequence elements Uk-1 and
+ Uk or Vk-1 and
+ Vk .
+ @param mu The parameter μ of the elliptic curve.
+ @param k The index of the second element of the Lucas Sequence to be
+ returned.
+ @param doV If set to true, computes Vk-1 and
+ Vk , otherwise Uk-1 and
+ Uk .
+ @return An array with 2 elements, containing Uk-1
+ and Uk or Vk-1
+ and Vk .
+
+
+ Computes the auxiliary value tw . If the width is
+ 4, then for mu = 1, tw = 6 and for
+ mu = -1, tw = 10
+ @param mu The parameter μ of the elliptic curve.
+ @param w The window width of the WTNAF.
+ @return the auxiliary value tw
+
+
+ Computes the auxiliary values s0 and
+ s1 used for partial modular reduction.
+ @param curve The elliptic curve for which to compute
+ s0 and s1 .
+ @throws ArgumentException if curve is not a
+ Koblitz curve (Anomalous Binary Curve, ABC).
+
+
+ Partial modular reduction modulo
+ (τm - 1)/(τ - 1).
+ @param k The integer to be reduced.
+ @param m The bitlength of the underlying finite field.
+ @param a The parameter a of the elliptic curve.
+ @param s The auxiliary values s0 and
+ s1 .
+ @param mu The parameter μ of the elliptic curve.
+ @param c The precision (number of bits of accuracy) of the partial
+ modular reduction.
+ @return ρ := k partmod (τm - 1)/(τ - 1)
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by a BigInteger using the reduced τ-adic
+ NAF (RTNAF) method.
+ @param p The AbstractF2mPoint to Multiply.
+ @param k The BigInteger by which to Multiply p.
+ @return k * p
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the τ-adic NAF (TNAF) method.
+ @param p The AbstractF2mPoint to Multiply.
+ @param lambda The element λ of
+ Z [τ].
+ @return λ * p
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the τ-adic NAF (TNAF) method, given the TNAF
+ of λ.
+ @param p The AbstractF2mPoint to Multiply.
+ @param u The the TNAF of λ..
+ @return λ * p
+
+
+ Computes the [τ]-adic window NAF of an element
+ λ of Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ] of which to compute the
+ [τ]-adic NAF.
+ @param width The window width of the resulting WNAF.
+ @param pow2w 2width .
+ @param tw The auxiliary value tw .
+ @param alpha The αu 's for the window width.
+ @return The [τ]-adic window NAF of
+ λ.
+
+
+ Does the precomputation for WTNAF multiplication.
+ @param p The ECPoint for which to do the precomputation.
+ @param a The parameter a of the elliptic curve.
+ @return The precomputation array for p.
+
+
+ Class representing an element of Z [τ]. Let
+ λ be an element of Z [τ]. Then
+ λ is given as λ = u + vτ. The
+ components u and v may be used directly, there
+ are no accessor methods.
+ Immutable class.
+
+
+ The "real" part of λ.
+
+
+ The "τ-adic" part of λ.
+
+
+ Constructor for an element λ of
+ Z [τ].
+ @param u The "real" part of λ.
+ @param v The "τ-adic" part of
+ λ.
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+ @param withCompression if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(boolean)}
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ Joye's double-add algorithm.
+
+
+ Interface for classes encapsulating a point multiplication algorithm
+ for ECPoints.
+
+
+ Multiplies the ECPoint p by k, i.e.
+ p is added k times to itself.
+ @param p The ECPoint to be multiplied.
+ @param k The factor by which p is multiplied.
+ @return p multiplied by k.
+
+
+ Class holding precomputation data for fixed-point multiplications.
+
+
+ Array holding the precomputed ECPoints used for a fixed
+ point multiplication.
+
+
+ The width used for the precomputation. If a larger width precomputation
+ is already available this may be larger than was requested, so calling
+ code should refer to the actual width.
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (right-to-left) using
+ mixed coordinates.
+
+
+ By default, addition will be done in Jacobian coordinates, and doubling will be done in
+ Modified Jacobian coordinates (independent of the original coordinate system of each point).
+
+
+ Montgomery ladder.
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (left-to-right).
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (right-to-left).
+
+
+ Interface for classes storing precomputation data for multiplication
+ algorithms. Used as a Memento (see GOF patterns) for
+ WNafMultiplier.
+
+
+ Class implementing the WNAF (Window Non-Adjacent Form) multiplication
+ algorithm.
+
+
+ Multiplies this by an integer k using the
+ Window NAF method.
+ @param k The integer by which this is multiplied.
+ @return A new ECPoint which equals this
+ multiplied by k.
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @return the window size to use
+
+
+ Class holding precomputation data for the WNAF (Window Non-Adjacent Form)
+ algorithm.
+
+
+ Array holding the precomputed ECPoints used for a Window
+ NAF multiplication.
+
+
+ Array holding the negations of the precomputed ECPoints used
+ for a Window NAF multiplication.
+
+
+ Holds an ECPoint representing Twice(this). Used for the
+ Window NAF multiplication to create or extend the precomputed values.
+
+
+ Computes the Window NAF (non-adjacent Form) of an integer.
+ @param width The width w of the Window NAF. The width is
+ defined as the minimal number w, such that for any
+ w consecutive digits in the resulting representation, at
+ most one is non-zero.
+ @param k The integer of which the Window NAF is computed.
+ @return The Window NAF of the given width, such that the following holds:
+ k = ∑i=0 l-1 ki 2i
+ , where the ki denote the elements of the
+ returned byte[].
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @return the window size to use
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @param windowSizeCutoffs a monotonically increasing list of bit sizes at which to increment the window width
+ @return the window size to use
+
+
+ Class implementing the WTNAF (Window
+ τ-adic Non-Adjacent Form) algorithm.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by k using the reduced τ-adic NAF (RTNAF)
+ method.
+ @param p The AbstractF2mPoint to multiply.
+ @param k The integer by which to multiply k.
+ @return p multiplied by k.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ] using
+ the τ-adic NAF (TNAF) method.
+ @param p The AbstractF2mPoint to multiply.
+ @param lambda The element λ of
+ Z [τ] of which to compute the
+ [τ]-adic NAF.
+ @return p multiplied by λ.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the window τ-adic NAF (TNAF) method, given the
+ WTNAF of λ.
+ @param p The AbstractF2mPoint to multiply.
+ @param u The the WTNAF of λ..
+ @return λ * p
+
+
+ Class holding precomputation data for the WTNAF (Window
+ τ-adic Non-Adjacent Form) algorithm.
+
+
+ Array holding the precomputed AbstractF2mPoints used for the
+ WTNAF multiplication in
+ {@link org.bouncycastle.math.ec.multiplier.WTauNafMultiplier.multiply()
+ WTauNafMultiplier.multiply()}.
+
+
+ 'Zeroless' Signed Digit Left-to-Right.
+
+
+ 'Zeroless' Signed Digit Right-to-Left.
+
+
+
+
+ BasicOcspResponse ::= SEQUENCE {
+ tbsResponseData ResponseData,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL
+ }
+
+
+
+
+ The DER encoding of the tbsResponseData field.
+ In the event of an encoding error.
+
+
+ The certificates, if any, associated with the response.
+ In the event of an encoding error.
+
+
+
+ Verify the signature against the tbsResponseData object we contain.
+
+
+
+ The ASN.1 encoded representation of this object.
+
+
+ Generator for basic OCSP response objects.
+
+
+ basic constructor
+
+
+ construct with the responderID to be the SHA-1 keyHash of the passed in public key.
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param certStatus status of the certificate - null if okay
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param nextUpdate date when next update should be requested
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param thisUpdate date this response was valid on
+ @param nextUpdate date when next update should be requested
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Set the extensions for the response.
+
+ @param responseExtensions the extension object to carry.
+
+
+
+ Generate the signed response using the passed in signature calculator.
+
+ Implementation of signing calculator factory.
+ The certificate chain associated with the response signer.
+ "produced at" date.
+
+
+
+ Return an IEnumerable of the signature names supported by the generator.
+
+ @return an IEnumerable containing recognised names.
+
+
+ create from an issuer certificate and the serial number of the
+ certificate it signed.
+ @exception OcspException if any problems occur creating the id fields.
+
+
+ return the serial number for the certificate associated
+ with this request.
+
+
+ Create a new CertificateID for a new serial number derived from a previous one
+ calculated for the same CA certificate.
+
+ @param original the previously calculated CertificateID for the CA.
+ @param newSerialNumber the serial number for the new certificate of interest.
+
+ @return a new CertificateID for newSerialNumber
+
+
+
+ OcspRequest ::= SEQUENCE {
+ tbsRequest TBSRequest,
+ optionalSignature [0] EXPLICIT Signature OPTIONAL }
+
+ TBSRequest ::= SEQUENCE {
+ version [0] EXPLICIT Version DEFAULT v1,
+ requestorName [1] EXPLICIT GeneralName OPTIONAL,
+ requestList SEQUENCE OF Request,
+ requestExtensions [2] EXPLICIT Extensions OPTIONAL }
+
+ Signature ::= SEQUENCE {
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL}
+
+ Version ::= INTEGER { v1(0) }
+
+ Request ::= SEQUENCE {
+ reqCert CertID,
+ singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL }
+
+ CertID ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ issuerNameHash OCTET STRING, -- Hash of Issuer's DN
+ issuerKeyHash OCTET STRING, -- Hash of Issuers public key
+ serialNumber CertificateSerialNumber }
+
+
+
+ Return the DER encoding of the tbsRequest field.
+ @return DER encoding of tbsRequest
+ @throws OcspException in the event of an encoding error.
+
+
+ return the object identifier representing the signature algorithm
+
+
+ If the request is signed return a possibly empty CertStore containing the certificates in the
+ request. If the request is not signed the method returns null.
+
+ @return null if not signed, a CertStore otherwise
+ @throws OcspException
+
+
+ Return whether or not this request is signed.
+
+ @return true if signed false otherwise.
+
+
+ Verify the signature against the TBSRequest object we contain.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Add a request for the given CertificateID.
+
+ @param certId certificate ID of interest
+
+
+ Add a request with extensions
+
+ @param certId certificate ID of interest
+ @param singleRequestExtensions the extensions to attach to the request
+
+
+ Set the requestor name to the passed in X509Principal
+
+ @param requestorName a X509Principal representing the requestor name.
+
+
+ Generate an unsigned request
+
+ @return the OcspReq
+ @throws OcspException
+
+
+ Return an IEnumerable of the signature names supported by the generator.
+
+ @return an IEnumerable containing recognised names.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ base generator for an OCSP response - at the moment this only supports the
+ generation of responses containing BasicOCSP responses.
+
+
+ note 4 is not used.
+
+
+ Carrier for a ResponderID.
+
+
+ wrapper for the RevokedInfo object
+
+
+ return the revocation reason. Note: this field is optional, test for it
+ with hasRevocationReason() first.
+ @exception InvalidOperationException if a reason is asked for and none is avaliable
+
+
+ Return the status object for the response - null indicates good.
+
+ @return the status object for the response, null if it is good.
+
+
+ return the NextUpdate value - note: this is an optional field so may
+ be returned as null.
+
+ @return nextUpdate, or null if not present.
+
+
+ wrapper for the UnknownInfo object
+
+
+
+ Utility class for creating IBasicAgreement objects from their names/Oids
+
+
+
+
+ Cipher Utility class contains methods that can not be specifically grouped into other classes.
+
+
+
+
+ Returns a ObjectIdentifier for a give encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ Utility class for creating IDigest objects from their names/Oids
+
+
+
+
+ Returns a ObjectIdentifier for a given digest mechanism.
+
+ A string representation of the digest meanism.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ A class containing methods to interface the BouncyCastle world to the .NET Crypto world.
+
+
+
+
+ Create an System.Security.Cryptography.X509Certificate from an X509Certificate Structure.
+
+
+ A System.Security.Cryptography.X509Certificate.
+
+
+
+ Utility class for creating HMac object from their names/Oids
+
+
+
+
+
+
+
+
+
+ Returns a ObjectIdentifier for a give encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ Create and auto-seed an instance based on the given algorithm.
+
+ Equivalent to GetInstance(algorithm, true)
+ e.g. "SHA256PRNG"
+
+
+
+ Create an instance based on the given algorithm, with optional auto-seeding
+
+ e.g. "SHA256PRNG"
+ If true, the instance will be auto-seeded.
+
+
+
+ To replicate existing predictable output, replace with GetInstance("SHA1PRNG", false), followed by SetSeed(seed)
+
+
+
+ Use the specified instance of IRandomGenerator as random source.
+
+ This constructor performs no seeding of either the IRandomGenerator or the
+ constructed SecureRandom . It is the responsibility of the client to provide
+ proper seed material as necessary/appropriate for the given IRandomGenerator
+ implementation.
+
+ The source to generate all random bytes from.
+
+
+ base constructor.
+
+
+ create a SecurityUtilityException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+
+ Signer Utility class contains methods that can not be specifically grouped into other classes.
+
+
+
+
+ Returns an ObjectIdentifier for a given encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the OID is not available.
+
+
+
+ Utility class for creating IWrapper objects from their names/Oids
+
+
+
+ PEM generator for the original set of PEM objects used in Open SSL.
+
+
+ Class for reading OpenSSL PEM encoded streams containing
+ X509 certificates, PKCS8 encoded keys and PKCS7 objects.
+
+ In the case of PKCS7 objects the reader will return a CMS ContentInfo object. Keys and
+ Certificates will be returned using the appropriate java.security type.
+
+
+ Create a new PemReader
+
+ @param reader the Reader
+
+
+ Create a new PemReader with a password finder
+
+ @param reader the Reader
+ @param pFinder the password finder
+
+
+ Reads in a X509Certificate.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a X509CRL.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a PKCS10 certification request.
+
+ @return the certificate request.
+ @throws IOException if an I/O error occured
+
+
+ Reads in a X509 Attribute Certificate.
+
+ @return the X509 Attribute Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a PKCS7 object. This returns a ContentInfo object suitable for use with the CMS
+ API.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Read a Key Pair
+
+
+ General purpose writer for OpenSSL PEM objects.
+
+
+ The TextWriter object to write the output to.
+
+
+ Constructor for an unencrypted private key PEM object.
+
+ @param key private key to be encoded.
+
+
+ Constructor for an encrypted private key PEM object.
+
+ @param key private key to be encoded
+ @param algorithm encryption algorithm to use
+ @param provider provider to use
+ @throws NoSuchAlgorithmException if algorithm/mode cannot be found
+
+
+
+ A class for verifying and creating Pkcs10 Certification requests.
+
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+ see
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ Name of Sig Alg.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+ Matching Private key for nominated (above) public key to be used to sign the request.
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ The factory for signature calculators to sign the PKCS#10 request with.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+ Matching Private key for nominated (above) public key to be used to sign the request.
+
+
+
+ Get the public key.
+
+ The public key.
+
+
+
+ Verify Pkcs10 Cert Request is valid.
+
+ true = valid.
+
+
+
+ A class for creating and verifying Pkcs10 Certification requests (this is an extension on ).
+ The requests are made using delay signing. This is useful for situations where
+ the private key is in another environment and not directly accessible (e.g. HSM)
+ So the first step creates the request, then the signing is done outside this
+ object and the signature is then used to complete the request.
+
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+ see
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ Name of Sig Alg.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+
+ After the object is constructed use the and finally the
+ SignRequest methods to finalize the request.
+
+
+
+ simply return the cert entry for the private key
+
+
+ Utility class for reencoding PKCS#12 files to definite length.
+
+
+ Just re-encode the outer layer of the PKCS#12 file to definite length encoding.
+
+ @param berPKCS12File - original PKCS#12 file
+ @return a byte array representing the DER encoding of the PFX structure
+ @throws IOException
+
+
+ Re-encode the PKCS#12 structure to definite length encoding at the inner layer
+ as well, recomputing the MAC accordingly.
+
+ @param berPKCS12File - original PKCS12 file.
+ @param provider - provider to use for MAC calculation.
+ @return a byte array representing the DER encoding of the PFX structure.
+ @throws IOException on parsing, encoding errors.
+
+
+
+ Returns the revocationDate.
+
+
+
+
+ Returns the certStatus.
+
+
+
+ Returns an immutable Set of X.509 attribute certificate
+ extensions that this PkixAttrCertChecker supports or
+ null if no extensions are supported.
+
+ Each element of the set is a String representing the
+ Object Identifier (OID) of the X.509 extension that is supported.
+
+
+ All X.509 attribute certificate extensions that a
+ PkixAttrCertChecker might possibly be able to process
+ should be included in the set.
+
+
+ @return an immutable Set of X.509 extension OIDs (in
+ String format) supported by this
+ PkixAttrCertChecker, or null if no
+ extensions are supported
+
+
+ Performs checks on the specified attribute certificate. Every handled
+ extension is rmeoved from the unresolvedCritExts
+ collection.
+
+ @param attrCert The attribute certificate to be checked.
+ @param certPath The certificate path which belongs to the attribute
+ certificate issuer public key certificate.
+ @param holderCertPath The certificate path which belongs to the holder
+ certificate.
+ @param unresolvedCritExts a Collection of OID strings
+ representing the current set of unresolved critical extensions
+ @throws CertPathValidatorException if the specified attribute certificate
+ does not pass the check.
+
+
+ Returns a clone of this object.
+
+ @return a copy of this PkixAttrCertChecker
+
+
+ Build and validate a CertPath using the given parameter.
+
+ @param params PKIXBuilderParameters object containing all information to
+ build the CertPath
+
+
+ CertPathValidatorSpi implementation for X.509 Attribute Certificates la RFC 3281.
+
+ @see org.bouncycastle.x509.ExtendedPkixParameters
+
+
+ Validates an attribute certificate with the given certificate path.
+
+
+ params must be an instance of
+ ExtendedPkixParameters.
+
+ The target constraints in the params must be an
+ X509AttrCertStoreSelector with at least the attribute
+ certificate criterion set. Obey that also target informations may be
+ necessary to correctly validate this attribute certificate.
+
+ The attribute certificate issuer must be added to the trusted attribute
+ issuers with {@link ExtendedPkixParameters#setTrustedACIssuers(Set)}.
+
+ @param certPath The certificate path which belongs to the attribute
+ certificate issuer public key certificate.
+ @param params The PKIX parameters.
+ @return A PKIXCertPathValidatorResult of the result of
+ validating the certPath.
+ @throws InvalidAlgorithmParameterException if params is
+ inappropriate for this validator.
+ @throws CertPathValidatorException if the verification fails.
+
+
+
+ Summary description for PkixBuilderParameters.
+
+
+
+ Returns an instance of PkixBuilderParameters.
+
+ This method can be used to get a copy from other
+ PKIXBuilderParameters, PKIXParameters,
+ and ExtendedPKIXParameters instances.
+
+
+ @param pkixParams The PKIX parameters to create a copy of.
+ @return An PkixBuilderParameters instance.
+
+
+
+ Excluded certificates are not used for building a certification path.
+
+ the excluded certificates.
+
+
+
+ Sets the excluded certificates which are not used for building a
+ certification path. If the ISet is null an
+ empty set is assumed.
+
+
+ The given set is cloned to protect it against subsequent modifications.
+
+ The excluded certificates to set.
+
+
+ Can alse handle ExtendedPKIXBuilderParameters and
+ PKIXBuilderParameters.
+
+ @param params Parameters to set.
+ @see org.bouncycastle.x509.ExtendedPKIXParameters#setParams(java.security.cert.PKIXParameters)
+
+
+ Makes a copy of this PKIXParameters object. Changes to the
+ copy will not affect the original and vice versa.
+
+ @return a copy of this PKIXParameters object
+
+
+ An immutable sequence of certificates (a certification path).
+
+ This is an abstract class that defines the methods common to all CertPaths.
+ Subclasses can handle different kinds of certificates (X.509, PGP, etc.).
+
+ All CertPath objects have a type, a list of Certificates, and one or more
+ supported encodings. Because the CertPath class is immutable, a CertPath
+ cannot change in any externally visible way after being constructed. This
+ stipulation applies to all public fields and methods of this class and any
+ added or overridden by subclasses.
+
+ The type is a string that identifies the type of Certificates in the
+ certification path. For each certificate cert in a certification path
+ certPath, cert.getType().equals(certPath.getType()) must be true.
+
+ The list of Certificates is an ordered List of zero or more Certificates.
+ This List and all of the Certificates contained in it must be immutable.
+
+ Each CertPath object must support one or more encodings so that the object
+ can be translated into a byte array for storage or transmission to other
+ parties. Preferably, these encodings should be well-documented standards
+ (such as PKCS#7). One of the encodings supported by a CertPath is considered
+ the default encoding. This encoding is used if no encoding is explicitly
+ requested (for the {@link #getEncoded()} method, for instance).
+
+ All CertPath objects are also Serializable. CertPath objects are resolved
+ into an alternate {@link CertPathRep} object during serialization. This
+ allows a CertPath object to be serialized into an equivalent representation
+ regardless of its underlying implementation.
+
+ CertPath objects can be created with a CertificateFactory or they can be
+ returned by other classes, such as a CertPathBuilder.
+
+ By convention, X.509 CertPaths (consisting of X509Certificates), are ordered
+ starting with the target certificate and ending with a certificate issued by
+ the trust anchor. That is, the issuer of one certificate is the subject of
+ the following one. The certificate representing the
+ {@link TrustAnchor TrustAnchor} should not be included in the certification
+ path. Unvalidated X.509 CertPaths may not follow these conventions. PKIX
+ CertPathValidators will detect any departure from these conventions that
+ cause the certification path to be invalid and throw a
+ CertPathValidatorException.
+
+ Concurrent Access
+
+ All CertPath objects must be thread-safe. That is, multiple threads may
+ concurrently invoke the methods defined in this class on a single CertPath
+ object (or more than one) with no ill effects. This is also true for the List
+ returned by CertPath.getCertificates.
+
+ Requiring CertPath objects to be immutable and thread-safe allows them to be
+ passed around to various pieces of code without worrying about coordinating
+ access. Providing this thread-safety is generally not difficult, since the
+ CertPath and List objects in question are immutable.
+
+ @see CertificateFactory
+ @see CertPathBuilder
+
+ CertPath implementation for X.509 certificates.
+
+
+
+ @param certs
+
+
+ Creates a CertPath of the specified type.
+ This constructor is protected because most users should use
+ a CertificateFactory to create CertPaths.
+ @param type the standard name of the type of Certificatesin this path
+
+
+
+ Creates a CertPath of the specified type.
+ This constructor is protected because most users should use
+ a CertificateFactory to create CertPaths.
+
+ @param type the standard name of the type of Certificatesin this path
+
+
+
+ Returns an iteration of the encodings supported by this
+ certification path, with the default encoding
+ first. Attempts to modify the returned Iterator via its
+ remove method result in an UnsupportedOperationException.
+
+ @return an Iterator over the names of the supported encodings (as Strings)
+
+
+
+ Compares this certification path for equality with the specified object.
+ Two CertPaths are equal if and only if their types are equal and their
+ certificate Lists (and by implication the Certificates in those Lists)
+ are equal. A CertPath is never equal to an object that is not a CertPath.
+
+ This algorithm is implemented by this method. If it is overridden, the
+ behavior specified here must be maintained.
+
+ @param other
+ the object to test for equality with this certification path
+
+ @return true if the specified object is equal to this certification path,
+ false otherwise
+
+ @see Object#hashCode() Object.hashCode()
+
+
+ Returns the encoded form of this certification path, using
+ the default encoding.
+
+ @return the encoded bytes
+ @exception CertificateEncodingException if an encoding error occurs
+
+
+
+ Returns the encoded form of this certification path, using
+ the specified encoding.
+
+ @param encoding the name of the encoding to use
+ @return the encoded bytes
+ @exception CertificateEncodingException if an encoding error
+ occurs or the encoding requested is not supported
+
+
+
+
+ Returns the list of certificates in this certification
+ path.
+
+
+
+ Return a DERObject containing the encoded certificate.
+
+ @param cert the X509Certificate object to be encoded
+
+ @return the DERObject
+
+
+
+ Implements the PKIX CertPathBuilding algorithm for BouncyCastle.
+
+ @see CertPathBuilderSpi
+
+
+ Build and validate a CertPath using the given parameter.
+
+ @param params PKIXBuilderParameters object containing all information to
+ build the CertPath
+
+
+
+ Summary description for PkixCertPathBuilderException.
+
+
+
+
+ Summary description for PkixCertPathBuilderResult.
+
+
+
+ * Initializes the internal state of this PKIXCertPathChecker.
+ *
+ * The forward flag specifies the order that certificates
+ * will be passed to the {@link #check check} method (forward or reverse). A
+ * PKIXCertPathChecker must support reverse checking
+ * and may support forward checking.
+ *
+ *
+ * @param forward
+ * the order that certificates are presented to the
+ * check method. If true,
+ * certificates are presented from target to most-trusted CA
+ * (forward); if false, from most-trusted CA to
+ * target (reverse).
+ * @exception CertPathValidatorException
+ * if this PKIXCertPathChecker is unable to
+ * check certificates in the specified order; it should never
+ * be thrown if the forward flag is false since reverse
+ * checking must be supported
+
+
+ Indicates if forward checking is supported. Forward checking refers to
+ the ability of the PKIXCertPathChecker to perform its
+ checks when certificates are presented to the check method
+ in the forward direction (from target to most-trusted CA).
+
+ @return true if forward checking is supported,
+ false otherwise
+
+
+ * Returns an immutable Set of X.509 certificate extensions
+ * that this PKIXCertPathChecker supports (i.e. recognizes,
+ * is able to process), or null if no extensions are
+ * supported.
+ *
+ * Each element of the set is a String representing the
+ * Object Identifier (OID) of the X.509 extension that is supported. The OID
+ * is represented by a set of nonnegative integers separated by periods.
+ *
+ * All X.509 certificate extensions that a PKIXCertPathChecker
+ * might possibly be able to process should be included in the set.
+ *
+ *
+ * @return an immutable Set of X.509 extension OIDs (in
+ * String format) supported by this
+ * PKIXCertPathChecker, or null if no
+ * extensions are supported
+
+
+ Performs the check(s) on the specified certificate using its internal
+ state and removes any critical extensions that it processes from the
+ specified collection of OID strings that represent the unresolved
+ critical extensions. The certificates are presented in the order
+ specified by the init method.
+
+ @param cert
+ the Certificate to be checked
+ @param unresolvedCritExts
+ a Collection of OID strings representing the
+ current set of unresolved critical extensions
+ @exception CertPathValidatorException
+ if the specified certificate does not pass the check
+
+
+ Returns a clone of this object. Calls the Object.clone()
+ method. All subclasses which maintain state must support and override
+ this method, if necessary.
+
+ @return a copy of this PKIXCertPathChecker
+
+
+ The Service Provider Interface (SPI )
+ for the {@link CertPathValidator CertPathValidator} class. All
+ CertPathValidator implementations must include a class (the
+ SPI class) that extends this class (CertPathValidatorSpi)
+ and implements all of its methods. In general, instances of this class
+ should only be accessed through the CertPathValidator class.
+ For details, see the Java Cryptography Architecture.
+
+ Concurrent Access
+
+ Instances of this class need not be protected against concurrent
+ access from multiple threads. Threads that need to access a single
+ CertPathValidatorSpi instance concurrently should synchronize
+ amongst themselves and provide the necessary locking before calling the
+ wrapping CertPathValidator object.
+
+ However, implementations of CertPathValidatorSpi may still
+ encounter concurrency issues, since multiple threads each
+ manipulating a different CertPathValidatorSpi instance need not
+ synchronize.
+
+ CertPathValidatorSpi implementation for X.509 Certificate validation a la RFC
+ 3280.
+
+
+
+ An exception indicating one of a variety of problems encountered when
+ validating a certification path.
+
+ A CertPathValidatorException provides support for wrapping
+ exceptions. The {@link #getCause getCause} method returns the throwable,
+ if any, that caused this exception to be thrown.
+
+ A CertPathValidatorException may also include the
+ certification path that was being validated when the exception was thrown
+ and the index of the certificate in the certification path that caused the
+ exception to be thrown. Use the {@link #getCertPath getCertPath} and
+ {@link #getIndex getIndex} methods to retrieve this information.
+
+ Concurrent Access
+
+ Unless otherwise specified, the methods defined in this class are not
+ thread-safe. Multiple threads that need to access a single
+ object concurrently should synchronize amongst themselves and
+ provide the necessary locking. Multiple threads each manipulating
+ separate objects need not synchronize.
+
+ @see CertPathValidator
+
+
+
+
+ Creates a PkixCertPathValidatorException with the given detail
+ message. A detail message is a String that describes this
+ particular exception.
+
+ the detail message
+
+
+
+ Creates a PkixCertPathValidatorException with the specified
+ detail message and cause.
+
+ the detail message
+ the cause (which is saved for later retrieval by the
+ {@link #getCause getCause()} method). (A null
+ value is permitted, and indicates that the cause is
+ nonexistent or unknown.)
+
+
+
+ Creates a PkixCertPathValidatorException with the specified
+ detail message, cause, certification path, and index.
+
+ the detail message (or null if none)
+ the cause (or null if none)
+ the certification path that was in the process of being
+ validated when the error was encountered
+ the index of the certificate in the certification path that *
+
+
+
+ Returns the detail message for this CertPathValidatorException.
+
+ the detail message, or null if neither the message nor cause were specified
+
+
+ Returns the certification path that was being validated when the
+ exception was thrown.
+
+ @return the CertPath that was being validated when the
+ exception was thrown (or null if not specified)
+
+
+ Returns the index of the certificate in the certification path that
+ caused the exception to be thrown. Note that the list of certificates in
+ a CertPath is zero based. If no index has been set, -1 is
+ returned.
+
+ @return the index that has been set, or -1 if none has been set
+
+
+
+ Summary description for PkixCertPathValidatorResult.
+
+
+
+
+ Summary description for PkixCertPathValidatorUtilities.
+
+
+
+
+ key usage bits
+
+
+
+
+ Search the given Set of TrustAnchor's for one that is the
+ issuer of the given X509 certificate.
+
+ the X509 certificate
+ a Set of TrustAnchor's
+ the TrustAnchor object if found or
+ null if not.
+
+ @exception
+
+
+
+ Returns the issuer of an attribute certificate or certificate.
+
+ The attribute certificate or certificate.
+ The issuer as X500Principal.
+
+
+ Return the next working key inheriting DSA parameters if necessary.
+
+ This methods inherits DSA parameters from the indexed certificate or
+ previous certificates in the certificate chain to the returned
+ PublicKey. The list is searched upwards, meaning the end
+ certificate is at position 0 and previous certificates are following.
+
+
+ If the indexed certificate does not contain a DSA key this method simply
+ returns the public key. If the DSA key already contains DSA parameters
+ the key is also only returned.
+
+
+ @param certs The certification path.
+ @param index The index of the certificate which contains the public key
+ which should be extended with DSA parameters.
+ @return The public key of the certificate in list position
+ index extended with DSA parameters if applicable.
+ @throws Exception if DSA parameters cannot be inherited.
+
+
+
+ Return a Collection of all certificates or attribute certificates found
+ in the X509Store's that are matching the certSelect criteriums.
+
+ a {@link Selector} object that will be used to select
+ the certificates
+ a List containing only X509Store objects. These
+ are used to search for certificates.
+ a Collection of all found or
+ objects.
+ May be empty but never null.
+
+
+
+ Add the CRL issuers from the cRLIssuer field of the distribution point or
+ from the certificate if not given to the issuer criterion of the
+ selector.
+
+ The issuerPrincipals are a collection with a single
+ X500Principal for X509Certificates. For
+ {@link X509AttributeCertificate}s the issuer may contain more than one
+ X500Principal.
+
+
+ @param dp The distribution point.
+ @param issuerPrincipals The issuers of the certificate or attribute
+ certificate which contains the distribution point.
+ @param selector The CRL selector.
+ @param pkixParams The PKIX parameters containing the cert stores.
+ @throws Exception if an exception occurs while processing.
+ @throws ClassCastException if issuerPrincipals does not
+ contain only X500Principals.
+
+
+ Fetches complete CRLs according to RFC 3280.
+
+ @param dp The distribution point for which the complete CRL
+ @param cert The X509Certificate or
+ {@link org.bouncycastle.x509.X509AttributeCertificate} for
+ which the CRL should be searched.
+ @param currentDate The date for which the delta CRLs must be valid.
+ @param paramsPKIX The extended PKIX parameters.
+ @return A Set of X509CRLs with complete
+ CRLs.
+ @throws Exception if an exception occurs while picking the CRLs
+ or no CRLs are found.
+
+
+ Fetches delta CRLs according to RFC 3280 section 5.2.4.
+
+ @param currentDate The date for which the delta CRLs must be valid.
+ @param paramsPKIX The extended PKIX parameters.
+ @param completeCRL The complete CRL the delta CRL is for.
+ @return A Set of X509CRLs with delta CRLs.
+ @throws Exception if an exception occurs while picking the delta
+ CRLs.
+
+
+ Find the issuer certificates of a given certificate.
+
+ @param cert
+ The certificate for which an issuer should be found.
+ @param pkixParams
+ @return A Collection object containing the issuer
+ X509Certificates. Never null.
+
+ @exception Exception
+ if an error occurs.
+
+
+
+ Extract the value of the given extension, if it exists.
+
+ The extension object.
+ The object identifier to obtain.
+ Asn1Object
+ if the extension cannot be read.
+
+
+
+ crl checking
+ Return a Collection of all CRLs found in the X509Store's that are
+ matching the crlSelect criteriums.
+
+ a {@link X509CRLStoreSelector} object that will be used
+ to select the CRLs
+ a List containing only {@link org.bouncycastle.x509.X509Store
+ X509Store} objects. These are used to search for CRLs
+ a Collection of all found {@link X509CRL X509CRL} objects. May be
+ empty but never null.
+
+
+
+ Returns the intersection of the permitted IP ranges in
+ permitted with ip.
+
+ @param permitted A Set of permitted IP addresses with
+ their subnet mask as byte arrays.
+ @param ips The IP address with its subnet mask.
+ @return The Set of permitted IP ranges intersected with
+ ip.
+
+
+ Returns the union of the excluded IP ranges in excluded
+ with ip.
+
+ @param excluded A Set of excluded IP addresses with their
+ subnet mask as byte arrays.
+ @param ip The IP address with its subnet mask.
+ @return The Set of excluded IP ranges unified with
+ ip as byte arrays.
+
+
+ Calculates the union if two IP ranges.
+
+ @param ipWithSubmask1 The first IP address with its subnet mask.
+ @param ipWithSubmask2 The second IP address with its subnet mask.
+ @return A Set with the union of both addresses.
+
+
+ Calculates the interesction if two IP ranges.
+
+ @param ipWithSubmask1 The first IP address with its subnet mask.
+ @param ipWithSubmask2 The second IP address with its subnet mask.
+ @return A Set with the single IP address with its subnet
+ mask as a byte array or an empty Set.
+
+
+ Concatenates the IP address with its subnet mask.
+
+ @param ip The IP address.
+ @param subnetMask Its subnet mask.
+ @return The concatenated IP address with its subnet mask.
+
+
+ Splits the IP addresses and their subnet mask.
+
+ @param ipWithSubmask1 The first IP address with the subnet mask.
+ @param ipWithSubmask2 The second IP address with the subnet mask.
+ @return An array with two elements. Each element contains the IP address
+ and the subnet mask in this order.
+
+
+ Based on the two IP addresses and their subnet masks the IP range is
+ computed for each IP address - subnet mask pair and returned as the
+ minimum IP address and the maximum address of the range.
+
+ @param ip1 The first IP address.
+ @param subnetmask1 The subnet mask of the first IP address.
+ @param ip2 The second IP address.
+ @param subnetmask2 The subnet mask of the second IP address.
+ @return A array with two elements. The first/second element contains the
+ min and max IP address of the first/second IP address and its
+ subnet mask.
+
+
+ Checks if the IP ip is included in the permitted ISet
+ permitted.
+
+ @param permitted A Set of permitted IP addresses with
+ their subnet mask as byte arrays.
+ @param ip The IP address.
+ @throws PkixNameConstraintValidatorException
+ if the IP is not permitted.
+
+
+ Checks if the IP ip is included in the excluded ISet
+ excluded.
+
+ @param excluded A Set of excluded IP addresses with their
+ subnet mask as byte arrays.
+ @param ip The IP address.
+ @throws PkixNameConstraintValidatorException
+ if the IP is excluded.
+
+
+ Checks if the IP address ip is constrained by
+ constraint.
+
+ @param ip The IP address.
+ @param constraint The constraint. This is an IP address concatenated with
+ its subnetmask.
+ @return true if constrained, false
+ otherwise.
+
+
+ The common part of email1 and email2 is
+ added to the union union. If email1 and
+ email2 have nothing in common they are added both.
+
+ @param email1 Email address constraint 1.
+ @param email2 Email address constraint 2.
+ @param union The union.
+
+
+ The most restricting part from email1 and
+ email2 is added to the intersection intersect.
+
+ @param email1 Email address constraint 1.
+ @param email2 Email address constraint 2.
+ @param intersect The intersection.
+
+
+ Checks if the given GeneralName is in the permitted ISet.
+
+ @param name The GeneralName
+ @throws PkixNameConstraintValidatorException
+ If the name
+
+
+ Check if the given GeneralName is contained in the excluded ISet.
+
+ @param name The GeneralName.
+ @throws PkixNameConstraintValidatorException
+ If the name is
+ excluded.
+
+
+ Updates the permitted ISet of these name constraints with the intersection
+ with the given subtree.
+
+ @param permitted The permitted subtrees
+
+
+ Adds a subtree to the excluded ISet of these name constraints.
+
+ @param subtree A subtree with an excluded GeneralName.
+
+
+ Returns the maximum IP address.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The maximum IP address.
+
+
+ Returns the minimum IP address.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The minimum IP address.
+
+
+ Compares IP address ip1 with ip2. If ip1
+ is equal to ip2 0 is returned. If ip1 is bigger 1 is returned, -1
+ otherwise.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return 0 if ip1 is equal to ip2, 1 if ip1 is bigger, -1 otherwise.
+
+
+ Returns the logical OR of the IP addresses ip1 and
+ ip2.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The OR of ip1 and ip2.
+
+
+ Stringifies an IPv4 or v6 address with subnet mask.
+
+ @param ip The IP with subnet mask.
+ @return The stringified IP address.
+
+
+
+ Summary description for PkixParameters.
+
+
+
+ This is the default PKIX validity model. Actually there are two variants
+ of this: The PKIX model and the modified PKIX model. The PKIX model
+ verifies that all involved certificates must have been valid at the
+ current time. The modified PKIX model verifies that all involved
+ certificates were valid at the signing time. Both are indirectly choosen
+ with the {@link PKIXParameters#setDate(java.util.Date)} method, so this
+ methods sets the Date when all certificates must have been
+ valid.
+
+
+ This model uses the following validity model. Each certificate must have
+ been valid at the moment where is was used. That means the end
+ certificate must have been valid at the time the signature was done. The
+ CA certificate which signed the end certificate must have been valid,
+ when the end certificate was signed. The CA (or Root CA) certificate must
+ have been valid, when the CA certificate was signed and so on. So the
+ {@link PKIXParameters#setDate(java.util.Date)} method sets the time, when
+ the end certificate must have been valid.
It is used e.g.
+ in the German signature law.
+
+
+ Creates an instance of PKIXParameters with the specified Set of
+ most-trusted CAs. Each element of the set is a TrustAnchor.
+
+ Note that the Set is copied to protect against subsequent modifications.
+
+ @param trustAnchors
+ a Set of TrustAnchors
+
+ @exception InvalidAlgorithmParameterException
+ if the specified Set is empty
+ (trustAnchors.isEmpty() == true)
+ @exception NullPointerException
+ if the specified Set is null
+ @exception ClassCastException
+ if any of the elements in the Set are not of type
+ java.security.cert.TrustAnchor
+
+
+ Returns the required constraints on the target certificate. The
+ constraints are returned as an instance of CertSelector. If
+ null, no constraints are defined.
+
+ Note that the CertSelector returned is cloned to protect against
+ subsequent modifications.
+
+ @return a CertSelector specifying the constraints on the target
+ certificate (or null)
+
+ @see #setTargetCertConstraints(CertSelector)
+
+
+ Sets the required constraints on the target certificate. The constraints
+ are specified as an instance of CertSelector. If null, no constraints are
+ defined.
+
+ Note that the CertSelector specified is cloned to protect against
+ subsequent modifications.
+
+ @param selector
+ a CertSelector specifying the constraints on the target
+ certificate (or null)
+
+ @see #getTargetCertConstraints()
+
+
+ Returns an immutable Set of initial policy identifiers (OID strings),
+ indicating that any one of these policies would be acceptable to the
+ certificate user for the purposes of certification path processing. The
+ default return value is an empty Set, which is
+ interpreted as meaning that any policy would be acceptable.
+
+ @return an immutable Set of initial policy OIDs in String
+ format, or an empty Set (implying any policy is
+ acceptable). Never returns null.
+
+ @see #setInitialPolicies(java.util.Set)
+
+
+ Sets the Set of initial policy identifiers (OID strings),
+ indicating that any one of these policies would be acceptable to the
+ certificate user for the purposes of certification path processing. By
+ default, any policy is acceptable (i.e. all policies), so a user that
+ wants to allow any policy as acceptable does not need to call this
+ method, or can call it with an empty Set (or
+ null).
+
+ Note that the Set is copied to protect against subsequent modifications.
+
+
+ @param initialPolicies
+ a Set of initial policy OIDs in String format (or
+ null)
+
+ @exception ClassCastException
+ if any of the elements in the set are not of type String
+
+ @see #getInitialPolicies()
+
+
+ Sets a List of additional certification path checkers. If
+ the specified List contains an object that is not a PKIXCertPathChecker,
+ it is ignored.
+
+ Each PKIXCertPathChecker specified implements additional
+ checks on a certificate. Typically, these are checks to process and
+ verify private extensions contained in certificates. Each
+ PKIXCertPathChecker should be instantiated with any
+ initialization parameters needed to execute the check.
+
+ This method allows sophisticated applications to extend a PKIX
+ CertPathValidator or CertPathBuilder. Each
+ of the specified PKIXCertPathCheckers will be called, in turn, by a PKIX
+ CertPathValidator or CertPathBuilder for
+ each certificate processed or validated.
+
+ Regardless of whether these additional PKIXCertPathCheckers are set, a
+ PKIX CertPathValidator or CertPathBuilder
+ must perform all of the required PKIX checks on each certificate. The one
+ exception to this rule is if the RevocationEnabled flag is set to false
+ (see the {@link #setRevocationEnabled(boolean) setRevocationEnabled}
+ method).
+
+ Note that the List supplied here is copied and each PKIXCertPathChecker
+ in the list is cloned to protect against subsequent modifications.
+
+ @param checkers
+ a List of PKIXCertPathCheckers. May be null, in which case no
+ additional checkers will be used.
+ @exception ClassCastException
+ if any of the elements in the list are not of type
+ java.security.cert.PKIXCertPathChecker
+ @see #getCertPathCheckers()
+
+
+ Returns the List of certification path checkers. Each PKIXCertPathChecker
+ in the returned IList is cloned to protect against subsequent modifications.
+
+ @return an immutable List of PKIXCertPathCheckers (may be empty, but not
+ null)
+
+ @see #setCertPathCheckers(java.util.List)
+
+
+ Adds a PKIXCertPathChecker to the list of certification
+ path checkers. See the {@link #setCertPathCheckers setCertPathCheckers}
+ method for more details.
+
+ Note that the PKIXCertPathChecker is cloned to protect
+ against subsequent modifications.
+
+ @param checker a PKIXCertPathChecker to add to the list of
+ checks. If null, the checker is ignored (not added to list).
+
+
+ Method to support Clone() under J2ME.
+ super.Clone() does not exist and fields are not copied.
+
+ @param params Parameters to set. If this are
+ ExtendedPkixParameters they are copied to.
+
+
+ Whether delta CRLs should be used for checking the revocation status.
+ Defaults to false.
+
+
+ The validity model.
+ @see #CHAIN_VALIDITY_MODEL
+ @see #PKIX_VALIDITY_MODEL
+
+
+ Sets the Bouncy Castle Stores for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ The IList is cloned.
+
+
+ @param stores A list of stores to use.
+ @see #getStores
+ @throws ClassCastException if an element of stores is not
+ a {@link Store}.
+
+
+ Adds a Bouncy Castle {@link Store} to find CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ This method should be used to add local stores, like collection based
+ X.509 stores, if available. Local stores should be considered first,
+ before trying to use additional (remote) locations, because they do not
+ need possible additional network traffic.
+
+ If store is null it is ignored.
+
+
+ @param store The store to add.
+ @see #getStores
+
+
+ Adds an additional Bouncy Castle {@link Store} to find CRLs, certificates,
+ attribute certificates or cross certificates.
+
+ You should not use this method. This method is used for adding additional
+ X.509 stores, which are used to add (remote) locations, e.g. LDAP, found
+ during X.509 object processing, e.g. in certificates or CRLs. This method
+ is used in PKIX certification path processing.
+
+ If store is null it is ignored.
+
+
+ @param store The store to add.
+ @see #getStores()
+
+
+ Returns an IList of additional Bouncy Castle
+ Stores used for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ @return an immutable IList of additional Bouncy Castle
+ Stores. Never null.
+
+ @see #addAddionalStore(Store)
+
+
+ Returns an IList of Bouncy Castle
+ Stores used for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ @return an immutable IList of Bouncy Castle
+ Stores. Never null.
+
+ @see #setStores(IList)
+
+
+ Returns if additional {@link X509Store}s for locations like LDAP found
+ in certificates or CRLs should be used.
+
+ @return Returns true if additional stores are used.
+
+
+ Sets if additional {@link X509Store}s for locations like LDAP found in
+ certificates or CRLs should be used.
+
+ @param enabled true if additional stores are used.
+
+
+ Returns the required constraints on the target certificate or attribute
+ certificate. The constraints are returned as an instance of
+ IX509Selector. If null, no constraints are
+ defined.
+
+
+ The target certificate in a PKIX path may be a certificate or an
+ attribute certificate.
+
+ Note that the IX509Selector returned is cloned to protect
+ against subsequent modifications.
+
+ @return a IX509Selector specifying the constraints on the
+ target certificate or attribute certificate (or null)
+ @see #setTargetConstraints
+ @see X509CertStoreSelector
+ @see X509AttributeCertStoreSelector
+
+
+ Sets the required constraints on the target certificate or attribute
+ certificate. The constraints are specified as an instance of
+ IX509Selector. If null, no constraints are
+ defined.
+
+ The target certificate in a PKIX path may be a certificate or an
+ attribute certificate.
+
+ Note that the IX509Selector specified is cloned to protect
+ against subsequent modifications.
+
+
+ @param selector a IX509Selector specifying the constraints on
+ the target certificate or attribute certificate (or
+ null)
+ @see #getTargetConstraints
+ @see X509CertStoreSelector
+ @see X509AttributeCertStoreSelector
+
+
+ Returns the trusted attribute certificate issuers. If attribute
+ certificates is verified the trusted AC issuers must be set.
+
+ The returned ISet consists of TrustAnchors.
+
+ The returned ISet is immutable. Never null
+
+
+ @return Returns an immutable set of the trusted AC issuers.
+
+
+ Sets the trusted attribute certificate issuers. If attribute certificates
+ is verified the trusted AC issuers must be set.
+
+ The trustedACIssuers must be a ISet of
+ TrustAnchor
+
+ The given set is cloned.
+
+
+ @param trustedACIssuers The trusted AC issuers to set. Is never
+ null.
+ @throws ClassCastException if an element of stores is not
+ a TrustAnchor.
+
+
+ Returns the necessary attributes which must be contained in an attribute
+ certificate.
+
+ The returned ISet is immutable and contains
+ Strings with the OIDs.
+
+
+ @return Returns the necessary AC attributes.
+
+
+ Sets the necessary which must be contained in an attribute certificate.
+
+ The ISet must contain Strings with the
+ OIDs.
+
+ The set is cloned.
+
+
+ @param necessaryACAttributes The necessary AC attributes to set.
+ @throws ClassCastException if an element of
+ necessaryACAttributes is not a
+ String.
+
+
+ Returns the attribute certificates which are not allowed.
+
+ The returned ISet is immutable and contains
+ Strings with the OIDs.
+
+
+ @return Returns the prohibited AC attributes. Is never null.
+
+
+ Sets the attribute certificates which are not allowed.
+
+ The ISet must contain Strings with the
+ OIDs.
+
+ The set is cloned.
+
+
+ @param prohibitedACAttributes The prohibited AC attributes to set.
+ @throws ClassCastException if an element of
+ prohibitedACAttributes is not a
+ String.
+
+
+ Returns the attribute certificate checker. The returned set contains
+ {@link PKIXAttrCertChecker}s and is immutable.
+
+ @return Returns the attribute certificate checker. Is never
+ null.
+
+
+ Sets the attribute certificate checkers.
+
+ All elements in the ISet must a {@link PKIXAttrCertChecker}.
+
+
+ The given set is cloned.
+
+
+ @param attrCertCheckers The attribute certificate checkers to set. Is
+ never null.
+ @throws ClassCastException if an element of attrCertCheckers
+ is not a PKIXAttrCertChecker.
+
+
+
+ Summary description for PkixPolicyNode.
+
+
+
+ Constructors
+
+
+
+ This class helps to handle CRL revocation reasons mask. Each CRL handles a
+ certain set of revocation reasons.
+
+
+
+
+ Constructs are reason mask with the reasons.
+
+ The reasons.
+
+
+
+ A reason mask with no reason.
+
+
+
+
+ A mask with all revocation reasons.
+
+
+
+ Adds all reasons from the reasons mask to this mask.
+
+ @param mask The reasons mask to add.
+
+
+
+ Returns true if this reasons mask contains all possible
+ reasons.
+
+ true if this reasons mask contains all possible reasons.
+
+
+
+
+ Intersects this mask with the given reasons mask.
+
+ mask The mask to intersect with.
+ The intersection of this and teh given mask.
+
+
+
+ Returns true if the passed reasons mask has new reasons.
+
+ The reasons mask which should be tested for new reasons.
+ true if the passed reasons mask has new reasons.
+
+
+
+ Returns the reasons in this mask.
+
+
+
+ If the complete CRL includes an issuing distribution point (IDP) CRL
+ extension check the following:
+
+ (i) If the distribution point name is present in the IDP CRL extension
+ and the distribution field is present in the DP, then verify that one of
+ the names in the IDP matches one of the names in the DP. If the
+ distribution point name is present in the IDP CRL extension and the
+ distribution field is omitted from the DP, then verify that one of the
+ names in the IDP matches one of the names in the cRLIssuer field of the
+ DP.
+
+
+ (ii) If the onlyContainsUserCerts boolean is asserted in the IDP CRL
+ extension, verify that the certificate does not include the basic
+ constraints extension with the cA boolean asserted.
+
+
+ (iii) If the onlyContainsCACerts boolean is asserted in the IDP CRL
+ extension, verify that the certificate includes the basic constraints
+ extension with the cA boolean asserted.
+
+
+ (iv) Verify that the onlyContainsAttributeCerts boolean is not asserted.
+
+
+ @param dp The distribution point.
+ @param cert The certificate.
+ @param crl The CRL.
+ @throws AnnotatedException if one of the conditions is not met or an error occurs.
+
+
+ If the DP includes cRLIssuer, then verify that the issuer field in the
+ complete CRL matches cRLIssuer in the DP and that the complete CRL
+ contains an
+ g distribution point extension with the indirectCRL
+ boolean asserted. Otherwise, verify that the CRL issuer matches the
+ certificate issuer.
+
+ @param dp The distribution point.
+ @param cert The certificate ot attribute certificate.
+ @param crl The CRL for cert.
+ @throws AnnotatedException if one of the above conditions does not apply or an error
+ occurs.
+
+
+ Obtain and validate the certification path for the complete CRL issuer.
+ If a key usage extension is present in the CRL issuer's certificate,
+ verify that the cRLSign bit is set.
+
+ @param crl CRL which contains revocation information for the certificate
+ cert.
+ @param cert The attribute certificate or certificate to check if it is
+ revoked.
+ @param defaultCRLSignCert The issuer certificate of the certificate cert.
+ @param defaultCRLSignKey The public key of the issuer certificate
+ defaultCRLSignCert.
+ @param paramsPKIX paramsPKIX PKIX parameters.
+ @param certPathCerts The certificates on the certification path.
+ @return A Set with all keys of possible CRL issuer
+ certificates.
+ @throws AnnotatedException if the CRL is not valid or the status cannot be checked or
+ some error occurs.
+
+
+ Checks a distribution point for revocation information for the
+ certificate cert.
+
+ @param dp The distribution point to consider.
+ @param paramsPKIX PKIX parameters.
+ @param cert Certificate to check if it is revoked.
+ @param validDate The date when the certificate revocation status should be
+ checked.
+ @param defaultCRLSignCert The issuer certificate of the certificate cert.
+ @param defaultCRLSignKey The public key of the issuer certificate
+ defaultCRLSignCert.
+ @param certStatus The current certificate revocation status.
+ @param reasonMask The reasons mask which is already checked.
+ @param certPathCerts The certificates of the certification path.
+ @throws AnnotatedException if the certificate is revoked or the status cannot be checked
+ or some error occurs.
+
+
+ Checks a certificate if it is revoked.
+
+ @param paramsPKIX PKIX parameters.
+ @param cert Certificate to check if it is revoked.
+ @param validDate The date when the certificate revocation status should be
+ checked.
+ @param sign The issuer certificate of the certificate cert.
+ @param workingPublicKey The public key of the issuer certificate sign.
+ @param certPathCerts The certificates of the certification path.
+ @throws AnnotatedException if the certificate is revoked or the status cannot be checked
+ or some error occurs.
+
+
+ If use-deltas is set, verify the issuer and scope of the delta CRL.
+
+ @param deltaCRL The delta CRL.
+ @param completeCRL The complete CRL.
+ @param pkixParams The PKIX paramaters.
+ @throws AnnotatedException if an exception occurs.
+
+
+ Checks if an attribute certificate is revoked.
+
+ @param attrCert Attribute certificate to check if it is revoked.
+ @param paramsPKIX PKIX parameters.
+ @param issuerCert The issuer certificate of the attribute certificate
+ attrCert.
+ @param validDate The date when the certificate revocation status should
+ be checked.
+ @param certPathCerts The certificates of the certification path to be
+ checked.
+
+ @throws CertPathValidatorException if the certificate is revoked or the
+ status cannot be checked or some error occurs.
+
+
+ Searches for a holder public key certificate and verifies its
+ certification path.
+
+ @param attrCert the attribute certificate.
+ @param pkixParams The PKIX parameters.
+ @return The certificate path of the holder certificate.
+ @throws Exception if
+
+ no public key certificate can be found although holder
+ information is given by an entity name or a base certificate
+ ID
+ support classes cannot be created
+ no certification path for the public key certificate can
+ be built
+
+
+
+
+ Checks a distribution point for revocation information for the
+ certificate attrCert.
+
+ @param dp The distribution point to consider.
+ @param attrCert The attribute certificate which should be checked.
+ @param paramsPKIX PKIX parameters.
+ @param validDate The date when the certificate revocation status should
+ be checked.
+ @param issuerCert Certificate to check if it is revoked.
+ @param reasonMask The reasons mask which is already checked.
+ @param certPathCerts The certificates of the certification path to be
+ checked.
+ @throws Exception if the certificate is revoked or the status
+ cannot be checked or some error occurs.
+
+
+
+ A trust anchor or most-trusted Certification Authority (CA).
+
+ This class represents a "most-trusted CA", which is used as a trust anchor
+ for validating X.509 certification paths. A most-trusted CA includes the
+ public key of the CA, the CA's name, and any constraints upon the set of
+ paths which may be validated using this key. These parameters can be
+ specified in the form of a trusted X509Certificate or as individual
+ parameters.
+
+
+
+
+ Creates an instance of TrustAnchor with the specified X509Certificate and
+ optional name constraints, which are intended to be used as additional
+ constraints when validating an X.509 certification path.
+ The name constraints are specified as a byte array. This byte array
+ should contain the DER encoded form of the name constraints, as they
+ would appear in the NameConstraints structure defined in RFC 2459 and
+ X.509. The ASN.1 definition of this structure appears below.
+
+
+ NameConstraints ::= SEQUENCE {
+ permittedSubtrees [0] GeneralSubtrees OPTIONAL,
+ excludedSubtrees [1] GeneralSubtrees OPTIONAL }
+
+ GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
+
+ GeneralSubtree ::= SEQUENCE {
+ base GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL }
+
+ BaseDistance ::= INTEGER (0..MAX)
+
+ GeneralName ::= CHOICE {
+ otherName [0] OtherName,
+ rfc822Name [1] IA5String,
+ dNSName [2] IA5String,
+ x400Address [3] ORAddress,
+ directoryName [4] Name,
+ ediPartyName [5] EDIPartyName,
+ uniformResourceIdentifier [6] IA5String,
+ iPAddress [7] OCTET STRING,
+ registeredID [8] OBJECT IDENTIFIER}
+
+
+ Note that the name constraints byte array supplied is cloned to protect
+ against subsequent modifications.
+
+ a trusted X509Certificate
+ a byte array containing the ASN.1 DER encoding of a
+ NameConstraints extension to be used for checking name
+ constraints. Only the value of the extension is included, not
+ the OID or criticality flag. Specify null to omit the
+ parameter.
+ if the specified X509Certificate is null
+
+
+
+ Creates an instance of TrustAnchor where the
+ most-trusted CA is specified as an X500Principal and public key.
+
+
+
+ Name constraints are an optional parameter, and are intended to be used
+ as additional constraints when validating an X.509 certification path.
+
+ The name constraints are specified as a byte array. This byte array
+ contains the DER encoded form of the name constraints, as they
+ would appear in the NameConstraints structure defined in RFC 2459
+ and X.509. The ASN.1 notation for this structure is supplied in the
+ documentation for the other constructors.
+
+ Note that the name constraints byte array supplied here is cloned to
+ protect against subsequent modifications.
+
+
+ the name of the most-trusted CA as X509Name
+ the public key of the most-trusted CA
+
+ a byte array containing the ASN.1 DER encoding of a NameConstraints extension to
+ be used for checking name constraints. Only the value of the extension is included,
+ not the OID or criticality flag. Specify null to omit the parameter.
+
+
+ if caPrincipal or pubKey is null
+
+
+
+
+ Creates an instance of TrustAnchor where the most-trusted
+ CA is specified as a distinguished name and public key. Name constraints
+ are an optional parameter, and are intended to be used as additional
+ constraints when validating an X.509 certification path.
+
+ The name constraints are specified as a byte array. This byte array
+ contains the DER encoded form of the name constraints, as they would
+ appear in the NameConstraints structure defined in RFC 2459 and X.509.
+
+ the X.500 distinguished name of the most-trusted CA in RFC
+ 2253 string format
+ the public key of the most-trusted CA
+ a byte array containing the ASN.1 DER encoding of a
+ NameConstraints extension to be used for checking name
+ constraints. Only the value of the extension is included, not
+ the OID or criticality flag. Specify null to omit the
+ parameter.
+ throws NullPointerException, IllegalArgumentException
+
+
+
+ Returns the most-trusted CA certificate.
+
+
+
+
+ Returns the name of the most-trusted CA as an X509Name.
+
+
+
+
+ Returns the name of the most-trusted CA in RFC 2253 string format.
+
+
+
+
+ Returns the public key of the most-trusted CA.
+
+
+
+
+ Decode the name constraints and clone them if not null.
+
+
+
+
+ Returns a formatted string describing the TrustAnchor.
+
+ a formatted string describing the TrustAnchor
+
+
+ Recognised hash algorithms for the time stamp protocol.
+
+
+ Fetches the signature time-stamp attributes from a SignerInformation object.
+ Checks that the MessageImprint for each time-stamp matches the signature field.
+ (see RFC 3161 Appendix A).
+
+ @param signerInfo a SignerInformation to search for time-stamps
+ @return a collection of TimeStampToken objects
+ @throws TSPValidationException
+
+
+ Validate the passed in certificate as being of the correct type to be used
+ for time stamping. To be valid it must have an ExtendedKeyUsage extension
+ which has a key purpose identifier of id-kp-timeStamping.
+
+ @param cert the certificate of interest.
+ @throws TspValidationException if the certicate fails on one of the check points.
+
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Exception thrown if a TSP request or response fails to validate.
+
+ If a failure code is associated with the exception it can be retrieved using
+ the getFailureCode() method.
+
+
+ Return the failure code associated with this exception - if one is set.
+
+ @return the failure code if set, -1 otherwise.
+
+
+ Base class for an RFC 3161 Time Stamp Request.
+
+
+ Create a TimeStampRequest from the past in byte array.
+
+ @param req byte array containing the request.
+ @throws IOException if the request is malformed.
+
+
+ Create a TimeStampRequest from the past in input stream.
+
+ @param in input stream containing the request.
+ @throws IOException if the request is malformed.
+
+
+ Validate the timestamp request, checking the digest to see if it is of an
+ accepted type and whether it is of the correct length for the algorithm specified.
+
+ @param algorithms a set of string OIDS giving accepted algorithms.
+ @param policies if non-null a set of policies we are willing to sign under.
+ @param extensions if non-null a set of extensions we are willing to accept.
+ @throws TspException if the request is invalid, or processing fails.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Generator for RFC 3161 Time Stamp Request objects.
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ @throws IOException
+
+
+ add a given extension field for the standard extensions tag
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ @throws IOException
+
+
+ add a given extension field for the standard extensions tag
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+ Base class for an RFC 3161 Time Stamp Response object.
+
+
+ Create a TimeStampResponse from a byte array containing an ASN.1 encoding.
+
+ @param resp the byte array containing the encoded response.
+ @throws TspException if the response is malformed.
+ @throws IOException if the byte array doesn't represent an ASN.1 encoding.
+
+
+ Create a TimeStampResponse from an input stream containing an ASN.1 encoding.
+
+ @param input the input stream containing the encoded response.
+ @throws TspException if the response is malformed.
+ @throws IOException if the stream doesn't represent an ASN.1 encoding.
+
+
+ Check this response against to see if it a well formed response for
+ the passed in request. Validation will include checking the time stamp
+ token if the response status is GRANTED or GRANTED_WITH_MODS.
+
+ @param request the request to be checked against
+ @throws TspException if the request can not match this response.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Generator for RFC 3161 Time Stamp Responses.
+
+
+ Return an appropriate TimeStampResponse.
+
+ If genTime is null a timeNotAvailable error response will be returned.
+
+ @param request the request this response is for.
+ @param serialNumber serial number for the response token.
+ @param genTime generation time for the response token.
+ @param provider provider to use for signature calculation.
+ @return
+ @throws NoSuchAlgorithmException
+ @throws NoSuchProviderException
+ @throws TSPException
+
+
+
+ Generate a TimeStampResponse with chosen status and FailInfoField.
+
+ @param status the PKIStatus to set.
+ @param failInfoField the FailInfoField to set.
+ @param statusString an optional string describing the failure.
+ @return a TimeStampResponse with a failInfoField and optional statusString
+ @throws TSPException in case the response could not be created
+
+
+ Validate the time stamp token.
+
+ To be valid the token must be signed by the passed in certificate and
+ the certificate must be the one referred to by the SigningCertificate
+ attribute included in the hashed attributes of the token. The
+ certificate must also have the ExtendedKeyUsageExtension with only
+ KeyPurposeID.IdKPTimeStamping and have been valid at the time the
+ timestamp was created.
+
+
+ A successful call to validate means all the above are true.
+
+
+
+ Return the underlying CmsSignedData object.
+
+ @return the underlying CMS structure.
+
+
+ Return a ASN.1 encoded byte stream representing the encoded object.
+
+ @throws IOException if encoding fails.
+
+
+ basic creation - only the default attributes will be included here.
+
+
+ create with a signer with extra signed/unsigned attributes.
+
+
+ @return the nonce value, null if there isn't one.
+
+
+ General array utilities.
+
+
+
+ Are two arrays equal.
+
+ Left side.
+ Right side.
+ True if equal.
+
+
+
+ A constant time equals comparison - does not terminate early if
+ test will fail.
+
+ first array
+ second array
+ true if arrays equal, false otherwise.
+
+
+ Make a copy of a range of bytes from the passed in data array. The range can
+ extend beyond the end of the input array, in which case the return array will
+ be padded with zeroes.
+
+ @param data the array from which the data is to be copied.
+ @param from the start index at which the copying should take place.
+ @param to the final index of the range (exclusive).
+
+ @return a new byte array containing the range given.
+
+
+ BigInteger utilities.
+
+
+ Return the passed in value as an unsigned byte array.
+
+ @param value value to be converted.
+ @return a byte array without a leading zero byte if present in the signed encoding.
+
+
+ Return the passed in value as an unsigned byte array of specified length, zero-extended as necessary.
+
+ @param length desired length of result array.
+ @param n value to be converted.
+ @return a byte array of specified length, with leading zeroes as necessary given the size of n.
+
+
+ Return a random BigInteger not less than 'min' and not greater than 'max'
+
+ @param min the least value that may be generated
+ @param max the greatest value that may be generated
+ @param random the source of randomness
+ @return a random BigInteger value in the range [min,max]
+
+
+
+ Produce a copy of this object with its configuration and in its current state.
+
+
+ The returned object may be used simply to store the state, or may be used as a similar object
+ starting from the copied state.
+
+
+
+
+ Restore a copied object state into this object.
+
+
+ Implementations of this method should try to avoid or minimise memory allocation to perform the reset.
+
+ an object originally {@link #copy() copied} from an object of the same type as this instance.
+ if the provided object is not of the correct type.
+ if the other parameter is in some other way invalid.
+
+
+ Exception to be thrown on a failure to reset an object implementing Memoable.
+
+ The exception extends InvalidCastException to enable users to have a single handling case,
+ only introducing specific handling of this one if required.
+
+
+
+ Basic Constructor.
+
+ @param msg message to be associated with this exception.
+
+
+ General string utilities.
+
+
+
+ Return the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC) for a given DateTime value.
+
+ A UTC DateTime value not before epoch.
+ Number of whole milliseconds after epoch.
+ 'dateTime' is before epoch.
+
+
+
+ Create a DateTime value from the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).
+
+ Number of milliseconds since the epoch.
+ A UTC DateTime value
+
+
+
+ Return the current number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).
+
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+ @return a byte array containing the base 64 encoded data.
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+ @return a byte array containing the base 64 encoded data.
+
+
+ Encode the byte data to base 64 writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Encode the byte data to base 64 writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded input data. It is assumed the input data is valid.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the base 64 encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ encode the input data producing a base 64 output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+
+ A buffering class to allow translation from one format to another to
+ be done in discrete chunks.
+
+
+
+
+ Create a buffered Decoder.
+
+ The translater to use.
+ The size of the buffer.
+
+
+
+ Process one byte of data.
+
+ Data in.
+ Byte array for the output.
+ The offset in the output byte array to start writing from.
+ The amount of output bytes.
+
+
+
+ Process data from a byte array.
+
+ The input data.
+ Start position within input data array.
+ Amount of data to process from input data array.
+ Array to store output.
+ Position in output array to start writing from.
+ The amount of output bytes.
+
+
+
+ A class that allows encoding of data using a specific encoder to be processed in chunks.
+
+
+
+
+ Create.
+
+ The translator to use.
+ Size of the chunks.
+
+
+
+ Process one byte of data.
+
+ The byte.
+ An array to store output in.
+ Offset within output array to start writing from.
+
+
+
+
+ Process data from a byte array.
+
+ Input data Byte array containing data to be processed.
+ Start position within input data array.
+ Amount of input data to be processed.
+ Output data array.
+ Offset within output data array to start writing to.
+ The amount of data written.
+
+
+
+ Class to decode and encode Hex.
+
+
+
+ encode the input data producing a Hex encoded byte array.
+
+ @return a byte array containing the Hex encoded data.
+
+
+ encode the input data producing a Hex encoded byte array.
+
+ @return a byte array containing the Hex encoded data.
+
+
+ Hex encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Hex encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded input data. It is assumed the input data is valid.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the Hex encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the Hex encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ encode the input data producing a Hex output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+
+ A hex translator.
+
+
+
+
+ Return encoded block size.
+
+ 2
+
+
+
+ Encode some data.
+
+ Input data array.
+ Start position within input data array.
+ The amount of data to process.
+ The output data array.
+ The offset within the output data array to start writing from.
+ Amount of data encoded.
+
+
+
+ Returns the decoded block size.
+
+ 1
+
+
+
+ Decode data from a byte array.
+
+ The input data array.
+ Start position within input data array.
+ The amounty of data to process.
+ The output data array.
+ The position within the output data array to start writing from.
+ The amount of data written.
+
+
+ Encode and decode byte arrays (typically from binary to 7-bit ASCII
+ encodings).
+
+
+
+ Translator interface.
+
+
+
+ Convert binary data to and from UrlBase64 encoding. This is identical to
+ Base64 encoding, except that the padding character is "." and the other
+ non-alphanumeric characters are "-" and "_" instead of "+" and "/".
+
+ The purpose of UrlBase64 encoding is to provide a compact encoding of binary
+ data that is safe for use as an URL parameter. Base64 encoding does not
+ produce encoded values that are safe for use in URLs, since "/" can be
+ interpreted as a path delimiter; "+" is the encoded form of a space; and
+ "=" is used to separate a name from the corresponding value in an URL
+ parameter.
+
+
+
+ Encode the input data producing a URL safe base 64 encoded byte array.
+
+ @return a byte array containing the URL safe base 64 encoded data.
+
+
+ Encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Decode the URL safe base 64 encoded input data - white space will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the URL safe base 64 encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the URL safe base 64 encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ Decode the URL safe base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ Convert binary data to and from UrlBase64 encoding. This is identical to
+ Base64 encoding, except that the padding character is "." and the other
+ non-alphanumeric characters are "-" and "_" instead of "+" and "/".
+
+ The purpose of UrlBase64 encoding is to provide a compact encoding of binary
+ data that is safe for use as an URL parameter. Base64 encoding does not
+ produce encoded values that are safe for use in URLs, since "/" can be
+ interpreted as a path delimiter; "+" is the encoded form of a space; and
+ "=" is used to separate a name from the corresponding value in an URL
+ parameter.
+
+
+
+
+ Pipe all bytes from inStr to outStr , throwing StreamFlowException if greater
+ than limit bytes in inStr .
+
+
+ A
+
+
+ A
+
+
+ A
+
+ The number of bytes actually transferred, if not greater than limit
+
+
+
+
+ A
+
+
+
+
+
+ A
+
+
+ A
+
+
+
+
+
+ A
+
+
+
+
+ A generic PEM writer, based on RFC 1421
+
+
+ Base constructor.
+
+ @param out output stream to use.
+
+
+ Return the number of bytes or characters required to contain the
+ passed in object if it is PEM encoded.
+
+ @param obj pem object to be output
+ @return an estimate of the number of bytes
+
+
+ Validate the given IPv4 or IPv6 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid address, false otherwise
+
+
+ Validate the given IPv4 or IPv6 address and netmask.
+
+ @param address the IP address as a string.
+
+ @return true if a valid address with netmask, false otherwise
+
+
+ Validate the given IPv4 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid IPv4 address, false otherwise
+
+
+ Validate the given IPv6 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid IPv4 address, false otherwise
+
+
+
+ Summary description for DeflaterOutputStream.
+
+
+
+
+ Summary description for DeflaterOutputStream.
+
+
+
+
+ The Holder object.
+
+ Holder ::= SEQUENCE {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+
+ Constructs a holder for v2 attribute certificates with a hash value for
+ some type of object.
+
+ digestedObjectType can be one of the following:
+
+ 0 - publicKey - A hash of the public key of the holder must be
+ passed.
+ 1 - publicKeyCert - A hash of the public key certificate of the
+ holder must be passed.
+ 2 - otherObjectDigest - A hash of some other object type must be
+ passed. otherObjectTypeID must not be empty.
+
+
+ This cannot be used if a v1 attribute certificate is used.
+
+ @param digestedObjectType The digest object type.
+ @param digestAlgorithm The algorithm identifier for the hash.
+ @param otherObjectTypeID The object type ID if
+ digestedObjectType is
+ otherObjectDigest.
+ @param objectDigest The hash value.
+
+
+ Returns the digest object type if an object digest info is used.
+
+
+ 0 - publicKey - A hash of the public key of the holder must be
+ passed.
+ 1 - publicKeyCert - A hash of the public key certificate of the
+ holder must be passed.
+ 2 - otherObjectDigest - A hash of some other object type must be
+ passed. otherObjectTypeID must not be empty.
+
+
+
+ @return The digest object type or -1 if no object digest info is set.
+
+
+ Returns the other object type ID if an object digest info is used.
+
+ @return The other object type ID or null if no object
+ digest info is set.
+
+
+ Returns the hash if an object digest info is used.
+
+ @return The hash or null if no object digest info is set.
+
+
+ Returns the digest algorithm ID if an object digest info is used.
+
+ @return The digest algorithm ID or null if no object
+ digest info is set.
+
+
+ Return any principal objects inside the attribute certificate holder entity names field.
+
+ @return an array of IPrincipal objects (usually X509Name), null if no entity names field is set.
+
+
+ Return the principals associated with the issuer attached to this holder
+
+ @return an array of principals, null if no BaseCertificateID is set.
+
+
+ Return the serial number associated with the issuer attached to this holder.
+
+ @return the certificate serial number, null if no BaseCertificateID is set.
+
+
+ Carrying class for an attribute certificate issuer.
+
+
+ Set the issuer directly with the ASN.1 structure.
+
+ @param issuer The issuer
+
+
+ Return any principal objects inside the attribute certificate issuer object.
+ An array of IPrincipal objects (usually X509Principal).
+
+
+ Interface for an X.509 Attribute Certificate.
+
+
+ The version number for the certificate.
+
+
+ The serial number for the certificate.
+
+
+ The UTC DateTime before which the certificate is not valid.
+
+
+ The UTC DateTime after which the certificate is not valid.
+
+
+ The holder of the certificate.
+
+
+ The issuer details for the certificate.
+
+
+ Return the attributes contained in the attribute block in the certificate.
+ An array of attributes.
+
+
+ Return the attributes with the same type as the passed in oid.
+ The object identifier we wish to match.
+ An array of matched attributes, null if there is no match.
+
+
+ Return an ASN.1 encoded byte array representing the attribute certificate.
+ An ASN.1 encoded byte array.
+ If the certificate cannot be encoded.
+
+
+
+ Get all critical extension values, by oid
+
+ IDictionary with string (OID) keys and Asn1OctetString values
+
+
+
+ Get all non-critical extension values, by oid
+
+ IDictionary with string (OID) keys and Asn1OctetString values
+
+
+
+ A utility class that will extract X509Principal objects from X.509 certificates.
+
+ Use this in preference to trying to recreate a principal from a string, not all
+ DNs are what they should be, so it's best to leave them encoded where they
+ can be.
+
+
+
+ Return the issuer of the given cert as an X509Principal.
+
+
+ Return the subject of the given cert as an X509Principal.
+
+
+ Return the issuer of the given CRL as an X509Principal.
+
+
+
+ A factory to produce Public Key Info Objects.
+
+
+
+
+ Create a Subject Public Key Info object for a given public key.
+
+ One of ElGammalPublicKeyParameters, DSAPublicKeyParameter, DHPublicKeyParameters, RsaKeyParameters or ECPublicKeyParameters
+ A subject public key info object.
+ Throw exception if object provided is not one of the above.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate object and initializes it with the data
+ read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the certificates
+ read from the given input stream inStream.
+
+
+ Class for carrying the values in an X.509 Attribute.
+
+
+ @param at an object representing an attribute.
+
+
+ Create an X.509 Attribute with the type given by the passed in oid and
+ the value represented by an ASN.1 Set containing value.
+
+ @param oid type of the attribute
+ @param value value object to go into the atribute's value set.
+
+
+ Create an X.59 Attribute with the type given by the passed in oid and the
+ value represented by an ASN.1 Set containing the objects in value.
+
+ @param oid type of the attribute
+ @param value vector of values to go in the attribute's value set.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ An Object representing an X509 Certificate.
+ Has static methods for loading Certificates encoded in many forms that return X509Certificate Objects.
+
+
+
+
+ Return true if the current time is within the start and end times nominated on the certificate.
+
+ true id certificate is valid for the current time.
+
+
+
+ Return true if the nominated time is within the start and end times nominated on the certificate.
+
+ The time to test validity against.
+ True if certificate is valid for nominated time.
+
+
+
+ Checks if the current date is within certificate's validity period.
+
+
+
+
+ Checks if the given date is within certificate's validity period.
+
+ if the certificate is expired by given date
+ if the certificate is not yet valid on given date
+
+
+
+ Return the certificate's version.
+
+ An integer whose value Equals the version of the cerficate.
+
+
+
+ Return a BigInteger containing the serial number.
+
+ The Serial number.
+
+
+
+ Get the Issuer Distinguished Name. (Who signed the certificate.)
+
+ And X509Object containing name and value pairs.
+
+
+
+ Get the subject of this certificate.
+
+ An X509Name object containing name and value pairs.
+
+
+
+ The time that this certificate is valid from.
+
+ A DateTime object representing that time in the local time zone.
+
+
+
+ The time that this certificate is valid up to.
+
+ A DateTime object representing that time in the local time zone.
+
+
+
+ Return the Der encoded TbsCertificate data.
+ This is the certificate component less the signature.
+ To Get the whole certificate call the GetEncoded() member.
+
+ A byte array containing the Der encoded Certificate component.
+
+
+
+ The signature.
+
+ A byte array containg the signature of the certificate.
+
+
+
+ A meaningful version of the Signature Algorithm. (EG SHA1WITHRSA)
+
+ A sting representing the signature algorithm.
+
+
+
+ Get the Signature Algorithms Object ID.
+
+ A string containg a '.' separated object id.
+
+
+
+ Get the signature algorithms parameters. (EG DSA Parameters)
+
+ A byte array containing the Der encoded version of the parameters or null if there are none.
+
+
+
+ Get the issuers UID.
+
+ A DerBitString.
+
+
+
+ Get the subjects UID.
+
+ A DerBitString.
+
+
+
+ Get a key usage guidlines.
+
+
+
+
+ Get the public key of the subject of the certificate.
+
+ The public key parameters.
+
+
+
+ Return a Der encoded version of this certificate.
+
+ A byte array.
+
+
+
+ Verify the certificate's signature using the nominated public key.
+
+ An appropriate public key parameter object, RsaPublicKeyParameters, DsaPublicKeyParameters or ECDsaPublicKeyParameters
+ True if the signature is valid.
+ If key submitted is not of the above nominated types.
+
+
+
+ Verify the certificate's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the certificate's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the certificate algorithm is invalid.
+
+
+
+ This class contains a cross certificate pair. Cross certificates pairs may
+ contain two cross signed certificates from two CAs. A certificate from the
+ other CA to this CA is contained in the forward certificate, the certificate
+ from this CA to the other CA is contained in the reverse certificate.
+
+
+
+ Constructor
+ Certificate from the other CA to this CA.
+ Certificate from this CA to the other CA.
+
+
+ Constructor from a ASN.1 CertificatePair structure.
+ The CertificatePair ASN.1 object.
+
+
+ Returns the certificate from the other CA to this CA.
+
+
+ Returns the certificate from this CA to the other CA.
+
+
+ class for dealing with X509 certificates.
+
+ At the moment this will deal with "-----BEGIN CERTIFICATE-----" to "-----END CERTIFICATE-----"
+ base 64 encoded certs, as well as the BER binaries of certificates and some classes of PKCS#7
+ objects.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate object and initializes it with the data
+ read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the certificates
+ read from the given input stream inStream.
+
+
+ The following extensions are listed in RFC 2459 as relevant to CRLs
+
+ Authority Key Identifier
+ Issuer Alternative Name
+ CRL Number
+ Delta CRL Indicator (critical)
+ Issuing Distribution Point (critical)
+
+
+
+ Verify the CRL's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the CRL's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the CRL algorithm is invalid.
+
+
+ Returns a string representation of this CRL.
+
+ @return a string representation of this CRL.
+
+
+ Checks whether the given certificate is on this CRL.
+
+ @param cert the certificate to check for.
+ @return true if the given certificate is on this CRL,
+ false otherwise.
+
+
+ The following extensions are listed in RFC 2459 as relevant to CRL Entries
+
+ ReasonCode Hode Instruction Code Invalidity Date Certificate Issuer
+ (critical)
+
+
+ Constructor for CRLEntries of indirect CRLs. If isIndirect
+ is false {@link #getCertificateIssuer()} will always
+ return null, previousCertificateIssuer is
+ ignored. If this isIndirect is specified and this CrlEntry
+ has no certificate issuer CRL entry extension
+ previousCertificateIssuer is returned by
+ {@link #getCertificateIssuer()}.
+
+ @param c
+ TbsCertificateList.CrlEntry object.
+ @param isIndirect
+ true if the corresponding CRL is a indirect
+ CRL.
+ @param previousCertificateIssuer
+ Certificate issuer of the previous CrlEntry.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate revocation list (CRL) object and initializes
+ it with the data read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the CRLs read from
+ the given input stream inStream.
+
+ The inStream may contain a sequence of DER-encoded CRLs, or
+ a PKCS#7 CRL set. This is a PKCS#7 SignedData object, with the
+ only significant field being crls. In particular the signature
+ and the contents are ignored.
+
+
+
+ Get non critical extensions.
+
+ A set of non critical extension oids.
+
+
+
+ Get any critical extensions.
+
+ A sorted list of critical entension.
+
+
+
+ Get the value of a given extension.
+
+ The object ID of the extension.
+ An Asn1OctetString object if that extension is found or null if not.
+
+
+ A holding class for constructing an X509 Key Usage extension.
+
+
+ id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
+
+ KeyUsage ::= BIT STRING {
+ digitalSignature (0),
+ nonRepudiation (1),
+ keyEncipherment (2),
+ dataEncipherment (3),
+ keyAgreement (4),
+ keyCertSign (5),
+ cRLSign (6),
+ encipherOnly (7),
+ decipherOnly (8) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (X509KeyUsage.keyEncipherment | X509KeyUsage.dataEncipherment)
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Class to Generate X509V1 Certificates.
+
+
+
+
+ Default Constructor.
+
+
+
+
+ Reset the generator.
+
+
+
+
+ Set the certificate's serial number.
+
+ Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data.
+ You will be surprised how ugly a serial number collision can get.
+ The serial number.
+
+
+
+ Set the issuer distinguished name.
+ The issuer is the entity whose private key is used to sign the certificate.
+
+ The issuers DN.
+
+
+
+ Set the date that this certificate is to be valid from.
+
+
+
+
+
+ Set the date after which this certificate will no longer be valid.
+
+
+
+
+
+ Set the subject distinguished name.
+ The subject describes the entity associated with the public key.
+
+
+
+
+
+ Set the public key that this certificate identifies.
+
+
+
+
+
+ Set the signature algorithm that will be used to sign this certificate.
+ This can be either a name or an OID, names are treated as case insensitive.
+
+ string representation of the algorithm name
+
+
+
+ Generate a new X509Certificate.
+
+ The private key of the issuer used to sign this certificate.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate specifying a SecureRandom instance that you would like to use.
+
+ The private key of the issuer used to sign this certificate.
+ The Secure Random you want to use.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Certificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ An implementation of a version 2 X.509 Attribute Certificate.
+
+
+
+ Verify the certificate's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the certificate's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the certificate algorithm is invalid.
+
+
+ Class to produce an X.509 Version 2 AttributeCertificate.
+
+
+ Reset the generator
+
+
+ Set the Holder of this Attribute Certificate.
+
+
+ Set the issuer.
+
+
+ Set the serial number for the certificate.
+
+
+
+ Set the signature algorithm. This can be either a name or an OID, names
+ are treated as case insensitive.
+
+ The algorithm name.
+
+
+ Add an attribute.
+
+
+ Add a given extension field for the standard extensions tag.
+
+
+
+ Add a given extension field for the standard extensions tag.
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+
+
+ Generate an X509 certificate, based on the current issuer and subject.
+
+
+
+
+ Generate an X509 certificate, based on the current issuer and subject,
+ using the supplied source of randomness, if required.
+
+
+
+
+ Generate a new X.509 Attribute Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An IX509AttributeCertificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ class to produce an X.509 Version 2 CRL.
+
+
+ reset the generator
+
+
+ Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the
+ certificate.
+
+
+ Reason being as indicated by CrlReason, i.e. CrlReason.KeyCompromise
+ or 0 if CrlReason is not to be used
+
+
+
+ Add a CRL entry with an Invalidity Date extension as well as a CrlReason extension.
+ Reason being as indicated by CrlReason, i.e. CrlReason.KeyCompromise
+ or 0 if CrlReason is not to be used
+
+
+
+ Add a CRL entry with extensions.
+
+
+
+ Add the CRLEntry objects contained in a previous CRL.
+
+ @param other the X509Crl to source the other entries from.
+
+
+
+ Set the signature algorithm that will be used to sign this CRL.
+
+
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+
+ Generate an X.509 CRL, based on the current issuer and subject.
+
+ The private key of the issuer that is signing this certificate.
+ An X509Crl.
+
+
+
+ Generate an X.509 CRL, based on the current issuer and subject using the specified secure random.
+
+ The private key of the issuer that is signing this certificate.
+ Your Secure Random instance.
+ An X509Crl.
+
+
+
+ Generate a new X509Crl using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Crl.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+
+ A class to Generate Version 3 X509Certificates.
+
+
+
+
+ Reset the Generator.
+
+
+
+
+ Set the certificate's serial number.
+
+ Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data.
+ You will be surprised how ugly a serial number collision can Get.
+ The serial number.
+
+
+
+ Set the distinguished name of the issuer.
+ The issuer is the entity which is signing the certificate.
+
+ The issuer's DN.
+
+
+
+ Set the date that this certificate is to be valid from.
+
+
+
+
+
+ Set the date after which this certificate will no longer be valid.
+
+
+
+
+
+ Set the DN of the entity that this certificate is about.
+
+
+
+
+
+ Set the public key that this certificate identifies.
+
+
+
+
+
+ Set the signature algorithm that will be used to sign this certificate.
+
+
+
+
+
+ Set the subject unique ID - note: it is very rare that it is correct to do this.
+
+
+
+
+
+ Set the issuer unique ID - note: it is very rare that it is correct to do this.
+
+
+
+
+
+ Add a given extension field for the standard extensions tag (tag 3).
+
+ string containing a dotted decimal Object Identifier.
+ Is it critical.
+ The value.
+
+
+
+ Add an extension to this certificate.
+
+ Its Object Identifier.
+ Is it critical.
+ The value.
+
+
+
+ Add an extension using a string with a dotted decimal OID.
+
+ string containing a dotted decimal Object Identifier.
+ Is it critical.
+ byte[] containing the value of this extension.
+
+
+
+ Add an extension to this certificate.
+
+ Its Object Identifier.
+ Is it critical.
+ byte[] containing the value of this extension.
+
+
+
+ Add a given extension field for the standard extensions tag (tag 3),
+ copying the extension value from another certificate.
+
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ copying the extension value from another certificate.
+ @throws CertificateParsingException if the extension cannot be extracted.
+
+
+
+ Generate an X509Certificate.
+
+ The private key of the issuer that is signing this certificate.
+ An X509Certificate.
+
+
+
+ Generate an X509Certificate using your own SecureRandom.
+
+ The private key of the issuer that is signing this certificate.
+ You Secure Random instance.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Certificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ A high level authority key identifier.
+
+
+ Constructor which will take the byte[] returned from getExtensionValue()
+
+ @param encodedValue a DER octet encoded string with the extension structure in it.
+ @throws IOException on parsing errors.
+
+
+ Create an AuthorityKeyIdentifier using the passed in certificate's public
+ key, issuer and serial number.
+
+ @param certificate the certificate providing the information.
+ @throws CertificateParsingException if there is a problem processing the certificate
+
+
+ Create an AuthorityKeyIdentifier using just the hash of the
+ public key.
+
+ @param pubKey the key to generate the hash from.
+ @throws InvalidKeyException if there is a problem using the key.
+
+
+ A high level subject key identifier.
+
+
+ Constructor which will take the byte[] returned from getExtensionValue()
+
+ @param encodedValue a DER octet encoded string with the extension structure in it.
+ @throws IOException on parsing errors.
+
+
+ This class is an Selector like implementation to select
+ attribute certificates from a given set of criteria.
+
+ @see org.bouncycastle.x509.X509AttributeCertificate
+ @see org.bouncycastle.x509.X509Store
+
+
+
+ Decides if the given attribute certificate should be selected.
+
+ The attribute certificate to be checked.
+ true if the object matches this selector.
+
+
+ The attribute certificate which must be matched.
+ If null is given, any will do.
+
+
+ The criteria for validity
+ If null is given any will do.
+
+
+ The holder.
+ If null is given any will do.
+
+
+ The issuer.
+ If null is given any will do.
+
+
+ The serial number.
+ If null is given any will do.
+
+
+ Adds a target name criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target names.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name The name as a GeneralName (not null)
+
+
+ Adds a target name criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target names.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name a byte array containing the name in ASN.1 DER encoded form of a GeneralName
+ @throws IOException if a parsing error occurs.
+
+
+ Adds a collection with target names criteria. If null is
+ given any will do.
+
+ The collection consists of either GeneralName objects or byte[] arrays representing
+ DER encoded GeneralName structures.
+
+
+ @param names A collection of target names.
+ @throws IOException if a parsing error occurs.
+ @see #AddTargetName(byte[])
+ @see #AddTargetName(GeneralName)
+
+
+ Gets the target names. The collection consists of Lists
+ made up of an Integer in the first entry and a DER encoded
+ byte array or a String in the second entry.
+ The returned collection is immutable.
+
+ @return The collection of target names
+ @see #setTargetNames(Collection)
+
+
+ Adds a target group criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target groups.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param group The group as GeneralName form (not null)
+
+
+ Adds a target group criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target groups.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name a byte array containing the group in ASN.1 DER encoded form of a GeneralName
+ @throws IOException if a parsing error occurs.
+
+
+ Adds a collection with target groups criteria. If null is
+ given any will do.
+
+ The collection consists of GeneralName objects or byte[]
+ representing DER encoded GeneralNames.
+
+
+ @param names A collection of target groups.
+ @throws IOException if a parsing error occurs.
+ @see #AddTargetGroup(byte[])
+ @see #AddTargetGroup(GeneralName)
+
+
+ Gets the target groups. The collection consists of Lists
+ made up of an Integer in the first entry and a DER encoded
+ byte array or a String in the second entry.
+ The returned collection is immutable.
+
+ @return The collection of target groups.
+ @see #setTargetGroups(Collection)
+
+
+
+ This class is an IX509Selector implementation to select
+ certificate pairs, which are e.g. used for cross certificates. The set of
+ criteria is given from two X509CertStoreSelector objects,
+ each of which, if present, must match the respective component of a pair.
+
+
+
+ The certificate pair which is used for testing on equality.
+
+
+ The certificate selector for the forward part.
+
+
+ The certificate selector for the reverse part.
+
+
+
+ Decides if the given certificate pair should be selected. If
+ obj is not a X509CertificatePair, this method
+ returns false.
+
+ The X509CertificatePair to be tested.
+ true if the object matches this selector.
+
+
+
+ An ISet of DerObjectIdentifier objects.
+
+
+
+ A simple collection backed store.
+
+
+ Basic constructor.
+
+ @param collection - initial contents for the store, this is copied.
+
+
+ Return the matches in the collection for the passed in selector.
+
+ @param selector the selector to match against.
+ @return a possibly empty collection of matching objects.
+
+
+ This class contains a collection for collection based X509Stores.
+
+
+
+ Constructor.
+
+ The collection is copied.
+
+
+ The collection containing X.509 object types.
+ If collection is null.
+
+
+ Returns a copy of the ICollection.
+
+
+ Returns a formatted string describing the parameters.
+
+
+
+ An ICollection of X509Name objects
+
+
+
+ The attribute certificate being checked. This is not a criterion.
+ Rather, it is optional information that may help a {@link X509Store} find
+ CRLs that would be relevant when checking revocation for the specified
+ attribute certificate. If null is specified, then no such
+ optional information is provided.
+
+ @param attrCert the IX509AttributeCertificate being checked (or
+ null)
+ @see #getAttrCertificateChecking()
+
+
+ If true only complete CRLs are returned. Defaults to
+ false.
+
+ @return true if only complete CRLs are returned.
+
+
+ Returns if this selector must match CRLs with the delta CRL indicator
+ extension set. Defaults to false.
+
+ @return Returns true if only CRLs with the delta CRL
+ indicator extension are selected.
+
+
+ The issuing distribution point.
+
+ The issuing distribution point extension is a CRL extension which
+ identifies the scope and the distribution point of a CRL. The scope
+ contains among others information about revocation reasons contained in
+ the CRL. Delta CRLs and complete CRLs must have matching issuing
+ distribution points.
+
+ The byte array is cloned to protect against subsequent modifications.
+
+ You must also enable or disable this criteria with
+ {@link #setIssuingDistributionPointEnabled(bool)}.
+
+ @param issuingDistributionPoint The issuing distribution point to set.
+ This is the DER encoded OCTET STRING extension value.
+ @see #getIssuingDistributionPoint()
+
+
+ Whether the issuing distribution point criteria should be applied.
+ Defaults to false.
+
+ You may also set the issuing distribution point criteria if not a missing
+ issuing distribution point should be assumed.
+
+ @return Returns if the issuing distribution point check is enabled.
+
+
+ The maximum base CRL number. Defaults to null.
+
+ @return Returns the maximum base CRL number.
+ @see #setMaxBaseCRLNumber(BigInteger)
+
+
+
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net35/MimeKit.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net35/MimeKit.dll
new file mode 100644
index 00000000..2e968d4c
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net35/MimeKit.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net40/BouncyCastle.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net40/BouncyCastle.dll
new file mode 100644
index 00000000..ee732537
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net40/BouncyCastle.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net40/BouncyCastle.xml b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net40/BouncyCastle.xml
new file mode 100644
index 00000000..33e81f46
--- /dev/null
+++ b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net40/BouncyCastle.xml
@@ -0,0 +1,24206 @@
+
+
+
+ BouncyCastle
+
+
+
+ Base class for both the compress and decompress classes.
+ Holds common arrays, and static data.
+
+ @author Keiron Liddle
+
+
+ An input stream that decompresses from the BZip2 format (with the file
+ header chars) to be read as any other stream.
+
+ @author Keiron Liddle
+
+ NB: note this class has been modified to read the leading BZ from the
+ start of the BZIP2 stream to make it compatible with other PGP programs.
+
+
+ An output stream that compresses into the BZip2 format (with the file
+ header chars) into another stream.
+
+ @author Keiron Liddle
+
+ TODO: Update to BZip2 1.0.1
+ NB: note this class has been modified to add a leading BZ to the
+ start of the BZIP2 stream to make it compatible with other PGP programs.
+
+
+
+ modified by Oliver Merkel, 010128
+
+
+
+ A simple class the hold and calculate the CRC for sanity checking
+ of the data.
+
+ @author Keiron Liddle
+
+
+ Return the DER encoding of the object, null if the DER encoding can not be made.
+
+ @return a DER byte array, null otherwise.
+
+
+ a general purpose ASN.1 decoder - note: this class differs from the
+ others in that it returns null after it has read the last object in
+ the stream. If an ASN.1 Null is encountered a Der/BER Null object is
+ returned.
+
+
+ Create an ASN1InputStream where no DER object will be longer than limit.
+
+ @param input stream containing ASN.1 encoded data.
+ @param limit maximum size of a DER encoded object.
+
+
+ Create an ASN1InputStream based on the input byte array. The length of DER objects in
+ the stream is automatically limited to the length of the input array.
+
+ @param input array containing ASN.1 encoded data.
+
+
+ build an object given its tag and the number of bytes to construct it from.
+
+
+ A Null object.
+
+
+ Create a base ASN.1 object from a byte array.
+ The byte array to parse.
+ The base ASN.1 object represented by the byte array.
+ If there is a problem parsing the data.
+
+
+ Read a base ASN.1 object from a stream.
+ The stream to parse.
+ The base ASN.1 object represented by the byte array.
+ If there is a problem parsing the data.
+
+
+ return an Octet string from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return an Octet string from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ @param string the octets making up the octet string.
+
+
+ return an Asn1Sequence from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Return an ASN1 sequence from a tagged object. There is a special
+ case here, if an object appears to have been explicitly tagged on
+ reading but we were expecting it to be implicitly tagged in the
+ normal course of events it indicates that we lost the surrounding
+ sequence - so we need to add it back (this will happen if the tagged
+ object is a sequence that contains other sequences). If you are
+ dealing with implicitly tagged sequences you really should
+ be using this method.
+
+ @param obj the tagged object.
+ @param explicitly true if the object is meant to be explicitly tagged,
+ false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return the object at the sequence position indicated by index.
+
+ @param index the sequence number (starting at zero) of the object
+ @return the object at the sequence position indicated by index.
+
+
+ return an ASN1Set from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Return an ASN1 set from a tagged object. There is a special
+ case here, if an object appears to have been explicitly tagged on
+ reading but we were expecting it to be implicitly tagged in the
+ normal course of events it indicates that we lost the surrounding
+ set - so we need to add it back (this will happen if the tagged
+ object is a sequence that contains other sequences). If you are
+ dealing with implicitly tagged sets you really should
+ be using this method.
+
+ @param obj the tagged object.
+ @param explicitly true if the object is meant to be explicitly tagged
+ false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return the object at the set position indicated by index.
+
+ @param index the set number (starting at zero) of the object
+ @return the object at the set position indicated by index.
+
+
+ ASN.1 TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if the object is explicitly tagged.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ return whether or not the object may be explicitly tagged.
+
+ Note: if the object has been read from an input stream, the only
+ time you can be sure if isExplicit is returning the true state of
+ affairs is if it returns false. An implicitly tagged object may appear
+ to be explicitly tagged, so you need to understand the context under
+ which the reading was done as well, see GetObject below.
+
+
+ return whatever was following the tag.
+
+ Note: tagged objects are generally context dependent if you're
+ trying to extract a tagged object you should be going via the
+ appropriate GetInstance method.
+
+
+ Return the object held in this tagged object as a parser assuming it has
+ the type of the passed in tag. If the object doesn't have a parser
+ associated with it, the base object is returned.
+
+
+ A BER Null object.
+
+
+ convert a vector of octet strings into a single byte string
+
+
+ The octets making up the octet string.
+
+
+ return the DER octets that make up this string.
+
+
+ create an empty sequence
+
+
+ create a sequence containing one object
+
+
+ create a sequence containing a vector of objects.
+
+
+ create an empty sequence
+
+
+ create a set containing one object
+
+
+ create a set containing a vector of objects.
+
+
+ BER TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if an explicitly tagged object.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ create an implicitly tagged object that contains a zero
+ length sequence.
+
+
+ Class representing the DER-type External
+
+
+ Creates a new instance of DerExternal
+ See X.690 for more informations about the meaning of these parameters
+ @param directReference The direct reference or null if not set.
+ @param indirectReference The indirect reference or null if not set.
+ @param dataValueDescriptor The data value descriptor or null if not set.
+ @param externalData The external data in its encoded form.
+
+
+ Creates a new instance of DerExternal.
+ See X.690 for more informations about the meaning of these parameters
+ @param directReference The direct reference or null if not set.
+ @param indirectReference The indirect reference or null if not set.
+ @param dataValueDescriptor The data value descriptor or null if not set.
+ @param encoding The encoding to be used for the external data
+ @param externalData The external data
+
+
+ The encoding of the content. Valid values are
+
+ 0 single-ASN1-type
+ 1 OCTET STRING
+ 2 BIT STRING
+
+
+
+ Base class for an application specific object
+
+
+ Return the enclosed object assuming explicit tagging.
+
+ @return the resulting object
+ @throws IOException if reconstruction fails.
+
+
+ Return the enclosed object assuming implicit tagging.
+
+ @param derTagNo the type tag that should be applied to the object's contents.
+ @return the resulting object
+ @throws IOException if reconstruction fails.
+
+
+ Der BMPString object.
+
+
+ return a BMP string from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a BMP string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ return a Bit string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Bit string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ @param data the octets making up the bit string.
+ @param padBits the number of extra bits at the end of the string.
+
+
+ Return the octets contained in this BIT STRING, checking that this BIT STRING really
+ does represent an octet aligned string. Only use this method when the standard you are
+ following dictates that the BIT STRING will be octet aligned.
+
+ @return a copy of the octet aligned data.
+
+
+ @return the value of the bit string as an int (truncating if necessary)
+
+
+ return a bool from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a DerBoolean from the passed in bool.
+
+
+ return a Boolean from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return an integer from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Enumerated from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ Generalized time object.
+
+
+ return a generalized time from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Generalized Time object from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ The correct format for this is YYYYMMDDHHMMSS[.f]Z, or without the Z
+ for local time, or Z+-HHMM on the end, for difference between local
+ time and UTC time. The fractional second amount f must consist of at
+ least one number with trailing zeroes removed.
+
+ @param time the time string.
+ @exception ArgumentException if string is an illegal format.
+
+
+ base constructor from a local time object
+
+
+ Return the time.
+ @return The time string as it appeared in the encoded object.
+
+
+ return the time - always in the form of
+ YYYYMMDDhhmmssGMT(+hh:mm|-hh:mm).
+
+ Normally in a certificate we would expect "Z" rather than "GMT",
+ however adding the "GMT" means we can just use:
+
+ dateF = new SimpleDateFormat("yyyyMMddHHmmssz");
+
+ To read in the time and Get a date which is compatible with our local
+ time zone.
+
+
+ return a Graphic String from the passed in object
+
+ @param obj a DerGraphicString or an object that can be converted into one.
+ @exception IllegalArgumentException if the object cannot be converted.
+ @return a DerGraphicString instance, or null.
+
+
+ return a Graphic String from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the tagged object cannot
+ be converted.
+ @return a DerGraphicString instance, or null.
+
+
+ basic constructor - with bytes.
+ @param string the byte encoding of the characters making up the string.
+
+
+ Der IA5String object - this is an ascii string.
+
+
+ return a IA5 string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an IA5 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - without validation.
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in an IA5String.
+
+
+ return true if the passed in String can be represented without
+ loss as an IA5String, false otherwise.
+
+ @return true if in printable set, false otherwise.
+
+
+ return an integer from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Integer from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ in some cases positive values Get crammed into a space,
+ that's not quite big enough...
+
+
+ A Null object.
+
+
+ Der NumericString object - this is an ascii string of characters {0,1,2,3,4,5,6,7,8,9, }.
+
+
+ return a Numeric string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Numeric string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - without validation..
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in a NumericString.
+
+
+ Return true if the string can be represented as a NumericString ('0'..'9', ' ')
+
+ @param str string to validate.
+ @return true if numeric, fale otherwise.
+
+
+ return an Oid from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an object Identifier from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ Return true if this oid is an extension of the passed in branch, stem.
+ @param stem the arc or branch that is a possible parent.
+ @return true if the branch is on the passed in stem, false otherwise.
+
+
+ The octets making up the octet string.
+
+
+ Der PrintableString object.
+
+
+ return a printable string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Printable string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor - this does not validate the string
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in a PrintableString.
+
+
+ return true if the passed in String can be represented without
+ loss as a PrintableString, false otherwise.
+
+ @return true if in printable set, false otherwise.
+
+
+ create an empty sequence
+
+
+ create a sequence containing one object
+
+
+ create a sequence containing a vector of objects.
+
+
+ A Der encoded set object
+
+
+ create an empty set
+
+
+ @param obj - a single object that makes up the set.
+
+
+ @param v - a vector of objects making up the set.
+
+
+ Der T61String (also the teletex string) - 8-bit characters
+
+
+ return a T61 string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an T61 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - with string.
+
+
+ DER TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if an explicitly tagged object.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ create an implicitly tagged object that contains a zero
+ length sequence.
+
+
+ UTC time object.
+
+
+ return an UTC Time from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an UTC Time from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ The correct format for this is YYMMDDHHMMSSZ (it used to be that seconds were
+ never encoded. When you're creating one of these objects from scratch, that's
+ what you want to use, otherwise we'll try to deal with whatever Gets read from
+ the input stream... (this is why the input format is different from the GetTime()
+ method output).
+
+ @param time the time string.
+
+
+ base constructor from a DateTime object
+
+
+ return the time as a date based on whatever a 2 digit year will return. For
+ standardised processing use ToAdjustedDateTime().
+
+ @return the resulting date
+ @exception ParseException if the date string cannot be parsed.
+
+
+ return the time as an adjusted date
+ in the range of 1950 - 2049.
+
+ @return a date in the range of 1950 to 2049.
+ @exception ParseException if the date string cannot be parsed.
+
+
+ return the time - always in the form of
+ YYMMDDhhmmssGMT(+hh:mm|-hh:mm).
+
+ Normally in a certificate we would expect "Z" rather than "GMT",
+ however adding the "GMT" means we can just use:
+
+ dateF = new SimpleDateFormat("yyMMddHHmmssz");
+
+ To read in the time and Get a date which is compatible with our local
+ time zone.
+
+ Note: In some cases, due to the local date processing, this
+ may lead to unexpected results. If you want to stick the normal
+ convention of 1950 to 2049 use the GetAdjustedTime() method.
+
+
+
+ Return a time string as an adjusted date with a 4 digit year.
+ This goes in the range of 1950 - 2049.
+
+
+
+ Der UTF8String object.
+
+
+ return an UTF8 string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an UTF8 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ Der UniversalString object.
+
+
+ return a Universal string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Universal string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ return a Videotex String from the passed in object
+
+ @param obj a DERVideotexString or an object that can be converted into one.
+ @exception IllegalArgumentException if the object cannot be converted.
+ @return a DERVideotexString instance, or null.
+
+
+ return a Videotex String from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the tagged object cannot
+ be converted.
+ @return a DERVideotexString instance, or null.
+
+
+ basic constructor - with bytes.
+ @param string the byte encoding of the characters making up the string.
+
+
+ Der VisibleString object.
+
+
+ return a Visible string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Visible string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ Marker interface for CHOICE objects - if you implement this in a roll-your-own
+ object, any attempt to tag the object implicitly will convert the tag to an
+ explicit one as the encoding rules require.
+
+ If you use this interface your class should also implement the getInstance
+ pattern which takes a tag object and the tagging mode used.
+
+
+
+ basic interface for Der string objects.
+
+
+ class for breaking up an Oid into it's component tokens, ala
+ java.util.StringTokenizer. We need this class as some of the
+ lightweight Java environment don't support classes like
+ StringTokenizer.
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+
+ CAKeyUpdAnnContent ::= SEQUENCE {
+ oldWithNew CmpCertificate, -- old pub signed with new priv
+ newWithOld CmpCertificate, -- new pub signed with old priv
+ newWithNew CmpCertificate -- new pub signed with new priv
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertConfirmContent ::= SEQUENCE OF CertStatus
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertOrEncCert ::= CHOICE {
+ certificate [0] CMPCertificate,
+ encryptedCert [1] EncryptedValue
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertRepMessage ::= SEQUENCE {
+ caPubs [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+ OPTIONAL,
+ response SEQUENCE OF CertResponse
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertResponse ::= SEQUENCE {
+ certReqId INTEGER,
+ -- to match this response with corresponding request (a value
+ -- of -1 is to be used if certReqId is not specified in the
+ -- corresponding request)
+ status PKIStatusInfo,
+ certifiedKeyPair CertifiedKeyPair OPTIONAL,
+ rspInfo OCTET STRING OPTIONAL
+ -- analogous to the id-regInfo-utf8Pairs string defined
+ -- for regInfo in CertReqMsg [CRMF]
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertStatus ::= SEQUENCE {
+ certHash OCTET STRING,
+ -- the hash of the certificate, using the same hash algorithm
+ -- as is used to create and verify the certificate signature
+ certReqId INTEGER,
+ -- to match this confirmation with the corresponding req/rep
+ statusInfo PKIStatusInfo OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertifiedKeyPair ::= SEQUENCE {
+ certOrEncCert CertOrEncCert,
+ privateKey [0] EncryptedValue OPTIONAL,
+ -- see [CRMF] for comment on encoding
+ publicationInfo [1] PKIPublicationInfo OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ Challenge ::= SEQUENCE {
+ owf AlgorithmIdentifier OPTIONAL,
+
+ -- MUST be present in the first Challenge; MAY be omitted in
+ -- any subsequent Challenge in POPODecKeyChallContent (if
+ -- omitted, then the owf used in the immediately preceding
+ -- Challenge is to be used).
+
+ witness OCTET STRING,
+ -- the result of applying the one-way function (owf) to a
+ -- randomly-generated INTEGER, A. [Note that a different
+ -- INTEGER MUST be used for each Challenge.]
+ challenge OCTET STRING
+ -- the encryption (under the public key for which the cert.
+ -- request is being made) of Rand, where Rand is specified as
+ -- Rand ::= SEQUENCE {
+ -- int INTEGER,
+ -- - the randomly-generated INTEGER A (above)
+ -- sender GeneralName
+ -- - the sender's name (as included in PKIHeader)
+ -- }
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Note: the addition of attribute certificates is a BC extension.
+
+
+
+ CMPCertificate ::= CHOICE {
+ x509v3PKCert Certificate
+ x509v2AttrCert [1] AttributeCertificate
+ }
+
+ Note: the addition of attribute certificates is a BC extension.
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CrlAnnContent ::= SEQUENCE OF CertificateList
+
+ @return a basic ASN.1 object representation.
+
+
+
+ ErrorMsgContent ::= SEQUENCE {
+ pKIStatusInfo PKIStatusInfo,
+ errorCode INTEGER OPTIONAL,
+ -- implementation-specific error codes
+ errorDetails PKIFreeText OPTIONAL
+ -- implementation-specific error details
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+
+ GenRepContent ::= SEQUENCE OF InfoTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+ Example InfoTypeAndValue contents include, but are not limited
+ to, the following (un-comment in this ASN.1 module and use as
+ appropriate for a given environment):
+
+ id-it-caProtEncCert OBJECT IDENTIFIER ::= {id-it 1}
+ CAProtEncCertValue ::= CMPCertificate
+ id-it-signKeyPairTypes OBJECT IDENTIFIER ::= {id-it 2}
+ SignKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ id-it-encKeyPairTypes OBJECT IDENTIFIER ::= {id-it 3}
+ EncKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ id-it-preferredSymmAlg OBJECT IDENTIFIER ::= {id-it 4}
+ PreferredSymmAlgValue ::= AlgorithmIdentifier
+ id-it-caKeyUpdateInfo OBJECT IDENTIFIER ::= {id-it 5}
+ CAKeyUpdateInfoValue ::= CAKeyUpdAnnContent
+ id-it-currentCRL OBJECT IDENTIFIER ::= {id-it 6}
+ CurrentCRLValue ::= CertificateList
+ id-it-unsupportedOIDs OBJECT IDENTIFIER ::= {id-it 7}
+ UnsupportedOIDsValue ::= SEQUENCE OF OBJECT IDENTIFIER
+ id-it-keyPairParamReq OBJECT IDENTIFIER ::= {id-it 10}
+ KeyPairParamReqValue ::= OBJECT IDENTIFIER
+ id-it-keyPairParamRep OBJECT IDENTIFIER ::= {id-it 11}
+ KeyPairParamRepValue ::= AlgorithmIdentifer
+ id-it-revPassphrase OBJECT IDENTIFIER ::= {id-it 12}
+ RevPassphraseValue ::= EncryptedValue
+ id-it-implicitConfirm OBJECT IDENTIFIER ::= {id-it 13}
+ ImplicitConfirmValue ::= NULL
+ id-it-confirmWaitTime OBJECT IDENTIFIER ::= {id-it 14}
+ ConfirmWaitTimeValue ::= GeneralizedTime
+ id-it-origPKIMessage OBJECT IDENTIFIER ::= {id-it 15}
+ OrigPKIMessageValue ::= PKIMessages
+ id-it-suppLangTags OBJECT IDENTIFIER ::= {id-it 16}
+ SuppLangTagsValue ::= SEQUENCE OF UTF8String
+
+ where
+
+ id-pkix OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3)
+ dod(6) internet(1) security(5) mechanisms(5) pkix(7)}
+ and
+ id-it OBJECT IDENTIFIER ::= {id-pkix 4}
+
+
+
+
+ InfoTypeAndValue ::= SEQUENCE {
+ infoType OBJECT IDENTIFIER,
+ infoValue ANY DEFINED BY infoType OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ KeyRecRepContent ::= SEQUENCE {
+ status PKIStatusInfo,
+ newSigCert [0] CMPCertificate OPTIONAL,
+ caCerts [1] SEQUENCE SIZE (1..MAX) OF
+ CMPCertificate OPTIONAL,
+ keyPairHist [2] SEQUENCE SIZE (1..MAX) OF
+ CertifiedKeyPair OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ OobCertHash ::= SEQUENCE {
+ hashAlg [0] AlgorithmIdentifier OPTIONAL,
+ certId [1] CertId OPTIONAL,
+ hashVal BIT STRING
+ -- hashVal is calculated over the Der encoding of the
+ -- self-signed certificate with the identifier certID.
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PkiBody.
+ @param type one of the TYPE_* constants
+ @param content message content
+
+
+
+ PkiBody ::= CHOICE { -- message-specific body elements
+ ir [0] CertReqMessages, --Initialization Request
+ ip [1] CertRepMessage, --Initialization Response
+ cr [2] CertReqMessages, --Certification Request
+ cp [3] CertRepMessage, --Certification Response
+ p10cr [4] CertificationRequest, --imported from [PKCS10]
+ popdecc [5] POPODecKeyChallContent, --pop Challenge
+ popdecr [6] POPODecKeyRespContent, --pop Response
+ kur [7] CertReqMessages, --Key Update Request
+ kup [8] CertRepMessage, --Key Update Response
+ krr [9] CertReqMessages, --Key Recovery Request
+ krp [10] KeyRecRepContent, --Key Recovery Response
+ rr [11] RevReqContent, --Revocation Request
+ rp [12] RevRepContent, --Revocation Response
+ ccr [13] CertReqMessages, --Cross-Cert. Request
+ ccp [14] CertRepMessage, --Cross-Cert. Response
+ ckuann [15] CAKeyUpdAnnContent, --CA Key Update Ann.
+ cann [16] CertAnnContent, --Certificate Ann.
+ rann [17] RevAnnContent, --Revocation Ann.
+ crlann [18] CRLAnnContent, --CRL Announcement
+ pkiconf [19] PKIConfirmContent, --Confirmation
+ nested [20] NestedMessageContent, --Nested Message
+ genm [21] GenMsgContent, --General Message
+ genp [22] GenRepContent, --General Response
+ error [23] ErrorMsgContent, --Error Message
+ certConf [24] CertConfirmContent, --Certificate confirm
+ pollReq [25] PollReqContent, --Polling request
+ pollRep [26] PollRepContent --Polling response
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiConfirmContent ::= NULL
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PKIFailureInfo ::= BIT STRING {
+ badAlg (0),
+ -- unrecognized or unsupported Algorithm Identifier
+ badMessageCheck (1), -- integrity check failed (e.g., signature did not verify)
+ badRequest (2),
+ -- transaction not permitted or supported
+ badTime (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+ badCertId (4), -- no certificate could be found matching the provided criteria
+ badDataFormat (5),
+ -- the data submitted has the wrong format
+ wrongAuthority (6), -- the authority indicated in the request is different from the one creating the response token
+ incorrectData (7), -- the requester's data is incorrect (for notary services)
+ missingTimeStamp (8), -- when the timestamp is missing but should be there (by policy)
+ badPOP (9) -- the proof-of-possession failed
+ certRevoked (10),
+ certConfirmed (11),
+ wrongIntegrity (12),
+ badRecipientNonce (13),
+ timeNotAvailable (14),
+ -- the TSA's time source is not available
+ unacceptedPolicy (15),
+ -- the requested TSA policy is not supported by the TSA
+ unacceptedExtension (16),
+ -- the requested extension is not supported by the TSA
+ addInfoNotAvailable (17)
+ -- the additional information requested could not be understood
+ -- or is not available
+ badSenderNonce (18),
+ badCertTemplate (19),
+ signerNotTrusted (20),
+ transactionIdInUse (21),
+ unsupportedVersion (22),
+ notAuthorized (23),
+ systemUnavail (24),
+ systemFailure (25),
+ -- the request cannot be handled due to system failure
+ duplicateCertReq (26)
+
+
+
+ Basic constructor.
+
+
+ Return the number of string elements present.
+
+ @return number of elements present.
+
+
+ Return the UTF8STRING at index.
+
+ @param index index of the string of interest
+ @return the string at index.
+
+
+
+ PkiFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String
+
+
+
+ Value for a "null" recipient or sender.
+
+
+
+ PkiHeader ::= SEQUENCE {
+ pvno INTEGER { cmp1999(1), cmp2000(2) },
+ sender GeneralName,
+ -- identifies the sender
+ recipient GeneralName,
+ -- identifies the intended recipient
+ messageTime [0] GeneralizedTime OPTIONAL,
+ -- time of production of this message (used when sender
+ -- believes that the transport will be "suitable"; i.e.,
+ -- that the time will still be meaningful upon receipt)
+ protectionAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used for calculation of protection bits
+ senderKID [2] KeyIdentifier OPTIONAL,
+ recipKID [3] KeyIdentifier OPTIONAL,
+ -- to identify specific keys used for protection
+ transactionID [4] OCTET STRING OPTIONAL,
+ -- identifies the transaction; i.e., this will be the same in
+ -- corresponding request, response, certConf, and PKIConf
+ -- messages
+ senderNonce [5] OCTET STRING OPTIONAL,
+ recipNonce [6] OCTET STRING OPTIONAL,
+ -- nonces used to provide replay protection, senderNonce
+ -- is inserted by the creator of this message; recipNonce
+ -- is a nonce previously inserted in a related message by
+ -- the intended recipient of this message
+ freeText [7] PKIFreeText OPTIONAL,
+ -- this may be used to indicate context-specific instructions
+ -- (this field is intended for human consumption)
+ generalInfo [8] SEQUENCE SIZE (1..MAX) OF
+ InfoTypeAndValue OPTIONAL
+ -- this may be used to convey context-specific information
+ -- (this field not primarily intended for human consumption)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PKIHeader ::= SEQUENCE {
+ pvno INTEGER { cmp1999(1), cmp2000(2) },
+ sender GeneralName,
+ -- identifies the sender
+ recipient GeneralName,
+ -- identifies the intended recipient
+ messageTime [0] GeneralizedTime OPTIONAL,
+ -- time of production of this message (used when sender
+ -- believes that the transport will be "suitable"; i.e.,
+ -- that the time will still be meaningful upon receipt)
+ protectionAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used for calculation of protection bits
+ senderKID [2] KeyIdentifier OPTIONAL,
+ recipKID [3] KeyIdentifier OPTIONAL,
+ -- to identify specific keys used for protection
+ transactionID [4] OCTET STRING OPTIONAL,
+ -- identifies the transaction; i.e., this will be the same in
+ -- corresponding request, response, certConf, and PKIConf
+ -- messages
+ senderNonce [5] OCTET STRING OPTIONAL,
+ recipNonce [6] OCTET STRING OPTIONAL,
+ -- nonces used to provide replay protection, senderNonce
+ -- is inserted by the creator of this message; recipNonce
+ -- is a nonce previously inserted in a related message by
+ -- the intended recipient of this message
+ freeText [7] PKIFreeText OPTIONAL,
+ -- this may be used to indicate context-specific instructions
+ -- (this field is intended for human consumption)
+ generalInfo [8] SEQUENCE SIZE (1..MAX) OF
+ InfoTypeAndValue OPTIONAL
+ -- this may be used to convey context-specific information
+ -- (this field not primarily intended for human consumption)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PkiMessage.
+
+ @param header message header
+ @param body message body
+ @param protection message protection (may be null)
+ @param extraCerts extra certificates (may be null)
+
+
+
+ PkiMessage ::= SEQUENCE {
+ header PKIHeader,
+ body PKIBody,
+ protection [0] PKIProtection OPTIONAL,
+ extraCerts [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+ OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiMessages ::= SEQUENCE SIZE (1..MAX) OF PkiMessage
+
+ @return a basic ASN.1 object representation.
+
+
+ @param status
+
+
+ @param status
+ @param statusString
+
+
+
+ PkiStatusInfo ::= SEQUENCE {
+ status PKIStatus, (INTEGER)
+ statusString PkiFreeText OPTIONAL,
+ failInfo PkiFailureInfo OPTIONAL (BIT STRING)
+ }
+
+ PKIStatus:
+ granted (0), -- you got exactly what you asked for
+ grantedWithMods (1), -- you got something like what you asked for
+ rejection (2), -- you don't get it, more information elsewhere in the message
+ waiting (3), -- the request body part has not yet been processed, expect to hear more later
+ revocationWarning (4), -- this message contains a warning that a revocation is imminent
+ revocationNotification (5), -- notification that a revocation has occurred
+ keyUpdateWarning (6) -- update already done for the oldCertId specified in CertReqMsg
+
+ PkiFailureInfo:
+ badAlg (0), -- unrecognized or unsupported Algorithm Identifier
+ badMessageCheck (1), -- integrity check failed (e.g., signature did not verify)
+ badRequest (2), -- transaction not permitted or supported
+ badTime (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+ badCertId (4), -- no certificate could be found matching the provided criteria
+ badDataFormat (5), -- the data submitted has the wrong format
+ wrongAuthority (6), -- the authority indicated in the request is different from the one creating the response token
+ incorrectData (7), -- the requester's data is incorrect (for notary services)
+ missingTimeStamp (8), -- when the timestamp is missing but should be there (by policy)
+ badPOP (9) -- the proof-of-possession failed
+
+
+
+
+
+ PbmParameter ::= SEQUENCE {
+ salt OCTET STRING,
+ -- note: implementations MAY wish to limit acceptable sizes
+ -- of this string to values appropriate for their environment
+ -- in order to reduce the risk of denial-of-service attacks
+ owf AlgorithmIdentifier,
+ -- AlgId for a One-Way Function (SHA-1 recommended)
+ iterationCount INTEGER,
+ -- number of times the OWF is applied
+ -- note: implementations MAY wish to limit acceptable sizes
+ -- of this integer to values appropriate for their environment
+ -- in order to reduce the risk of denial-of-service attacks
+ mac AlgorithmIdentifier
+ -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
+ } -- or HMAC [RFC2104, RFC2202])
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PollRepContent ::= SEQUENCE OF SEQUENCE {
+ certReqId INTEGER,
+ checkAfter INTEGER, -- time in seconds
+ reason PKIFreeText OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PollReqContent ::= SEQUENCE OF SEQUENCE {
+ certReqId INTEGER
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoDecKeyChallContent ::= SEQUENCE OF Challenge
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoDecKeyRespContent ::= SEQUENCE OF INTEGER
+
+ @return a basic ASN.1 object representation.
+
+
+
+ ProtectedPart ::= SEQUENCE {
+ header PKIHeader,
+ body PKIBody
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevAnnContent ::= SEQUENCE {
+ status PKIStatus,
+ certId CertId,
+ willBeRevokedAt GeneralizedTime,
+ badSinceDate GeneralizedTime,
+ crlDetails Extensions OPTIONAL
+ -- extra CRL details (e.g., crl number, reason, location, etc.)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevDetails ::= SEQUENCE {
+ certDetails CertTemplate,
+ -- allows requester to specify as much as they can about
+ -- the cert. for which revocation is requested
+ -- (e.g., for cases in which serialNumber is not available)
+ crlEntryDetails Extensions OPTIONAL
+ -- requested crlEntryExtensions
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevRepContent ::= SEQUENCE {
+ status SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
+ -- in same order as was sent in RevReqContent
+ revCerts [0] SEQUENCE SIZE (1..MAX) OF CertId OPTIONAL,
+ -- IDs for which revocation was requested
+ -- (same order as status)
+ crls [1] SEQUENCE SIZE (1..MAX) OF CertificateList OPTIONAL
+ -- the resulting CRLs (there may be more than one)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevReqContent ::= SEQUENCE OF RevDetails
+
+ @return a basic ASN.1 object representation.
+
+
+ return an Attribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attribute ::= SEQUENCE {
+ attrType OBJECT IDENTIFIER,
+ attrValues SET OF AttributeValue
+ }
+
+
+
+ Return the first attribute matching the given OBJECT IDENTIFIER
+
+
+ Return all the attributes matching the OBJECT IDENTIFIER oid. The vector will be
+ empty if there are no attributes of the required type present.
+
+ @param oid type of attribute required.
+ @return a vector of all the attributes found of type oid.
+
+
+ Return a new table with the passed in attribute added.
+
+ @param attrType
+ @param attrValue
+ @return
+
+
+
+ Attributes ::=
+ SET SIZE(1..MAX) OF Attribute -- according to RFC 5652
+
+ @return
+
+
+ return an AuthEnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthEnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthEnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ authEncryptedContentInfo EncryptedContentInfo,
+ authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+ AuthEnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ authEncryptedContentInfo EncryptedContentInfo,
+ authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+
+
+
+ return an AuthenticatedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthenticatedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthenticatedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ macAlgorithm MessageAuthenticationCodeAlgorithm,
+ digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+ encapContentInfo EncapsulatedContentInfo,
+ authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+
+ AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ MessageAuthenticationCode ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthenticatedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ macAlgorithm MessageAuthenticationCodeAlgorithm,
+ digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+ encapContentInfo EncapsulatedContentInfo,
+ authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+
+ AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ MessageAuthenticationCode ::= OCTET STRING
+
+
+
+ The other Revocation Info arc
+ id-ri OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
+ dod(6) internet(1) security(5) mechanisms(5) pkix(7) ri(16) }
+
+
+ RFC 3274 - CMS Compressed Data.
+
+ CompressedData ::= Sequence {
+ version CMSVersion,
+ compressionAlgorithm CompressionAlgorithmIdentifier,
+ encapContentInfo EncapsulatedContentInfo
+ }
+
+
+
+ return a CompressedData object from a tagged object.
+
+ @param ato the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a CompressedData object from the given object.
+
+ @param _obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ RFC 3274 - CMS Compressed Data.
+
+ CompressedData ::= SEQUENCE {
+ version CMSVersion,
+ compressionAlgorithm CompressionAlgorithmIdentifier,
+ encapContentInfo EncapsulatedContentInfo
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= Sequence {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= SEQUENCE {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ return an EncryptedContentInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EncryptedContentInfo ::= Sequence {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+
+
+
+ EncryptedContentInfo ::= SEQUENCE {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+
+
+
+ EncryptedData ::= SEQUENCE {
+ version CMSVersion,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ return an EnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an EnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EnvelopedData ::= Sequence {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+ }
+
+
+
+ return a KekIdentifier object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KekIdentifier object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KekIdentifier ::= Sequence {
+ keyIdentifier OCTET STRING,
+ date GeneralizedTime OPTIONAL,
+ other OtherKeyAttribute OPTIONAL
+ }
+
+
+
+ return a KekRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KekRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KekRecipientInfo ::= Sequence {
+ version CMSVersion, -- always set to 4
+ kekID KekIdentifier,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+ return an KeyAgreeRecipientIdentifier object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an KeyAgreeRecipientIdentifier object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeyAgreeRecipientIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ rKeyId [0] IMPLICIT RecipientKeyIdentifier
+ }
+
+
+
+ return a KeyAgreeRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KeyAgreeRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * KeyAgreeRecipientInfo ::= Sequence {
+ * version CMSVersion, -- always set to 3
+ * originator [0] EXPLICIT OriginatorIdentifierOrKey,
+ * ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
+ * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ * recipientEncryptedKeys RecipientEncryptedKeys
+ * }
+ *
+ * UserKeyingMaterial ::= OCTET STRING
+ *
+
+
+ return a KeyTransRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeyTransRecipientInfo ::= Sequence {
+ version CMSVersion, -- always set to 0 or 2
+ rid RecipientIdentifier,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+
+ MetaData ::= SEQUENCE {
+ hashProtected BOOLEAN,
+ fileName UTF8String OPTIONAL,
+ mediaType IA5String OPTIONAL,
+ otherMetaData Attributes OPTIONAL
+ }
+
+ @return
+
+
+ return an OriginatorIdentifierOrKey object from a tagged object.
+
+ @param o the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorIdentifierOrKey object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorIdentifierOrKey ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier,
+ originatorKey [1] OriginatorPublicKey
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ return an OriginatorInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorInfo ::= Sequence {
+ certs [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL
+ }
+
+
+
+ return an OriginatorPublicKey object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorPublicKey object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorPublicKey ::= Sequence {
+ algorithm AlgorithmIdentifier,
+ publicKey BIT STRING
+ }
+
+
+
+ return an OtherKeyAttribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherKeyAttribute ::= Sequence {
+ keyAttrId OBJECT IDENTIFIER,
+ keyAttr ANY DEFINED BY keyAttrId OPTIONAL
+ }
+
+
+
+ return a OtherRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a OtherRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherRecipientInfo ::= Sequence {
+ oriType OBJECT IDENTIFIER,
+ oriValue ANY DEFINED BY oriType }
+
+
+
+ return a OtherRevocationInfoFormat object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a OtherRevocationInfoFormat object from the given object.
+
+ @param obj the object we want converted.
+ @exception IllegalArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an ASN1OutputStream.
+
+ OtherRevocationInfoFormat ::= SEQUENCE {
+ otherRevInfoFormat OBJECT IDENTIFIER,
+ otherRevInfo ANY DEFINED BY otherRevInfoFormat }
+
+
+
+ return a PasswordRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a PasswordRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ PasswordRecipientInfo ::= Sequence {
+ version CMSVersion, -- Always set to 0
+ keyDerivationAlgorithm [0] KeyDerivationAlgorithmIdentifier
+ OPTIONAL,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey }
+
+
+
+ return an RecipientEncryptedKey object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a RecipientEncryptedKey object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientEncryptedKey ::= SEQUENCE {
+ rid KeyAgreeRecipientIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+ return a RecipientIdentifier object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientInfo ::= CHOICE {
+ ktri KeyTransRecipientInfo,
+ kari [1] KeyAgreeRecipientInfo,
+ kekri [2] KekRecipientInfo,
+ pwri [3] PasswordRecipientInfo,
+ ori [4] OtherRecipientInfo }
+
+
+
+ return a RecipientKeyIdentifier object from a tagged object.
+
+ @param _ato the tagged object holding the object we want.
+ @param _explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a RecipientKeyIdentifier object from the given object.
+
+ @param _obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientKeyIdentifier ::= Sequence {
+ subjectKeyIdentifier SubjectKeyIdentifier,
+ date GeneralizedTime OPTIONAL,
+ other OtherKeyAttribute OPTIONAL
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+
+ ScvpReqRes ::= SEQUENCE {
+ request [0] EXPLICIT ContentInfo OPTIONAL,
+ response ContentInfo }
+
+ @return the ASN.1 primitive representation.
+
+
+ a signed data object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignedData ::= Sequence {
+ version CMSVersion,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ encapContentInfo EncapsulatedContentInfo,
+ certificates [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos
+ }
+
+
+
+
+ SignedData ::= SEQUENCE {
+ version CMSVersion,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ encapContentInfo EncapsulatedContentInfo,
+ certificates [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos
+ }
+
+
+
+ return a SignerIdentifier object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerInfo ::= Sequence {
+ version Version,
+ SignerIdentifier sid,
+ digestAlgorithm DigestAlgorithmIdentifier,
+ authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+ digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+ encryptedDigest EncryptedDigest,
+ unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+ }
+
+ EncryptedDigest ::= OCTET STRING
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+
+ DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+
+
+
+ creates a time object from a given date - if the date is between 1950
+ and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime
+ is used.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Time ::= CHOICE {
+ utcTime UTCTime,
+ generalTime GeneralizedTime }
+
+
+
+
+ TimeStampAndCRL ::= SEQUENCE {
+ timeStamp TimeStampToken, -- according to RFC 3161
+ crl CertificateList OPTIONAL -- according to RFC 5280
+ }
+
+ @return
+
+
+
+ TimeStampTokenEvidence ::=
+ SEQUENCE SIZE(1..MAX) OF TimeStampAndCrl
+
+ @return
+
+
+
+ TimeStampedData ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ dataUri IA5String OPTIONAL,
+ metaData MetaData OPTIONAL,
+ content OCTET STRING OPTIONAL,
+ temporalEvidence Evidence
+ }
+
+ @return
+
+
+ return an AuthEnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthEnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ MQVuserKeyingMaterial ::= SEQUENCE {
+ ephemeralPublicKey OriginatorPublicKey,
+ addedukm [0] EXPLICIT UserKeyingMaterial OPTIONAL }
+
+
+
+
+ AttributeTypeAndValue ::= SEQUENCE {
+ type OBJECT IDENTIFIER,
+ value ANY DEFINED BY type }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertId ::= SEQUENCE {
+ issuer GeneralName,
+ serialNumber INTEGER }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertReqMessages ::= SEQUENCE SIZE (1..MAX) OF CertReqMsg
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new CertReqMsg.
+ @param certReq CertRequest
+ @param popo may be null
+ @param regInfo may be null
+
+
+
+ CertReqMsg ::= SEQUENCE {
+ certReq CertRequest,
+ pop ProofOfPossession OPTIONAL,
+ -- content depends upon key type
+ regInfo SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertRequest ::= SEQUENCE {
+ certReqId INTEGER, -- ID for matching request and reply
+ certTemplate CertTemplate, -- Selected fields of cert to be issued
+ controls Controls OPTIONAL } -- Attributes affecting issuance
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertTemplate ::= SEQUENCE {
+ version [0] Version OPTIONAL,
+ serialNumber [1] INTEGER OPTIONAL,
+ signingAlg [2] AlgorithmIdentifier OPTIONAL,
+ issuer [3] Name OPTIONAL,
+ validity [4] OptionalValidity OPTIONAL,
+ subject [5] Name OPTIONAL,
+ publicKey [6] SubjectPublicKeyInfo OPTIONAL,
+ issuerUID [7] UniqueIdentifier OPTIONAL,
+ subjectUID [8] UniqueIdentifier OPTIONAL,
+ extensions [9] Extensions OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ Sets the X.509 version. Note: for X509v3, use 2 here.
+
+
+ Sets the issuer unique ID (deprecated in X.509v3)
+
+
+ Sets the subject unique ID (deprecated in X.509v3)
+
+
+
+ CertTemplate ::= SEQUENCE {
+ version [0] Version OPTIONAL,
+ serialNumber [1] INTEGER OPTIONAL,
+ signingAlg [2] AlgorithmIdentifier OPTIONAL,
+ issuer [3] Name OPTIONAL,
+ validity [4] OptionalValidity OPTIONAL,
+ subject [5] Name OPTIONAL,
+ publicKey [6] SubjectPublicKeyInfo OPTIONAL,
+ issuerUID [7] UniqueIdentifier OPTIONAL,
+ subjectUID [8] UniqueIdentifier OPTIONAL,
+ extensions [9] Extensions OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ Controls ::= SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+
+ EncKeyWithID ::= SEQUENCE {
+ privateKey PrivateKeyInfo,
+ identifier CHOICE {
+ string UTF8String,
+ generalName GeneralName
+ } OPTIONAL
+ }
+
+ @return
+
+
+
+ EncryptedKey ::= CHOICE {
+ encryptedValue EncryptedValue, -- deprecated
+ envelopedData [0] EnvelopedData }
+ -- The encrypted private key MUST be placed in the envelopedData
+ -- encryptedContentInfo encryptedContent OCTET STRING.
+
+
+
+
+ EncryptedValue ::= SEQUENCE {
+ intendedAlg [0] AlgorithmIdentifier OPTIONAL,
+ -- the intended algorithm for which the value will be used
+ symmAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- the symmetric algorithm used to encrypt the value
+ encSymmKey [2] BIT STRING OPTIONAL,
+ -- the (encrypted) symmetric key used to encrypt the value
+ keyAlg [3] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used to encrypt the symmetric key
+ valueHint [4] OCTET STRING OPTIONAL,
+ -- a brief description or identifier of the encValue content
+ -- (may be meaningful only to the sending entity, and used only
+ -- if EncryptedValue might be re-examined by the sending entity
+ -- in the future)
+ encValue BIT STRING }
+ -- the encrypted value itself
+
+ @return a basic ASN.1 object representation.
+
+
+
+ OptionalValidity ::= SEQUENCE {
+ notBefore [0] Time OPTIONAL,
+ notAfter [1] Time OPTIONAL } --at least one MUST be present
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiArchiveOptions ::= CHOICE {
+ encryptedPrivKey [0] EncryptedKey,
+ -- the actual value of the private key
+ keyGenParameters [1] KeyGenParameters,
+ -- parameters which allow the private key to be re-generated
+ archiveRemGenPrivKey [2] BOOLEAN }
+ -- set to TRUE if sender wishes receiver to archive the private
+ -- key of a key pair that the receiver generates in response to
+ -- this request; set to FALSE if no archival is desired.
+
+
+
+
+ PkiPublicationInfo ::= SEQUENCE {
+ action INTEGER {
+ dontPublish (0),
+ pleasePublish (1) },
+ pubInfos SEQUENCE SIZE (1..MAX) OF SinglePubInfo OPTIONAL }
+ -- pubInfos MUST NOT be present if action is "dontPublish"
+ -- (if action is "pleasePublish" and pubInfos is omitted,
+ -- "dontCare" is assumed)
+
+ @return a basic ASN.1 object representation.
+
+
+ Password-based MAC value for use with POPOSigningKeyInput.
+
+
+ Creates a new PKMACValue.
+ @param params parameters for password-based MAC
+ @param value MAC of the DER-encoded SubjectPublicKeyInfo
+
+
+ Creates a new PKMACValue.
+ @param aid CMPObjectIdentifiers.passwordBasedMAC, with PBMParameter
+ @param value MAC of the DER-encoded SubjectPublicKeyInfo
+
+
+
+ PKMACValue ::= SEQUENCE {
+ algId AlgorithmIdentifier,
+ -- algorithm value shall be PasswordBasedMac 1.2.840.113533.7.66.13
+ -- parameter value is PBMParameter
+ value BIT STRING }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoPrivKey ::= CHOICE {
+ thisMessage [0] BIT STRING, -- Deprecated
+ -- possession is proven in this message (which contains the private
+ -- key itself (encrypted for the CA))
+ subsequentMessage [1] SubsequentMessage,
+ -- possession will be proven in a subsequent message
+ dhMAC [2] BIT STRING, -- Deprecated
+ agreeMAC [3] PKMACValue,
+ encryptedKey [4] EnvelopedData }
+
+
+
+ Creates a new Proof of Possession object for a signing key.
+ @param poposkIn the PopoSigningKeyInput structure, or null if the
+ CertTemplate includes both subject and publicKey values.
+ @param aid the AlgorithmIdentifier used to sign the proof of possession.
+ @param signature a signature over the DER-encoded value of poposkIn,
+ or the DER-encoded value of certReq if poposkIn is null.
+
+
+
+ PopoSigningKey ::= SEQUENCE {
+ poposkInput [0] PopoSigningKeyInput OPTIONAL,
+ algorithmIdentifier AlgorithmIdentifier,
+ signature BIT STRING }
+ -- The signature (using "algorithmIdentifier") is on the
+ -- DER-encoded value of poposkInput. NOTE: If the CertReqMsg
+ -- certReq CertTemplate contains the subject and publicKey values,
+ -- then poposkInput MUST be omitted and the signature MUST be
+ -- computed on the DER-encoded value of CertReqMsg certReq. If
+ -- the CertReqMsg certReq CertTemplate does not contain the public
+ -- key and subject values, then poposkInput MUST be present and
+ -- MUST be signed. This strategy ensures that the public key is
+ -- not present in both the poposkInput and CertReqMsg certReq
+ -- CertTemplate fields.
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PopoSigningKeyInput with sender name as authInfo.
+
+
+ Creates a new PopoSigningKeyInput using password-based MAC.
+
+
+ Returns the sender field, or null if authInfo is publicKeyMac
+
+
+ Returns the publicKeyMac field, or null if authInfo is sender
+
+
+
+ PopoSigningKeyInput ::= SEQUENCE {
+ authInfo CHOICE {
+ sender [0] GeneralName,
+ -- used only if an authenticated identity has been
+ -- established for the sender (e.g., a DN from a
+ -- previously-issued and currently-valid certificate
+ publicKeyMac PKMacValue },
+ -- used if no authenticated GeneralName currently exists for
+ -- the sender; publicKeyMac contains a password-based MAC
+ -- on the DER-encoded value of publicKey
+ publicKey SubjectPublicKeyInfo } -- from CertTemplate
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a ProofOfPossession with type raVerified.
+
+
+ Creates a ProofOfPossession for a signing key.
+
+
+ Creates a ProofOfPossession for key encipherment or agreement.
+ @param type one of TYPE_KEY_ENCIPHERMENT or TYPE_KEY_AGREEMENT
+
+
+
+ ProofOfPossession ::= CHOICE {
+ raVerified [0] NULL,
+ -- used if the RA has already verified that the requester is in
+ -- possession of the private key
+ signature [1] PopoSigningKey,
+ keyEncipherment [2] PopoPrivKey,
+ keyAgreement [3] PopoPrivKey }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ SinglePubInfo ::= SEQUENCE {
+ pubMethod INTEGER {
+ dontCare (0),
+ x500 (1),
+ web (2),
+ ldap (3) },
+ pubLocation GeneralName OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ table of the available named parameters for GOST 3410-2001.
+
+
+ return the ECDomainParameters object for the given OID, null if it
+ isn't present.
+
+ @param oid an object identifier representing a named parameters, if present.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+
+ Gost28147-89-Parameters ::=
+ SEQUENCE {
+ iv Gost28147-89-IV,
+ encryptionParamSet OBJECT IDENTIFIER
+ }
+
+ Gost28147-89-IV ::= OCTET STRING (SIZE (8))
+
+
+
+ table of the available named parameters for GOST 3410-94.
+
+
+ return the GOST3410ParamSetParameters object for the given OID, null if it
+ isn't present.
+
+ @param oid an object identifier representing a named parameters, if present.
+
+
+ returns an enumeration containing the name strings for parameters
+ contained in this structure.
+
+
+
+ RFC 3126: 4.3.1 Certificate Values Attribute Definition
+
+ CertificateValues ::= SEQUENCE OF Certificate
+
+
+
+
+
+ CommitmentTypeIndication ::= SEQUENCE {
+ commitmentTypeId CommitmentTypeIdentifier,
+ commitmentTypeQualifier SEQUENCE SIZE (1..MAX) OF
+ CommitmentTypeQualifier OPTIONAL }
+
+
+
+ Commitment type qualifiers, used in the Commitment-Type-Indication attribute (RFC3126).
+
+
+ CommitmentTypeQualifier ::= SEQUENCE {
+ commitmentTypeIdentifier CommitmentTypeIdentifier,
+ qualifier ANY DEFINED BY commitmentTypeIdentifier OPTIONAL }
+
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param commitmentTypeIdentifier a CommitmentTypeIdentifier value
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param commitmentTypeIdentifier a CommitmentTypeIdentifier value
+ @param qualifier the qualifier, defined by the above field.
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param as CommitmentTypeQualifier structure
+ encoded as an Asn1Sequence.
+
+
+ Returns a DER-encodable representation of this instance.
+
+ @return a Asn1Object value
+
+
+
+ RFC 3126: 4.2.1 Complete Certificate Refs Attribute Definition
+
+ CompleteCertificateRefs ::= SEQUENCE OF OtherCertID
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CompleteRevocationRefs ::= SEQUENCE OF CrlOcspRef
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlIdentifier ::= SEQUENCE
+ {
+ crlissuer Name,
+ crlIssuedTime UTCTime,
+ crlNumber INTEGER OPTIONAL
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CRLListID ::= SEQUENCE
+ {
+ crls SEQUENCE OF CrlValidatedID
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlOcspRef ::= SEQUENCE {
+ crlids [0] CRLListID OPTIONAL,
+ ocspids [1] OcspListID OPTIONAL,
+ otherRev [2] OtherRevRefs OPTIONAL
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlValidatedID ::= SEQUENCE {
+ crlHash OtherHash,
+ crlIdentifier CrlIdentifier OPTIONAL}
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspIdentifier ::= SEQUENCE {
+ ocspResponderID ResponderID,
+ -- As in OCSP response data
+ producedAt GeneralizedTime
+ -- As in OCSP response data
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspListID ::= SEQUENCE {
+ ocspResponses SEQUENCE OF OcspResponsesID
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspResponsesID ::= SEQUENCE {
+ ocspIdentifier OcspIdentifier,
+ ocspRepHash OtherHash OPTIONAL
+ }
+
+
+
+
+
+
+ OtherCertID ::= SEQUENCE {
+ otherCertHash OtherHash,
+ issuerSerial IssuerSerial OPTIONAL
+ }
+
+
+
+
+
+
+ OtherHash ::= CHOICE {
+ sha1Hash OtherHashValue, -- This contains a SHA-1 hash
+ otherHash OtherHashAlgAndValue
+ }
+
+ OtherHashValue ::= OCTET STRING
+
+
+
+
+
+ Summary description for OtherHashAlgAndValue.
+
+
+
+ OtherHashAlgAndValue ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashValue OtherHashValue
+ }
+
+ OtherHashValue ::= OCTET STRING
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OtherRevRefs ::= SEQUENCE
+ {
+ otherRevRefType OtherRevRefType,
+ otherRevRefs ANY DEFINED BY otherRevRefType
+ }
+
+ OtherRevRefType ::= OBJECT IDENTIFIER
+
+
+
+
+
+ RFC 3126: 4.3.2 Revocation Values Attribute Definition
+
+ OtherRevVals ::= SEQUENCE
+ {
+ otherRevValType OtherRevValType,
+ otherRevVals ANY DEFINED BY otherRevValType
+ }
+
+ OtherRevValType ::= OBJECT IDENTIFIER
+
+
+
+
+
+
+ OtherSigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF OtherCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+
+
+
+
+ RFC 5126: 6.3.4. revocation-values Attribute Definition
+
+ RevocationValues ::= SEQUENCE {
+ crlVals [0] SEQUENCE OF CertificateList OPTIONAL,
+ ocspVals [1] SEQUENCE OF BasicOCSPResponse OPTIONAL,
+ otherRevVals [2] OtherRevVals OPTIONAL
+ }
+
+
+
+
+
+
+ SigPolicyQualifierInfo ::= SEQUENCE {
+ sigPolicyQualifierId SigPolicyQualifierId,
+ sigQualifier ANY DEFINED BY sigPolicyQualifierId
+ }
+
+ SigPolicyQualifierId ::= OBJECT IDENTIFIER
+
+
+
+
+
+
+ SignaturePolicyId ::= SEQUENCE {
+ sigPolicyIdentifier SigPolicyId,
+ sigPolicyHash SigPolicyHash,
+ sigPolicyQualifiers SEQUENCE SIZE (1..MAX) OF SigPolicyQualifierInfo OPTIONAL
+ }
+
+ SigPolicyId ::= OBJECT IDENTIFIER
+
+ SigPolicyHash ::= OtherHashAlgAndValue
+
+
+
+
+
+
+ SignaturePolicyIdentifier ::= CHOICE {
+ SignaturePolicyId SignaturePolicyId,
+ SignaturePolicyImplied SignaturePolicyImplied
+ }
+
+ SignaturePolicyImplied ::= NULL
+
+
+
+
+
+
+ SignerAttribute ::= SEQUENCE OF CHOICE {
+ claimedAttributes [0] ClaimedAttributes,
+ certifiedAttributes [1] CertifiedAttributes }
+
+ ClaimedAttributes ::= SEQUENCE OF Attribute
+ CertifiedAttributes ::= AttributeCertificate -- as defined in RFC 3281: see clause 4.1.
+
+
+
+ Signer-Location attribute (RFC3126).
+
+
+ SignerLocation ::= SEQUENCE {
+ countryName [0] DirectoryString OPTIONAL,
+ localityName [1] DirectoryString OPTIONAL,
+ postalAddress [2] PostalAddress OPTIONAL }
+
+ PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+
+
+
+
+ SignerLocation ::= SEQUENCE {
+ countryName [0] DirectoryString OPTIONAL,
+ localityName [1] DirectoryString OPTIONAL,
+ postalAddress [2] PostalAddress OPTIONAL }
+
+ PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+
+ DirectoryString ::= CHOICE {
+ teletexString TeletexString (SIZE (1..MAX)),
+ printableString PrintableString (SIZE (1..MAX)),
+ universalString UniversalString (SIZE (1..MAX)),
+ utf8String UTF8String (SIZE (1.. MAX)),
+ bmpString BMPString (SIZE (1..MAX)) }
+
+
+
+ constructor
+
+
+
+ ContentHints ::= SEQUENCE {
+ contentDescription UTF8String (SIZE (1..MAX)) OPTIONAL,
+ contentType ContentType }
+
+
+
+ Create from OCTET STRING whose octets represent the identifier.
+
+
+ Create from byte array representing the identifier.
+
+
+ The definition of ContentIdentifier is
+
+ ContentIdentifier ::= OCTET STRING
+
+ id-aa-contentIdentifier OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 7 }
+
+
+ constructor
+
+
+
+ EssCertID ::= SEQUENCE {
+ certHash Hash,
+ issuerSerial IssuerSerial OPTIONAL }
+
+
+
+
+ EssCertIDv2 ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier
+ DEFAULT {algorithm id-sha256},
+ certHash Hash,
+ issuerSerial IssuerSerial OPTIONAL
+ }
+
+ Hash ::= OCTET STRING
+
+ IssuerSerial ::= SEQUENCE {
+ issuer GeneralNames,
+ serialNumber CertificateSerialNumber
+ }
+
+
+
+ constructor
+
+
+
+ OtherCertID ::= SEQUENCE {
+ otherCertHash OtherHash,
+ issuerSerial IssuerSerial OPTIONAL }
+
+ OtherHash ::= CHOICE {
+ sha1Hash OCTET STRING,
+ otherHash OtherHashAlgAndValue }
+
+ OtherHashAlgAndValue ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashValue OCTET STRING }
+
+
+
+
+ constructors
+
+
+ The definition of OtherSigningCertificate is
+
+ OtherSigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF OtherCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-ets-otherSigCert OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 19 }
+
+
+ constructors
+
+
+ The definition of SigningCertificate is
+
+ SigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF EssCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-signingCertificate OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 12 }
+
+
+ The definition of SigningCertificateV2 is
+
+ SigningCertificateV2 ::= SEQUENCE {
+ certs SEQUENCE OF EssCertIDv2,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-signingCertificateV2 OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 47 }
+
+
+ The CscaMasterList object. This object can be wrapped in a
+ CMSSignedData to be published in LDAP.
+
+
+ CscaMasterList ::= SEQUENCE {
+ version CscaMasterListVersion,
+ certList SET OF Certificate }
+
+ CscaMasterListVersion :: INTEGER {v0(0)}
+
+
+
+ The DataGroupHash object.
+
+ DataGroupHash ::= SEQUENCE {
+ dataGroupNumber DataGroupNumber,
+ dataGroupHashValue OCTET STRING }
+
+ DataGroupNumber ::= INTEGER {
+ dataGroup1 (1),
+ dataGroup1 (2),
+ dataGroup1 (3),
+ dataGroup1 (4),
+ dataGroup1 (5),
+ dataGroup1 (6),
+ dataGroup1 (7),
+ dataGroup1 (8),
+ dataGroup1 (9),
+ dataGroup1 (10),
+ dataGroup1 (11),
+ dataGroup1 (12),
+ dataGroup1 (13),
+ dataGroup1 (14),
+ dataGroup1 (15),
+ dataGroup1 (16) }
+
+
+
+
+ The LDSSecurityObject object (V1.8).
+
+ LDSSecurityObject ::= SEQUENCE {
+ version LDSSecurityObjectVersion,
+ hashAlgorithm DigestAlgorithmIdentifier,
+ dataGroupHashValues SEQUENCE SIZE (2..ub-DataGroups) OF DataHashGroup,
+ ldsVersionInfo LDSVersionInfo OPTIONAL
+ -- if present, version MUST be v1 }
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier,
+
+ LDSSecurityObjectVersion :: INTEGER {V0(0)}
+
+
+
+
+ LDSVersionInfo ::= SEQUENCE {
+ ldsVersion PRINTABLE STRING
+ unicodeVersion PRINTABLE STRING
+ }
+
+ @return
+
+
+ The id-isismtt-cp-accredited OID indicates that the certificate is a
+ qualified certificate according to Directive 1999/93/EC of the European
+ Parliament and of the Council of 13 December 1999 on a Community
+ Framework for Electronic Signatures, which additionally conforms the
+ special requirements of the SigG and has been issued by an accredited CA.
+
+
+ Certificate extensionDate of certificate generation
+
+
+ DateOfCertGenSyntax ::= GeneralizedTime
+
+
+
+ Attribute to indicate that the certificate holder may sign in the name of
+ a third person. May also be used as extension in a certificate.
+
+
+ Attribute to indicate admissions to certain professions. May be used as
+ attribute in attribute certificate or as extension in a certificate
+
+
+ Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST
+ be used in new certificates in place of the extension/attribute
+ MonetaryLimit since January 1, 2004. For the sake of backward
+ compatibility with certificates already in use, SigG conforming
+ components MUST support MonetaryLimit (as well as QcEuLimitValue).
+
+
+ A declaration of majority. May be used as attribute in attribute
+ certificate or as extension in a certificate
+
+
+
+ Serial number of the smart card containing the corresponding private key
+
+
+ ICCSNSyntax ::= OCTET STRING (SIZE(8..20))
+
+
+
+
+ Reference for a file of a smartcard that stores the public key of this
+ certificate and that is used as �security anchor�.
+
+
+ PKReferenceSyntax ::= OCTET STRING (SIZE(20))
+
+
+
+ Some other restriction regarding the usage of this certificate. May be
+ used as attribute in attribute certificate or as extension in a
+ certificate.
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.Restriction
+
+
+
+ (Single)Request extension: Clients may include this extension in a
+ (single) Request to request the responder to send the certificate in the
+ response message along with the status information. Besides the LDAP
+ service, this extension provides another mechanism for the distribution
+ of certificates, which MAY optionally be provided by certificate
+ repositories.
+
+
+ RetrieveIfAllowed ::= BOOLEAN
+
+
+
+ SingleOCSPResponse extension: The certificate requested by the client by
+ inserting the RetrieveIfAllowed extension in the request, will be
+ returned in this extension.
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.Ocsp.RequestedCertificate
+
+
+ Base ObjectIdentifier for naming authorities
+
+
+ SingleOCSPResponse extension: Date, when certificate has been published
+ in the directory and status information has become available. Currently,
+ accrediting authorities enforce that SigG-conforming OCSP servers include
+ this extension in the responses.
+
+
+ CertInDirSince ::= GeneralizedTime
+
+
+
+ Hash of a certificate in OCSP.
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.Ocsp.CertHash
+
+
+
+ NameAtBirth ::= DirectoryString(SIZE(1..64)
+
+
+ Used in
+ {@link Org.BouncyCastle.Asn1.X509.SubjectDirectoryAttributes SubjectDirectoryAttributes}
+
+
+ Some other information of non-restrictive nature regarding the usage of
+ this certificate. May be used as attribute in atribute certificate or as
+ extension in a certificate.
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdditionalInformationSyntax
+
+
+ Indicates that an attribute certificate exists, which limits the
+ usability of this public key certificate. Whenever verifying a signature
+ with the help of this certificate, the content of the corresponding
+ attribute certificate should be concerned. This extension MUST be
+ included in a PKC, if a corresponding attribute certificate (having the
+ PKC as base certificate) contains some attribute that restricts the
+ usability of the PKC too. Attribute certificates with restricting content
+ MUST always be included in the signed document.
+
+
+ LiabilityLimitationFlagSyntax ::= BOOLEAN
+
+
+
+ ISIS-MTT PROFILE: The responder may include this extension in a response to
+ send the hash of the requested certificate to the responder. This hash is
+ cryptographically bound to the certificate and serves as evidence that the
+ certificate is known to the responder (i.e. it has been issued and is present
+ in the directory). Hence, this extension is a means to provide a positive
+ statement of availability as described in T8.[8]. As explained in T13.[1],
+ clients may rely on this information to be able to validate signatures after
+ the expiry of the corresponding certificate. Hence, clients MUST support this
+ extension. If a positive statement of availability is to be delivered, this
+ extension syntax and OID MUST be used.
+
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type CertHash:
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param hashAlgorithm The hash algorithm identifier.
+ @param certificateHash The hash of the whole DER encoding of the certificate.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+ @return an Asn1Object
+
+
+ ISIS-MTT-Optional: The certificate requested by the client by inserting the
+ RetrieveIfAllowed extension in the request, will be returned in this
+ extension.
+
+ ISIS-MTT-SigG: The signature act allows publishing certificates only then,
+ when the certificate owner gives his isExplicit permission. Accordingly, there
+ may be �nondownloadable� certificates, about which the responder must provide
+ status information, but MUST NOT include them in the response. Clients may
+ get therefore the following three kind of answers on a single request
+ including the RetrieveIfAllowed extension:
+
+ a) the responder supports the extension and is allowed to publish the
+ certificate: RequestedCertificate returned including the requested
+ certificate
+ b) the responder supports the extension but is NOT allowed to publish
+ the certificate: RequestedCertificate returned including an empty OCTET
+ STRING
+ c) the responder does not support the extension: RequestedCertificate is
+ not included in the response
+
+ Clients requesting RetrieveIfAllowed MUST be able to handle these cases. If
+ any of the OCTET STRING options is used, it MUST contain the DER encoding of
+ the requested certificate.
+
+
+ RequestedCertificate ::= CHOICE {
+ Certificate Certificate,
+ publicKeyCertificate [0] EXPLICIT OCTET STRING,
+ attributeCertificate [1] EXPLICIT OCTET STRING
+ }
+
+
+
+ Constructor from a given details.
+
+ Only one parameter can be given. All other must be null.
+
+ @param certificate Given as Certificate
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ RequestedCertificate ::= CHOICE {
+ Certificate Certificate,
+ publicKeyCertificate [0] EXPLICIT OCTET STRING,
+ attributeCertificate [1] EXPLICIT OCTET STRING
+ }
+
+
+ @return an Asn1Object
+
+
+ Some other information of non-restrictive nature regarding the usage of this
+ certificate.
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+
+ Constructor from a given details.
+
+ @param information The describtion of the information.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+ @return an Asn1Object
+
+
+ Attribute to indicate admissions to certain professions.
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+
+ ISIS-MTT PROFILE: The relatively complex structure of AdmissionSyntax
+ supports the following concepts and requirements:
+
+ External institutions (e.g. professional associations, chambers, unions,
+ administrative bodies, companies, etc.), which are responsible for granting
+ and verifying professional admissions, are indicated by means of the data
+ field admissionAuthority. An admission authority is indicated by a
+ GeneralName object. Here an X.501 directory name (distinguished name) can be
+ indicated in the field directoryName, a URL address can be indicated in the
+ field uniformResourceIdentifier, and an object identifier can be indicated in
+ the field registeredId.
+ The names of authorities which are responsible for the administration of
+ title registers are indicated in the data field namingAuthority. The name of
+ the authority can be identified by an object identifier in the field
+ namingAuthorityId, by means of a text string in the field
+ namingAuthorityText, by means of a URL address in the field
+ namingAuthorityUrl, or by a combination of them. For example, the text string
+ can contain the name of the authority, the country and the name of the title
+ register. The URL-option refers to a web page which contains lists with
+ officially registered professions (text and possibly OID) as well as
+ further information on these professions. Object identifiers for the
+ component namingAuthorityId are grouped under the OID-branch
+ id-isis-at-namingAuthorities and must be applied for.
+ See http://www.teletrust.de/anwend.asp?Id=30200&Sprache=E_&HomePG=0
+ for an application form and http://www.teletrust.de/links.asp?id=30220,11
+ for an overview of registered naming authorities.
+ By means of the data type ProfessionInfo certain professions,
+ specializations, disciplines, fields of activity, etc. are identified. A
+ profession is represented by one or more text strings, resp. profession OIDs
+ in the fields professionItems and professionOIDs and by a registration number
+ in the field registrationNumber. An indication in text form must always be
+ present, whereas the other indications are optional. The component
+ addProfessionInfo may contain additional applicationspecific information in
+ DER-encoded form.
+
+
+ By means of different namingAuthority-OIDs or profession OIDs hierarchies of
+ professions, specializations, disciplines, fields of activity, etc. can be
+ expressed. The issuing admission authority should always be indicated (field
+ admissionAuthority), whenever a registration number is presented. Still,
+ information on admissions can be given without indicating an admission or a
+ naming authority by the exclusive use of the component professionItems. In
+ this case the certification authority is responsible for the verification of
+ the admission information.
+
+
+
+ This attribute is single-valued. Still, several admissions can be captured in
+ the sequence structure of the component contentsOfAdmissions of
+ AdmissionSyntax or in the component professionInfos of Admissions. The
+ component admissionAuthority of AdmissionSyntax serves as default value for
+ the component admissionAuthority of Admissions. Within the latter component
+ the default value can be overwritten, in case that another authority is
+ responsible. The component namingAuthority of Admissions serves as a default
+ value for the component namingAuthority of ProfessionInfo. Within the latter
+ component the default value can be overwritten, in case that another naming
+ authority needs to be recorded.
+
+ The length of the string objects is limited to 128 characters. It is
+ recommended to indicate a namingAuthorityURL in all issued attribute
+ certificates. If a namingAuthorityURL is indicated, the field professionItems
+ of ProfessionInfo should contain only registered titles. If the field
+ professionOIDs exists, it has to contain the OIDs of the professions listed
+ in professionItems in the same order. In general, the field professionInfos
+ should contain only one entry, unless the admissions that are to be listed
+ are logically connected (e.g. they have been issued under the same admission
+ number).
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.Admissions
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from given details.
+
+ @param admissionAuthority The admission authority.
+ @param contentsOfAdmissions The admissions.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ @return Returns the admissionAuthority if present, null otherwise.
+
+
+ @return Returns the contentsOfAdmissions.
+
+
+ An Admissions structure.
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ Parameter professionInfos is mandatory.
+
+ @param admissionAuthority The admission authority.
+ @param namingAuthority The naming authority.
+ @param professionInfos The profession infos.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+
+ @return an Asn1Object
+
+
+ A declaration of majority.
+
+
+ DeclarationOfMajoritySyntax ::= CHOICE
+ {
+ notYoungerThan [0] IMPLICIT INTEGER,
+ fullAgeAtCountry [1] IMPLICIT SEQUENCE
+ {
+ fullAge BOOLEAN DEFAULT TRUE,
+ country PrintableString (SIZE(2))
+ }
+ dateOfBirth [2] IMPLICIT GeneralizedTime
+ }
+
+
+ fullAgeAtCountry indicates the majority of the owner with respect to the laws
+ of a specific country.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ DeclarationOfMajoritySyntax ::= CHOICE
+ {
+ notYoungerThan [0] IMPLICIT INTEGER,
+ fullAgeAtCountry [1] IMPLICIT SEQUENCE
+ {
+ fullAge BOOLEAN DEFAULT TRUE,
+ country PrintableString (SIZE(2))
+ }
+ dateOfBirth [2] IMPLICIT GeneralizedTime
+ }
+
+
+ @return an Asn1Object
+
+
+ @return notYoungerThan if that's what we are, -1 otherwise
+
+
+ Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST be
+ used in new certificates in place of the extension/attribute MonetaryLimit
+ since January 1, 2004. For the sake of backward compatibility with
+ certificates already in use, components SHOULD support MonetaryLimit (as well
+ as QcEuLimitValue).
+
+ Indicates a monetary limit within which the certificate holder is authorized
+ to act. (This value DOES NOT express a limit on the liability of the
+ certification authority).
+
+
+ MonetaryLimitSyntax ::= SEQUENCE
+ {
+ currency PrintableString (SIZE(3)),
+ amount INTEGER,
+ exponent INTEGER
+ }
+
+
+ currency must be the ISO code.
+
+ value = amount�10*exponent
+
+
+ Constructor from a given details.
+
+
+ value = amount�10^exponent
+
+ @param currency The currency. Must be the ISO code.
+ @param amount The amount
+ @param exponent The exponent
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ MonetaryLimitSyntax ::= SEQUENCE
+ {
+ currency PrintableString (SIZE(3)),
+ amount INTEGER,
+ exponent INTEGER
+ }
+
+
+ @return an Asn1Object
+
+
+ Names of authorities which are responsible for the administration of title
+ registers.
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+
+
+
+ Profession OIDs should always be defined under the OID branch of the
+ responsible naming authority. At the time of this writing, the work group
+ �Recht, Wirtschaft, Steuern� (�Law, Economy, Taxes�) is registered as the
+ first naming authority under the OID id-isismtt-at-namingAuthorities.
+
+
+ Constructor from Asn1Sequence.
+
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ @return Returns the namingAuthorityID.
+
+
+ @return Returns the namingAuthorityText.
+
+
+ @return Returns the namingAuthorityUrl.
+
+
+ Constructor from given details.
+
+ All parameters can be combined.
+
+ @param namingAuthorityID ObjectIdentifier for naming authority.
+ @param namingAuthorityUrl URL for naming authority.
+ @param namingAuthorityText Textual representation of naming authority.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ Attribute to indicate that the certificate holder may sign in the name of a
+ third person.
+
+ ISIS-MTT PROFILE: The corresponding ProcurationSyntax contains either the
+ name of the person who is represented (subcomponent thirdPerson) or a
+ reference to his/her base certificate (in the component signingFor,
+ subcomponent certRef), furthermore the optional components country and
+ typeSubstitution to indicate the country whose laws apply, and respectively
+ the type of procuration (e.g. manager, procuration, custody).
+
+
+ ISIS-MTT PROFILE: The GeneralName MUST be of type directoryName and MAY only
+ contain: - RFC3039 attributes, except pseudonym (countryName, commonName,
+ surname, givenName, serialNumber, organizationName, organizationalUnitName,
+ stateOrProvincename, localityName, postalAddress) and - SubjectDirectoryName
+ attributes (title, dateOfBirth, placeOfBirth, gender, countryOfCitizenship,
+ countryOfResidence and NameAtBirth).
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+
+ Either generalName or certRef MUST be
+ null.
+
+ @param country The country code whose laws apply.
+ @param typeOfSubstitution The type of procuration.
+ @param certRef Reference to certificate of the person who is represented.
+
+
+ Constructor from a given details.
+
+
+ Either generalName or certRef MUST be
+ null.
+
+ @param country The country code whose laws apply.
+ @param typeOfSubstitution The type of procuration.
+ @param thirdPerson The GeneralName of the person who is represented.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+ @return an Asn1Object
+
+
+ Professions, specializations, disciplines, fields of activity, etc.
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+
+
+ Rechtsanw�ltin
+
+
+ Rechtsanwalt
+
+
+ Rechtsbeistand
+
+
+ Steuerberaterin
+
+
+ Steuerberater
+
+
+ Steuerbevollm�chtigte
+
+
+ Steuerbevollm�chtigter
+
+
+ Notarin
+
+
+ Notar
+
+
+ Notarvertreterin
+
+
+ Notarvertreter
+
+
+ Notariatsverwalterin
+
+
+ Notariatsverwalter
+
+
+ Wirtschaftspr�ferin
+
+
+ Wirtschaftspr�fer
+
+
+ Vereidigte Buchpr�ferin
+
+
+ Vereidigter Buchpr�fer
+
+
+ Patentanw�ltin
+
+
+ Patentanwalt
+
+
+ Constructor from Asn1Sequence.
+
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from given details.
+
+ professionItems is mandatory, all other parameters are
+ optional.
+
+ @param namingAuthority The naming authority.
+ @param professionItems Directory strings of the profession.
+ @param professionOids DERObjectIdentfier objects for the
+ profession.
+ @param registrationNumber Registration number.
+ @param addProfessionInfo Additional infos in encoded form.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ @return Returns the addProfessionInfo.
+
+
+ @return Returns the namingAuthority.
+
+
+ @return Returns the professionItems.
+
+
+ @return Returns the professionOids.
+
+
+ @return Returns the registrationNumber.
+
+
+ Some other restriction regarding the usage of this certificate.
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+
+ Constructor from DirectoryString.
+
+ The DirectoryString is of type RestrictionSyntax:
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+ @param restriction A IAsn1String.
+
+
+ Constructor from a given details.
+
+ @param restriction The description of the restriction.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+
+ @return an Asn1Object
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ cast5CBCParameters ::= Sequence {
+ iv OCTET STRING DEFAULT 0,
+ -- Initialization vector
+ keyLength Integer
+ -- Key length, in bits
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ IDEA-CBCPar ::= Sequence {
+ iv OCTET STRING OPTIONAL -- exactly 8 octets
+ }
+
+
+
+ The NetscapeCertType object.
+
+ NetscapeCertType ::= BIT STRING {
+ SSLClient (0),
+ SSLServer (1),
+ S/MIME (2),
+ Object Signing (3),
+ Reserved (4),
+ SSL CA (5),
+ S/MIME CA (6),
+ Object Signing CA (7) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (X509NetscapeCertType.sslCA | X509NetscapeCertType.smimeCA)
+
+
+ This is designed to parse
+ the PublicKeyAndChallenge created by the KEYGEN tag included by
+ Mozilla based browsers.
+
+ PublicKeyAndChallenge ::= SEQUENCE {
+ spki SubjectPublicKeyInfo,
+ challenge IA5STRING
+ }
+
+
+
+
+ Utility class for fetching curves using their NIST names as published in FIPS-PUB 186-3
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ From RFC 3657
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ BasicOcspResponse ::= Sequence {
+ tbsResponseData ResponseData,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT Sequence OF Certificate OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CertID ::= Sequence {
+ hashAlgorithm AlgorithmIdentifier,
+ issuerNameHash OCTET STRING, -- Hash of Issuer's DN
+ issuerKeyHash OCTET STRING, -- Hash of Issuers public key
+ serialNumber CertificateSerialNumber }
+
+
+
+ create a CertStatus object with a tag of zero.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CertStatus ::= CHOICE {
+ good [0] IMPLICIT Null,
+ revoked [1] IMPLICIT RevokedInfo,
+ unknown [2] IMPLICIT UnknownInfo }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CrlID ::= Sequence {
+ crlUrl [0] EXPLICIT IA5String OPTIONAL,
+ crlNum [1] EXPLICIT Integer OPTIONAL,
+ crlTime [2] EXPLICIT GeneralizedTime OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OcspRequest ::= Sequence {
+ tbsRequest TBSRequest,
+ optionalSignature [0] EXPLICIT Signature OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OcspResponse ::= Sequence {
+ responseStatus OcspResponseStatus,
+ responseBytes [0] EXPLICIT ResponseBytes OPTIONAL }
+
+
+
+ The OcspResponseStatus enumeration.
+
+ OcspResponseStatus ::= Enumerated {
+ successful (0), --Response has valid confirmations
+ malformedRequest (1), --Illegal confirmation request
+ internalError (2), --Internal error in issuer
+ tryLater (3), --Try again later
+ --(4) is not used
+ sigRequired (5), --Must sign the request
+ unauthorized (6) --Request unauthorized
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Request ::= Sequence {
+ reqCert CertID,
+ singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponderID ::= CHOICE {
+ byName [1] Name,
+ byKey [2] KeyHash }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponseBytes ::= Sequence {
+ responseType OBJECT IDENTIFIER,
+ response OCTET STRING }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponseData ::= Sequence {
+ version [0] EXPLICIT Version DEFAULT v1,
+ responderID ResponderID,
+ producedAt GeneralizedTime,
+ responses Sequence OF SingleResponse,
+ responseExtensions [1] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RevokedInfo ::= Sequence {
+ revocationTime GeneralizedTime,
+ revocationReason [0] EXPLICIT CRLReason OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ServiceLocator ::= Sequence {
+ issuer Name,
+ locator AuthorityInfoAccessSyntax OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Signature ::= Sequence {
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT Sequence OF Certificate OPTIONAL}
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SingleResponse ::= Sequence {
+ certID CertID,
+ certStatus CertStatus,
+ thisUpdate GeneralizedTime,
+ nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL,
+ singleExtensions [1] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ TBSRequest ::= Sequence {
+ version [0] EXPLICIT Version DEFAULT v1,
+ requestorName [1] EXPLICIT GeneralName OPTIONAL,
+ requestList Sequence OF Request,
+ requestExtensions [2] EXPLICIT Extensions OPTIONAL }
+
+
+
+ return an Attribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attr ::= Sequence {
+ attrType OBJECT IDENTIFIER,
+ attrValues Set OF AttributeValue
+ }
+
+
+
+ Pkcs10 Certfication request object.
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+
+
+ Pkcs10 CertificationRequestInfo object.
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= Sequence {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ The EncryptedData object.
+
+ EncryptedData ::= Sequence {
+ version Version,
+ encryptedContentInfo EncryptedContentInfo
+ }
+
+
+ EncryptedContentInfo ::= Sequence {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+ EncryptedContent ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EncryptedPrivateKeyInfo ::= Sequence {
+ encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
+ encryptedData EncryptedData
+ }
+
+ EncryptedData ::= OCTET STRING
+
+ KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
+ ... -- For local profiles
+ }
+
+
+
+
+ MacData ::= SEQUENCE {
+ mac DigestInfo,
+ macSalt OCTET STRING,
+ iterations INTEGER DEFAULT 1
+ -- Note: The default is for historic reasons and its use is deprecated. A
+ -- higher value, like 1024 is recommended.
+
+ @return the basic DERObject construction.
+
+
+ the infamous Pfx from Pkcs12
+
+
+ write out an RSA private key with its associated information
+ as described in Pkcs8.
+
+ PrivateKeyInfo ::= Sequence {
+ version Version,
+ privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}},
+ privateKey PrivateKey,
+ attributes [0] IMPLICIT Attributes OPTIONAL
+ }
+ Version ::= Integer {v1(0)} (v1,...)
+
+ PrivateKey ::= OCTET STRING
+
+ Attributes ::= Set OF Attr
+
+
+
+ The default version
+
+
+
+ RSAES-OAEP-params ::= SEQUENCE {
+ hashAlgorithm [0] OAEP-PSSDigestAlgorithms DEFAULT sha1,
+ maskGenAlgorithm [1] PKCS1MGFAlgorithms DEFAULT mgf1SHA1,
+ pSourceAlgorithm [2] PKCS1PSourceAlgorithms DEFAULT pSpecifiedEmpty
+ }
+
+ OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-sha1 PARAMETERS NULL }|
+ { OID id-sha256 PARAMETERS NULL }|
+ { OID id-sha384 PARAMETERS NULL }|
+ { OID id-sha512 PARAMETERS NULL },
+ ... -- Allows for future expansion --
+ }
+ PKCS1MGFAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+ ... -- Allows for future expansion --
+ }
+ PKCS1PSourceAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-pSpecified PARAMETERS OCTET STRING },
+ ... -- Allows for future expansion --
+ }
+
+ @return the asn1 primitive representing the parameters.
+
+
+ This outputs the key in Pkcs1v2 format.
+
+ RsaPrivateKey ::= Sequence {
+ version Version,
+ modulus Integer, -- n
+ publicExponent Integer, -- e
+ privateExponent Integer, -- d
+ prime1 Integer, -- p
+ prime2 Integer, -- q
+ exponent1 Integer, -- d mod (p-1)
+ exponent2 Integer, -- d mod (q-1)
+ coefficient Integer -- (inverse of q) mod p
+ }
+
+ Version ::= Integer
+
+ This routine is written to output Pkcs1 version 0, private keys.
+
+
+ The default version
+
+
+
+ RSASSA-PSS-params ::= SEQUENCE {
+ hashAlgorithm [0] OAEP-PSSDigestAlgorithms DEFAULT sha1,
+ maskGenAlgorithm [1] PKCS1MGFAlgorithms DEFAULT mgf1SHA1,
+ saltLength [2] INTEGER DEFAULT 20,
+ trailerField [3] TrailerField DEFAULT trailerFieldBC
+ }
+
+ OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-sha1 PARAMETERS NULL }|
+ { OID id-sha256 PARAMETERS NULL }|
+ { OID id-sha384 PARAMETERS NULL }|
+ { OID id-sha512 PARAMETERS NULL },
+ ... -- Allows for future expansion --
+ }
+
+ PKCS1MGFAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+ ... -- Allows for future expansion --
+ }
+
+ TrailerField ::= INTEGER { trailerFieldBC(1) }
+
+ @return the asn1 primitive representing the parameters.
+
+
+ a Pkcs#7 signed data object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignedData ::= Sequence {
+ version Version,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ contentInfo ContentInfo,
+ certificates
+ [0] IMPLICIT ExtendedCertificatesAndCertificates
+ OPTIONAL,
+ crls
+ [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos }
+
+
+
+ a Pkcs#7 signer info object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerInfo ::= Sequence {
+ version Version,
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ digestAlgorithm DigestAlgorithmIdentifier,
+ authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+ digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+ encryptedDigest EncryptedDigest,
+ unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+ }
+
+ EncryptedDigest ::= OCTET STRING
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+
+ DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+
+
+
+ the elliptic curve private key object from SEC 1
+
+
+ ECPrivateKey ::= SEQUENCE {
+ version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1),
+ privateKey OCTET STRING,
+ parameters [0] Parameters OPTIONAL,
+ publicKey [1] BIT STRING OPTIONAL }
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ EllipticCurve OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0)
+ }
+
+
+ Handler class for dealing with S/MIME Capabilities
+
+
+ general preferences
+
+
+ encryption algorithms preferences
+
+
+ return an Attr object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ returns an ArrayList with 0 or more objects of all the capabilities
+ matching the passed in capability Oid. If the Oid passed is null the
+ entire set is returned.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SMIMECapabilities ::= Sequence OF SMIMECapability
+
+
+
+ general preferences
+
+
+ encryption algorithms preferences
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SMIMECapability ::= Sequence {
+ capabilityID OBJECT IDENTIFIER,
+ parameters ANY DEFINED BY capabilityID OPTIONAL
+ }
+
+
+
+ Handler for creating a vector S/MIME Capabilities
+
+
+ The SmimeEncryptionKeyPreference object.
+
+ SmimeEncryptionKeyPreference ::= CHOICE {
+ issuerAndSerialNumber [0] IssuerAndSerialNumber,
+ receipentKeyId [1] RecipientKeyIdentifier,
+ subjectAltKeyIdentifier [2] SubjectKeyIdentifier
+ }
+
+
+
+ @param sKeyId the subjectKeyIdentifier value (normally the X.509 one)
+
+
+ elliptic curves defined in "ECC Brainpool Standard Curves and Curve Generation"
+ http://www.ecc-brainpool.org/download/draft_pkix_additional_ecc_dp.txt
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+
+ Accuracy ::= SEQUENCE {
+ seconds INTEGER OPTIONAL,
+ millis [0] INTEGER (1..999) OPTIONAL,
+ micros [1] INTEGER (1..999) OPTIONAL
+ }
+
+
+
+ @param o
+ @return a MessageImprint object.
+
+
+
+ MessageImprint ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashedMessage OCTET STRING }
+
+
+
+
+
+ TstInfo ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ policy TSAPolicyId,
+ messageImprint MessageImprint,
+ -- MUST have the same value as the similar field in
+ -- TimeStampReq
+ serialNumber INTEGER,
+ -- Time-Stamping users MUST be ready to accommodate integers
+ -- up to 160 bits.
+ genTime GeneralizedTime,
+ accuracy Accuracy OPTIONAL,
+ ordering BOOLEAN DEFAULT FALSE,
+ nonce INTEGER OPTIONAL,
+ -- MUST be present if the similar field was present
+ -- in TimeStampReq. In that case it MUST have the same value.
+ tsa [0] GeneralName OPTIONAL,
+ extensions [1] IMPLICIT Extensions OPTIONAL }
+
+
+
+
+
+ TimeStampReq ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ messageImprint MessageImprint,
+ --a hash algorithm OID and the hash value of the data to be
+ --time-stamped
+ reqPolicy TSAPolicyId OPTIONAL,
+ nonce INTEGER OPTIONAL,
+ certReq BOOLEAN DEFAULT FALSE,
+ extensions [0] IMPLICIT Extensions OPTIONAL
+ }
+
+
+
+
+ TimeStampResp ::= SEQUENCE {
+ status PkiStatusInfo,
+ timeStampToken TimeStampToken OPTIONAL }
+
+
+
+ dump a Der object as a formatted string with indentation
+
+ @param obj the Asn1Object to be dumped out.
+
+
+ dump out a DER object as a formatted string, in non-verbose mode
+
+ @param obj the Asn1Encodable to be dumped out.
+ @return the resulting string.
+
+
+ Dump out the object as a string
+
+ @param obj the Asn1Encodable to be dumped out.
+ @param verbose if true, dump out the contents of octet and bit strings.
+ @return the resulting string.
+
+
+
+ DirectoryString ::= CHOICE {
+ teletexString TeletexString (SIZE (1..MAX)),
+ printableString PrintableString (SIZE (1..MAX)),
+ universalString UniversalString (SIZE (1..MAX)),
+ utf8String UTF8String (SIZE (1..MAX)),
+ bmpString BMPString (SIZE (1..MAX)) }
+
+
+
+ The AccessDescription object.
+
+ AccessDescription ::= SEQUENCE {
+ accessMethod OBJECT IDENTIFIER,
+ accessLocation GeneralName }
+
+
+
+ create an AccessDescription with the oid and location provided.
+
+
+
+ @return the access method.
+
+
+
+ @return the access location
+
+
+
+ Return the OID in the Algorithm entry of this identifier.
+
+
+
+
+ Return the parameters structure in the Parameters entry of this identifier.
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AlgorithmIdentifier ::= Sequence {
+ algorithm OBJECT IDENTIFIER,
+ parameters ANY DEFINED BY algorithm OPTIONAL }
+
+
+
+
+ Don't use this one if you are trying to be RFC 3281 compliant.
+ Use it for v1 attribute certificates only.
+
+ Our GeneralNames structure
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttCertIssuer ::= CHOICE {
+ v1Form GeneralNames, -- MUST NOT be used in this
+ -- profile
+ v2Form [0] V2Form -- v2 only
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttCertValidityPeriod ::= Sequence {
+ notBeforeTime GeneralizedTime,
+ notAfterTime GeneralizedTime
+ }
+
+
+
+ return an Attr object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attr ::= Sequence {
+ attrType OBJECT IDENTIFIER,
+ attrValues Set OF AttributeValue
+ }
+
+
+
+ @param obj
+ @return
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttributeCertificate ::= Sequence {
+ acinfo AttributeCertificateInfo,
+ signatureAlgorithm AlgorithmIdentifier,
+ signatureValue BIT STRING
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttributeCertificateInfo ::= Sequence {
+ version AttCertVersion -- version is v2,
+ holder Holder,
+ issuer AttCertIssuer,
+ signature AlgorithmIdentifier,
+ serialNumber CertificateSerialNumber,
+ attrCertValidityPeriod AttCertValidityPeriod,
+ attributes Sequence OF Attr,
+ issuerUniqueID UniqueIdentifier OPTIONAL,
+ extensions Extensions OPTIONAL
+ }
+
+ AttCertVersion ::= Integer { v2(1) }
+
+
+
+ The AuthorityInformationAccess object.
+
+ id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 1 }
+
+ AuthorityInfoAccessSyntax ::=
+ Sequence SIZE (1..MAX) OF AccessDescription
+ AccessDescription ::= Sequence {
+ accessMethod OBJECT IDENTIFIER,
+ accessLocation GeneralName }
+
+ id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
+ id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 }
+ id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 }
+
+
+
+ create an AuthorityInformationAccess with the oid and location provided.
+
+
+ The AuthorityKeyIdentifier object.
+
+ id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 35 }
+
+ AuthorityKeyIdentifier ::= Sequence {
+ keyIdentifier [0] IMPLICIT KeyIdentifier OPTIONAL,
+ authorityCertIssuer [1] IMPLICIT GeneralNames OPTIONAL,
+ authorityCertSerialNumber [2] IMPLICIT CertificateSerialNumber OPTIONAL }
+
+ KeyIdentifier ::= OCTET STRING
+
+
+
+
+ *
+ * Calulates the keyidentifier using a SHA1 hash over the BIT STRING
+ * from SubjectPublicKeyInfo as defined in RFC2459.
+ *
+ * Example of making a AuthorityKeyIdentifier:
+ *
+ * SubjectPublicKeyInfo apki = new SubjectPublicKeyInfo((ASN1Sequence)new ASN1InputStream(
+ * publicKey.getEncoded()).readObject());
+ * AuthorityKeyIdentifier aki = new AuthorityKeyIdentifier(apki);
+ *
+ *
+ *
+
+
+ create an AuthorityKeyIdentifier with the GeneralNames tag and
+ the serial number provided as well.
+
+
+ create an AuthorityKeyIdentifier with the GeneralNames tag and
+ the serial number provided.
+
+
+ create an AuthorityKeyIdentifier with a precomputed key identifier
+
+
+ create an AuthorityKeyIdentifier with a precomupted key identifier
+ and the GeneralNames tag and the serial number provided as well.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+ create a cA=true object for the given path length constraint.
+
+ @param pathLenConstraint
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ BasicConstraints := Sequence {
+ cA Boolean DEFAULT FALSE,
+ pathLenConstraint Integer (0..MAX) OPTIONAL
+ }
+
+
+
+ Return the distribution points making up the sequence.
+
+ @return DistributionPoint[]
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CrlDistPoint ::= Sequence SIZE {1..MAX} OF DistributionPoint
+
+
+
+ The CRLNumber object.
+
+ CRLNumber::= Integer(0..MAX)
+
+
+
+ The CRLReason enumeration.
+
+ CRLReason ::= Enumerated {
+ unspecified (0),
+ keyCompromise (1),
+ cACompromise (2),
+ affiliationChanged (3),
+ superseded (4),
+ cessationOfOperation (5),
+ certificateHold (6),
+ removeFromCRL (8),
+ privilegeWithdrawn (9),
+ aACompromise (10)
+ }
+
+
+
+ CertPolicyId, used in the CertificatePolicies and PolicyMappings
+ X509V3 Extensions.
+
+
+ CertPolicyId ::= OBJECT IDENTIFIER
+
+
+
+ PKIX RFC-2459
+
+ The X.509 v2 CRL syntax is as follows. For signature calculation,
+ the data that is to be signed is ASN.1 Der encoded.
+
+
+ CertificateList ::= Sequence {
+ tbsCertList TbsCertList,
+ signatureAlgorithm AlgorithmIdentifier,
+ signatureValue BIT STRING }
+
+
+
+ This class helps to support crossCerfificatePairs in a LDAP directory
+ according RFC 2587
+
+
+ crossCertificatePairATTRIBUTE::={
+ WITH SYNTAX CertificatePair
+ EQUALITY MATCHING RULE certificatePairExactMatch
+ ID joint-iso-ccitt(2) ds(5) attributeType(4) crossCertificatePair(40)}
+
+
+ The forward elements of the crossCertificatePair attribute of a
+ CA's directory entry shall be used to store all, except self-issued
+ certificates issued to this CA. Optionally, the reverse elements of the
+ crossCertificatePair attribute, of a CA's directory entry may contain a
+ subset of certificates issued by this CA to other CAs. When both the forward
+ and the reverse elements are present in a single attribute value, issuer name
+ in one certificate shall match the subject name in the other and vice versa,
+ and the subject public key in one certificate shall be capable of verifying
+ the digital signature on the other certificate and vice versa.
+
+ When a reverse element is present, the forward element value and the reverse
+ element value need not be stored in the same attribute value; in other words,
+ they can be stored in either a single attribute value or two attribute
+ values.
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type CertificatePair:
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param forward Certificates issued to this CA.
+ @param reverse Certificates issued by this CA to other CAs.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+ @return a DERObject
+
+
+ @return Returns the forward.
+
+
+ @return Returns the reverse.
+
+
+ Construct a CertificatePolicies object containing one PolicyInformation.
+
+ @param name the name to be contained.
+
+
+ Produce an object suitable for an ASN1OutputStream.
+
+ CertificatePolicies ::= SEQUENCE SIZE {1..MAX} OF PolicyInformation
+
+
+
+ The DigestInfo object.
+
+ DigestInfo::=Sequence{
+ digestAlgorithm AlgorithmIdentifier,
+ digest OCTET STRING }
+
+
+
+ DisplayText class, used in
+ CertificatePolicies X509 V3 extensions (in policy qualifiers).
+
+ It stores a string in a chosen encoding.
+
+ DisplayText ::= CHOICE {
+ ia5String IA5String (SIZE (1..200)),
+ visibleString VisibleString (SIZE (1..200)),
+ bmpString BMPString (SIZE (1..200)),
+ utf8String UTF8String (SIZE (1..200)) }
+
+ @see PolicyQualifierInfo
+ @see PolicyInformation
+
+
+ Constant corresponding to ia5String encoding.
+
+
+
+ Constant corresponding to bmpString encoding.
+
+
+
+ Constant corresponding to utf8String encoding.
+
+
+
+ Constant corresponding to visibleString encoding.
+
+
+
+ Describe constant DisplayTextMaximumSize here.
+
+
+
+ Creates a new DisplayText instance.
+
+ @param type the desired encoding type for the text.
+ @param text the text to store. Strings longer than 200
+ characters are truncated.
+
+
+ Creates a new DisplayText instance.
+
+ @param text the text to encapsulate. Strings longer than 200
+ characters are truncated.
+
+
+ Creates a new DisplayText instance.
+ Useful when reading back a DisplayText class
+ from it's Asn1Encodable form.
+
+ @param contents an Asn1Encodable instance.
+
+
+ Returns the stored string object.
+
+ @return the stored text as a string.
+
+
+ The DistributionPoint object.
+
+ DistributionPoint ::= Sequence {
+ distributionPoint [0] DistributionPointName OPTIONAL,
+ reasons [1] ReasonFlags OPTIONAL,
+ cRLIssuer [2] GeneralNames OPTIONAL
+ }
+
+
+
+ The DistributionPointName object.
+
+ DistributionPointName ::= CHOICE {
+ fullName [0] GeneralNames,
+ nameRelativeToCRLIssuer [1] RDN
+ }
+
+
+
+ The extendedKeyUsage object.
+
+ extendedKeyUsage ::= Sequence SIZE (1..MAX) OF KeyPurposeId
+
+
+
+ Returns all extended key usages.
+ The returned ArrayList contains DerObjectIdentifier instances.
+ @return An ArrayList with all key purposes.
+
+
+ The GeneralName object.
+
+ GeneralName ::= CHOICE {
+ otherName [0] OtherName,
+ rfc822Name [1] IA5String,
+ dNSName [2] IA5String,
+ x400Address [3] ORAddress,
+ directoryName [4] Name,
+ ediPartyName [5] EDIPartyName,
+ uniformResourceIdentifier [6] IA5String,
+ iPAddress [7] OCTET STRING,
+ registeredID [8] OBJECT IDENTIFIER}
+
+ OtherName ::= Sequence {
+ type-id OBJECT IDENTIFIER,
+ value [0] EXPLICIT ANY DEFINED BY type-id }
+
+ EDIPartyName ::= Sequence {
+ nameAssigner [0] DirectoryString OPTIONAL,
+ partyName [1] DirectoryString }
+
+
+
+ When the subjectAltName extension contains an Internet mail address,
+ the address MUST be included as an rfc822Name. The format of an
+ rfc822Name is an "addr-spec" as defined in RFC 822 [RFC 822].
+
+ When the subjectAltName extension contains a domain name service
+ label, the domain name MUST be stored in the dNSName (an IA5String).
+ The name MUST be in the "preferred name syntax," as specified by RFC
+ 1034 [RFC 1034].
+
+ When the subjectAltName extension contains a URI, the name MUST be
+ stored in the uniformResourceIdentifier (an IA5String). The name MUST
+ be a non-relative URL, and MUST follow the URL syntax and encoding
+ rules specified in [RFC 1738]. The name must include both a scheme
+ (e.g., "http" or "ftp") and a scheme-specific-part. The scheme-
+ specific-part must include a fully qualified domain name or IP
+ address as the host.
+
+ When the subjectAltName extension contains a iPAddress, the address
+ MUST be stored in the octet string in "network byte order," as
+ specified in RFC 791 [RFC 791]. The least significant bit (LSB) of
+ each octet is the LSB of the corresponding byte in the network
+ address. For IP Version 4, as specified in RFC 791, the octet string
+ MUST contain exactly four octets. For IP Version 6, as specified in
+ RFC 1883, the octet string MUST contain exactly sixteen octets [RFC
+ 1883].
+
+
+ Create a GeneralName for the given tag from the passed in string.
+
+ This constructor can handle:
+
+ rfc822Name
+ iPAddress
+ directoryName
+ dNSName
+ uniformResourceIdentifier
+ registeredID
+
+ For x400Address, otherName and ediPartyName there is no common string
+ format defined.
+
+ Note: A directory name can be encoded in different ways into a byte
+ representation. Be aware of this if the byte representation is used for
+ comparing results.
+
+
+ @param tag tag number
+ @param name string representation of name
+ @throws ArgumentException if the string encoding is not correct or
+ not supported.
+
+
+ Construct a GeneralNames object containing one GeneralName.
+ The name to be contained.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ GeneralNames ::= Sequence SIZE {1..MAX} OF GeneralName
+
+
+
+ Class for containing a restriction object subtrees in NameConstraints. See
+ RFC 3280.
+
+
+
+ GeneralSubtree ::= SEQUENCE
+ {
+ baseName GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.NameConstraints
+
+
+
+ Constructor from a given details.
+
+ According RFC 3280, the minimum and maximum fields are not used with any
+ name forms, thus minimum MUST be zero, and maximum MUST be absent.
+
+ If minimum is null, zero is assumed, if
+ maximum is null, maximum is absent.
+
+ @param baseName
+ A restriction.
+ @param minimum
+ Minimum
+
+ @param maximum
+ Maximum
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ GeneralSubtree ::= SEQUENCE
+ {
+ baseName GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL
+ }
+
+
+ @return a DERObject
+
+
+ The Holder object.
+
+ For an v2 attribute certificate this is:
+
+
+ Holder ::= SEQUENCE {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+ For an v1 attribute certificate this is:
+
+
+ subject CHOICE {
+ baseCertificateID [0] IssuerSerial,
+ -- associated with a Public Key Certificate
+ subjectName [1] GeneralNames },
+ -- associated with a name
+
+
+
+
+ Constructor for a holder for an v1 attribute certificate.
+
+ @param tagObj The ASN.1 tagged holder object.
+
+
+ Constructor for a holder for an v2 attribute certificate. *
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructs a holder from a IssuerSerial.
+ @param baseCertificateID The IssuerSerial.
+ @param version The version of the attribute certificate.
+
+
+ Returns 1 for v2 attribute certificates or 0 for v1 attribute
+ certificates.
+ @return The version of the attribute certificate.
+
+
+ Constructs a holder with an entityName for v2 attribute certificates or
+ with a subjectName for v1 attribute certificates.
+
+ @param entityName The entity or subject name.
+
+
+ Constructs a holder with an entityName for v2 attribute certificates or
+ with a subjectName for v1 attribute certificates.
+
+ @param entityName The entity or subject name.
+ @param version The version of the attribute certificate.
+
+
+ Constructs a holder from an object digest info.
+
+ @param objectDigestInfo The object digest info object.
+
+
+ Returns the entityName for an v2 attribute certificate or the subjectName
+ for an v1 attribute certificate.
+
+ @return The entityname or subjectname.
+
+
+ The Holder object.
+
+ Holder ::= Sequence {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+ Implementation of IetfAttrSyntax as specified by RFC3281.
+
+
+
+
+
+
+
+
+ IetfAttrSyntax ::= Sequence {
+ policyAuthority [0] GeneralNames OPTIONAL,
+ values Sequence OF CHOICE {
+ octets OCTET STRING,
+ oid OBJECT IDENTIFIER,
+ string UTF8String
+ }
+ }
+
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ IssuerSerial ::= Sequence {
+ issuer GeneralNames,
+ serial CertificateSerialNumber,
+ issuerUid UniqueIdentifier OPTIONAL
+ }
+
+
+
+
+ IssuingDistributionPoint ::= SEQUENCE {
+ distributionPoint [0] DistributionPointName OPTIONAL,
+ onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE,
+ onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE,
+ onlySomeReasons [3] ReasonFlags OPTIONAL,
+ indirectCRL [4] BOOLEAN DEFAULT FALSE,
+ onlyContainsAttributeCerts [5] BOOLEAN DEFAULT FALSE }
+
+
+
+ Constructor from given details.
+
+ @param distributionPoint
+ May contain an URI as pointer to most current CRL.
+ @param onlyContainsUserCerts Covers revocation information for end certificates.
+ @param onlyContainsCACerts Covers revocation information for CA certificates.
+
+ @param onlySomeReasons
+ Which revocation reasons does this point cover.
+ @param indirectCRL
+ If true then the CRL contains revocation
+ information about certificates ssued by other CAs.
+ @param onlyContainsAttributeCerts Covers revocation information for attribute certificates.
+
+
+ Constructor from Asn1Sequence
+
+
+ @return Returns the distributionPoint.
+
+
+ @return Returns the onlySomeReasons.
+
+
+ The KeyPurposeID object.
+
+ KeyPurposeID ::= OBJECT IDENTIFIER
+
+
+
+ The KeyUsage object.
+
+ id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
+
+ KeyUsage ::= BIT STRING {
+ digitalSignature (0),
+ nonRepudiation (1),
+ keyEncipherment (2),
+ dataEncipherment (3),
+ keyAgreement (4),
+ keyCertSign (5),
+ cRLSign (6),
+ encipherOnly (7),
+ decipherOnly (8) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment)
+
+
+ Constructor from a given details.
+
+ permitted and excluded are Vectors of GeneralSubtree objects.
+
+ @param permitted Permitted subtrees
+ @param excluded Excluded subtrees
+
+
+ NoticeReference class, used in
+ CertificatePolicies X509 V3 extensions
+ (in policy qualifiers).
+
+
+ NoticeReference ::= Sequence {
+ organization DisplayText,
+ noticeNumbers Sequence OF Integer }
+
+
+
+ @see PolicyQualifierInfo
+ @see PolicyInformation
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization a String value
+ @param numbers a Vector value
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization a String value
+ @param noticeNumbers an ASN1EncodableVector value
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization displayText
+ @param noticeNumbers an ASN1EncodableVector value
+
+
+ Creates a new NoticeReference instance.
+ Useful for reconstructing a NoticeReference
+ instance from its encodable/encoded form.
+
+ @param as an Asn1Sequence value obtained from either
+ calling @{link ToAsn1Object()} for a NoticeReference
+ instance or from parsing it from a Der-encoded stream.
+
+
+ Describe ToAsn1Object method here.
+
+ @return a Asn1Object value
+
+
+ ObjectDigestInfo ASN.1 structure used in v2 attribute certificates.
+
+
+
+ ObjectDigestInfo ::= SEQUENCE {
+ digestedObjectType ENUMERATED {
+ publicKey (0),
+ publicKeyCert (1),
+ otherObjectTypes (2) },
+ -- otherObjectTypes MUST NOT
+ -- be used in this profile
+ otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
+ digestAlgorithm AlgorithmIdentifier,
+ objectDigest BIT STRING
+ }
+
+
+
+
+
+ The public key is hashed.
+
+
+ The public key certificate is hashed.
+
+
+ An other object is hashed.
+
+
+ Constructor from given details.
+
+ If digestedObjectType is not {@link #publicKeyCert} or
+ {@link #publicKey} otherObjectTypeID must be given,
+ otherwise it is ignored.
+
+ @param digestedObjectType The digest object type.
+ @param otherObjectTypeID The object type ID for
+ otherObjectDigest.
+ @param digestAlgorithm The algorithm identifier for the hash.
+ @param objectDigest The hash value.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+
+ ObjectDigestInfo ::= SEQUENCE {
+ digestedObjectType ENUMERATED {
+ publicKey (0),
+ publicKeyCert (1),
+ otherObjectTypes (2) },
+ -- otherObjectTypes MUST NOT
+ -- be used in this profile
+ otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
+ digestAlgorithm AlgorithmIdentifier,
+ objectDigest BIT STRING
+ }
+
+
+
+
+ PolicyMappings V3 extension, described in RFC3280.
+
+ PolicyMappings ::= Sequence SIZE (1..MAX) OF Sequence {
+ issuerDomainPolicy CertPolicyId,
+ subjectDomainPolicy CertPolicyId }
+
+
+ @see RFC 3280, section 4.2.1.6
+
+
+ Creates a new PolicyMappings instance.
+
+ @param seq an Asn1Sequence constructed as specified
+ in RFC 3280
+
+
+ Creates a new PolicyMappings instance.
+
+ @param mappings a HashMap value that maps
+ string oids
+ to other string oids.
+
+
+ PolicyQualifierId, used in the CertificatePolicies
+ X509V3 extension.
+
+
+ id-qt OBJECT IDENTIFIER ::= { id-pkix 2 }
+ id-qt-cps OBJECT IDENTIFIER ::= { id-qt 1 }
+ id-qt-unotice OBJECT IDENTIFIER ::= { id-qt 2 }
+ PolicyQualifierId ::=
+ OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
+
+
+
+ Policy qualifiers, used in the X509V3 CertificatePolicies
+ extension.
+
+
+ PolicyQualifierInfo ::= Sequence {
+ policyQualifierId PolicyQualifierId,
+ qualifier ANY DEFINED BY policyQualifierId }
+
+
+
+ Creates a new PolicyQualifierInfo instance.
+
+ @param policyQualifierId a PolicyQualifierId value
+ @param qualifier the qualifier, defined by the above field.
+
+
+ Creates a new PolicyQualifierInfo containing a
+ cPSuri qualifier.
+
+ @param cps the CPS (certification practice statement) uri as a
+ string.
+
+
+ Creates a new PolicyQualifierInfo instance.
+
+ @param as PolicyQualifierInfo X509 structure
+ encoded as an Asn1Sequence.
+
+
+ Returns a Der-encodable representation of this instance.
+
+ @return a Asn1Object value
+
+
+
+
+ PrivateKeyUsagePeriod ::= SEQUENCE
+ {
+ notBefore [0] GeneralizedTime OPTIONAL,
+ notAfter [1] GeneralizedTime OPTIONAL }
+
+
+
+
+ This outputs the key in Pkcs1v2 format.
+
+ RSAPublicKey ::= Sequence {
+ modulus Integer, -- n
+ publicExponent Integer, -- e
+ }
+
+
+
+ The ReasonFlags object.
+
+ ReasonFlags ::= BIT STRING {
+ unused(0),
+ keyCompromise(1),
+ cACompromise(2),
+ affiliationChanged(3),
+ superseded(4),
+ cessationOfOperation(5),
+ certficateHold(6)
+ }
+
+
+
+ @param reasons - the bitwise OR of the Key Reason flags giving the
+ allowed uses for the key.
+
+
+ Implementation of the RoleSyntax object as specified by the RFC3281.
+
+
+ RoleSyntax ::= SEQUENCE {
+ roleAuthority [0] GeneralNames OPTIONAL,
+ roleName [1] GeneralName
+ }
+
+
+
+ RoleSyntax factory method.
+ @param obj the object used to construct an instance of
+ RoleSyntax. It must be an instance of RoleSyntax
+ or Asn1Sequence.
+ @return the instance of RoleSyntax built from the
+ supplied object.
+ @throws java.lang.ArgumentException if the object passed
+ to the factory is not an instance of RoleSyntax or
+ Asn1Sequence.
+
+
+ Constructor.
+ @param roleAuthority the role authority of this RoleSyntax.
+ @param roleName the role name of this RoleSyntax.
+
+
+ Constructor. Invoking this constructor is the same as invoking
+ new RoleSyntax(null, roleName).
+ @param roleName the role name of this RoleSyntax.
+
+
+ Utility constructor. Takes a string argument representing
+ the role name, builds a GeneralName to hold the role name
+ and calls the constructor that takes a GeneralName.
+ @param roleName
+
+
+ Constructor that builds an instance of RoleSyntax by
+ extracting the encoded elements from the Asn1Sequence
+ object supplied.
+ @param seq an instance of Asn1Sequence that holds
+ the encoded elements used to build this RoleSyntax.
+
+
+ Gets the role authority of this RoleSyntax.
+ @return an instance of GeneralNames holding the
+ role authority of this RoleSyntax.
+
+
+ Gets the role name of this RoleSyntax.
+ @return an instance of GeneralName holding the
+ role name of this RoleSyntax.
+
+
+ Gets the role name as a java.lang.string object.
+ @return the role name of this RoleSyntax represented as a
+ string object.
+
+
+ Gets the role authority as a string[] object.
+ @return the role authority of this RoleSyntax represented as a
+ string[] array.
+
+
+ Implementation of the method ToAsn1Object as
+ required by the superclass ASN1Encodable.
+
+
+ RoleSyntax ::= SEQUENCE {
+ roleAuthority [0] GeneralNames OPTIONAL,
+ roleName [1] GeneralName
+ }
+
+
+
+ This extension may contain further X.500 attributes of the subject. See also
+ RFC 3039.
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @see org.bouncycastle.asn1.x509.X509Name for AttributeType ObjectIdentifiers.
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type SubjectDirectoryAttributes:
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @param seq
+ The ASN.1 sequence.
+
+
+ Constructor from an ArrayList of attributes.
+
+ The ArrayList consists of attributes of type {@link Attribute Attribute}
+
+ @param attributes The attributes.
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @return a DERObject
+
+
+ @return Returns the attributes.
+
+
+ The SubjectKeyIdentifier object.
+
+ SubjectKeyIdentifier::= OCTET STRING
+
+
+
+ Calculates the keyIdentifier using a SHA1 hash over the BIT STRING
+ from SubjectPublicKeyInfo as defined in RFC3280.
+
+ @param spki the subject public key info.
+
+
+ Return a RFC 3280 type 1 key identifier. As in:
+
+ (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the
+ value of the BIT STRING subjectPublicKey (excluding the tag,
+ length, and number of unused bits).
+
+ @param keyInfo the key info object containing the subjectPublicKey field.
+ @return the key identifier.
+
+
+ Return a RFC 3280 type 2 key identifier. As in:
+
+ (2) The keyIdentifier is composed of a four bit type field with
+ the value 0100 followed by the least significant 60 bits of the
+ SHA-1 hash of the value of the BIT STRING subjectPublicKey.
+
+ @param keyInfo the key info object containing the subjectPublicKey field.
+ @return the key identifier.
+
+
+ The object that contains the public key stored in a certficate.
+
+ The GetEncoded() method in the public keys in the JCE produces a DER
+ encoded one of these.
+
+
+ for when the public key is an encoded object - if the bitstring
+ can't be decoded this routine raises an IOException.
+
+ @exception IOException - if the bit string doesn't represent a Der
+ encoded object.
+
+
+ for when the public key is raw bits...
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SubjectPublicKeyInfo ::= Sequence {
+ algorithm AlgorithmIdentifier,
+ publicKey BIT STRING }
+
+
+
+ PKIX RFC-2459 - TbsCertList object.
+
+ TbsCertList ::= Sequence {
+ version Version OPTIONAL,
+ -- if present, shall be v2
+ signature AlgorithmIdentifier,
+ issuer Name,
+ thisUpdate Time,
+ nextUpdate Time OPTIONAL,
+ revokedCertificates Sequence OF Sequence {
+ userCertificate CertificateSerialNumber,
+ revocationDate Time,
+ crlEntryExtensions Extensions OPTIONAL
+ -- if present, shall be v2
+ } OPTIONAL,
+ crlExtensions [0] EXPLICIT Extensions OPTIONAL
+ -- if present, shall be v2
+ }
+
+
+
+ The TbsCertificate object.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ extensions [ 3 ] Extensions OPTIONAL
+ }
+
+
+ Note: issuerUniqueID and subjectUniqueID are both deprecated by the IETF. This class
+ will parse them, but you really shouldn't be creating new ones.
+
+
+ Target structure used in target information extension for attribute
+ certificates from RFC 3281.
+
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+
+
+ The targetCert field is currently not supported and must not be used
+ according to RFC 3281.
+
+
+ Creates an instance of a Target from the given object.
+
+ obj can be a Target or a {@link Asn1TaggedObject}
+
+ @param obj The object.
+ @return A Target instance.
+ @throws ArgumentException if the given object cannot be
+ interpreted as Target.
+
+
+ Constructor from Asn1TaggedObject.
+
+ @param tagObj The tagged object.
+ @throws ArgumentException if the encoding is wrong.
+
+
+ Constructor from given details.
+
+ Exactly one of the parameters must be not null.
+
+ @param type the choice type to apply to the name.
+ @param name the general name.
+ @throws ArgumentException if type is invalid.
+
+
+ @return Returns the targetGroup.
+
+
+ @return Returns the targetName.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+
+ @return an Asn1Object
+
+
+ Target information extension for attributes certificates according to RFC
+ 3281.
+
+
+ SEQUENCE OF Targets
+
+
+
+
+ Creates an instance of a TargetInformation from the given object.
+
+ obj can be a TargetInformation or a {@link Asn1Sequence}
+
+ @param obj The object.
+ @return A TargetInformation instance.
+ @throws ArgumentException if the given object cannot be interpreted as TargetInformation.
+
+
+ Constructor from a Asn1Sequence.
+
+ @param seq The Asn1Sequence.
+ @throws ArgumentException if the sequence does not contain
+ correctly encoded Targets elements.
+
+
+ Returns the targets in this target information extension.
+
+ The ArrayList is cloned before it is returned.
+
+ @return Returns the targets.
+
+
+ Constructs a target information from a single targets element.
+ According to RFC 3281 only one targets element must be produced.
+
+ @param targets A Targets instance.
+
+
+ According to RFC 3281 only one targets element must be produced. If
+ multiple targets are given they must be merged in
+ into one targets element.
+
+ @param targets An array with {@link Targets}.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ SEQUENCE OF Targets
+
+
+
+ According to RFC 3281 only one targets element must be produced. If
+ multiple targets are given in the constructor they are merged into one
+ targets element. If this was produced from a
+ {@link Org.BouncyCastle.Asn1.Asn1Sequence} the encoding is kept.
+
+ @return an Asn1Object
+
+
+ Targets structure used in target information extension for attribute
+ certificates from RFC 3281.
+
+
+ Targets ::= SEQUENCE OF Target
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+ TargetCert ::= SEQUENCE {
+ targetCertificate IssuerSerial,
+ targetName GeneralName OPTIONAL,
+ certDigestInfo ObjectDigestInfo OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.Target
+ @see org.bouncycastle.asn1.x509.TargetInformation
+
+
+ Creates an instance of a Targets from the given object.
+
+ obj can be a Targets or a {@link Asn1Sequence}
+
+ @param obj The object.
+ @return A Targets instance.
+ @throws ArgumentException if the given object cannot be interpreted as Target.
+
+
+ Constructor from Asn1Sequence.
+
+ @param targets The ASN.1 SEQUENCE.
+ @throws ArgumentException if the contents of the sequence are
+ invalid.
+
+
+ Constructor from given targets.
+
+ The ArrayList is copied.
+
+ @param targets An ArrayList of {@link Target}s.
+ @see Target
+ @throws ArgumentException if the ArrayList contains not only Targets.
+
+
+ Returns the targets in an ArrayList.
+
+ The ArrayList is cloned before it is returned.
+
+ @return Returns the targets.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Targets ::= SEQUENCE OF Target
+
+
+ @return an Asn1Object
+
+
+ creates a time object from a given date - if the date is between 1950
+ and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime
+ is used.
+
+
+
+ Return our time as DateTime.
+
+ A date time.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Time ::= CHOICE {
+ utcTime UTCTime,
+ generalTime GeneralizedTime }
+
+
+
+ UserNotice class, used in
+ CertificatePolicies X509 extensions (in policy
+ qualifiers).
+
+ UserNotice ::= Sequence {
+ noticeRef NoticeReference OPTIONAL,
+ explicitText DisplayText OPTIONAL}
+
+
+
+ @see PolicyQualifierId
+ @see PolicyInformation
+
+
+ Creates a new UserNotice instance.
+
+ @param noticeRef a NoticeReference value
+ @param explicitText a DisplayText value
+
+
+ Creates a new UserNotice instance.
+
+ @param noticeRef a NoticeReference value
+ @param str the explicitText field as a string.
+
+
+ Creates a new UserNotice instance.
+ Useful from reconstructing a UserNotice instance
+ from its encodable/encoded form.
+
+ @param as an ASN1Sequence value obtained from either
+ calling @{link toASN1Object()} for a UserNotice
+ instance or from parsing it from a DER-encoded stream.
+
+
+ Generator for Version 1 TbsCertificateStructures.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ }
+
+
+
+
+ Generator for Version 2 AttributeCertificateInfo
+
+ AttributeCertificateInfo ::= Sequence {
+ version AttCertVersion -- version is v2,
+ holder Holder,
+ issuer AttCertIssuer,
+ signature AlgorithmIdentifier,
+ serialNumber CertificateSerialNumber,
+ attrCertValidityPeriod AttCertValidityPeriod,
+ attributes Sequence OF Attr,
+ issuerUniqueID UniqueIdentifier OPTIONAL,
+ extensions Extensions OPTIONAL
+ }
+
+
+
+
+ @param attribute
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ V2Form ::= Sequence {
+ issuerName GeneralNames OPTIONAL,
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ objectDigestInfo [1] ObjectDigestInfo OPTIONAL
+ -- issuerName MUST be present in this profile
+ -- baseCertificateID and objectDigestInfo MUST NOT
+ -- be present in this profile
+ }
+
+
+
+ Generator for Version 2 TbsCertList structures.
+
+ TbsCertList ::= Sequence {
+ version Version OPTIONAL,
+ -- if present, shall be v2
+ signature AlgorithmIdentifier,
+ issuer Name,
+ thisUpdate Time,
+ nextUpdate Time OPTIONAL,
+ revokedCertificates Sequence OF Sequence {
+ userCertificate CertificateSerialNumber,
+ revocationDate Time,
+ crlEntryExtensions Extensions OPTIONAL
+ -- if present, shall be v2
+ } OPTIONAL,
+ crlExtensions [0] EXPLICIT Extensions OPTIONAL
+ -- if present, shall be v2
+ }
+
+
+ Note: This class may be subject to change
+
+
+ Generator for Version 3 TbsCertificateStructures.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ extensions [ 3 ] Extensions OPTIONAL
+ }
+
+
+
+
+ an X509Certificate structure.
+
+ Certificate ::= Sequence {
+ tbsCertificate TbsCertificate,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING
+ }
+
+
+
+ The default converter for X509 DN entries when going from their
+ string value to ASN.1 strings.
+
+
+ Apply default conversion for the given value depending on the oid
+ and the character range of the value.
+
+ @param oid the object identifier for the DN entry
+ @param value the value associated with it
+ @return the ASN.1 equivalent for the string value.
+
+
+ an object for the elements in the X.509 V3 extension block.
+
+
+ Convert the value of the passed in extension to an object.
+ The extension to parse.
+ The object the value string contains.
+ If conversion is not possible.
+
+
+ Subject Directory Attributes
+
+
+ Subject Key Identifier
+
+
+ Key Usage
+
+
+ Private Key Usage Period
+
+
+ Subject Alternative Name
+
+
+ Issuer Alternative Name
+
+
+ Basic Constraints
+
+
+ CRL Number
+
+
+ Reason code
+
+
+ Hold Instruction Code
+
+
+ Invalidity Date
+
+
+ Delta CRL indicator
+
+
+ Issuing Distribution Point
+
+
+ Certificate Issuer
+
+
+ Name Constraints
+
+
+ CRL Distribution Points
+
+
+ Certificate Policies
+
+
+ Policy Mappings
+
+
+ Authority Key Identifier
+
+
+ Policy Constraints
+
+
+ Extended Key Usage
+
+
+ Freshest CRL
+
+
+ Inhibit Any Policy
+
+
+ Authority Info Access
+
+
+ Subject Info Access
+
+
+ Logo Type
+
+
+ BiometricInfo
+
+
+ QCStatements
+
+
+ Audit identity extension in attribute certificates.
+
+
+ NoRevAvail extension in attribute certificates.
+
+
+ TargetInformation extension in attribute certificates.
+
+
+ Constructor from Asn1Sequence.
+
+ the extensions are a list of constructed sequences, either with (Oid, OctetString) or (Oid, Boolean, OctetString)
+
+
+ constructor from a table of extensions.
+
+ it's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from a table of extensions with ordering.
+
+ It's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from two vectors
+
+ @param objectIDs an ArrayList of the object identifiers.
+ @param values an ArrayList of the extension values.
+
+
+ constructor from a table of extensions.
+
+ it's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from a table of extensions with ordering.
+
+ It's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from two vectors
+
+ @param objectIDs an ArrayList of the object identifiers.
+ @param values an ArrayList of the extension values.
+
+
+ return an Enumeration of the extension field's object ids.
+
+
+ return the extension represented by the object identifier
+ passed in.
+
+ @return the extension if it's present, null otherwise.
+
+
+
+ Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
+
+ Extension ::= SEQUENCE {
+ extnId EXTENSION.&id ({ExtensionSet}),
+ critical BOOLEAN DEFAULT FALSE,
+ extnValue OCTET STRING }
+
+
+
+ Generator for X.509 extensions
+
+
+ Reset the generator
+
+
+
+ Add an extension with the given oid and the passed in value to be included
+ in the OCTET STRING associated with the extension.
+
+ OID for the extension.
+ True if critical, false otherwise.
+ The ASN.1 object to be included in the extension.
+
+
+
+ Add an extension with the given oid and the passed in byte array to be wrapped
+ in the OCTET STRING associated with the extension.
+
+ OID for the extension.
+ True if critical, false otherwise.
+ The byte array to be wrapped.
+
+
+ Return true if there are no extension present in this generator.
+ True if empty, false otherwise
+
+
+ Generate an X509Extensions object based on the current state of the generator.
+ An X509Extensions object
+
+
+
+ RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
+
+ RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
+
+ AttributeTypeAndValue ::= SEQUENCE {
+ type OBJECT IDENTIFIER,
+ value ANY }
+
+
+
+ country code - StringType(SIZE(2))
+
+
+ organization - StringType(SIZE(1..64))
+
+
+ organizational unit name - StringType(SIZE(1..64))
+
+
+ Title
+
+
+ common name - StringType(SIZE(1..64))
+
+
+ street - StringType(SIZE(1..64))
+
+
+ device serial number name - StringType(SIZE(1..64))
+
+
+ locality name - StringType(SIZE(1..64))
+
+
+ state, or province name - StringType(SIZE(1..64))
+
+
+ Naming attributes of type X520name
+
+
+ businessCategory - DirectoryString(SIZE(1..128)
+
+
+ postalCode - DirectoryString(SIZE(1..40)
+
+
+ dnQualifier - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z
+
+
+ RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)
+
+
+ RFC 3039 DateOfBirth - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"
+
+
+ RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166
+ codes only
+
+
+ RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166
+ codes only
+
+
+ ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF
+ DirectoryString(SIZE(1..30))
+
+
+ RFC 2256 dmdName
+
+
+ id-at-telephoneNumber
+
+
+ id-at-name
+
+
+ Email address (RSA PKCS#9 extension) - IA5String.
+ Note: if you're trying to be ultra orthodox, don't use this! It shouldn't be in here.
+
+
+ more from PKCS#9
+
+
+ email address in Verisign certificates
+
+
+ LDAP User id.
+
+
+ determines whether or not strings should be processed and printed
+ from back to front.
+
+
+ default look up table translating OID values into their common symbols following
+ the convention in RFC 2253 with a few extras
+
+
+ look up table translating OID values into their common symbols following the convention in RFC 2253
+
+
+ look up table translating OID values into their common symbols following the convention in RFC 1779
+
+
+
+ look up table translating common symbols into their OIDS.
+
+
+ Return a X509Name based on the passed in tagged object.
+
+ @param obj tag object holding name.
+ @param explicitly true if explicitly tagged false otherwise.
+ @return the X509Name
+
+
+ Constructor from Asn1Sequence
+
+ the principal will be a list of constructed sets, each containing an (OID, string) pair.
+
+
+ Constructor from a table of attributes with ordering.
+
+ it's is assumed the table contains OID/string pairs, and the contents
+ of the table are copied into an internal table as part of the
+ construction process. The ordering ArrayList should contain the OIDs
+ in the order they are meant to be encoded or printed in ToString.
+
+
+ Constructor from a table of attributes with ordering.
+
+ it's is assumed the table contains OID/string pairs, and the contents
+ of the table are copied into an internal table as part of the
+ construction process. The ordering ArrayList should contain the OIDs
+ in the order they are meant to be encoded or printed in ToString.
+
+ The passed in converter will be used to convert the strings into their
+ ASN.1 counterparts.
+
+
+ Takes two vectors one of the oids and the other of the values.
+
+
+ Takes two vectors one of the oids and the other of the values.
+
+ The passed in converter will be used to convert the strings into their
+ ASN.1 counterparts.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes with each
+ string value being converted to its associated ASN.1 type using the passed
+ in converter.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. If reverse
+ is true, create the encoded version of the sequence starting from the
+ last element in the string.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes with each
+ string value being converted to its associated ASN.1 type using the passed
+ in converter. If reverse is true the ASN.1 sequence representing the DN will
+ be built by starting at the end of the string, rather than the start.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. lookUp
+ should provide a table of lookups, indexed by lowercase only strings and
+ yielding a DerObjectIdentifier, other than that OID. and numeric oids
+ will be processed automatically.
+
+ If reverse is true, create the encoded version of the sequence
+ starting from the last element in the string.
+ @param reverse true if we should start scanning from the end (RFC 2553).
+ @param lookUp table of names and their oids.
+ @param dirName the X.500 string to be parsed.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. lookUp
+ should provide a table of lookups, indexed by lowercase only strings and
+ yielding a DerObjectIdentifier, other than that OID. and numeric oids
+ will be processed automatically. The passed in converter is used to convert the
+ string values to the right of each equals sign to their ASN.1 counterparts.
+
+ @param reverse true if we should start scanning from the end, false otherwise.
+ @param lookUp table of names and oids.
+ @param dirName the string dirName
+ @param converter the converter to convert string values into their ASN.1 equivalents
+
+
+ return an IList of the oids in the name, in the order they were found.
+
+
+ return an IList of the values found in the name, in the order they
+ were found.
+
+
+ return an IList of the values found in the name, in the order they
+ were found, with the DN label corresponding to passed in oid.
+
+
+ The X509Name object to test equivalency against.
+ If true, the order of elements must be the same,
+ as well as the values associated with each element.
+
+
+ test for equivalence - note: case is ignored.
+
+
+ convert the structure to a string - if reverse is true the
+ oids and values are listed out starting with the last element
+ in the sequence (ala RFC 2253), otherwise the string will begin
+ with the first element of the structure. If no string definition
+ for the oid is found in oidSymbols the string value of the oid is
+ added. Two standard symbol tables are provided DefaultSymbols, and
+ RFC2253Symbols as part of this class.
+
+ @param reverse if true start at the end of the sequence and work back.
+ @param oidSymbols look up table strings for oids.
+
+
+ * It turns out that the number of standard ways the fields in a DN should be
+ * encoded into their ASN.1 counterparts is rapidly approaching the
+ * number of machines on the internet. By default the X509Name class
+ * will produce UTF8Strings in line with the current recommendations (RFC 3280).
+ *
+ * An example of an encoder look like below:
+ *
+ * public class X509DirEntryConverter
+ * : X509NameEntryConverter
+ * {
+ * public Asn1Object GetConvertedValue(
+ * DerObjectIdentifier oid,
+ * string value)
+ * {
+ * if (str.Length() != 0 && str.charAt(0) == '#')
+ * {
+ * return ConvertHexEncoded(str, 1);
+ * }
+ * if (oid.Equals(EmailAddress))
+ * {
+ * return new DerIA5String(str);
+ * }
+ * else if (CanBePrintable(str))
+ * {
+ * return new DerPrintableString(str);
+ * }
+ * else if (CanBeUTF8(str))
+ * {
+ * return new DerUtf8String(str);
+ * }
+ * else
+ * {
+ * return new DerBmpString(str);
+ * }
+ * }
+ * }
+ *
+ *
+
+
+ Convert an inline encoded hex string rendition of an ASN.1
+ object back into its corresponding ASN.1 object.
+
+ @param str the hex encoded object
+ @param off the index at which the encoding starts
+ @return the decoded object
+
+
+ return true if the passed in string can be represented without
+ loss as a PrintableString, false otherwise.
+
+
+ Convert the passed in string value into the appropriate ASN.1
+ encoded object.
+
+ @param oid the oid associated with the value in the DN.
+ @param value the value of the particular DN component.
+ @return the ASN.1 equivalent for the value.
+
+
+ class for breaking up an X500 Name into it's component tokens, ala
+ java.util.StringTokenizer. We need this class as some of the
+ lightweight Java environment don't support classes like
+ StringTokenizer.
+
+
+ The BiometricData object.
+
+ BiometricData ::= SEQUENCE {
+ typeOfBiometricData TypeOfBiometricData,
+ hashAlgorithm AlgorithmIdentifier,
+ biometricDataHash OCTET STRING,
+ sourceDataUri IA5String OPTIONAL }
+
+
+
+ The Iso4217CurrencyCode object.
+
+ Iso4217CurrencyCode ::= CHOICE {
+ alphabetic PrintableString (SIZE 3), --Recommended
+ numeric INTEGER (1..999) }
+ -- Alphabetic or numeric currency code as defined in ISO 4217
+ -- It is recommended that the Alphabetic form is used
+
+
+
+ The MonetaryValue object.
+
+ MonetaryValue ::= SEQUENCE {
+ currency Iso4217CurrencyCode,
+ amount INTEGER,
+ exponent INTEGER }
+ -- value = amount * 10^exponent
+
+
+
+ The QCStatement object.
+
+ QCStatement ::= SEQUENCE {
+ statementId OBJECT IDENTIFIER,
+ statementInfo ANY DEFINED BY statementId OPTIONAL}
+
+
+
+ The SemanticsInformation object.
+
+ SemanticsInformation ::= SEQUENCE {
+ semanticsIdentifier OBJECT IDENTIFIER OPTIONAL,
+ nameRegistrationAuthorities NameRegistrationAuthorities
+ OPTIONAL }
+ (WITH COMPONENTS {..., semanticsIdentifier PRESENT}|
+ WITH COMPONENTS {..., nameRegistrationAuthorities PRESENT})
+
+ NameRegistrationAuthorities ::= SEQUENCE SIZE (1..MAX) OF
+ GeneralName
+
+
+
+ The TypeOfBiometricData object.
+
+ TypeOfBiometricData ::= CHOICE {
+ predefinedBiometricType PredefinedBiometricType,
+ biometricDataOid OBJECT IDENTIFIER }
+
+ PredefinedBiometricType ::= INTEGER {
+ picture(0),handwritten-signature(1)}
+ (picture|handwritten-signature)
+
+
+
+ Structure for a name or pseudonym.
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @see org.bouncycastle.asn1.x509.sigi.PersonalData
+
+
+
+ Constructor from DERString.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+ @param pseudonym pseudonym value to use.
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param pseudonym The pseudonym.
+
+
+ Constructor from a given details.
+
+ @param surname The surname.
+ @param givenName A sequence of directory strings making up the givenName
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @return an Asn1Object
+
+
+ Contains personal data for the otherName field in the subjectAltNames
+ extension.
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.sigi.NameOrPseudonym
+ @see org.bouncycastle.asn1.x509.sigi.SigIObjectIdentifiers
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param nameOrPseudonym Name or pseudonym.
+ @param nameDistinguisher Name distinguisher.
+ @param dateOfBirth Date of birth.
+ @param placeOfBirth Place of birth.
+ @param gender Gender.
+ @param postalAddress Postal Address.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ Object Identifiers of SigI specifciation (German Signature Law
+ Interoperability specification).
+
+
+ Key purpose IDs for German SigI (Signature Interoperability
+ Specification)
+
+
+ Certificate policy IDs for German SigI (Signature Interoperability
+ Specification)
+
+
+ Other Name IDs for German SigI (Signature Interoperability Specification)
+
+
+ To be used for for the generation of directory service certificates.
+
+
+ ID for PersonalData
+
+
+ Certificate is conform to german signature law.
+
+
+ A general class that reads all X9.62 style EC curve tables.
+
+
+ return a X9ECParameters object representing the passed in named
+ curve. The routine returns null if the curve is not present.
+
+ @param name the name of the curve requested
+ @return an X9ECParameters object or null if the curve is not available.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return a X9ECParameters object representing the passed in named
+ curve.
+
+ @param oid the object id of the curve requested
+ @return an X9ECParameters object or null if the curve is not available.
+
+
+ return an enumeration of the names of the available curves.
+
+ @return an enumeration of the names of the available curves.
+
+
+ ASN.1 def for Diffie-Hellman key exchange KeySpecificInfo structure. See
+ RFC 2631, or X9.42, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeySpecificInfo ::= Sequence {
+ algorithm OBJECT IDENTIFIER,
+ counter OCTET STRING SIZE (4..4)
+ }
+
+
+
+ ANS.1 def for Diffie-Hellman key exchange OtherInfo structure. See
+ RFC 2631, or X9.42, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherInfo ::= Sequence {
+ keyInfo KeySpecificInfo,
+ partyAInfo [0] OCTET STRING OPTIONAL,
+ suppPubInfo [2] OCTET STRING
+ }
+
+
+
+ table of the current named curves defined in X.962 EC-DSA.
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Parameters ::= CHOICE {
+ ecParameters ECParameters,
+ namedCurve CURVES.&id({CurveNames}),
+ implicitlyCA Null
+ }
+
+
+
+ ASN.1 def for Elliptic-Curve Curve structure. See
+ X9.62, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Curve ::= Sequence {
+ a FieldElement,
+ b FieldElement,
+ seed BIT STRING OPTIONAL
+ }
+
+
+
+ ASN.1 def for Elliptic-Curve ECParameters structure. See
+ X9.62, for further details.
+
+
+ Return the ASN.1 entry representing the Curve.
+
+ @return the X9Curve for the curve in these parameters.
+
+
+ Return the ASN.1 entry representing the FieldID.
+
+ @return the X9FieldID for the FieldID in these parameters.
+
+
+ Return the ASN.1 entry representing the base point G.
+
+ @return the X9ECPoint for the base point in these parameters.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ECParameters ::= Sequence {
+ version Integer { ecpVer1(1) } (ecpVer1),
+ fieldID FieldID {{FieldTypes}},
+ curve X9Curve,
+ base X9ECPoint,
+ order Integer,
+ cofactor Integer OPTIONAL
+ }
+
+
+
+ class for describing an ECPoint as a Der object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ECPoint ::= OCTET STRING
+
+
+ Octet string produced using ECPoint.GetEncoded().
+
+
+ Class for processing an ECFieldElement as a DER object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ FieldElement ::= OCTET STRING
+
+
+
+ if q is an odd prime then the field element is
+ processed as an Integer and converted to an octet string
+ according to x 9.62 4.3.1.
+ if q is 2m then the bit string
+ contained in the field element is converted into an octet
+ string with the same ordering padded at the front if necessary.
+
+
+
+
+
+ ASN.1 def for Elliptic-Curve Field ID structure. See
+ X9.62, for further details.
+
+
+ Constructor for elliptic curves over prime fields
+ F2 .
+ @param primeP The prime p defining the prime field.
+
+
+ Constructor for elliptic curves over binary fields
+ F2m .
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ Constructor for elliptic curves over binary fields
+ F2m .
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z)..
+
+
+ Produce a Der encoding of the following structure.
+
+ FieldID ::= Sequence {
+ fieldType FIELD-ID.&id({IOSet}),
+ parameters FIELD-ID.&Type({IOSet}{@fieldType})
+ }
+
+
+
+ id-dsa-with-sha1 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ us(840) x9-57 (10040) x9cm(4) 3 }
+
+
+ X9.63
+
+
+ X9.42
+
+
+ reader for Base64 armored objects - read the headers and then start returning
+ bytes when the data is reached. An IOException is thrown if the CRC check
+ fails.
+
+
+ decode the base 64 encoded input data.
+
+ @return the offset the data starts in out.
+
+
+ Create a stream for reading a PGP armoured message, parsing up to a header
+ and then reading the data that follows.
+
+ @param input
+
+
+ Create an armoured input stream which will assume the data starts
+ straight away, or parse for headers first depending on the value of
+ hasHeaders.
+
+ @param input
+ @param hasHeaders true if headers are to be looked for, false otherwise.
+
+
+ @return true if we are inside the clear text section of a PGP
+ signed message.
+
+
+ @return true if the stream is actually at end of file.
+
+
+ Return the armor header line (if there is one)
+ @return the armor header line, null if none present.
+
+
+ Return the armor headers (the lines after the armor header line),
+ @return an array of armor headers, null if there aren't any.
+
+
+ Basic output stream.
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+
+ Set an additional header entry.
+
+ @param name the name of the header entry.
+ @param v the value of the header entry.
+
+
+ Reset the headers to only contain a Version string.
+
+
+ Start a clear text signed message.
+ @param hashAlgorithm
+
+
+ Note : Close() does not close the underlying stream. So it is possible to write
+ multiple objects using armoring to a single stream.
+
+
+ Reader for PGP objects.
+
+
+ Returns the next packet tag in the stream.
+
+
+
+ A stream that overlays our input stream, allowing the user to only read a segment of it.
+ NB: dataLength will be negative if the segment length is in the upper range above 2**31.
+
+
+
+ Base class for a PGP object.
+
+
+ Basic output stream.
+
+
+ Create a stream representing a general packet.
+ Output stream to write to.
+
+
+ Create a stream representing an old style partial object.
+ Output stream to write to.
+ The packet tag for the object.
+
+
+ Create a stream representing a general packet.
+ Output stream to write to.
+ Packet tag.
+ Size of chunks making up the packet.
+ If true, the header is written out in old format.
+
+
+ Create a new style partial input stream buffered into chunks.
+ Output stream to write to.
+ Packet tag.
+ Size of chunks making up the packet.
+
+
+ Create a new style partial input stream buffered into chunks.
+ Output stream to write to.
+ Packet tag.
+ Buffer to use for collecting chunks.
+
+
+ Flush the underlying stream.
+
+
+ Finish writing out the current packet without closing the underlying stream.
+
+
+ Generic compressed data object.
+
+
+ The algorithm tag value.
+
+
+ Basic tags for compression algorithms.
+
+
+ Basic type for a PGP packet.
+
+
+ Base class for a DSA public key.
+
+
+ The stream to read the packet from.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for a DSA secret key.
+
+
+ @param in
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ @return x
+
+
+ Base class for an ECDH Public Key.
+
+
+ The stream to read the packet from.
+
+
+ Base class for an ECDSA Public Key.
+
+
+ The stream to read the packet from.
+
+
+ Base class for an EC Public Key.
+
+
+ The stream to read the packet from.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an EC Secret Key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an ElGamal public key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an ElGamal secret key.
+
+
+ @param in
+
+
+ @param x
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Basic packet for an experimental packet.
+
+
+ Basic tags for hash algorithms.
+
+
+ Base interface for a PGP key.
+
+
+
+ The base format for this key - in the case of the symmetric keys it will generally
+ be raw indicating that the key is just a straight byte representation, for an asymmetric
+ key the format will be PGP, indicating the key is a string of MPIs encoded in PGP format.
+
+ "RAW" or "PGP".
+
+
+ Note: you can only read from this once...
+
+
+ Generic literal data packet.
+
+
+ The format tag value.
+
+
+ The modification time of the file in milli-seconds (since Jan 1, 1970 UTC)
+
+
+ A multiple precision integer
+
+
+ Basic type for a marker packet.
+
+
+ Basic packet for a modification detection code packet.
+
+
+ Generic signature object
+
+
+ The encryption algorithm tag.
+
+
+ The hash algorithm tag.
+
+
+ Basic PGP packet tag types.
+
+
+ Public Key Algorithm tag numbers.
+
+
+ Basic packet for a PGP public key.
+
+
+ Basic packet for a PGP public key.
+
+
+ Construct a version 4 public key packet.
+
+
+ Basic packet for a PGP public subkey
+
+
+ Construct a version 4 public subkey packet.
+
+
+ Base class for an RSA public key.
+
+
+ Construct an RSA public key from the passed in stream.
+
+
+ The modulus.
+ The public exponent.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an RSA secret (or priate) key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ The string to key specifier class.
+
+
+ The hash algorithm.
+
+
+ The IV for the key generation algorithm.
+
+
+ The iteration count
+
+
+ The protection mode - only if GnuDummyS2K
+
+
+ Basic packet for a PGP secret key.
+
+
+ Basic packet for a PGP secret key.
+
+
+ Generic signature packet.
+
+
+ Generate a version 4 signature packet.
+
+ @param signatureType
+ @param keyAlgorithm
+ @param hashAlgorithm
+ @param hashedData
+ @param unhashedData
+ @param fingerprint
+ @param signature
+
+
+ Generate a version 2/3 signature packet.
+
+ @param signatureType
+ @param keyAlgorithm
+ @param hashAlgorithm
+ @param fingerprint
+ @param signature
+
+
+ return the keyId
+ @return the keyId that created the signature.
+
+
+ return the signature trailer that must be included with the data
+ to reconstruct the signature
+
+ @return byte[]
+
+
+ * return the signature as a set of integers - note this is normalised to be the
+ * ASN.1 encoding of what appears in the signature packet.
+
+
+ Return the byte encoding of the signature section.
+ @return uninterpreted signature bytes.
+
+
+ Return the creation time in milliseconds since 1 Jan., 1970 UTC.
+
+
+ Basic type for a PGP Signature sub-packet.
+
+
+ Return the generic data making up the packet.
+
+
+ Basic PGP signature sub-packet tag types.
+
+
+ reader for signature sub-packets
+
+
+ Basic type for a symmetric key encrypted packet.
+
+
+ Basic tags for symmetric key algorithms
+
+
+ Basic type for a symmetric encrypted session key packet
+
+
+ @return int
+
+
+ @return S2k
+
+
+ @return byte[]
+
+
+ @return int
+
+
+ Basic type for a trust packet.
+
+
+ Basic type for a user attribute packet.
+
+
+ Basic type for a user attribute sub-packet.
+
+
+ return the generic data making up the packet.
+
+
+ Basic PGP user attribute sub-packet tag types.
+
+
+ reader for user attribute sub-packets
+
+
+ Basic type for a user ID packet.
+
+
+ Basic type for a image attribute packet.
+
+
+ Packet embedded signature
+
+
+ packet giving signature creation time.
+
+
+ packet giving signature expiration time.
+
+
+ Identifier for the modification detection feature
+
+
+ Returns if modification detection is supported.
+
+
+ Returns if a particular feature is supported.
+
+
+ Sets support for a particular feature.
+
+
+ packet giving signature creation time.
+
+
+ packet giving time after creation at which the key expires.
+
+
+ Return the number of seconds after creation time a key is valid for.
+
+ @return second count for key validity.
+
+
+ Packet holding the key flag values.
+
+
+
+ Return the flag values contained in the first 4 octets (note: at the moment
+ the standard only uses the first one).
+
+
+
+ Class provided a NotationData object according to
+ RFC2440, Chapter 5.2.3.15. Notation Data
+
+
+ packet giving signature creation time.
+
+
+ packet giving whether or not the signature is signed using the primary user ID for the key.
+
+
+ packet giving whether or not is revocable.
+
+
+ packet giving signature creation time.
+
+
+ packet giving signature expiration time.
+
+
+ return time in seconds before signature expires after creation time.
+
+
+ packet giving the User ID of the signer.
+
+
+ packet giving trust.
+
+
+
+ Represents revocation key OpenPGP signature sub packet.
+
+
+
+
+ Represents revocation reason OpenPGP signature sub packet.
+
+
+
+ Compressed data objects
+
+
+ The algorithm used for compression
+
+
+ Get the raw input stream contained in the object.
+
+
+ Return an uncompressed input stream which allows reading of the compressed data.
+
+
+ Class for producing compressed data packets.
+
+
+
+
+ Return an output stream which will save the data being written to
+ the compressed object.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Stream to be used for output.
+ A Stream for output of the compressed data.
+
+
+
+
+
+
+
+ Return an output stream which will compress the data as it is written to it.
+ The stream will be written out in chunks according to the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+
+ Note : using this may break compatibility with RFC 1991 compliant tools.
+ Only recent OpenPGP implementations are capable of accepting these streams.
+
+
+ Stream to be used for output.
+ The buffer to use.
+ A Stream for output of the compressed data.
+
+
+
+
+
+
+ Close the compressed object. summary>
+
+
+
+ Thrown if the IV at the start of a data stream indicates the wrong key is being used.
+
+
+
+ Return the raw input stream for the data stream.
+
+
+ Return true if the message is integrity protected.
+ True, if there is a modification detection code namespace associated
+ with this stream.
+
+
+ Note: This can only be called after the message has been read.
+ True, if the message verifies, false otherwise
+
+
+ Generator for encrypted objects.
+
+
+ Existing SecureRandom constructor.
+ The symmetric algorithm to use.
+ Source of randomness.
+
+
+ Creates a cipher stream which will have an integrity packet associated with it.
+
+
+ Base constructor.
+ The symmetric algorithm to use.
+ Source of randomness.
+ PGP 2.6.x compatibility required.
+
+
+
+ Add a PBE encryption method to the encrypted object using the default algorithm (S2K_SHA1).
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ Add a public key encrypted session key to the encrypted object.
+
+
+
+
+ If buffer is non null stream assumed to be partial, otherwise the length will be used
+ to output a fixed length packet.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+
+
+
+
+ Return an output stream which will encrypt the data as it is written to it.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+
+
+
+
+ Return an output stream which will encrypt the data as it is written to it.
+ The stream will be written out in chunks according to the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+
+
+
+
+
+ Close off the encrypted object - this is equivalent to calling Close() on the stream
+ returned by the Open() method.
+
+
+ Note : This does not close the underlying output stream, only the stream on top of
+ it created by the Open() method.
+
+
+
+
+ A holder for a list of PGP encryption method packets.
+
+
+ Generic exception class for PGP encoding/decoding problems.
+
+
+ Key flag values for the KeyFlags subpacket.
+
+
+
+ General class to handle JCA key pairs and convert them into OpenPGP ones.
+
+ A word for the unwary, the KeyId for an OpenPGP public key is calculated from
+ a hash that includes the time of creation, if you pass a different date to the
+ constructor below with the same public private key pair the KeyIs will not be the
+ same as for previous generations of the key, so ideally you only want to do
+ this once.
+
+
+
+
+ Create a key pair from a PgpPrivateKey and a PgpPublicKey.
+ The public key.
+ The private key.
+
+
+ The keyId associated with this key pair.
+
+
+
+ Generator for a PGP master and subkey ring.
+ This class will generate both the secret and public key rings
+
+
+
+
+ Create a new key ring generator using old style checksumming. It is recommended to use
+ SHA1 checksumming where possible.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+
+ If true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+
+ If true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+ Add a subkey to the key ring to be generated with default certification.
+
+
+
+ Add a subkey to the key ring to be generated with default certification.
+
+ The key pair.
+ The hash algorithm.
+
+
+
+ Add a subkey with specific hashed and unhashed packets associated with it and
+ default certification.
+
+ Public/private key pair.
+ Hashed packet values to be included in certification.
+ Unhashed packets values to be included in certification.
+
+
+
+
+ Add a subkey with specific hashed and unhashed packets associated with it and
+ default certification.
+
+ Public/private key pair.
+ Hashed packet values to be included in certification.
+ Unhashed packets values to be included in certification.
+ The hash algorithm.
+ exception adding subkey:
+
+
+
+ Return the secret key ring.
+
+
+ Return the public key ring that corresponds to the secret key ring.
+
+
+
+ Thrown if the key checksum is invalid.
+
+
+
+ Class for processing literal data objects.
+
+
+ The special name indicating a "for your eyes only" packet.
+
+
+ The format of the data stream - Binary or Text
+
+
+ The file name that's associated with the data stream.
+
+
+ Return the file name as an unintrepreted byte array.
+
+
+ The modification time for the file.
+
+
+ The raw input stream for the data stream.
+
+
+ The input stream representing the data stream.
+
+
+ Class for producing literal data packets.
+
+
+ The special name indicating a "for your eyes only" packet.
+
+
+
+ Generates literal data objects in the old format.
+ This is important if you need compatibility with PGP 2.6.x.
+
+ If true, uses old format.
+
+
+
+
+ Open a literal data packet, returning a stream to store the data inside the packet.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ The stream we want the packet in.
+ The format we are using.
+ The name of the 'file'.
+ The length of the data we will write.
+ The time of last modification we want stored.
+
+
+
+
+ Open a literal data packet, returning a stream to store the data inside the packet,
+ as an indefinite length stream. The stream is written out as a series of partial
+ packets with a chunk size determined by the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+ The stream we want the packet in.
+ The format we are using.
+ The name of the 'file'.
+ The time of last modification we want stored.
+ The buffer to use for collecting data to put into chunks.
+
+
+
+
+ Open a literal data packet for the passed in FileInfo object, returning
+ an output stream for saving the file contents.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ The stream we want the packet in.
+ The format we are using.
+ The FileInfo object containg the packet details.
+
+
+
+ Close the literal data packet - this is equivalent to calling Close()
+ on the stream returned by the Open() method.
+
+
+
+
+ A PGP marker packet - in general these should be ignored other than where
+ the idea is to preserve the original input stream.
+
+
+
+
+ General class for reading a PGP object stream.
+
+ Note: if this class finds a PgpPublicKey or a PgpSecretKey it
+ will create a PgpPublicKeyRing, or a PgpSecretKeyRing for each
+ key found. If all you are trying to do is read a key ring file use
+ either PgpPublicKeyRingBundle or PgpSecretKeyRingBundle.
+
+
+
+ Return the next object in the stream, or null if the end is reached.
+ On a parse error
+
+
+
+ Return all available objects in a list.
+
+ An IList containing all objects from this factory, in order.
+
+
+ A one pass signature object.
+
+
+ Initialise the signature object for verification.
+
+
+ Verify the calculated signature against the passed in PgpSignature.
+
+
+ Holder for a list of PgpOnePassSignature objects.
+
+
+ Padding functions.
+
+
+ A password based encryption object.
+
+
+ Return the raw input stream for the data stream.
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ General class to contain a private key for use with other OpenPGP objects.
+
+
+
+ Create a PgpPrivateKey from a keyID, the associated public data packet, and a regular private key.
+
+ ID of the corresponding public key.
+ the public key data packet to be associated with this private key.
+ the private key data packet to be associated with this private key.
+
+
+ The keyId associated with the contained private key.
+
+
+ The public key packet associated with this private key, if available.
+
+
+ The contained private key.
+
+
+ General class to handle a PGP public key object.
+
+
+
+ Create a PgpPublicKey from the passed in lightweight one.
+
+
+ Note: the time passed in affects the value of the key's keyId, so you probably only want
+ to do this once for a lightweight key, or make sure you keep track of the time you used.
+
+ Asymmetric algorithm type representing the public key.
+ Actual public key to associate.
+ Date of creation.
+ If pubKey is not public.
+ On key creation problem.
+
+
+ Constructor for a sub-key.
+
+
+ Copy constructor.
+ The public key to copy.
+
+
+ The version of this key.
+
+
+ The creation time of this key.
+
+
+ The number of valid days from creation time - zero means no expiry.
+ WARNING: This method will return 1 for keys with version > 3 that expire in less than 1 day
+
+
+ Return the trust data associated with the public key, if present.
+ A byte array with trust data, null otherwise.
+
+
+ The number of valid seconds from creation time - zero means no expiry.
+
+
+ The keyId associated with the public key.
+
+
+ The fingerprint of the key
+
+
+
+ Check if this key has an algorithm type that makes it suitable to use for encryption.
+
+
+ Note: with version 4 keys KeyFlags subpackets should also be considered when present for
+ determining the preferred use of the key.
+
+
+ true if this key algorithm is suitable for encryption.
+
+
+
+ True, if this is a master key.
+
+
+ The algorithm code associated with the public key.
+
+
+ The strength of the key in bits.
+
+
+ The public key contained in the object.
+ A lightweight public key.
+ If the key algorithm is not recognised.
+
+
+ Allows enumeration of any user IDs associated with the key.
+ An IEnumerable of string objects.
+
+
+ Allows enumeration of any user attribute vectors associated with the key.
+ An IEnumerable of PgpUserAttributeSubpacketVector objects.
+
+
+ Allows enumeration of any signatures associated with the passed in id.
+ The ID to be matched.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of signatures associated with the passed in user attributes.
+ The vector of user attributes to be matched.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of signatures of the passed in type that are on this key.
+ The type of the signature to be returned.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of all signatures/certifications associated with this key.
+ An IEnumerable with all signatures/certifications.
+
+
+ Return all signatures/certifications directly associated with this key (ie, not to a user id).
+
+ @return an iterator (possibly empty) with all signatures/certifications.
+
+
+ Check whether this (sub)key has a revocation signature on it.
+ True, if this (sub)key has been revoked.
+
+
+ Add a certification for an id to the given public key.
+ The key the certification is to be added to.
+ The ID the certification is associated with.
+ The new certification.
+ The re-certified key.
+
+
+ Add a certification for the given UserAttributeSubpackets to the given public key.
+ The key the certification is to be added to.
+ The attributes the certification is associated with.
+ The new certification.
+ The re-certified key.
+
+
+
+ Remove any certifications associated with a user attribute subpacket on a key.
+
+ The key the certifications are to be removed from.
+ The attributes to be removed.
+
+ The re-certified key, or null if the user attribute subpacket was not found on the key.
+
+
+
+ Remove any certifications associated with a given ID on a key.
+ The key the certifications are to be removed from.
+ The ID that is to be removed.
+ The re-certified key, or null if the ID was not found on the key.
+
+
+ Remove a certification associated with a given ID on a key.
+ The key the certifications are to be removed from.
+ The ID that the certfication is to be removed from.
+ The certfication to be removed.
+ The re-certified key, or null if the certification was not found.
+
+
+ Remove a certification associated with a given user attributes on a key.
+ The key the certifications are to be removed from.
+ The user attributes that the certfication is to be removed from.
+ The certification to be removed.
+ The re-certified key, or null if the certification was not found.
+
+
+ Add a revocation or some other key certification to a key.
+ The key the revocation is to be added to.
+ The key signature to be added.
+ The new changed public key object.
+
+
+ Remove a certification from the key.
+ The key the certifications are to be removed from.
+ The certfication to be removed.
+ The modified key, null if the certification was not found.
+
+
+ A public key encrypted data object.
+
+
+ The key ID for the key used to encrypt the data.
+
+
+
+ Return the algorithm code for the symmetric algorithm used to encrypt the data.
+
+
+
+ Return the decrypted data stream for the packet.
+
+
+
+ Class to hold a single master public key and its subkeys.
+
+ Often PGP keyring files consist of multiple master keys, if you are trying to process
+ or construct one of these you should use the PgpPublicKeyRingBundle class.
+
+
+
+
+ Return the first public key in the ring.
+
+
+ Return the public key referred to by the passed in key ID if it is present.
+
+
+ Allows enumeration of all the public keys.
+ An IEnumerable of PgpPublicKey objects.
+
+
+
+ Returns a new key ring with the public key passed in either added or
+ replacing an existing one.
+
+ The public key ring to be modified.
+ The public key to be inserted.
+ A new PgpPublicKeyRing
+
+
+ Returns a new key ring with the public key passed in removed from the key ring.
+ The public key ring to be modified.
+ The public key to be removed.
+ A new PgpPublicKeyRing , or null if pubKey is not found.
+
+
+
+ Often a PGP key ring file is made up of a succession of master/sub-key key rings.
+ If you want to read an entire public key file in one hit this is the class for you.
+
+
+
+ Build a PgpPublicKeyRingBundle from the passed in input stream.
+ Input stream containing data.
+ If a problem parsing the stream occurs.
+ If an object is encountered which isn't a PgpPublicKeyRing.
+
+
+ Return the number of key rings in this collection.
+
+
+ Allow enumeration of the public key rings making up this collection.
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ If true, case is ignored in user ID comparisons.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Return the PGP public key associated with the given key id.
+ The ID of the public key to return.
+
+
+ Return the public key ring which contains the key referred to by keyId
+ key ID to match against
+
+
+
+ Return true if a key matching the passed in key ID is present, false otherwise.
+
+ key ID to look for.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle and
+ the passed in public key ring.
+
+ The PgpPublicKeyRingBundle the key ring is to be added to.
+ The key ring to be added.
+ A new PgpPublicKeyRingBundle merging the current one with the passed in key ring.
+ If the keyId for the passed in key ring is already present.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle with
+ the passed in public key ring removed.
+
+ The PgpPublicKeyRingBundle the key ring is to be removed from.
+ The key ring to be removed.
+ A new PgpPublicKeyRingBundle not containing the passed in key ring.
+ If the keyId for the passed in key ring is not present.
+
+
+ General class to handle a PGP secret key object.
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ If utf8PassPhrase is true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ If utf8PassPhrase is true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Check if this key has an algorithm type that makes it suitable to use for signing.
+
+
+ Note: with version 4 keys KeyFlags subpackets should also be considered when present for
+ determining the preferred use of the key.
+
+
+ true if this key algorithm is suitable for use with signing.
+
+
+
+ True, if this is a master key.
+
+
+ Detect if the Secret Key's Private Key is empty or not
+
+
+ The algorithm the key is encrypted with.
+
+
+ The key ID of the public key associated with this key.
+
+
+ Return the S2K usage associated with this key.
+
+
+ Return the S2K used to process this key.
+
+
+ The public key associated with this key.
+
+
+ Allows enumeration of any user IDs associated with the key.
+ An IEnumerable of string objects.
+
+
+ Allows enumeration of any user attribute vectors associated with the key.
+ An IEnumerable of string objects.
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+ Replace the passed the public key on the passed in secret key.
+ Secret key to change.
+ New public key.
+ A new secret key.
+ If KeyId's do not match.
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+
+
+ Class to hold a single master secret key and its subkeys.
+
+ Often PGP keyring files consist of multiple master keys, if you are trying to process
+ or construct one of these you should use the PgpSecretKeyRingBundle class.
+
+
+
+
+ Return the public key for the master key.
+
+
+ Return the master private key.
+
+
+ Allows enumeration of the secret keys.
+ An IEnumerable of PgpSecretKey objects.
+
+
+
+ Return an iterator of the public keys in the secret key ring that
+ have no matching private key. At the moment only personal certificate data
+ appears in this fashion.
+
+ An IEnumerable of unattached, or extra, public keys.
+
+
+
+ Replace the public key set on the secret ring with the corresponding key off the public ring.
+
+ Secret ring to be changed.
+ Public ring containing the new public key set.
+
+
+
+ Return a copy of the passed in secret key ring, with the master key and sub keys encrypted
+ using a new password and the passed in algorithm.
+
+ The PgpSecretKeyRing to be copied.
+ The current password for key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Returns a new key ring with the secret key passed in either added or
+ replacing an existing one with the same key ID.
+
+ The secret key ring to be modified.
+ The secret key to be inserted.
+ A new PgpSecretKeyRing
+
+
+ Returns a new key ring with the secret key passed in removed from the key ring.
+ The secret key ring to be modified.
+ The secret key to be removed.
+ A new PgpSecretKeyRing , or null if secKey is not found.
+
+
+
+ Often a PGP key ring file is made up of a succession of master/sub-key key rings.
+ If you want to read an entire secret key file in one hit this is the class for you.
+
+
+
+ Build a PgpSecretKeyRingBundle from the passed in input stream.
+ Input stream containing data.
+ If a problem parsing the stream occurs.
+ If an object is encountered which isn't a PgpSecretKeyRing.
+
+
+ Return the number of rings in this collection.
+
+
+ Allow enumeration of the secret key rings making up this collection.
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ If true, case is ignored in user ID comparisons.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Return the PGP secret key associated with the given key id.
+ The ID of the secret key to return.
+
+
+ Return the secret key ring which contains the key referred to by keyId
+ The ID of the secret key
+
+
+
+ Return true if a key matching the passed in key ID is present, false otherwise.
+
+ key ID to look for.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle and
+ the passed in secret key ring.
+
+ The PgpSecretKeyRingBundle the key ring is to be added to.
+ The key ring to be added.
+ A new PgpSecretKeyRingBundle merging the current one with the passed in key ring.
+ If the keyId for the passed in key ring is already present.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle with
+ the passed in secret key ring removed.
+
+ The PgpSecretKeyRingBundle the key ring is to be removed from.
+ The key ring to be removed.
+ A new PgpSecretKeyRingBundle not containing the passed in key ring.
+ If the keyId for the passed in key ring is not present.
+
+
+ A PGP signature object.
+
+
+ The OpenPGP version number for this signature.
+
+
+ The key algorithm associated with this signature.
+
+
+ The hash algorithm associated with this signature.
+
+
+
+ Verify the signature as certifying the passed in public key as associated
+ with the passed in user attributes.
+
+ User attributes the key was stored under.
+ The key to be verified.
+ True, if the signature matches, false otherwise.
+
+
+
+ Verify the signature as certifying the passed in public key as associated
+ with the passed in ID.
+
+ ID the key was stored under.
+ The key to be verified.
+ True, if the signature matches, false otherwise.
+
+
+ Verify a certification for the passed in key against the passed in master key.
+ The key we are verifying against.
+ The key we are verifying.
+ True, if the certification is valid, false otherwise.
+
+
+ Verify a key certification, such as revocation, for the passed in key.
+ The key we are checking.
+ True, if the certification is valid, false otherwise.
+
+
+ The ID of the key that created the signature.
+
+
+ The creation time of this signature.
+
+
+
+ Return true if the signature has either hashed or unhashed subpackets.
+
+
+
+ Generator for PGP signatures.
+
+
+ Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
+
+
+ Initialise the generator for signing.
+
+
+ Initialise the generator for signing.
+
+
+ Return the one pass header associated with the current signature.
+
+
+ Return a signature object containing the current signature state.
+
+
+ Generate a certification for the passed in ID and key.
+ The ID we are certifying against the public key.
+ The key we are certifying against the ID.
+ The certification.
+
+
+ Generate a certification for the passed in userAttributes.
+ The ID we are certifying against the public key.
+ The key we are certifying against the ID.
+ The certification.
+
+
+ Generate a certification for the passed in key against the passed in master key.
+ The key we are certifying against.
+ The key we are certifying.
+ The certification.
+
+
+ Generate a certification, such as a revocation, for the passed in key.
+ The key we are certifying.
+ The certification.
+
+
+ A list of PGP signatures - normally in the signature block after literal data.
+
+
+ Generator for signature subpackets.
+
+
+
+ Add a TrustSignature packet to the signature. The values for depth and trust are largely
+ installation dependent but there are some guidelines in RFC 4880 - 5.2.3.13.
+
+ true if the packet is critical.
+ depth level.
+ trust amount.
+
+
+
+ Set the number of seconds a key is valid for after the time of its creation.
+ A value of zero means the key never expires.
+
+ True, if should be treated as critical, false otherwise.
+ The number of seconds the key is valid, or zero if no expiry.
+
+
+
+ Set the number of seconds a signature is valid for after the time of its creation.
+ A value of zero means the signature never expires.
+
+ True, if should be treated as critical, false otherwise.
+ The number of seconds the signature is valid, or zero if no expiry.
+
+
+
+ Set the creation time for the signature.
+
+ Note: this overrides the generation of a creation time when the signature
+ is generated.
+
+
+
+
+ Sets revocation reason sub packet
+
+
+
+
+ Sets revocation key sub packet
+
+
+
+
+ Sets issuer key sub packet
+
+
+
+ Container for a list of signature subpackets.
+
+
+ Return true if a particular subpacket type exists.
+
+ @param type type to look for.
+ @return true if present, false otherwise.
+
+
+ Return all signature subpackets of the passed in type.
+ @param type subpacket type code
+ @return an array of zero or more matching subpackets.
+
+
+
+ Return the number of seconds a signature is valid for after its creation date.
+ A value of zero means the signature never expires.
+
+ Seconds a signature is valid for.
+
+
+
+ Return the number of seconds a key is valid for after its creation date.
+ A value of zero means the key never expires.
+
+ Seconds a signature is valid for.
+
+
+ Return the number of packets this vector contains.
+
+
+ Container for a list of user attribute subpackets.
+
+
+ Basic utility class.
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ Write out the passed in file as a literal data packet.
+
+
+ Write out the passed in file as a literal data packet in partial packet format.
+
+
+
+ Return either an ArmoredInputStream or a BcpgInputStream based on whether
+ the initial characters of the stream are binary PGP encodings or not.
+
+
+
+ Generator for old style PGP V3 Signatures.
+
+
+ Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
+
+
+ Initialise the generator for signing.
+
+
+ Initialise the generator for signing.
+
+
+ Return the one pass header associated with the current signature.
+
+
+ Return a V3 signature object containing the current signature state.
+
+
+ Utility functions for looking a S-expression keys. This class will move when it finds a better home!
+
+ Format documented here:
+ http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=agent/keyformat.txt;h=42c4b1f06faf1bbe71ffadc2fee0fad6bec91a97;hb=refs/heads/master
+
+
+
+
+ The 'Signature' parameter is only available when generating unsigned attributes.
+
+
+
+ containing class for an CMS AuthEnveloped Data object
+
+
+ containing class for an CMS Authenticated Data object
+
+
+ return the object identifier for the content MAC algorithm.
+
+
+ return a store of the intended recipients for this message
+
+
+ return the ContentInfo
+
+
+ return a table of the digested attributes indexed by
+ the OID of the attribute.
+
+
+ return a table of the undigested attributes indexed by
+ the OID of the attribute.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ General class for generating a CMS authenticated-data message.
+
+ A simple example of usage.
+
+
+ CMSAuthenticatedDataGenerator fact = new CMSAuthenticatedDataGenerator();
+
+ fact.addKeyTransRecipient(cert);
+
+ CMSAuthenticatedData data = fact.generate(content, algorithm, "BC");
+
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+ @param rand instance of SecureRandom to use
+
+
+ generate an enveloped object that contains an CMS Enveloped Data
+ object using the given provider and the passed in key generator.
+
+
+ generate an authenticated object that contains an CMS Authenticated Data object
+
+
+ Parsing class for an CMS Authenticated Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one recipient can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ Example of use - assuming the first recipient matches the private key we have.
+
+ CMSAuthenticatedDataParser ad = new CMSAuthenticatedDataParser(inputStream);
+
+ RecipientInformationStore recipients = ad.getRecipientInfos();
+
+ Collection c = recipients.getRecipients();
+ Iterator it = c.iterator();
+
+ if (it.hasNext())
+ {
+ RecipientInformation recipient = (RecipientInformation)it.next();
+
+ CMSTypedStream recData = recipient.getContentStream(privateKey, "BC");
+
+ processDataStream(recData.getContentStream());
+
+ if (!Arrays.equals(ad.getMac(), recipient.getMac())
+ {
+ System.err.println("Data corrupted!!!!");
+ }
+ }
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CMSAuthenticatedDataParser ep = new CMSAuthenticatedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+
+ return the object identifier for the mac algorithm.
+
+
+ return the ASN.1 encoded encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a store of the intended recipients for this message
+
+
+ return a table of the unauthenticated attributes indexed by
+ the OID of the attribute.
+ @exception java.io.IOException
+
+
+ return a table of the unauthenticated attributes indexed by
+ the OID of the attribute.
+ @exception java.io.IOException
+
+
+ General class for generating a CMS authenticated-data message stream.
+
+ A simple example of usage.
+
+ CMSAuthenticatedDataStreamGenerator edGen = new CMSAuthenticatedDataStreamGenerator();
+
+ edGen.addKeyTransRecipient(cert);
+
+ ByteArrayOutputStream bOut = new ByteArrayOutputStream();
+
+ OutputStream out = edGen.open(
+ bOut, CMSAuthenticatedDataGenerator.AES128_CBC, "BC");*
+ out.write(data);
+
+ out.close();
+
+
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+ @param rand instance of SecureRandom to use
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ Use a BER Set to store the recipient information
+
+
+ generate an enveloped object that contains an CMS Enveloped Data
+ object using the given provider and the passed in key generator.
+ @throws java.io.IOException
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+
+ @param rand instance of SecureRandom to use
+
+
+ containing class for an CMS Compressed Data object
+
+
+ Return the uncompressed content.
+
+ @return the uncompressed content
+ @throws CmsException if there is an exception uncompressing the data.
+
+
+ Return the uncompressed content, throwing an exception if the data size
+ is greater than the passed in limit. If the content is exceeded getCause()
+ on the CMSException will contain a StreamOverflowException
+
+ @param limit maximum number of bytes to read
+ @return the content read
+ @throws CMSException if there is an exception uncompressing the data.
+
+
+ return the ContentInfo
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ * General class for generating a compressed CMS message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * CMSCompressedDataGenerator fact = new CMSCompressedDataGenerator();
+ * CMSCompressedData data = fact.Generate(content, algorithm);
+ *
+ *
+
+
+ Generate an object that contains an CMS Compressed Data
+
+
+ Class for reading a CMS Compressed Data stream.
+
+ CMSCompressedDataParser cp = new CMSCompressedDataParser(inputStream);
+
+ process(cp.GetContent().GetContentStream());
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CMSCompressedDataParser ep = new CMSCompressedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+ General class for generating a compressed CMS message stream.
+
+ A simple example of usage.
+
+
+ CMSCompressedDataStreamGenerator gen = new CMSCompressedDataStreamGenerator();
+
+ Stream cOut = gen.Open(outputStream, CMSCompressedDataStreamGenerator.ZLIB);
+
+ cOut.Write(data);
+
+ cOut.Close();
+
+
+
+ base constructor
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ Close the underlying data stream.
+ @throws IOException if the close fails.
+
+
+ containing class for an CMS Enveloped Data object
+
+
+ return the object identifier for the content encryption algorithm.
+
+
+ return a store of the intended recipients for this message
+
+
+ return the ContentInfo
+
+
+ return a table of the unprotected attributes indexed by
+ the OID of the attribute.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+
+ General class for generating a CMS enveloped-data message.
+
+ A simple example of usage.
+
+
+ CmsEnvelopedDataGenerator fact = new CmsEnvelopedDataGenerator();
+
+ fact.AddKeyTransRecipient(cert);
+
+ CmsEnvelopedData data = fact.Generate(content, algorithm);
+
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+
+ Generate an enveloped object that contains a CMS Enveloped Data
+ object using the passed in key generator.
+
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data object.
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data object.
+
+
+ Parsing class for an CMS Enveloped Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one recipient can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ Example of use - assuming the first recipient matches the private key we have.
+
+ CmsEnvelopedDataParser ep = new CmsEnvelopedDataParser(inputStream);
+
+ RecipientInformationStore recipients = ep.GetRecipientInfos();
+
+ Collection c = recipients.getRecipients();
+ Iterator it = c.iterator();
+
+ if (it.hasNext())
+ {
+ RecipientInformation recipient = (RecipientInformation)it.next();
+
+ CMSTypedStream recData = recipient.getContentStream(privateKey);
+
+ processDataStream(recData.getContentStream());
+ }
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CmsEnvelopedDataParser ep = new CmsEnvelopedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+
+ return the object identifier for the content encryption algorithm.
+
+
+ return the ASN.1 encoded encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a store of the intended recipients for this message
+
+
+ return a table of the unprotected attributes indexed by
+ the OID of the attribute.
+ @throws IOException
+
+
+ General class for generating a CMS enveloped-data message stream.
+
+ A simple example of usage.
+
+ CmsEnvelopedDataStreamGenerator edGen = new CmsEnvelopedDataStreamGenerator();
+
+ edGen.AddKeyTransRecipient(cert);
+
+ MemoryStream bOut = new MemoryStream();
+
+ Stream out = edGen.Open(
+ bOut, CMSEnvelopedDataGenerator.AES128_CBC);*
+ out.Write(data);
+
+ out.Close();
+
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Set the underlying string size for encapsulated data.
+ Length of octet strings to buffer the data.
+
+
+ Use a BER Set to store the recipient information.
+
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data
+ object using the passed in key generator.
+
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+ @throws IOException
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+ @throws IOException
+
+
+ General class for generating a CMS enveloped-data message.
+
+ A simple example of usage.
+
+
+ CMSEnvelopedDataGenerator fact = new CMSEnvelopedDataGenerator();
+
+ fact.addKeyTransRecipient(cert);
+
+ CMSEnvelopedData data = fact.generate(content, algorithm, "BC");
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ add a recipient.
+
+ @param cert recipient's public key certificate
+ @exception ArgumentException if there is a problem with the certificate
+
+
+ add a recipient
+
+ @param key the public key used by the recipient
+ @param subKeyId the identifier for the recipient's public key
+ @exception ArgumentException if there is a problem with the key
+
+
+ add a KEK recipient.
+ @param key the secret key to use for wrapping
+ @param keyIdentifier the byte string that identifies the key
+
+
+ add a KEK recipient.
+ @param key the secret key to use for wrapping
+ @param keyIdentifier the byte string that identifies the key
+
+
+ Add a key agreement based recipient.
+
+ @param agreementAlgorithm key agreement algorithm to use.
+ @param senderPrivateKey private key to initialise sender side of agreement with.
+ @param senderPublicKey sender public key to include with message.
+ @param recipientCert recipient's public key certificate.
+ @param cekWrapAlgorithm OID for key wrapping algorithm to use.
+ @exception SecurityUtilityException if the algorithm requested cannot be found
+ @exception InvalidKeyException if the keys are inappropriate for the algorithm specified
+
+
+ Add multiple key agreement based recipients (sharing a single KeyAgreeRecipientInfo structure).
+
+ @param agreementAlgorithm key agreement algorithm to use.
+ @param senderPrivateKey private key to initialise sender side of agreement with.
+ @param senderPublicKey sender public key to include with message.
+ @param recipientCerts recipients' public key certificates.
+ @param cekWrapAlgorithm OID for key wrapping algorithm to use.
+ @exception SecurityUtilityException if the algorithm requested cannot be found
+ @exception InvalidKeyException if the keys are inappropriate for the algorithm specified
+
+
+
+ Generic routine to copy out the data we want processed.
+
+
+ This routine may be called multiple times.
+
+
+
+ a holding class for a byte array of data to be processed.
+
+
+ A clone of the byte array
+
+
+ a holding class for a file of data to be processed.
+
+
+ The file handle
+
+
+ general class for handling a pkcs7-signature message.
+
+ A simple example of usage - note, in the example below the validity of
+ the certificate isn't verified, just the fact that one of the certs
+ matches the given signer...
+
+
+ IX509Store certs = s.GetCertificates();
+ SignerInformationStore signers = s.GetSignerInfos();
+
+ foreach (SignerInformation signer in signers.GetSigners())
+ {
+ ArrayList certList = new ArrayList(certs.GetMatches(signer.SignerID));
+ X509Certificate cert = (X509Certificate) certList[0];
+
+ if (signer.Verify(cert.GetPublicKey()))
+ {
+ verified++;
+ }
+ }
+
+
+
+ Content with detached signature, digests precomputed
+
+ @param hashes a map of precomputed digests for content indexed by name of hash.
+ @param sigBlock the signature object.
+
+
+ base constructor - content with detached signature.
+
+ @param signedContent the content that was signed.
+ @param sigData the signature object.
+
+
+ base constructor - with encapsulated content
+
+
+ Return the version number for this object.
+
+
+ return the collection of signers that are associated with the
+ signatures for the message.
+
+
+ return a X509Store containing the attribute certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of attribute certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing the public key certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of public key certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing CRLs, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of CRLs
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+
+ Return the DerObjectIdentifier associated with the encapsulated
+ content info structure carried in the signed data.
+
+
+
+ return the ContentInfo
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Replace the signerinformation store associated with this
+ CmsSignedData object with the new one passed in. You would
+ probably only want to do this if you wanted to change the unsigned
+ attributes associated with a signer, or perhaps delete one.
+
+ @param signedData the signed data object to be used as a base.
+ @param signerInformationStore the new signer information store to use.
+ @return a new signed data object.
+
+
+ Replace the certificate and CRL information associated with this
+ CmsSignedData object with the new one passed in.
+
+ @param signedData the signed data object to be used as a base.
+ @param x509Certs the new certificates to be used.
+ @param x509Crls the new CRLs to be used.
+ @return a new signed data object.
+ @exception CmsException if there is an error processing the stores
+
+
+ * general class for generating a pkcs7-signature message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * IX509Store certs...
+ * IX509Store crls...
+ * CmsSignedDataGenerator gen = new CmsSignedDataGenerator();
+ *
+ * gen.AddSigner(privKey, cert, CmsSignedGenerator.DigestSha1);
+ * gen.AddCertificates(certs);
+ * gen.AddCrls(crls);
+ *
+ * CmsSignedData data = gen.Generate(content);
+ *
+ *
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ * add a signer - no attributes other than the default ones will be
+ * provided here.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param digestOID digest algorithm OID
+
+
+ add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be
+ provided here.
+
+ @param key signing key to use
+ @param cert certificate containing corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+
+
+ add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be
+ provided here.
+
+
+ * add a signer with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes.
+
+ @param key signing key to use
+ @param cert certificate containing corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+ @param signedAttr table of attributes to be included in signature
+ @param unsignedAttr table of attributes to be included as unsigned
+
+
+ * add a signer with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param subjectKeyID subjectKeyID of corresponding public key
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes.
+
+ @param key signing key to use
+ @param subjectKeyID subjectKeyID of corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+ @param signedAttr table of attributes to be included in signature
+ @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer with extra signed/unsigned attributes based on generators.
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes based on generators.
+
+
+ add a signer with extra signed/unsigned attributes based on generators.
+
+
+ add a signer, including digest encryption algorithm, with extra signed/unsigned attributes based on generators.
+
+
+ generate a signed object that for a CMS Signed Data object
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data".
+
+
+ generate a set of one or more SignerInformation objects representing counter signatures on
+ the passed in SignerInformation object.
+
+ @param signer the signer to be countersigned
+ @param sigProvider the provider to be used for counter signing.
+ @return a store containing the signers.
+
+
+ Parsing class for an CMS Signed Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one signer can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ A simple example of usage for an encapsulated signature.
+
+
+ Two notes: first, in the example below the validity of
+ the certificate isn't verified, just the fact that one of the certs
+ matches the given signer, and, second, because we are in a streaming
+ mode the order of the operations is important.
+
+
+ CmsSignedDataParser sp = new CmsSignedDataParser(encapSigData);
+
+ sp.GetSignedContent().Drain();
+
+ IX509Store certs = sp.GetCertificates();
+ SignerInformationStore signers = sp.GetSignerInfos();
+
+ foreach (SignerInformation signer in signers.GetSigners())
+ {
+ ArrayList certList = new ArrayList(certs.GetMatches(signer.SignerID));
+ X509Certificate cert = (X509Certificate) certList[0];
+
+ Console.WriteLine("verify returns: " + signer.Verify(cert));
+ }
+
+ Note also: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CmsSignedDataParser ep = new CmsSignedDataParser(new BufferedInputStream(encapSigData, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+ base constructor - with encapsulated content
+
+
+ base constructor
+
+ @param signedContent the content that was signed.
+ @param sigData the signature object.
+
+
+ Return the version number for the SignedData object
+
+ @return the version number
+
+
+ return the collection of signers that are associated with the
+ signatures for the message.
+ @throws CmsException
+
+
+ return a X509Store containing the attribute certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of attribute certificates
+ @exception org.bouncycastle.x509.NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing the public key certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of public key certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing CRLs, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of CRLs
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+
+ Return the DerObjectIdentifier associated with the encapsulated
+ content info structure carried in the signed data.
+
+
+
+ Replace the signerinformation store associated with the passed
+ in message contained in the stream original with the new one passed in.
+ You would probably only want to do this if you wanted to change the unsigned
+ attributes associated with a signer, or perhaps delete one.
+
+ The output stream is returned unclosed.
+
+ @param original the signed data stream to be used as a base.
+ @param signerInformationStore the new signer information store to use.
+ @param out the stream to Write the new signed data object to.
+ @return out.
+
+
+ Replace the certificate and CRL information associated with this
+ CMSSignedData object with the new one passed in.
+
+ The output stream is returned unclosed.
+
+ @param original the signed data stream to be used as a base.
+ @param certsAndCrls the new certificates and CRLs to be used.
+ @param out the stream to Write the new signed data object to.
+ @return out.
+ @exception CmsException if there is an error processing the CertStore
+
+
+ General class for generating a pkcs7-signature message stream.
+
+ A simple example of usage.
+
+
+ IX509Store certs...
+ CmsSignedDataStreamGenerator gen = new CmsSignedDataStreamGenerator();
+
+ gen.AddSigner(privateKey, cert, CmsSignedDataStreamGenerator.DIGEST_SHA1);
+
+ gen.AddCertificates(certs);
+
+ Stream sigOut = gen.Open(bOut);
+
+ sigOut.Write(Encoding.UTF8.GetBytes("Hello World!"));
+
+ sigOut.Close();
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer, specifying the digest encryption algorithm - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes - specifying digest
+ encryption algorithm.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ generate a signed object that for a CMS Signed Data object
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data".
+
+
+ generate a signed object that for a CMS Signed Data
+ object using the given provider - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data". If dataOutputStream is non null the data
+ being signed will be written to the stream as it is processed.
+ @param out stream the CMS object is to be written to.
+ @param encapsulate true if data should be encapsulated.
+ @param dataOutputStream output stream to copy the data being signed to.
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+
+
+ generate a signed object that for a CMS Signed Data
+ object using the given provider - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+ @param out stream the CMS object is to be written to.
+ @param signedContentType OID for data to be signed.
+ @param encapsulate true if data should be encapsulated.
+ @param dataOutputStream output stream to copy the data being signed to.
+
+
+ Default type for the signed data.
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Add the attribute certificates contained in the passed in store to the
+ generator.
+
+ @param store a store of Version 2 attribute certificates
+ @throws CmsException if an error occurse processing the store.
+
+
+ Add a store of precalculated signers to the generator.
+
+ @param signerStore store of signers
+
+
+ Return a map of oids and byte arrays representing the digests calculated on the content during
+ the last generate.
+
+ @return a map of oids (as String objects) and byte[] representing digests.
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+ Return the digest encryption algorithm using one of the standard
+ JCA string representations rather than the algorithm identifier (if
+ possible).
+
+
+ Default authenticated attributes generator.
+
+
+ Initialise to use all defaults
+
+
+ Initialise with some extra attributes or overrides.
+
+ @param attributeTable initial attribute table to use.
+
+
+ Create a standard attribute table from the passed in parameters - this will
+ normally include contentType and messageDigest. If the constructor
+ using an AttributeTable was used, entries in it for contentType and
+ messageDigest will override the generated ones.
+
+ @param parameters source parameters for table generation.
+
+ @return a filled in IDictionary of attributes.
+
+
+ @param parameters source parameters
+ @return the populated attribute table
+
+
+ Default signed attributes generator.
+
+
+ Initialise to use all defaults
+
+
+ Initialise with some extra attributes or overrides.
+
+ @param attributeTable initial attribute table to use.
+
+
+ Create a standard attribute table from the passed in parameters - this will
+ normally include contentType, signingTime, and messageDigest. If the constructor
+ using an AttributeTable was used, entries in it for contentType, signingTime, and
+ messageDigest will override the generated ones.
+
+ @param parameters source parameters for table generation.
+
+ @return a filled in Hashtable of attributes.
+
+
+ @param parameters source parameters
+ @return the populated attribute table
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using a secret key known to the other side.
+
+
+ decrypt the content and return an input stream.
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using key agreement.
+
+
+ decrypt the content and return an input stream.
+
+
+ the KeyTransRecipientInformation class for a recipient who has been sent a secret
+ key encrypted using their public key that needs to be used to
+ extract the message.
+
+
+ decrypt the content and return it as a byte array.
+
+
+ a basic index for an originator.
+
+
+ Return the certificates stored in the underlying OriginatorInfo object.
+
+ @return a Store of X509CertificateHolder objects.
+
+
+ Return the CRLs stored in the underlying OriginatorInfo object.
+
+ @return a Store of X509CRLHolder objects.
+
+
+ Return the underlying ASN.1 object defining this SignerInformation object.
+
+ @return a OriginatorInfo.
+
+
+
+ PKCS5 scheme-2 - password converted to bytes assuming ASCII.
+
+
+
+ PKCS5 scheme-2 - password converted to bytes using UTF-8.
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using a password.
+
+
+ return the object identifier for the key derivation algorithm, or null
+ if there is none present.
+
+ @return OID for key derivation algorithm, if present.
+
+
+ decrypt the content and return an input stream.
+
+
+
+ Generate a RecipientInfo object for the given key.
+
+
+ A
+
+
+ A
+
+
+ A
+
+
+
+
+ * return the object identifier for the key encryption algorithm.
+ *
+ * @return OID for key encryption algorithm.
+
+
+ * return the ASN.1 encoded key encryption algorithm parameters, or null if
+ * there aren't any.
+ *
+ * @return ASN.1 encoding of key encryption algorithm parameters.
+
+
+ Return the MAC calculated for the content stream. Note: this call is only meaningful once all
+ the content has been read.
+
+ @return byte array containing the mac.
+
+
+ Return the first RecipientInformation object that matches the
+ passed in selector. Null if there are no matches.
+
+ @param selector to identify a recipient
+ @return a single RecipientInformation object. Null if none matches.
+
+
+ Return the number of recipients in the collection.
+
+ @return number of recipients identified.
+
+
+ Return all recipients in the collection
+
+ @return a collection of recipients.
+
+
+ Return possible empty collection with recipients matching the passed in RecipientID
+
+ @param selector a recipient id to select against.
+ @return a collection of RecipientInformation objects.
+
+
+ a basic index for a signer.
+
+
+ If the passed in flag is true, the signer signature will be based on the data, not
+ a collection of signed attributes, and no signed attributes will be included.
+
+ @return the builder object
+
+
+ Provide a custom signed attribute generator.
+
+ @param signedGen a generator of signed attributes.
+ @return the builder object
+
+
+ Provide a generator of unsigned attributes.
+
+ @param unsignedGen a generator for signed attributes.
+ @return the builder object
+
+
+ Build a generator with the passed in certHolder issuer and serial number as the signerIdentifier.
+
+ @param contentSigner operator for generating the final signature in the SignerInfo with.
+ @param certHolder carrier for the X.509 certificate related to the contentSigner.
+ @return a SignerInfoGenerator
+ @throws OperatorCreationException if the generator cannot be built.
+
+
+ Build a generator with the passed in subjectKeyIdentifier as the signerIdentifier. If used you should
+ try to follow the calculation described in RFC 5280 section 4.2.1.2.
+
+ @param signerFactory operator factory for generating the final signature in the SignerInfo with.
+ @param subjectKeyIdentifier key identifier to identify the public key for verifying the signature.
+ @return a SignerInfoGenerator
+
+
+ an expanded SignerInfo block from a CMS Signed message
+
+
+ return the version number for this objects underlying SignerInfo structure.
+
+
+ return the object identifier for the signature.
+
+
+ return the signature parameters, or null if there aren't any.
+
+
+ return the content digest that was calculated during verification.
+
+
+ return the object identifier for the signature.
+
+
+ return the signature/encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a table of the signed attributes - indexed by
+ the OID of the attribute.
+
+
+ return a table of the unsigned attributes indexed by
+ the OID of the attribute.
+
+
+ return the encoded signature
+
+
+ Return a SignerInformationStore containing the counter signatures attached to this
+ signer. If no counter signatures are present an empty store is returned.
+
+
+ return the DER encoding of the signed attributes.
+ @throws IOException if an encoding error occurs.
+
+
+ verify that the given public key successfully handles and confirms the
+ signature associated with this signer.
+
+
+ verify that the given certificate successfully handles and confirms
+ the signature associated with this signer and, if a signingTime
+ attribute is available, that the certificate was valid at the time the
+ signature was generated.
+
+
+ Return the base ASN.1 CMS structure that this object contains.
+
+ @return an object containing a CMS SignerInfo structure.
+
+
+ Return a signer information object with the passed in unsigned
+ attributes replacing the ones that are current associated with
+ the object passed in.
+
+ @param signerInformation the signerInfo to be used as the basis.
+ @param unsignedAttributes the unsigned attributes to add.
+ @return a copy of the original SignerInformationObject with the changed attributes.
+
+
+ Return a signer information object with passed in SignerInformationStore representing counter
+ signatures attached as an unsigned attribute.
+
+ @param signerInformation the signerInfo to be used as the basis.
+ @param counterSigners signer info objects carrying counter signature.
+ @return a copy of the original SignerInformationObject with the changed attributes.
+
+
+ Create a store containing a single SignerInformation object.
+
+ @param signerInfo the signer information to contain.
+
+
+ Create a store containing a collection of SignerInformation objects.
+
+ @param signerInfos a collection signer information objects to contain.
+
+
+ Return the first SignerInformation object that matches the
+ passed in selector. Null if there are no matches.
+
+ @param selector to identify a signer
+ @return a single SignerInformation object. Null if none matches.
+
+
+ The number of signers in the collection.
+
+
+ An ICollection of all signers in the collection
+
+
+ Return possible empty collection with signers matching the passed in SignerID
+
+ @param selector a signer id to select against.
+ @return a collection of SignerInformation objects.
+
+
+ Basic generator that just returns a preconstructed attribute table
+
+
+ a holding class for public/private parameter pairs.
+
+
+ basic constructor.
+
+ @param publicParam a public key parameters object.
+ @param privateParam the corresponding private key parameters.
+
+
+ return the public key parameters.
+
+ @return the public key parameters.
+
+
+ return the private key parameters.
+
+ @return the private key parameters.
+
+
+ The AEAD block ciphers already handle buffering internally, so this class
+ just takes care of implementing IBufferedCipher methods.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the blocksize for the underlying cipher.
+
+ @return the blocksize for the underlying cipher.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output, or the input is not block size aligned and should be.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+ @exception DataLengthException if the input is not block size
+ aligned.
+
+
+ Reset the buffer and cipher. After resetting the object is in the same
+ state as it was after the last init (if there was one).
+
+
+ a buffer wrapper for an asymmetric block cipher, allowing input
+ to be accumulated in a piecemeal fashion until final processing.
+
+
+ base constructor.
+
+ @param cipher the cipher this buffering object wraps.
+
+
+ return the amount of data sitting in the buffer.
+
+ @return the amount of data sitting in the buffer.
+
+
+ initialise the buffer and the underlying cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+
+
+ process the contents of the buffer using the underlying
+ cipher.
+
+ @return the result of the encryption/decryption process on the
+ buffer.
+ @exception InvalidCipherTextException if we are given a garbage block.
+
+
+ Reset the buffer
+
+
+ A wrapper class that allows block ciphers to be used to process data in
+ a piecemeal fashion. The BufferedBlockCipher outputs a block only when the
+ buffer is full and more data is being added, or on a doFinal.
+
+ Note: in the case where the underlying cipher is either a CFB cipher or an
+ OFB one the last block may not be a multiple of the block size.
+
+
+
+ constructor for subclasses
+
+
+ Create a buffered block cipher without padding.
+
+ @param cipher the underlying block cipher this buffering object wraps.
+ false otherwise.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the blocksize for the underlying cipher.
+
+ @return the blocksize for the underlying cipher.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output, or the input is not block size aligned and should be.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+ @exception DataLengthException if the input is not block size
+ aligned.
+
+
+ Reset the buffer and cipher. After resetting the object is in the same
+ state as it was after the last init (if there was one).
+
+
+ The base class for symmetric, or secret, cipher key generators.
+
+
+ initialise the key generator.
+
+ @param param the parameters to be used for key generation
+
+
+ Generate a secret key.
+
+ @return a byte array containing the key value.
+
+
+ this exception is thrown if a buffer that is meant to have output
+ copied into it turns out to be too short, or if we've been given
+ insufficient input. In general this exception will Get thrown rather
+ than an ArrayOutOfBounds exception.
+
+
+ base constructor.
+
+
+ create a DataLengthException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+ Wrapper removes exposure to the IMemoable interface on an IDigest implementation.
+
+
+ Base constructor.
+
+ @param baseDigest underlying digest to use.
+ @exception IllegalArgumentException if baseDigest is null
+
+
+ implementation of GOST R 34.11-94
+
+
+ Standard constructor
+
+
+ Constructor to allow use of a particular sbox with GOST28147
+ @see GOST28147Engine#getSBox(String)
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ base implementation of MD4 family style digest as outlined in
+ "Handbook of Applied Cryptography", pages 344 - 347.
+
+
+
+ Implementation of Keccak based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+ Return the size of block that the compression function is applied to in bytes.
+
+ @return internal byte length of a block.
+
+
+ Base class for SHA-384 and SHA-512.
+
+
+ Constructor for variable length word
+
+
+ Copy constructor. We are using copy constructors in place
+ of the object.Clone() interface as this interface is not
+ supported by J2ME.
+
+
+ adjust the byte counts so that byteCount2 represents the
+ upper long (less 3 bits) word of the byte count.
+
+
+ implementation of MD2
+ as outlined in RFC1319 by B.Kaliski from RSA Laboratories April 1992
+
+
+ return the algorithm name
+
+ @return the algorithm name
+
+
+ Close the digest, producing the final digest value. The doFinal
+ call leaves the digest reset.
+
+ @param out the array the digest is to be copied into.
+ @param outOff the offset into the out array the digest is to start at.
+
+
+ reset the digest back to it's initial state.
+
+
+ update the message digest with a single byte.
+
+ @param in the input byte to be entered.
+
+
+ update the message digest with a block of bytes.
+
+ @param in the byte array containing the data.
+ @param inOff the offset into the byte array where the data starts.
+ @param len the length of the data.
+
+
+ implementation of MD4 as RFC 1320 by R. Rivest, MIT Laboratory for
+ Computer Science and RSA Data Security, Inc.
+
+ NOTE : This algorithm is only included for backwards compatibility
+ with legacy applications, it's not secure, don't use it for anything new!
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of MD5 as outlined in "Handbook of Applied Cryptography", pages 346 - 347.
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of RipeMD128
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of RipeMD see,
+ http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of RipeMD256.
+ Note: this algorithm offers the same level of security as RipeMD128.
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of RipeMD 320.
+ Note: this algorithm offers the same level of security as RipeMD160.
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of SHA-3 based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+
+ Implementation of Chinese SM3 digest as described at
+ http://tools.ietf.org/html/draft-shen-sm3-hash-00
+ and at .... ( Chinese PDF )
+
+
+ The specification says "process a bit stream",
+ but this is written to process bytes in blocks of 4,
+ meaning this will process 32-bit word groups.
+ But so do also most other digest specifications,
+ including the SHA-256 which was a origin for
+ this specification.
+
+
+
+
+ Standard constructor
+
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+
+ reset the chaining variables
+
+
+
+ implementation of SHA-1 as outlined in "Handbook of Applied Cryptography", pages 346 - 349.
+
+ It is interesting to ponder why the, apart from the extra IV, the other difference here from MD5
+ is the "endianness" of the word processing!
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ SHA-224 as described in RFC 3874
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-224 512 32 224
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-256. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-384. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-512. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ FIPS 180-4 implementation of SHA-512/t
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+
+ Implementation of SHAKE based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+ Wrapper class that reduces the output length of a particular digest to
+ only the first n bytes of the digest function.
+
+
+ Base constructor.
+
+ @param baseDigest underlying digest to use.
+ @param length length in bytes of the output of doFinal.
+ @exception ArgumentException if baseDigest is null, or length is greater than baseDigest.GetDigestSize().
+
+
+
+ Implementation of the Skein parameterised hash function in 256, 512 and 1024 bit block sizes,
+ based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+
+ Constructs a Skein digest with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/digest size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Optionally initialises the Skein digest with the provided parameters.
+
+ See for details on the parameterisation of the Skein hash function.
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+
+ Implementation of the Skein family of parameterised hash functions in 256, 512 and 1024 bit block
+ sizes, based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+ This implementation is the basis for and , implementing the
+ parameter based configuration system that allows Skein to be adapted to multiple applications.
+ Initialising the engine with allows standard and arbitrary parameters to
+ be applied during the Skein hash function.
+
+ Implemented:
+
+ 256, 512 and 1024 bit internal states.
+ Full 96 bit input length.
+ Parameters defined in the Skein specification, and arbitrary other pre and post message
+ parameters.
+ Arbitrary output size in 1 byte intervals.
+
+
+ Not implemented:
+
+ Sub-byte length input (bit padding).
+ Tree hashing.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+ The parameter type for the Skein key.
+
+
+ The parameter type for the Skein configuration block.
+
+
+ The parameter type for the message.
+
+
+ The parameter type for the output transformation.
+
+
+ Precalculated UBI(CFG) states for common state/output combinations without key or other
+ pre-message params.
+
+
+ Point at which position might overflow long, so switch to add with carry logic
+
+
+ Bit 127 = final
+
+
+ Bit 126 = first
+
+
+ UBI uses a 128 bit tweak
+
+
+ Whether 64 bit position exceeded
+
+
+ Advances the position in the tweak by the specified value.
+
+
+ The Unique Block Iteration chaining mode.
+
+
+ Buffer for the current block of message data
+
+
+ Offset into the current message block
+
+
+ Buffer for message words for feedback into encrypted block
+
+
+ Underlying Threefish tweakable block cipher
+
+
+ Size of the digest output, in bytes
+
+
+ The current chaining/state value
+
+
+ The initial state value
+
+
+ The (optional) key parameter
+
+
+ Parameters to apply prior to the message
+
+
+ Parameters to apply after the message, but prior to output
+
+
+ The current UBI operation
+
+
+ Buffer for single byte update method
+
+
+
+ Constructs a Skein digest with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/digest size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Creates a SkeinEngine as an exact copy of an existing instance.
+
+
+
+
+ Initialises the Skein engine with the provided parameters. See for
+ details on the parameterisation of the Skein hash function.
+
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+ Calculate the initial (pre message block) chaining state.
+
+
+
+ Reset the engine to the initial state (with the key and any pre-message parameters , ready to
+ accept message input.
+
+
+
+ implementation of Tiger based on:
+
+ http://www.cs.technion.ac.il/~biham/Reports/Tiger
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Implementation of WhirlpoolDigest, based on Java source published by Barreto
+ and Rijmen.
+
+
+
+ Copy constructor. This will copy the state of the provided message
+ digest.
+
+
+ Reset the chaining variables
+
+
+ initialise a Serpent cipher.
+
+ @param encrypting whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @throws IllegalArgumentException if the params argument is
+ inappropriate.
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @return the number of bytes processed and produced.
+ @throws DataLengthException if there isn't enough data in in, or
+ space in out.
+ @throws IllegalStateException if the cipher isn't initialised.
+
+
+ InvSO - {13, 3,11, 0,10, 6, 5,12, 1,14, 4, 7,15, 9, 8, 2 } - 15 terms.
+
+
+ S1 - {15,12, 2, 7, 9, 0, 5,10, 1,11,14, 8, 6,13, 3, 4 } - 14 terms.
+
+
+ InvS1 - { 5, 8, 2,14,15, 6,12, 3,11, 4, 7, 9, 1,13,10, 0 } - 14 steps.
+
+
+ S2 - { 8, 6, 7, 9, 3,12,10,15,13, 1,14, 4, 0,11, 5, 2 } - 16 terms.
+
+
+ InvS2 - {12, 9,15, 4,11,14, 1, 2, 0, 3, 6,13, 5, 8,10, 7 } - 16 steps.
+
+
+ S3 - { 0,15,11, 8,12, 9, 6, 3,13, 1, 2, 4,10, 7, 5,14 } - 16 terms.
+
+
+ InvS3 - { 0, 9,10, 7,11,14, 6,13, 3, 5,12, 2, 4, 8,15, 1 } - 15 terms
+
+
+ S4 - { 1,15, 8, 3,12, 0,11, 6, 2, 5, 4,10, 9,14, 7,13 } - 15 terms.
+
+
+ InvS4 - { 5, 0, 8, 3,10, 9, 7,14, 2,12,11, 6, 4,15,13, 1 } - 15 terms.
+
+
+ S5 - {15, 5, 2,11, 4,10, 9,12, 0, 3,14, 8,13, 6, 7, 1 } - 16 terms.
+
+
+ InvS5 - { 8,15, 2, 9, 4, 1,13,14,11, 6, 5, 3, 7,12,10, 0 } - 16 terms.
+
+
+ S6 - { 7, 2,12, 5, 8, 4, 6,11,14, 9, 1,15,13, 3,10, 0 } - 15 terms.
+
+
+ InvS6 - {15,10, 1,13, 5, 3, 6, 0, 4, 9,14, 7, 2,12, 8,11 } - 15 terms.
+
+
+ S7 - { 1,13,15, 0,14, 8, 2,11, 7, 4,12,10, 9, 3, 5, 6 } - 16 terms.
+
+
+ InvS7 - { 3, 0, 6,13, 9,14,15, 8, 5,12,11, 7,10, 1, 4, 2 } - 17 terms.
+
+
+ Apply the linear transformation to the register set.
+
+
+ Apply the inverse of the linear transformation to the register set.
+
+
+ Tnepres is a 128-bit 32-round block cipher with variable key lengths,
+ including 128, 192 and 256 bit keys conjectured to be at least as
+ secure as three-key triple-DES.
+
+ Tnepres is based on Serpent which was designed by Ross Anderson, Eli Biham and Lars Knudsen as a
+ candidate algorithm for the NIST AES Quest. Unfortunately there was an endianness issue
+ with test vectors in the AES submission and the resulting confusion lead to the Tnepres cipher
+ as well, which is a byte swapped version of Serpent.
+
+
+ For full details see The Serpent home page
+
+
+
+ Expand a user-supplied key material into a session key.
+
+ @param key The user-key bytes (multiples of 4) to use.
+ @exception ArgumentException
+
+
+ Encrypt one block of plaintext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ Decrypt one block of ciphertext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ an implementation of the AES (Rijndael), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor, they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations, 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each, for a total of 2Kbytes,
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first.
+
+ The slowest version uses no static tables at all and computes the values in each round.
+
+
+ This file contains the middle performance version with 2Kbytes of static tables for round precomputation.
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ an implementation of the AES (Rijndael)), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor), they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations), 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each), for a total of 2Kbytes),
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first
+
+ The slowest version uses no static tables at all and computes the values in each round
+
+
+ This file contains the fast version with 8Kbytes of static tables for round precomputation
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ an implementation of the AES (Rijndael), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor, they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations, 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each, for a total of 2Kbytes,
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first
+
+ The slowest version uses no static tables at all and computes the values
+ in each round.
+
+
+ This file contains the slowest performance version with no static tables
+ for round precomputation, but it has the smallest foot print.
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+
+ An implementation of the AES Key Wrapper from the NIST Key Wrap Specification.
+
+ For further details see: http://csrc.nist.gov/encryption/kms/key-wrap.pdf .
+
+
+
+ A class that provides Blowfish key encryption operations,
+ such as encoding data and generating keys.
+ All the algorithms herein are from Applied Cryptography
+ and implement a simplified cryptography interface.
+
+
+ initialise a Blowfish cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ apply the encryption cycle to each value pair in the table.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Camellia - based on RFC 3713.
+
+
+ Camellia - based on RFC 3713, smaller implementation, about half the size of CamelliaEngine.
+
+
+
+ An implementation of the Camellia key wrapper based on RFC 3657/RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc3657.txt .
+
+
+
+ A class that provides CAST key encryption operations,
+ such as encoding data and generating keys.
+
+ All the algorithms herein are from the Internet RFC's
+
+ RFC2144 - Cast5 (64bit block, 40-128bit key)
+ RFC2612 - CAST6 (128bit block, 128-256bit key)
+
+ and implement a simplified cryptography interface.
+
+
+ initialise a CAST cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ The first of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ The second of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ The third of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ Does the 16 rounds to encrypt the block.
+
+ @param L0 the LH-32bits of the plaintext block
+ @param R0 the RH-32bits of the plaintext block
+
+
+ A class that provides CAST6 key encryption operations,
+ such as encoding data and generating keys.
+
+ All the algorithms herein are from the Internet RFC
+
+ RFC2612 - CAST6 (128bit block, 128-256bit key)
+
+ and implement a simplified cryptography interface.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Does the 12 quad rounds rounds to encrypt the block.
+
+ @param A the 00-31 bits of the plaintext block
+ @param B the 32-63 bits of the plaintext block
+ @param C the 64-95 bits of the plaintext block
+ @param D the 96-127 bits of the plaintext block
+ @param result the resulting ciphertext
+
+
+ Does the 12 quad rounds rounds to decrypt the block.
+
+ @param A the 00-31 bits of the ciphertext block
+ @param B the 32-63 bits of the ciphertext block
+ @param C the 64-95 bits of the ciphertext block
+ @param D the 96-127 bits of the ciphertext block
+ @param result the resulting plaintext
+
+
+
+ Implementation of Daniel J. Bernstein's ChaCha stream cipher.
+
+
+
+
+ Creates a 20 rounds ChaCha engine.
+
+
+
+
+ Creates a ChaCha engine with a specific number of rounds.
+
+ the number of rounds (must be an even number).
+
+
+
+ ChacCha function.
+
+ The number of ChaCha rounds to execute
+ The input words.
+ The ChaCha state to modify.
+
+
+ A class that provides a basic DESede (or Triple DES) engine.
+
+
+ initialise a DESede cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ * Wrap keys according to
+ *
+ * draft-ietf-smime-key-wrap-01.txt .
+ *
+ * Note:
+ *
+ * this is based on a draft, and as such is subject to change - don't use this class for anything requiring long term storage.
+ * if you are using this to wrap triple-des keys you need to set the
+ * parity bits on the key and, if it's a two-key triple-des key, pad it
+ * yourself.
+ *
+ *
+
+
+ Field engine
+
+
+ Field param
+
+
+ Field paramPlusIV
+
+
+ Field iv
+
+
+ Field forWrapping
+
+
+ Field IV2
+
+
+ Method init
+
+ @param forWrapping
+ @param param
+
+
+ Method GetAlgorithmName
+
+ @return
+
+
+ Method wrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+
+
+ Method unwrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+ @throws InvalidCipherTextException
+
+
+ Some key wrap algorithms make use of the Key Checksum defined
+ in CMS [CMS-Algorithms]. This is used to provide an integrity
+ check value for the key being wrapped. The algorithm is
+
+ - Compute the 20 octet SHA-1 hash on the key being wrapped.
+ - Use the first 8 octets of this hash as the checksum value.
+
+ @param key
+ @return
+ @throws Exception
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ @param key
+ @param checksum
+ @return
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ A class that provides a basic DES engine.
+
+
+ initialise a DES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ what follows is mainly taken from "Applied Cryptography", by
+ Bruce Schneier, however it also bears great resemblance to Richard
+ Outerbridge's D3DES...
+
+
+ Generate an integer based working key based on our secret key
+ and what we processing we are planning to do.
+
+ Acknowledgements for this routine go to James Gillogly and Phil Karn.
+ (whoever, and wherever they are!).
+
+
+ the DES engine.
+
+
+ this does your basic ElGamal algorithm.
+
+
+ initialise the ElGamal engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary ElGamal key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For ElGamal this is always one byte less than the size of P on
+ encryption, and twice the length as the size of P on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For ElGamal this is always one byte less than the size of P on
+ decryption, and twice the length as the size of P on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic ElGamal algorithm.
+
+ @param in the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param length the length of the data to be processed.
+ @return the result of the ElGamal process.
+ @exception DataLengthException the input block is too large.
+
+
+ implementation of GOST 28147-89
+
+
+ standard constructor.
+
+
+ initialise an Gost28147 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is inappropriate.
+
+
+ Return the S-Box associated with SBoxName
+ @param sBoxName name of the S-Box
+ @return byte array representing the S-Box
+
+
+ HC-128 is a software-efficient stream cipher created by Hongjun Wu. It
+ generates keystream from a 128-bit secret key and a 128-bit initialization
+ vector.
+
+ http://www.ecrypt.eu.org/stream/p3ciphers/hc/hc128_p3.pdf
+
+ It is a third phase candidate in the eStream contest, and is patent-free.
+ No attacks are known as of today (April 2007). See
+
+ http://www.ecrypt.eu.org/stream/hcp3.html
+
+
+
+ Initialise a HC-128 cipher.
+
+ @param forEncryption whether or not we are for encryption. Irrelevant, as
+ encryption and decryption are the same.
+ @param params the parameters required to set up the cipher.
+ @throws ArgumentException if the params argument is
+ inappropriate (ie. the key is not 128 bit long).
+
+
+ HC-256 is a software-efficient stream cipher created by Hongjun Wu. It
+ generates keystream from a 256-bit secret key and a 256-bit initialization
+ vector.
+
+ http://www.ecrypt.eu.org/stream/p3ciphers/hc/hc256_p3.pdf
+
+ Its brother, HC-128, is a third phase candidate in the eStream contest.
+ The algorithm is patent-free. No attacks are known as of today (April 2007).
+ See
+
+ http://www.ecrypt.eu.org/stream/hcp3.html
+
+
+
+ Initialise a HC-256 cipher.
+
+ @param forEncryption whether or not we are for encryption. Irrelevant, as
+ encryption and decryption are the same.
+ @param params the parameters required to set up the cipher.
+ @throws ArgumentException if the params argument is
+ inappropriate (ie. the key is not 256 bit long).
+
+
+ Implementation of Bob Jenkin's ISAAC (Indirection Shift Accumulate Add and Count).
+ see: http://www.burtleburtle.net/bob/rand/isaacafa.html
+
+
+ initialise an ISAAC cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ A class that provides a basic International Data Encryption Algorithm (IDEA) engine.
+
+ This implementation is based on the "HOWTO: INTERNATIONAL DATA ENCRYPTION ALGORITHM"
+ implementation summary by Fauzan Mirza (F.U.Mirza@sheffield.ac.uk). (baring 1 typo at the
+ end of the mulinv function!).
+
+
+ It can be found at ftp://ftp.funet.fi/pub/crypt/cryptography/symmetric/idea/
+
+
+ Note 1: This algorithm is patented in the USA, Japan, and Europe including
+ at least Austria, France, Germany, Italy, Netherlands, Spain, Sweden, Switzerland
+ and the United Kingdom. Non-commercial use is free, however any commercial
+ products are liable for royalties. Please see
+ www.mediacrypt.com for
+ further details. This announcement has been included at the request of
+ the patent holders.
+
+
+ Note 2: Due to the requests concerning the above, this algorithm is now only
+ included in the extended assembly. It is not included in the default distributions.
+
+
+
+ standard constructor.
+
+
+ initialise an IDEA cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return x = x * y where the multiplication is done modulo
+ 65537 (0x10001) (as defined in the IDEA specification) and
+ a zero input is taken to be 65536 (0x10000).
+
+ @param x the x value
+ @param y the y value
+ @return x = x * y
+
+
+ The following function is used to expand the user key to the encryption
+ subkey. The first 16 bytes are the user key, and the rest of the subkey
+ is calculated by rotating the previous 16 bytes by 25 bits to the left,
+ and so on until the subkey is completed.
+
+
+ This function computes multiplicative inverse using Euclid's Greatest
+ Common Divisor algorithm. Zero and one are self inverse.
+
+ i.e. x * MulInv(x) == 1 (modulo BASE)
+
+
+
+ Return the additive inverse of x.
+
+ i.e. x + AddInv(x) == 0
+
+
+
+ The function to invert the encryption subkey to the decryption subkey.
+ It also involves the multiplicative inverse and the additive inverse functions.
+
+
+ support class for constructing intergrated encryption ciphers
+ for doing basic message exchanges on top of key agreement ciphers
+
+
+ set up for use with stream mode, where the key derivation function
+ is used to provide a stream of bytes to xor with the message.
+
+ @param agree the key agreement used as the basis for the encryption
+ @param kdf the key derivation function used for byte generation
+ @param mac the message authentication code generator for the message
+
+
+ set up for use in conjunction with a block cipher to handle the
+ message.
+
+ @param agree the key agreement used as the basis for the encryption
+ @param kdf the key derivation function used for byte generation
+ @param mac the message authentication code generator for the message
+ @param cipher the cipher to used for encrypting the message
+
+
+ Initialise the encryptor.
+
+ @param forEncryption whether or not this is encryption/decryption.
+ @param privParam our private key parameters
+ @param pubParam the recipient's/sender's public key parameters
+ @param param encoding and derivation parameters.
+
+
+ NaccacheStern Engine. For details on this cipher, please see
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Initializes this algorithm. Must be called before all other Functions.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#init(bool,
+ org.bouncycastle.crypto.CipherParameters)
+
+
+ Returns the input block size of this algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#GetInputBlockSize()
+
+
+ Returns the output block size of this algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#GetOutputBlockSize()
+
+
+ Process a single Block using the Naccache-Stern algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#ProcessBlock(byte[],
+ int, int)
+
+
+ Encrypts a BigInteger aka Plaintext with the public key.
+
+ @param plain
+ The BigInteger to encrypt
+ @return The byte[] representation of the encrypted BigInteger (i.e.
+ crypted.toByteArray())
+
+
+ Adds the contents of two encrypted blocks mod sigma
+
+ @param block1
+ the first encrypted block
+ @param block2
+ the second encrypted block
+ @return encrypt((block1 + block2) mod sigma)
+ @throws InvalidCipherTextException
+
+
+ Convenience Method for data exchange with the cipher.
+
+ Determines blocksize and splits data to blocksize.
+
+ @param data the data to be processed
+ @return the data after it went through the NaccacheSternEngine.
+ @throws InvalidCipherTextException
+
+
+ Computes the integer x that is expressed through the given primes and the
+ congruences with the chinese remainder theorem (CRT).
+
+ @param congruences
+ the congruences c_i
+ @param primes
+ the primes p_i
+ @return an integer x for that x % p_i == c_i
+
+
+ A Noekeon engine, using direct-key mode.
+
+
+ Create an instance of the Noekeon encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ The no-op engine that just copies bytes through, irrespective of whether encrypting and decrypting.
+ Provided for the sake of completeness.
+
+
+ an implementation of RC2 as described in RFC 2268
+ "A Description of the RC2(r) Encryption Algorithm" R. Rivest.
+
+
+ initialise a RC2 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the result rotating the 16 bit number in x left by y
+
+
+ Wrap keys according to RFC 3217 - RC2 mechanism
+
+
+ Field engine
+
+
+ Field param
+
+
+ Field paramPlusIV
+
+
+ Field iv
+
+
+ Field forWrapping
+
+
+ Field IV2
+
+
+ Method init
+
+ @param forWrapping
+ @param param
+
+
+ Method GetAlgorithmName
+
+ @return
+
+
+ Method wrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+
+
+ Method unwrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+ @throws InvalidCipherTextException
+
+
+ Some key wrap algorithms make use of the Key Checksum defined
+ in CMS [CMS-Algorithms]. This is used to provide an integrity
+ check value for the key being wrapped. The algorithm is
+
+ - Compute the 20 octet SHA-1 hash on the key being wrapped.
+ - Use the first 8 octets of this hash as the checksum value.
+
+ @param key
+ @return
+ @throws Exception
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ @param key
+ @param checksum
+ @return
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ initialise a RC4 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ The specification for RC5 came from the RC5 Encryption Algorithm
+ publication in RSA CryptoBytes, Spring of 1995.
+ http://www.rsasecurity.com/rsalabs/cryptobytes .
+
+ This implementation has a word size of 32 bits.
+
+
+ Create an instance of the RC5 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-32 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Encrypt the given block starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param in in byte buffer containing data to encrypt
+ @param inOff offset into src buffer
+ @param out out buffer where encrypted data is written
+ @param outOff offset into out buffer
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(32) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % 32
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(32) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % 32
+
+
+ The specification for RC5 came from the RC5 Encryption Algorithm
+ publication in RSA CryptoBytes, Spring of 1995.
+ http://www.rsasecurity.com/rsalabs/cryptobytes .
+
+ This implementation is set to work with a 64 bit word size.
+
+
+ Create an instance of the RC5 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-64 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Encrypt the given block starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param in in byte buffer containing data to encrypt
+ @param inOff offset into src buffer
+ @param out out buffer where encrypted data is written
+ @param outOff offset into out buffer
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ An RC6 engine.
+
+
+ Create an instance of the RC6 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-32 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param inKey the key to be used
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ an implementation of the RFC 3211 Key Wrap
+ Specification.
+
+
+
+ An implementation of the AES Key Wrapper from the NIST Key Wrap
+ Specification as described in RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc3394.txt
+ and http://csrc.nist.gov/encryption/kms/key-wrap.pdf .
+
+
+
+ this does your basic RSA algorithm with blinding
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic RSA algorithm.
+
+ @param inBuf the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @exception DataLengthException the input block is too large.
+
+
+ This does your basic RSA Chaum's blinding and unblinding as outlined in
+ "Handbook of Applied Cryptography", page 475. You need to use this if you are
+ trying to get another party to generate signatures without them being aware
+ of the message they are signing.
+
+
+ Initialise the blinding engine.
+
+ @param forEncryption true if we are encrypting (blinding), false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the RSA blinding algorithm.
+
+ @param in the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @throws DataLengthException the input block is too large.
+
+
+ this does your basic RSA algorithm.
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ an implementation of Rijndael, based on the documentation and reference implementation
+ by Paulo Barreto, Vincent Rijmen, for v2.0 August '99.
+
+ Note: this implementation is based on information prior to readonly NIST publication.
+
+
+
+ multiply two elements of GF(2^m)
+ needed for MixColumn and InvMixColumn
+
+
+ xor corresponding text input and round key input bytes
+
+
+ Row 0 remains unchanged
+ The other three rows are shifted a variable amount
+
+
+ Replace every byte of the input by the byte at that place
+ in the nonlinear S-box
+
+
+ Mix the bytes of every column in a linear way
+
+
+ Mix the bytes of every column in a linear way
+ This is the opposite operation of Mixcolumn
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on keyBits and blockBits
+
+
+ default constructor - 128 bit block size.
+
+
+ basic constructor - set the cipher up for a given blocksize
+
+ @param blocksize the blocksize in bits, must be 128, 192, or 256.
+
+
+ initialise a Rijndael cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ this does your basic RSA algorithm.
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic RSA algorithm.
+
+ @param inBuf the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @exception DataLengthException the input block is too large.
+
+
+ Implementation of the SEED algorithm as described in RFC 4009
+
+
+
+ An implementation of the SEED key wrapper based on RFC 4010/RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc4010.txt .
+
+
+
+
+ Implementation of Daniel J. Bernstein's Salsa20 stream cipher, Snuffle 2005
+
+
+
+ Constants
+
+
+
+ Creates a 20 round Salsa20 engine.
+
+
+
+
+ Creates a Salsa20 engine with a specific number of rounds.
+
+ the number of rounds (must be an even number).
+
+
+ Rotate left
+
+ @param x value to rotate
+ @param y amount to rotate x
+
+ @return rotated x
+
+
+ * Serpent is a 128-bit 32-round block cipher with variable key lengths,
+ * including 128, 192 and 256 bit keys conjectured to be at least as
+ * secure as three-key triple-DES.
+ *
+ * Serpent was designed by Ross Anderson, Eli Biham and Lars Knudsen as a
+ * candidate algorithm for the NIST AES Quest.
+ *
+ *
+ * For full details see The Serpent home page
+ *
+
+
+ Expand a user-supplied key material into a session key.
+
+ @param key The user-key bytes (multiples of 4) to use.
+ @exception ArgumentException
+
+
+ Encrypt one block of plaintext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ Decrypt one block of ciphertext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ a class that provides a basic SKIPJACK engine.
+
+
+ initialise a SKIPJACK cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ The G permutation
+
+
+ the inverse of the G permutation.
+
+
+ An TEA engine.
+
+
+ Create an instance of the TEA encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+
+ Implementation of the Threefish tweakable large block cipher in 256, 512 and 1024 bit block
+ sizes.
+
+
+ This is the 1.3 version of Threefish defined in the Skein hash function submission to the NIST
+ SHA-3 competition in October 2010.
+
+ Threefish was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+ This implementation inlines all round functions, unrolls 8 rounds, and uses 1.2k of static tables
+ to speed up key schedule injection.
+ 2 x block size state is retained by each cipher instance.
+
+
+
+
+ 256 bit block size - Threefish-256
+
+
+
+
+ 512 bit block size - Threefish-512
+
+
+
+
+ 1024 bit block size - Threefish-1024
+
+
+
+ Size of the tweak in bytes (always 128 bit/16 bytes)
+
+
+ Rounds in Threefish-256
+
+
+ Rounds in Threefish-512
+
+
+ Rounds in Threefish-1024
+
+
+ Max rounds of any of the variants
+
+
+ Key schedule parity constant
+
+
+ Block size in bytes
+
+
+ Block size in 64 bit words
+
+
+ Buffer for byte oriented processBytes to call internal word API
+
+
+ Tweak bytes (2 byte t1,t2, calculated t3 and repeat of t1,t2 for modulo free lookup
+
+
+ Key schedule words
+
+
+ The internal cipher implementation (varies by blocksize)
+
+
+
+ Constructs a new Threefish cipher, with a specified block size.
+
+ the block size in bits, one of , ,
+ .
+
+
+
+ Initialise the engine.
+
+ Initialise for encryption if true, for decryption if false.
+ an instance of or (to
+ use a 0 tweak)
+
+
+
+ Initialise the engine, specifying the key and tweak directly.
+
+ the cipher mode.
+ the words of the key, or null to use the current key.
+ the 2 word (128 bit) tweak, or null to use the current tweak.
+
+
+
+ Process a block of data represented as 64 bit words.
+
+ the number of 8 byte words processed (which will be the same as the block size).
+ a block sized buffer of words to process.
+ a block sized buffer of words to receive the output of the operation.
+ if either the input or output is not block sized
+ if this engine is not initialised
+
+
+
+ Read a single 64 bit word from input in LSB first order.
+
+
+
+
+ Write a 64 bit word to output in LSB first order.
+
+
+
+ Rotate left + xor part of the mix operation.
+
+
+ Rotate xor + rotate right part of the unmix operation.
+
+
+ The extended + repeated tweak words
+
+
+ The extended + repeated key words
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ A class that provides Twofish encryption operations.
+
+ This Java implementation is based on the Java reference
+ implementation provided by Bruce Schneier and developed
+ by Raif S. Naffah.
+
+
+ Define the fixed p0/p1 permutations used in keyed S-box lookup.
+ By changing the following constant definitions, the S-boxes will
+ automatically Get changed in the Twofish engine.
+
+
+ gSubKeys[] and gSBox[] are eventually used in the
+ encryption and decryption methods.
+
+
+ initialise a Twofish cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+ encryptBlock uses the pre-calculated gSBox[] and subKey[]
+ arrays.
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Use (12, 8) Reed-Solomon code over GF(256) to produce
+ a key S-box 32-bit entity from 2 key material 32-bit
+ entities.
+
+ @param k0 first 32-bit entity
+ @param k1 second 32-bit entity
+ @return Remainder polynomial Generated using RS code
+
+
+ * Reed-Solomon code parameters: (12,8) reversible code:
+ *
+ *
+ * G(x) = x^4 + (a+1/a)x^3 + ax^2 + (a+1/a)x + 1
+ *
+ * where a = primitive root of field generator 0x14D
+ *
+
+
+ initialise a VMPC cipher.
+
+ @param forEncryption
+ whether or not we are for encryption.
+ @param params
+ the parameters required to set up the cipher.
+ @exception ArgumentException
+ if the params argument is inappropriate.
+
+
+
+ Implementation of Daniel J. Bernstein's XSalsa20 stream cipher - Salsa20 with an extended nonce.
+
+
+ XSalsa20 requires a 256 bit key, and a 192 bit nonce.
+
+
+
+
+ XSalsa20 key generation: process 256 bit input key and 128 bits of the input nonce
+ using a core Salsa20 function without input addition to produce 256 bit working key
+ and use that with the remaining 64 bits of nonce to initialize a standard Salsa20 engine state.
+
+
+
+ An XTEA engine.
+
+
+ Create an instance of the TEA encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Base interface for a public/private key block cipher.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The maximum size, in bytes, an input block may be.
+
+
+ The maximum size, in bytes, an output block will be.
+
+
+ Process a block.
+ The input buffer.
+ The offset into inBuf that the input block begins.
+ The length of the input block.
+ Input decrypts improperly.
+ Input is too large for the cipher.
+
+
+ interface that a public/private key pair generator should conform to.
+
+
+ intialise the key pair generator.
+
+ @param the parameters the key pair is to be initialised with.
+
+
+ return an AsymmetricCipherKeyPair containing the Generated keys.
+
+ @return an AsymmetricCipherKeyPair containing the Generated keys.
+
+
+ The basic interface that basic Diffie-Hellman implementations
+ conforms to.
+
+
+ initialise the agreement engine.
+
+
+ return the field size for the agreement algorithm in bytes.
+
+
+ given a public key from a given party calculate the next
+ message in the agreement sequence.
+
+
+ Base interface for a symmetric key block cipher.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The block size for this cipher, in bytes.
+
+
+ Indicates whether this cipher can handle partial blocks.
+
+
+ Process a block.
+ The input buffer.
+ The offset into inBuf that the input block begins.
+ The output buffer.
+ The offset into outBuf to write the output block.
+ If input block is wrong size, or outBuf too small.
+ The number of bytes processed and produced.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+
+ Operators that reduce their input to a single block return an object
+ of this type.
+
+
+
+
+ Return the final result of the operation.
+
+ A block of bytes, representing the result of an operation.
+
+
+
+ Store the final result of the operation by copying it into the destination array.
+
+ The number of bytes copied into destination.
+ The byte array to copy the result into.
+ The offset into destination to start copying the result at.
+
+
+ Block cipher engines are expected to conform to this interface.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ If true the cipher is initialised for encryption,
+ if false for decryption.
+ The key and other data required by the cipher.
+
+
+
+ Reset the cipher. After resetting the cipher is in the same state
+ as it was after the last init (if there was one).
+
+
+
+ all parameter classes implement this.
+
+
+ interface for classes implementing the Digital Signature Algorithm
+
+
+ initialise the signer for signature generation or signature
+ verification.
+
+ @param forSigning true if we are generating a signature, false
+ otherwise.
+ @param param key parameters for signature generation.
+
+
+ sign the passed in message (usually the output of a hash function).
+
+ @param message the message to be signed.
+ @return two big integers representing the r and s values respectively.
+
+
+ verify the message message against the signature values r and s.
+
+ @param message the message that was supposed to have been signed.
+ @param r the r signature value.
+ @param s the s signature value.
+
+
+ base interface for general purpose byte derivation functions.
+
+
+ return the message digest used as the basis for the function
+
+
+ Parameters for key/byte stream derivation classes
+
+
+ interface that a message digest conforms to.
+
+
+ return the algorithm name
+
+ @return the algorithm name
+
+
+ return the size, in bytes, of the digest produced by this message digest.
+
+ @return the size, in bytes, of the digest produced by this message digest.
+
+
+ return the size, in bytes, of the internal buffer used by this digest.
+
+ @return the size, in bytes, of the internal buffer used by this digest.
+
+
+ update the message digest with a single byte.
+
+ @param inByte the input byte to be entered.
+
+
+ update the message digest with a block of bytes.
+
+ @param input the byte array containing the data.
+ @param inOff the offset into the byte array where the data starts.
+ @param len the length of the data.
+
+
+ Close the digest, producing the final digest value. The doFinal
+ call leaves the digest reset.
+
+ @param output the array the digest is to be copied into.
+ @param outOff the offset into the out array the digest is to start at.
+
+
+ reset the digest back to it's initial state.
+
+
+
+ Base interface describing an entropy source for a DRBG.
+
+
+
+
+ Return whether or not this entropy source is regarded as prediction resistant.
+
+ true if this instance is prediction resistant; otherwise, false .
+
+
+
+ Return a byte array of entropy.
+
+ The entropy bytes.
+
+
+
+ Return the number of bits of entropy this source can produce.
+
+ The size, in bits, of the return value of getEntropy.
+
+
+
+ Base interface describing a provider of entropy sources.
+
+
+
+
+ Return an entropy source providing a block of entropy.
+
+ The size of the block of entropy required.
+ An entropy source providing bitsRequired blocks of entropy.
+
+
+ The base interface for implementations of message authentication codes (MACs).
+
+
+ Initialise the MAC.
+
+ @param param the key and other data required by the MAC.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Return the name of the algorithm the MAC implements.
+
+ @return the name of the algorithm the MAC implements.
+
+
+ Return the block size for this MAC (in bytes).
+
+ @return the block size for this MAC in bytes.
+
+
+ add a single byte to the mac for processing.
+
+ @param in the byte to be processed.
+ @exception InvalidOperationException if the MAC is not initialised.
+
+
+ @param in the array containing the input.
+ @param inOff the index in the array the data begins at.
+ @param len the length of the input starting at inOff.
+ @exception InvalidOperationException if the MAC is not initialised.
+ @exception DataLengthException if there isn't enough data in in.
+
+
+ Compute the final stage of the MAC writing the output to the out
+ parameter.
+
+ doFinal leaves the MAC in the same state it was after the last init.
+
+ @param out the array the MAC is to be output to.
+ @param outOff the offset into the out buffer the output is to start at.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the MAC is not initialised.
+
+
+ Reset the MAC. At the end of resetting the MAC should be in the
+ in the same state it was after the last init (if there was one).
+
+
+
+ Base interface for operators that serve as stream-based signature calculators.
+
+
+
+ The algorithm details object for this calculator.
+
+
+
+ Create a stream calculator for this signature calculator. The stream
+ calculator is used for the actual operation of entering the data to be signed
+ and producing the signature block.
+
+ A calculator producing an IBlockResult with a signature in it.
+
+
+
+ Base interface for cryptographic operations such as Hashes, MACs, and Signatures which reduce a stream of data
+ to a single value.
+
+
+
+ Return a "sink" stream which only exists to update the implementing object.
+ A stream to write to in order to update the implementing object.
+
+
+
+ Return the result of processing the stream. This value is only available once the stream
+ has been closed.
+
+ The result of processing the stream.
+
+
+ Return the name of the algorithm the signer implements.
+
+ @return the name of the algorithm the signer implements.
+
+
+ Initialise the signer for signing or verification.
+
+ @param forSigning true if for signing, false otherwise
+ @param param necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+ reset the internal state
+
+
+ Signer with message recovery.
+
+
+ Returns true if the signer has recovered the full message as
+ part of signature verification.
+
+ @return true if full message recovered.
+
+
+ Returns a reference to what message was recovered (if any).
+
+ @return full/partial message, null if nothing.
+
+
+ Perform an update with the recovered message before adding any other data. This must
+ be the first update method called, and calling it will result in the signer assuming
+ that further calls to update will include message content past what is recoverable.
+
+ @param signature the signature that we are in the process of verifying.
+ @throws IllegalStateException
+
+
+ The interface stream ciphers conform to.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ If true the cipher is initialised for encryption,
+ if false for decryption.
+ The key and other data required by the cipher.
+
+ If the parameters argument is inappropriate.
+
+
+
+ encrypt/decrypt a single byte returning the result.
+ the byte to be processed.
+ the result of processing the input byte.
+
+
+
+ Process a block of bytes from input putting the result into output .
+
+ The input byte array.
+
+ The offset into input where the data to be processed starts.
+
+ The number of bytes to be processed.
+ The output buffer the processed bytes go into.
+
+ The offset into output the processed data starts at.
+
+ If the output buffer is too small.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+
+ Operators that reduce their input to the validation of a signature produce this type.
+
+
+
+
+ Return true if the passed in data matches what is expected by the verification result.
+
+ The bytes representing the signature.
+ true if the signature verifies, false otherwise.
+
+
+
+ Return true if the length bytes from off in the source array match the signature
+ expected by the verification result.
+
+ Byte array containing the signature.
+ The offset into the source array where the signature starts.
+ The number of bytes in source making up the signature.
+ true if the signature verifies, false otherwise.
+
+
+
+ Base interface for operators that serve as stream-based signature verifiers.
+
+
+
+ The algorithm details object for this verifier.
+
+
+
+ Create a stream calculator for this verifier. The stream
+ calculator is used for the actual operation of entering the data to be verified
+ and producing a result which can be used to verify the original signature.
+
+ A calculator producing an IVerifier which can verify the signature.
+
+
+
+ Base interface for a provider to support the dynamic creation of signature verifiers.
+
+
+
+
+ Return a signature verfier for signature algorithm described in the passed in algorithm details object.
+
+ The details of the signature algorithm verification is required for.
+ A new signature verifier.
+
+
+ The name of the algorithm this cipher implements.
+
+
+
+ With FIPS PUB 202 a new kind of message digest was announced which supported extendable output, or variable digest sizes.
+ This interface provides the extra method required to support variable output on a digest implementation.
+
+
+
+ Output the results of the final calculation for this digest to outLen number of bytes.
+
+ @param out output array to write the output bytes to.
+ @param outOff offset to start writing the bytes at.
+ @param outLen the number of output bytes requested.
+ @return the number of bytes written
+
+
+ this exception is thrown whenever we find something we don't expect in a
+ message.
+
+
+ base constructor.
+
+
+ create a InvalidCipherTextException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+ The base class for parameters to key generators.
+
+
+ initialise the generator with a source of randomness
+ and a strength (in bits).
+
+ @param random the random byte source.
+ @param strength the size, in bits, of the keys we want to produce.
+
+
+ return the random source associated with this
+ generator.
+
+ @return the generators random source.
+
+
+ return the bit strength for keys produced by this generator,
+
+ @return the strength of the keys this generator produces (in bits).
+
+
+
+ This exception is thrown whenever a cipher requires a change of key, iv
+ or similar after x amount of bytes enciphered
+
+
+
+ super class for all Password Based Encyrption (Pbe) parameter generator classes.
+
+
+ base constructor.
+
+
+ initialise the Pbe generator.
+
+ @param password the password converted into bytes (see below).
+ @param salt the salt to be mixed with the password.
+ @param iterationCount the number of iterations the "mixing" function
+ is to be applied for.
+
+
+ return the password byte array.
+
+ @return the password byte array.
+
+
+ return the salt byte array.
+
+ @return the salt byte array.
+
+
+ return the iteration count.
+
+ @return the iteration count.
+
+
+ Generate derived parameters for a key of length keySize.
+
+ @param keySize the length, in bits, of the key required.
+ @return a parameters object representing a key.
+
+
+ Generate derived parameters for a key of length keySize, and
+ an initialisation vector (IV) of length ivSize.
+
+ @param keySize the length, in bits, of the key required.
+ @param ivSize the length, in bits, of the iv required.
+ @return a parameters object representing a key and an IV.
+
+
+ Generate derived parameters for a key of length keySize, specifically
+ for use with a MAC.
+
+ @param keySize the length, in bits, of the key required.
+ @return a parameters object representing a key.
+
+
+ converts a password to a byte array according to the scheme in
+ Pkcs5 (ascii, no padding)
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ converts a password to a byte array according to the scheme in
+ PKCS5 (UTF-8, no padding)
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ converts a password to a byte array according to the scheme in
+ Pkcs12 (unicode, big endian, 2 zero pad bytes at the end).
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ An EntropySourceProvider where entropy generation is based on a SecureRandom output using SecureRandom.generateSeed().
+
+
+ Create a entropy source provider based on the passed in SecureRandom.
+
+ @param secureRandom the SecureRandom to base EntropySource construction on.
+ @param isPredictionResistant boolean indicating if the SecureRandom is based on prediction resistant entropy or not (true if it is).
+
+
+ Return an entropy source that will create bitsRequired bits of entropy on
+ each invocation of getEntropy().
+
+ @param bitsRequired size (in bits) of entropy to be created by the provided source.
+ @return an EntropySource that generates bitsRequired bits of entropy on each call to its getEntropy() method.
+
+
+ A SP800-90A CTR DRBG.
+
+
+ Construct a SP800-90A CTR DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param engine underlying block cipher to use to support DRBG
+ @param keySizeInBits size of the key to use with the block cipher.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each internal round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Pad out a key for TDEA, setting odd parity for each byte.
+
+ @param keyMaster
+ @param keyOff
+ @param tmp
+ @param tmpOff
+
+
+ Used by both Dual EC and Hash.
+
+
+ A SP800-90A Hash DRBG.
+
+
+ Construct a SP800-90A Hash DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param digest source digest to use for DRB stream.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each internal round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ A SP800-90A HMAC DRBG.
+
+
+ Construct a SP800-90A Hash DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param hMac Hash MAC to base the DRBG on.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Interface to SP800-90A deterministic random bit generators.
+
+
+ Return the block size of the DRBG.
+
+ @return the block size (in bits) produced by each round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Generate numBytes worth of entropy from the passed in entropy source.
+
+ @param entropySource the entropy source to request the data from.
+ @param numBytes the number of bytes of entropy requested.
+ @return a byte array populated with the random data.
+
+
+ Builder class for making SecureRandom objects based on SP 800-90A Deterministic Random Bit Generators (DRBG).
+
+
+ Basic constructor, creates a builder using an EntropySourceProvider based on the default SecureRandom with
+ predictionResistant set to false.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the default SecureRandom does for its generateSeed() call.
+
+
+
+ Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value
+ for prediction resistance.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the passed in SecureRandom does for its generateSeed() call.
+
+ @param entropySource
+ @param predictionResistant
+
+
+ Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.
+
+ Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored.
+
+ @param entropySourceProvider a provider of EntropySource objects.
+
+
+ Set the personalization string for DRBG SecureRandoms created by this builder
+ @param personalizationString the personalisation string for the underlying DRBG.
+ @return the current builder.
+
+
+ Set the security strength required for DRBGs used in building SecureRandom objects.
+
+ @param securityStrength the security strength (in bits)
+ @return the current builder.
+
+
+ Set the amount of entropy bits required for seeding and reseeding DRBGs used in building SecureRandom objects.
+
+ @param entropyBitsRequired the number of bits of entropy to be requested from the entropy source on each seed/reseed.
+ @return the current builder.
+
+
+ Build a SecureRandom based on a SP 800-90A Hash DRBG.
+
+ @param digest digest algorithm to use in the DRBG underneath the SecureRandom.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a Hash DRBG.
+
+
+ Build a SecureRandom based on a SP 800-90A CTR DRBG.
+
+ @param cipher the block cipher to base the DRBG on.
+ @param keySizeInBits key size in bits to be used with the block cipher.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a CTR DRBG.
+
+
+ Build a SecureRandom based on a SP 800-90A HMAC DRBG.
+
+ @param hMac HMAC algorithm to use in the DRBG underneath the SecureRandom.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a HMAC DRBG.
+
+
+
+ @param engine
+ @param entropySource
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the RNG.
+
+
+ Basic constructor, creates a builder using an EntropySourceProvider based on the default SecureRandom with
+ predictionResistant set to false.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the default SecureRandom does for its generateSeed() call.
+
+
+
+ Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value
+ for prediction resistance.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the passed in SecureRandom does for its generateSeed() call.
+
+ @param entropySource
+ @param predictionResistant
+
+
+ Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.
+
+ Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored.
+
+ @param entropySourceProvider a provider of EntropySource objects.
+
+
+ Construct a X9.31 secure random generator using the passed in engine and key. If predictionResistant is true the
+ generator will be reseeded on each request.
+
+ @param engine a block cipher to use as the operator.
+ @param key the block cipher key to initialise engine with.
+ @param predictionResistant true if engine to be reseeded on each use, false otherwise.
+ @return a SecureRandom.
+
+
+
+ Uses Microsoft's RNGCryptoServiceProvider
+
+
+
+ Random generation based on the digest with counter. Calling AddSeedMaterial will
+ always increase the entropy of the hash.
+
+ Internal access to the digest is synchronized so a single one of these can be shared.
+
+
+
+ Generic interface for objects generating random bytes.
+
+
+ Add more seed material to the generator.
+ A byte array to be mixed into the generator's state.
+
+
+ Add more seed material to the generator.
+ A long value to be mixed into the generator's state.
+
+
+ Fill byte array with random values.
+ Array to be filled.
+
+
+ Fill byte array with random values.
+ Array to receive bytes.
+ Index to start filling at.
+ Length of segment to fill.
+
+
+
+ Takes bytes generated by an underling RandomGenerator and reverses the order in
+ each small window (of configurable size).
+
+ Access to internals is synchronized so a single one of these can be shared.
+
+
+
+
+ Add more seed material to the generator.
+ A byte array to be mixed into the generator's state.
+
+
+ Add more seed material to the generator.
+ A long value to be mixed into the generator's state.
+
+
+ Fill byte array with random values.
+ Array to be filled.
+
+
+ Fill byte array with random values.
+ Array to receive bytes.
+ Index to start filling at.
+ Length of segment to fill.
+
+
+ A thread based seed generator - one source of randomness.
+
+ Based on an idea from Marcus Lippert.
+
+
+
+ Generate seed bytes. Set fast to false for best quality.
+
+ If fast is set to true, the code should be round about 8 times faster when
+ generating a long sequence of random bytes. 20 bytes of random values using
+ the fast mode take less than half a second on a Nokia e70. If fast is set to false,
+ it takes round about 2500 ms.
+
+ @param numBytes the number of bytes to generate
+ @param fast true if fast mode should be used
+
+
+
+ Permutation generated by code:
+
+ // First 1850 fractional digit of Pi number.
+ byte[] key = new BigInteger("14159265358979323846...5068006422512520511").ToByteArray();
+ s = 0;
+ P = new byte[256];
+ for (int i = 0; i < 256; i++)
+ {
+ P[i] = (byte) i;
+ }
+ for (int m = 0; m < 768; m++)
+ {
+ s = P[(s + P[m & 0xff] + key[m % key.length]) & 0xff];
+ byte temp = P[m & 0xff];
+ P[m & 0xff] = P[s & 0xff];
+ P[s & 0xff] = temp;
+ }
+
+
+
+ Value generated in the same way as P .
+
+
+ a wrapper for block ciphers with a single byte block size, so that they
+ can be treated like stream ciphers.
+
+
+ basic constructor.
+
+ @param cipher the block cipher to be wrapped.
+ @exception ArgumentException if the cipher has a block size other than
+ one.
+
+
+ initialise the underlying cipher.
+
+ @param forEncryption true if we are setting up for encryption, false otherwise.
+ @param param the necessary parameters for the underlying cipher to be initialised.
+
+
+ return the name of the algorithm we are wrapping.
+
+ @return the name of the algorithm we are wrapping.
+
+
+ encrypt/decrypt a single byte returning the result.
+
+ @param in the byte to be processed.
+ @return the result of processing the input byte.
+
+
+ process a block of bytes from in putting the result into out.
+
+ @param in the input byte array.
+ @param inOff the offset into the in array where the data to be processed starts.
+ @param len the number of bytes to be processed.
+ @param out the output buffer the processed bytes go into.
+ @param outOff the offset into the output byte array the processed data stars at.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ reset the underlying cipher. This leaves it in the same state
+ it was at after the last init (if there was one).
+
+
+ a Diffie-Hellman key exchange engine.
+
+ note: This uses MTI/A0 key agreement in order to make the key agreement
+ secure against passive attacks. If you're doing Diffie-Hellman and both
+ parties have long term public keys you should look at using this. For
+ further information have a look at RFC 2631.
+
+ It's possible to extend this to more than two parties as well, for the moment
+ that is left as an exercise for the reader.
+
+
+ calculate our initial message.
+
+
+ given a message from a given party and the corresponding public key
+ calculate the next message in the agreement sequence. In this case
+ this will represent the shared secret.
+
+
+ a Diffie-Hellman key agreement class.
+
+ note: This is only the basic algorithm, it doesn't take advantage of
+ long term public keys if they are available. See the DHAgreement class
+ for a "better" implementation.
+
+
+ given a short term public key from a given party calculate the next
+ message in the agreement sequence.
+
+
+ Standard Diffie-Hellman groups from various IETF specifications.
+
+
+ P1363 7.2.1 ECSVDP-DH
+
+ ECSVDP-DH is Elliptic Curve Secret Value Derivation Primitive,
+ Diffie-Hellman version. It is based on the work of [DH76], [Mil86],
+ and [Kob87]. This primitive derives a shared secret value from one
+ party's private key and another party's public key, where both have
+ the same set of EC domain parameters. If two parties correctly
+ execute this primitive, they will produce the same output. This
+ primitive can be invoked by a scheme to derive a shared secret key;
+ specifically, it may be used with the schemes ECKAS-DH1 and
+ DL/ECKAS-DH2. It assumes that the input keys are valid (see also
+ Section 7.2.2).
+
+
+ P1363 7.2.2 ECSVDP-DHC
+
+ ECSVDP-DHC is Elliptic Curve Secret Value Derivation Primitive,
+ Diffie-Hellman version with cofactor multiplication. It is based on
+ the work of [DH76], [Mil86], [Kob87], [LMQ98] and [Kal98a]. This
+ primitive derives a shared secret value from one party's private key
+ and another party's public key, where both have the same set of EC
+ domain parameters. If two parties correctly execute this primitive,
+ they will produce the same output. This primitive can be invoked by a
+ scheme to derive a shared secret key; specifically, it may be used
+ with the schemes ECKAS-DH1 and DL/ECKAS-DH2. It does not assume the
+ validity of the input public key (see also Section 7.2.1).
+
+ Note: As stated P1363 compatibility mode with ECDH can be preset, and
+ in this case the implementation doesn't have a ECDH compatibility mode
+ (if you want that just use ECDHBasicAgreement and note they both implement
+ BasicAgreement!).
+
+
+
+ A participant in a Password Authenticated Key Exchange by Juggling (J-PAKE) exchange.
+
+ The J-PAKE exchange is defined by Feng Hao and Peter Ryan in the paper
+
+ "Password Authenticated Key Exchange by Juggling, 2008."
+
+ The J-PAKE protocol is symmetric.
+ There is no notion of a client or server , but rather just two participants .
+ An instance of JPakeParticipant represents one participant, and
+ is the primary interface for executing the exchange.
+
+ To execute an exchange, construct a JPakeParticipant on each end,
+ and call the following 7 methods
+ (once and only once, in the given order, for each participant, sending messages between them as described):
+
+ CreateRound1PayloadToSend() - and send the payload to the other participant
+ ValidateRound1PayloadReceived(JPakeRound1Payload) - use the payload received from the other participant
+ CreateRound2PayloadToSend() - and send the payload to the other participant
+ ValidateRound2PayloadReceived(JPakeRound2Payload) - use the payload received from the other participant
+ CalculateKeyingMaterial()
+ CreateRound3PayloadToSend(BigInteger) - and send the payload to the other participant
+ ValidateRound3PayloadReceived(JPakeRound3Payload, BigInteger) - use the payload received from the other participant
+
+ Each side should derive a session key from the keying material returned by CalculateKeyingMaterial().
+ The caller is responsible for deriving the session key using a secure key derivation function (KDF).
+
+ Round 3 is an optional key confirmation process.
+ If you do not execute round 3, then there is no assurance that both participants are using the same key.
+ (i.e. if the participants used different passwords, then their session keys will differ.)
+
+ If the round 3 validation succeeds, then the keys are guaranteed to be the same on both sides.
+
+ The symmetric design can easily support the asymmetric cases when one party initiates the communication.
+ e.g. Sometimes the round1 payload and round2 payload may be sent in one pass.
+ Also, in some cases, the key confirmation payload can be sent together with the round2 payload.
+ These are the trivial techniques to optimize the communication.
+
+ The key confirmation process is implemented as specified in
+ NIST SP 800-56A Revision 1 ,
+ Section 8.2 Unilateral Key Confirmation for Key Agreement Schemes.
+
+ This class is stateful and NOT threadsafe.
+ Each instance should only be used for ONE complete J-PAKE exchange
+ (i.e. a new JPakeParticipant should be constructed for each new J-PAKE exchange).
+
+
+
+
+ Convenience constructor for a new JPakeParticipant that uses
+ the JPakePrimeOrderGroups#NIST_3072 prime order group,
+ a SHA-256 digest, and a default SecureRandom implementation.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+
+
+
+ Convenience constructor for a new JPakeParticipant that uses
+ a SHA-256 digest, and a default SecureRandom implementation.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+ Prime order group. See JPakePrimeOrderGroups for standard groups.
+
+
+
+ Constructor for a new JPakeParticipant.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+ Prime order group. See JPakePrimeOrderGroups for standard groups.
+ Digest to use during zero knowledge proofs and key confirmation
+ (SHA-256 or stronger preferred).
+ Source of secure random data for x1 and x2, and for the zero knowledge proofs.
+
+
+
+ Gets the current state of this participant.
+ See the STATE_* constants for possible values.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 1.
+
+ After execution, the State state} will be STATE_ROUND_1_CREATED}.
+
+
+
+
+ Validates the payload received from the other participant during round 1.
+
+ Must be called prior to CreateRound2PayloadToSend().
+
+ After execution, the State state will be STATE_ROUND_1_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws InvalidOperationException
+ if called multiple times.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 2.
+
+ ValidateRound1PayloadReceived(JPakeRound1Payload) must be called prior to this method.
+
+ After execution, the State state will be STATE_ROUND_2_CREATED.
+
+ Throws InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times
+
+
+
+
+ Validates the payload received from the other participant during round 2.
+ Note that this DOES NOT detect a non-common password.
+ The only indication of a non-common password is through derivation
+ of different keys (which can be detected explicitly by executing round 3 and round 4)
+
+ Must be called prior to CalculateKeyingMaterial().
+
+ After execution, the State state will be STATE_ROUND_2_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws
+ InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times
+
+
+
+
+ Calculates and returns the key material.
+ A session key must be derived from this key material using a secure key derivation function (KDF).
+ The KDF used to derive the key is handled externally (i.e. not by JPakeParticipant).
+
+ The keying material will be identical for each participant if and only if
+ each participant's password is the same. i.e. If the participants do not
+ share the same password, then each participant will derive a different key.
+ Therefore, if you immediately start using a key derived from
+ the keying material, then you must handle detection of incorrect keys.
+ If you want to handle this detection explicitly, you can optionally perform
+ rounds 3 and 4. See JPakeParticipant for details on how to execute
+ rounds 3 and 4.
+
+ The keying material will be in the range [0, p-1] .
+
+ ValidateRound2PayloadReceived(JPakeRound2Payload) must be called prior to this method.
+
+ As a side effect, the internal password array is cleared, since it is no longer needed.
+
+ After execution, the State state will be STATE_KEY_CALCULATED.
+
+ Throws InvalidOperationException if called prior to ValidateRound2PayloadReceived(JPakeRound2Payload),
+ or if called multiple times.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 3.
+
+ See JPakeParticipant for more details on round 3.
+
+ After execution, the State state} will be STATE_ROUND_3_CREATED.
+ Throws InvalidOperationException if called prior to CalculateKeyingMaterial, or multiple
+ times.
+
+ The keying material as returned from CalculateKeyingMaterial().
+
+
+
+ Validates the payload received from the other participant during round 3.
+
+ See JPakeParticipant for more details on round 3.
+
+ After execution, the State state will be STATE_ROUND_3_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws InvalidOperationException if called prior to
+ CalculateKeyingMaterial or multiple times
+
+ The round 3 payload received from the other participant.
+ The keying material as returned from CalculateKeyingMaterial().
+
+
+
+ A pre-computed prime order group for use during a J-PAKE exchange.
+
+ Typically a Schnorr group is used. In general, J-PAKE can use any prime order group
+ that is suitable for public key cryptography, including elliptic curve cryptography.
+
+ See JPakePrimeOrderGroups for convenient standard groups.
+
+ NIST publishes
+ many groups that can be used for the desired level of security.
+
+
+
+
+ Constructs a new JPakePrimeOrderGroup.
+
+ In general, you should use one of the pre-approved groups from
+ JPakePrimeOrderGroups, rather than manually constructing one.
+
+ The following basic checks are performed:
+
+ p-1 must be evenly divisible by q
+ g must be in [2, p-1]
+ g^q mod p must equal 1
+ p must be prime (within reasonably certainty)
+ q must be prime (within reasonably certainty)
+
+ The prime checks are performed using BigInteger#isProbablePrime(int),
+ and are therefore subject to the same probability guarantees.
+
+ These checks prevent trivial mistakes.
+ However, due to the small uncertainties if p and q are not prime,
+ advanced attacks are not prevented.
+ Use it at your own risk.
+
+ Throws NullReferenceException if any argument is null. Throws
+ InvalidOperationException is any of the above validations fail.
+
+
+
+
+ Constructor used by the pre-approved groups in JPakePrimeOrderGroups.
+ These pre-approved groups can avoid the expensive checks.
+ User-specified groups should not use this constructor.
+
+
+
+
+ Standard pre-computed prime order groups for use by J-PAKE.
+ (J-PAKE can use pre-computed prime order groups, same as DSA and Diffie-Hellman.)
+
+ This class contains some convenient constants for use as input for
+ constructing {@link JPAKEParticipant}s.
+
+ The prime order groups below are taken from Sun's JDK JavaDoc (docs/guide/security/CryptoSpec.html#AppB),
+ and from the prime order groups
+ published by NIST .
+
+
+
+
+ From Sun's JDK JavaDoc (docs/guide/security/CryptoSpec.html#AppB)
+ 1024-bit p, 160-bit q and 1024-bit g for 80-bit security.
+
+
+
+
+ From NIST.
+ 2048-bit p, 224-bit q and 2048-bit g for 112-bit security.
+
+
+
+
+ From NIST.
+ 3072-bit p, 256-bit q and 3072-bit g for 128-bit security.
+
+
+
+
+ The payload sent/received during the first round of a J-PAKE exchange.
+
+ Each JPAKEParticipant creates and sends an instance of this payload to
+ the other. The payload to send should be created via
+ JPAKEParticipant.CreateRound1PayloadToSend().
+
+ Each participant must also validate the payload received from the other.
+ The received payload should be validated via
+ JPAKEParticipant.ValidateRound1PayloadReceived(JPakeRound1Payload).
+
+
+
+
+ The id of the JPAKEParticipant who created/sent this payload.
+
+
+
+
+ The value of g^x1
+
+
+
+
+ The value of g^x2
+
+
+
+
+ The zero knowledge proof for x1.
+
+ This is a two element array, containing {g^v, r} for x1.
+
+
+
+
+ The zero knowledge proof for x2.
+
+ This is a two element array, containing {g^v, r} for x2.
+
+
+
+
+ The payload sent/received during the second round of a J-PAKE exchange.
+
+ Each JPAKEParticipant creates and sends an instance
+ of this payload to the other JPAKEParticipant.
+ The payload to send should be created via
+ JPAKEParticipant#createRound2PayloadToSend()
+
+ Each JPAKEParticipant must also validate the payload
+ received from the other JPAKEParticipant.
+ The received payload should be validated via
+ JPAKEParticipant#validateRound2PayloadReceived(JPakeRound2Payload)
+
+
+
+
+ The id of the JPAKEParticipant who created/sent this payload.
+
+
+
+
+ The value of A, as computed during round 2.
+
+
+
+
+ The zero knowledge proof for x2 * s.
+
+ This is a two element array, containing {g^v, r} for x2 * s.
+
+
+
+
+ The payload sent/received during the optional third round of a J-PAKE exchange,
+ which is for explicit key confirmation.
+
+ Each JPAKEParticipant creates and sends an instance
+ of this payload to the other JPAKEParticipant.
+ The payload to send should be created via
+ JPAKEParticipant#createRound3PayloadToSend(BigInteger)
+
+ Eeach JPAKEParticipant must also validate the payload
+ received from the other JPAKEParticipant.
+ The received payload should be validated via
+ JPAKEParticipant#validateRound3PayloadReceived(JPakeRound3Payload, BigInteger)
+
+
+
+
+ The id of the {@link JPAKEParticipant} who created/sent this payload.
+
+
+
+
+ The value of MacTag, as computed by round 3.
+
+ See JPAKEUtil#calculateMacTag(string, string, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, org.bouncycastle.crypto.Digest)
+
+
+
+
+ Primitives needed for a J-PAKE exchange.
+
+ The recommended way to perform a J-PAKE exchange is by using
+ two JPAKEParticipants. Internally, those participants
+ call these primitive operations in JPakeUtilities.
+
+ The primitives, however, can be used without a JPAKEParticipant if needed.
+
+
+
+
+ Return a value that can be used as x1 or x3 during round 1.
+ The returned value is a random value in the range [0, q-1].
+
+
+
+
+ Return a value that can be used as x2 or x4 during round 1.
+ The returned value is a random value in the range [1, q-1].
+
+
+
+
+ Converts the given password to a BigInteger
+ for use in arithmetic calculations.
+
+
+
+
+ Calculate g^x mod p as done in round 1.
+
+
+
+
+ Calculate ga as done in round 2.
+
+
+
+
+ Calculate x2 * s as done in round 2.
+
+
+
+
+ Calculate A as done in round 2.
+
+
+
+
+ Calculate a zero knowledge proof of x using Schnorr's signature.
+ The returned array has two elements {g^v, r = v-x*h} for x.
+
+
+
+
+ Validates that g^x4 is not 1.
+ throws CryptoException if g^x4 is 1
+
+
+
+
+ Validates that ga is not 1.
+
+ As described by Feng Hao...
+ Alice could simply check ga != 1 to ensure it is a generator.
+ In fact, as we will explain in Section 3, (x1 + x3 + x4 ) is random over Zq even in the face of active attacks.
+ Hence, the probability for ga = 1 is extremely small - on the order of 2^160 for 160-bit q.
+
+ throws CryptoException if ga is 1
+
+
+
+
+ Validates the zero knowledge proof (generated by
+ calculateZeroKnowledgeProof(BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, string, Digest, SecureRandom)
+ is correct.
+
+ throws CryptoException if the zero knowledge proof is not correct
+
+
+
+
+ Calculates the keying material, which can be done after round 2 has completed.
+ A session key must be derived from this key material using a secure key derivation function (KDF).
+ The KDF used to derive the key is handled externally (i.e. not by JPAKEParticipant).
+
+ KeyingMaterial = (B/g^{x2*x4*s})^x2
+
+
+
+
+ Validates that the given participant ids are not equal.
+ (For the J-PAKE exchange, each participant must use a unique id.)
+
+ Throws CryptoException if the participantId strings are equal.
+
+
+
+
+ Validates that the given participant ids are equal.
+ This is used to ensure that the payloads received from
+ each round all come from the same participant.
+
+
+
+
+ Validates that the given object is not null.
+ throws NullReferenceException if the object is null.
+
+ object in question
+ name of the object (to be used in exception message)
+
+
+
+ Calculates the MacTag (to be used for key confirmation), as defined by
+ NIST SP 800-56A Revision 1 ,
+ Section 8.2 Unilateral Key Confirmation for Key Agreement Schemes.
+
+ MacTag = HMAC(MacKey, MacLen, MacData)
+ MacKey = H(K || "JPAKE_KC")
+ MacData = "KC_1_U" || participantId || partnerParticipantId || gx1 || gx2 || gx3 || gx4
+
+ Note that both participants use "KC_1_U" because the sender of the round 3 message
+ is always the initiator for key confirmation.
+
+ HMAC = {@link HMac} used with the given {@link Digest}
+ H = The given {@link Digest}
+ MacLen = length of MacTag
+
+
+
+
+ Calculates the MacKey (i.e. the key to use when calculating the MagTag for key confirmation).
+
+ MacKey = H(K || "JPAKE_KC")
+
+
+
+
+ Validates the MacTag received from the partner participant.
+
+ throws CryptoException if the participantId strings are equal.
+
+
+
+ RFC 2631 Diffie-hellman KEK derivation function.
+
+
+ X9.63 based key derivation function for ECDH CMS.
+
+
+ Implements the client side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe.
+ This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper
+ "SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002"
+
+
+ Initialises the client to begin new authentication attempt
+ @param N The safe prime associated with the client's verifier
+ @param g The group parameter associated with the client's verifier
+ @param digest The digest algorithm associated with the client's verifier
+ @param random For key generation
+
+
+ Generates client's credentials given the client's salt, identity and password
+ @param salt The salt used in the client's verifier.
+ @param identity The user's identity (eg. username)
+ @param password The user's password
+ @return Client's public value to send to server
+
+
+ Generates client's verification message given the server's credentials
+ @param serverB The server's credentials
+ @return Client's verification message for the server
+ @throws CryptoException If server's credentials are invalid
+
+
+ Computes the client evidence message M1 using the previously received values.
+ To be called after calculating the secret S.
+ @return M1: the client side generated evidence message
+ @throws CryptoException
+
+
+ Authenticates the server evidence message M2 received and saves it only if correct.
+ @param M2: the server side generated evidence message
+ @return A boolean indicating if the server message M2 was the expected one.
+ @throws CryptoException
+
+
+ Computes the final session key as a result of the SRP successful mutual authentication
+ To be called after verifying the server evidence message M2.
+ @return Key: the mutually authenticated symmetric session key
+ @throws CryptoException
+
+
+ Implements the server side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe.
+ This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper
+ "SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002"
+
+
+ Initialises the server to accept a new client authentication attempt
+ @param N The safe prime associated with the client's verifier
+ @param g The group parameter associated with the client's verifier
+ @param v The client's verifier
+ @param digest The digest algorithm associated with the client's verifier
+ @param random For key generation
+
+
+ Generates the server's credentials that are to be sent to the client.
+ @return The server's public value to the client
+
+
+ Processes the client's credentials. If valid the shared secret is generated and returned.
+ @param clientA The client's credentials
+ @return A shared secret BigInteger
+ @throws CryptoException If client's credentials are invalid
+
+
+ Authenticates the received client evidence message M1 and saves it only if correct.
+ To be called after calculating the secret S.
+ @param M1: the client side generated evidence message
+ @return A boolean indicating if the client message M1 was the expected one.
+ @throws CryptoException
+
+
+ Computes the server evidence message M2 using the previously verified values.
+ To be called after successfully verifying the client evidence message M1.
+ @return M2: the server side generated evidence message
+ @throws CryptoException
+
+
+ Computes the final session key as a result of the SRP successful mutual authentication
+ To be called after calculating the server evidence message M2.
+ @return Key: the mutual authenticated symmetric session key
+ @throws CryptoException
+
+
+ Computes the client evidence message (M1) according to the standard routine:
+ M1 = H( A | B | S )
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param A The public client value
+ @param B The public server value
+ @param S The secret calculated by both sides
+ @return M1 The calculated client evidence message
+
+
+ Computes the server evidence message (M2) according to the standard routine:
+ M2 = H( A | M1 | S )
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param A The public client value
+ @param M1 The client evidence message
+ @param S The secret calculated by both sides
+ @return M2 The calculated server evidence message
+
+
+ Computes the final Key according to the standard routine: Key = H(S)
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param S The secret calculated by both sides
+ @return
+
+
+ Generates new SRP verifier for user
+
+
+ Initialises generator to create new verifiers
+ @param N The safe prime to use (see DHParametersGenerator)
+ @param g The group parameter to use (see DHParametersGenerator)
+ @param digest The digest to use. The same digest type will need to be used later for the actual authentication
+ attempt. Also note that the final session key size is dependent on the chosen digest.
+
+
+ Creates a new SRP verifier
+ @param salt The salt to use, generally should be large and random
+ @param identity The user's identifying information (eg. username)
+ @param password The user's password
+ @return A new verifier for use in future SRP authentication
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ ISO 9796-1 padding. Note in the light of recent results you should
+ only use this with RSA (rather than the "simpler" Rabin keys) and you
+ should never use it with anything other than a hash (ie. even if the
+ message is small don't sign the message, sign it's hash) or some "random"
+ value. See your favorite search engine for details.
+
+
+ return the input block size. The largest message we can process
+ is (key_size_in_bits + 3)/16, which in our world comes to
+ key_size_in_bytes / 2.
+
+
+ return the maximum possible size for the output.
+
+
+ set the number of bits in the next message to be treated as
+ pad bits.
+
+
+ retrieve the number of pad bits in the last decoded message.
+
+
+ @exception InvalidCipherTextException if the decrypted block is not a valid ISO 9796 bit string
+
+
+ Optimal Asymmetric Encryption Padding (OAEP) - see PKCS 1 V 2.
+
+
+ @exception InvalidCipherTextException if the decrypted block turns out to
+ be badly formatted.
+
+
+ int to octet string.
+
+
+ mask generator function, as described in PKCS1v2.
+
+
+ this does your basic Pkcs 1 v1.5 padding - whether or not you should be using this
+ depends on your application - see Pkcs1 Version 2 for details.
+
+
+ some providers fail to include the leading zero in PKCS1 encoded blocks. If you need to
+ work with one of these set the system property Org.BouncyCastle.Pkcs1.Strict to false.
+
+
+ The same effect can be achieved by setting the static property directly
+
+ The static property is checked during construction of the encoding object, it is set to
+ true by default.
+
+
+
+ Basic constructor.
+ @param cipher
+
+
+ Constructor for decryption with a fixed plaintext length.
+
+ @param cipher The cipher to use for cryptographic operation.
+ @param pLen Length of the expected plaintext.
+
+
+ Constructor for decryption with a fixed plaintext length and a fallback
+ value that is returned, if the padding is incorrect.
+
+ @param cipher
+ The cipher to use for cryptographic operation.
+ @param fallback
+ The fallback value, we don't to a arraycopy here.
+
+
+ Checks if the argument is a correctly PKCS#1.5 encoded Plaintext
+ for encryption.
+
+ @param encoded The Plaintext.
+ @param pLen Expected length of the plaintext.
+ @return Either 0, if the encoding is correct, or -1, if it is incorrect.
+
+
+ Decode PKCS#1.5 encoding, and return a random value if the padding is not correct.
+
+ @param in The encrypted block.
+ @param inOff Offset in the encrypted block.
+ @param inLen Length of the encrypted block.
+ @param pLen Length of the desired output.
+ @return The plaintext without padding, or a random value if the padding was incorrect.
+
+ @throws InvalidCipherTextException
+
+
+ @exception InvalidCipherTextException if the decrypted block is not in Pkcs1 format.
+
+
+ Basic KDF generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on ISO 18033/P1363a.
+
+
+ Construct a KDF Parameters generator.
+
+ @param counterStart value of counter.
+ @param digest the digest to be used as the source of derived keys.
+
+
+ return the underlying digest.
+
+
+ fill len bytes of the output buffer with bytes generated from
+ the derivation function.
+
+ @throws ArgumentException if the size of the request will cause an overflow.
+ @throws DataLengthException if the out buffer is too small.
+
+
+ a basic Diffie-Hellman key pair generator.
+
+ This generates keys consistent for use with the basic algorithm for
+ Diffie-Hellman.
+
+
+ a Diffie-Hellman key pair generator.
+
+ This generates keys consistent for use in the MTI/A0 key agreement protocol
+ as described in "Handbook of Applied Cryptography", Pages 516-519.
+
+
+ which Generates the p and g values from the given parameters,
+ returning the DHParameters object.
+
+ Note: can take a while...
+
+
+ initialise the key generator - if strength is set to zero
+ the key Generated will be 192 bits in size, otherwise
+ strength can be 128 or 192 (or 112 or 168 if you don't count
+ parity bits), depending on whether you wish to do 2-key or 3-key
+ triple DES.
+
+ @param param the parameters to be used for key generation
+
+
+ initialise the key generator - if strength is set to zero
+ the key generated will be 64 bits in size, otherwise
+ strength can be 64 or 56 bits (if you don't count the parity bits).
+
+ @param param the parameters to be used for key generation
+
+
+ a DSA key pair generator.
+
+ This Generates DSA keys in line with the method described
+ in FIPS 186-3 B.1 FFC Key Pair Generation .
+
+
+ Generate suitable parameters for DSA, in line with FIPS 186-2, or FIPS 186-3.
+
+
+ Initialise the generator
+ This form can only be used for older DSA (pre-DSA2) parameters
+ the size of keys in bits (from 512 up to 1024, and a multiple of 64)
+ measure of robustness of primes (at least 80 for FIPS 186-2 compliance)
+ the source of randomness to use
+
+
+ Initialise the generator for DSA 2
+ You must use this Init method if you need to generate parameters for DSA 2 keys
+ An instance of DsaParameterGenerationParameters used to configure this generator
+
+
+ Generates a set of DsaParameters
+ Can take a while...
+
+
+ generate suitable parameters for DSA, in line with
+ FIPS 186-3 A.1 Generation of the FFC Primes p and q .
+
+
+ Given the domain parameters this routine generates an EC key
+ pair in accordance with X9.62 section 5.2.1 pages 26, 27.
+
+
+ a ElGamal key pair generator.
+
+ This Generates keys consistent for use with ElGamal as described in
+ page 164 of "Handbook of Applied Cryptography".
+
+
+ * which Generates the p and g values from the given parameters,
+ * returning the ElGamalParameters object.
+ *
+ * Note: can take a while...
+ *
+
+
+ a GOST3410 key pair generator.
+ This generates GOST3410 keys in line with the method described
+ in GOST R 34.10-94.
+
+
+ generate suitable parameters for GOST3410.
+
+
+ initialise the key generator.
+
+ @param size size of the key
+ @param typeProcedure type procedure A,B = 1; A',B' - else
+ @param random random byte source.
+
+
+ Procedure C
+ procedure generates the a value from the given p,q,
+ returning the a value.
+
+
+ which generates the p , q and a values from the given parameters,
+ returning the Gost3410Parameters object.
+
+
+ KFD2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on IEEE P1363/ISO 18033.
+
+
+ Construct a KDF1 byte generator.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ KDF2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on IEEE P1363/ISO 18033.
+
+
+ Construct a KDF2 bytes generator. Generates key material
+ according to IEEE P1363 or ISO 18033 depending on the initialisation.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ Generator for MGF1 as defined in Pkcs 1v2
+
+
+ @param digest the digest to be used as the source of Generated bytes
+
+
+ return the underlying digest.
+
+
+ int to octet string.
+
+
+ fill len bytes of the output buffer with bytes Generated from
+ the derivation function.
+
+ @throws DataLengthException if the out buffer is too small.
+
+
+ Key generation parameters for NaccacheStern cipher. For details on this cipher, please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Generates a permuted ArrayList from the original one. The original List
+ is not modified
+
+ @param arr
+ the ArrayList to be permuted
+ @param rand
+ the source of Randomness for permutation
+ @return a new IList with the permuted elements.
+
+
+ Finds the first 'count' primes starting with 3
+
+ @param count
+ the number of primes to find
+ @return a vector containing the found primes as Integer
+
+
+ Generator for PBE derived keys and ivs as usd by OpenSSL.
+
+ The scheme is a simple extension of PKCS 5 V2.0 Scheme 1 using MD5 with an
+ iteration count of 1.
+
+
+
+ Construct a OpenSSL Parameters generator.
+
+
+ Initialise - note the iteration count for this algorithm is fixed at 1.
+
+ @param password password to use.
+ @param salt salt to use.
+
+
+ the derived key function, the ith hash of the password and the salt.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+ @exception ArgumentException if keySize + ivSize is larger than the base hash size.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 12 V1.0.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs12 Page
+
+
+
+ Construct a Pkcs 12 Parameters generator.
+
+ @param digest the digest to be used as the source of derived keys.
+ @exception ArgumentException if an unknown digest is passed in.
+
+
+ add a + b + 1, returning the result in a. The a value is treated
+ as a BigInteger of length (b.Length * 8) bits. The result is
+ modulo 2^b.Length in case of overflow.
+
+
+ generation of a derived key ala Pkcs12 V1.0.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 5 V2.0 Scheme 1.
+ Note this generator is limited to the size of the hash produced by the
+ digest used to drive it.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs5 Page
+
+
+
+ Construct a Pkcs 5 Scheme 1 Parameters generator.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ the derived key function, the ith hash of the mPassword and the mSalt.
+
+
+ Generate a key parameter derived from the mPassword, mSalt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the mPassword, mSalt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+ @exception ArgumentException if keySize + ivSize is larger than the base hash size.
+
+
+ Generate a key parameter for use with a MAC derived from the mPassword,
+ mSalt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 5 V2.0 Scheme 2.
+ This generator uses a SHA-1 HMac as the calculation function.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs5 Page
+
+
+ construct a Pkcs5 Scheme 2 Parameters generator.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+
+ Generates keys for the Poly1305 MAC.
+
+
+ Poly1305 keys are 256 bit keys consisting of a 128 bit secret key used for the underlying block
+ cipher followed by a 128 bit {@code r} value used for the polynomial portion of the Mac.
+ The {@code r} value has a specific format with some bits required to be cleared, resulting in an
+ effective 106 bit key.
+ A separately generated 256 bit key can be modified to fit the Poly1305 key format by using the
+ {@link #clamp(byte[])} method to clear the required bits.
+
+
+
+
+
+ Initialises the key generator.
+
+
+ Poly1305 keys are always 256 bits, so the key length in the provided parameters is ignored.
+
+
+
+
+ Generates a 256 bit key in the format required for Poly1305 - e.g.
+ k[0] ... k[15], r[0] ... r[15] with the required bits in r cleared
+ as per .
+
+
+
+
+ Modifies an existing 32 byte key value to comply with the requirements of the Poly1305 key by
+ clearing required bits in the r (second 16 bytes) portion of the key.
+ Specifically:
+
+ r[3], r[7], r[11], r[15] have top four bits clear (i.e., are {0, 1, . . . , 15})
+ r[4], r[8], r[12] have bottom two bits clear (i.e., are in {0, 4, 8, . . . , 252})
+
+
+ a 32 byte key value k[0] ... k[15], r[0] ... r[15]
+
+
+
+ Checks a 32 byte key for compliance with the Poly1305 key requirements, e.g.
+ k[0] ... k[15], r[0] ... r[15] with the required bits in r cleared
+ as per .
+
+ Key.
+ if the key is of the wrong length, or has invalid bits set
+ in the r portion of the key.
+
+
+ Generate a random factor suitable for use with RSA blind signatures
+ as outlined in Chaum's blinding and unblinding as outlined in
+ "Handbook of Applied Cryptography", page 475.
+
+
+ Initialise the factor generator
+
+ @param param the necessary RSA key parameters.
+
+
+ Generate a suitable blind factor for the public key the generator was initialised with.
+
+ @return a random blind factor
+
+
+ an RSA key pair generator.
+
+
+ Choose a random prime value for use with RSA
+ the bit-length of the returned prime
+ the RSA public exponent
+ a prime p, with (p-1) relatively prime to e
+
+
+ CMAC - as specified at www.nuee.nagoya-u.ac.jp/labs/tiwata/omac/omac.html
+
+ CMAC is analogous to OMAC1 - see also en.wikipedia.org/wiki/CMAC
+
+ CMAC is a NIST recomendation - see
+ csrc.nist.gov/CryptoToolkit/modes/800-38_Series_Publications/SP800-38B.pdf
+
+ CMAC/OMAC1 is a blockcipher-based message authentication code designed and
+ analyzed by Tetsu Iwata and Kaoru Kurosawa.
+
+ CMAC/OMAC1 is a simple variant of the CBC MAC (Cipher Block Chaining Message
+ Authentication Code). OMAC stands for One-Key CBC MAC.
+
+ It supports 128- or 64-bits block ciphers, with any key size, and returns
+ a MAC with dimension less or equal to the block size of the underlying
+ cipher.
+
+
+
+ create a standard MAC based on a CBC block cipher (64 or 128 bit block).
+ This will produce an authentication code the length of the block size
+ of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8 and @lt;= 128.
+
+
+ Reset the mac generator.
+
+
+ standard CBC Block Cipher MAC - if no padding is specified the default of
+ pad of zeroes is used.
+
+
+ create a standard MAC based on a CBC block cipher. This will produce an
+ authentication code half the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a CBC block cipher. This will produce an
+ authentication code half the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used to complete the last block.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding the padding to be used to complete the last block.
+
+
+ Reset the mac generator.
+
+
+ implements a Cipher-FeedBack (CFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ create a standard MAC based on a CFB block cipher. This will produce an
+ authentication code half the length of the block size of the cipher, with
+ the CFB mode set to 8 bits.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a CFB block cipher. This will produce an
+ authentication code half the length of the block size of the cipher, with
+ the CFB mode set to 8 bits.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CFB mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param cfbBitSize the size of an output block produced by the CFB mode.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CFB mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param cfbBitSize the size of an output block produced by the CFB mode.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding a padding to be used.
+
+
+ Reset the mac generator.
+
+
+
+ The GMAC specialisation of Galois/Counter mode (GCM) detailed in NIST Special Publication
+ 800-38D.
+
+
+ GMac is an invocation of the GCM mode where no data is encrypted (i.e. all input data to the Mac
+ is processed as additional authenticated data with the underlying GCM block cipher).
+
+
+
+
+ Creates a GMAC based on the operation of a block cipher in GCM mode.
+
+
+ This will produce an authentication code the length of the block size of the cipher.
+
+ the cipher to be used in GCM mode to generate the MAC.
+
+
+
+ Creates a GMAC based on the operation of a 128 bit block cipher in GCM mode.
+
+
+ This will produce an authentication code the length of the block size of the cipher.
+
+ the cipher to be used in GCM mode to generate the MAC.
+ the mac size to generate, in bits. Must be a multiple of 8, between 32 and 128 (inclusive).
+ Sizes less than 96 are not recommended, but are supported for specialized applications.
+
+
+
+ Initialises the GMAC - requires a
+ providing a and a nonce.
+
+
+
+ implementation of GOST 28147-89 MAC
+
+
+ HMAC implementation based on RFC2104
+
+ H(K XOR opad, H(K XOR ipad, text))
+
+
+ Reset the mac generator.
+
+
+ DES based CBC Block Cipher MAC according to ISO9797, algorithm 3 (ANSI X9.19 Retail MAC)
+
+ This could as well be derived from CBCBlockCipherMac, but then the property mac in the base
+ class must be changed to protected
+
+
+ create a Retail-MAC based on a CBC block cipher. This will produce an
+ authentication code of the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation. This must
+ be DESEngine.
+
+
+ create a Retail-MAC based on a CBC block cipher. This will produce an
+ authentication code of the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used to complete the last block.
+
+
+ create a Retail-MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses single DES CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses single DES CBC mode as the basis for the
+ MAC generation. The final block is decrypted and then encrypted using the
+ middle and right part of the key.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding the padding to be used to complete the last block.
+
+
+ Reset the mac generator.
+
+
+
+ Poly1305 message authentication code, designed by D. J. Bernstein.
+
+
+ Poly1305 computes a 128-bit (16 bytes) authenticator, using a 128 bit nonce and a 256 bit key
+ consisting of a 128 bit key applied to an underlying cipher, and a 128 bit key (with 106
+ effective key bits) used in the authenticator.
+
+ The polynomial calculation in this implementation is adapted from the public domain poly1305-donna-unrolled C implementation
+ by Andrew M (@floodyberry).
+
+
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Current block of buffered input
+
+
+ Current offset in input buffer
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Constructs a Poly1305 MAC, where the key passed to init() will be used directly.
+
+
+ Constructs a Poly1305 MAC, using a 128 bit block cipher.
+
+
+
+ Initialises the Poly1305 MAC.
+
+ a {@link ParametersWithIV} containing a 128 bit nonce and a {@link KeyParameter} with
+ a 256 bit key complying to the {@link Poly1305KeyGenerator Poly1305 key format}.
+
+
+
+ Implementation of SipHash as specified in "SipHash: a fast short-input PRF", by Jean-Philippe
+ Aumasson and Daniel J. Bernstein (https://131002.net/siphash/siphash.pdf).
+
+
+ "SipHash is a family of PRFs SipHash-c-d where the integer parameters c and d are the number of
+ compression rounds and the number of finalization rounds. A compression round is identical to a
+ finalization round and this round function is called SipRound. Given a 128-bit key k and a
+ (possibly empty) byte string m, SipHash-c-d returns a 64-bit value..."
+
+
+
+ SipHash-2-4
+
+
+ SipHash-c-d
+ the number of compression rounds
+ the number of finalization rounds
+
+
+
+ Implementation of the Skein parameterised MAC function in 256, 512 and 1024 bit block sizes,
+ based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+
+ Constructs a Skein MAC with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/MAC size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Optionally initialises the Skein digest with the provided parameters.
+
+ See for details on the parameterisation of the Skein hash function.
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+ implements Cipher-Block-Chaining (CBC) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of chaining.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CBC".
+
+
+ return the block size of the underlying cipher.
+
+ @return the block size of the underlying cipher.
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ Do the appropriate chaining step for CBC mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate chaining step for CBC mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the decrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Implements the Counter with Cipher Block Chaining mode (CCM) detailed in
+ NIST Special Publication 800-38C.
+
+ Note : this mode is a packet mode - it needs all the data up front.
+
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Returns a byte array containing the mac calculated as part of the
+ last encrypt or decrypt operation.
+
+ @return the last mac calculated.
+
+
+ Process a packet of data for either CCM decryption or encryption.
+
+ @param in data for processing.
+ @param inOff offset at which data starts in the input array.
+ @param inLen length of the data in the input array.
+ @return a byte array containing the processed input..
+ @throws IllegalStateException if the cipher is not appropriately set up.
+ @throws InvalidCipherTextException if the input data is truncated or the mac check fails.
+
+
+ Process a packet of data for either CCM decryption or encryption.
+
+ @param in data for processing.
+ @param inOff offset at which data starts in the input array.
+ @param inLen length of the data in the input array.
+ @param output output array.
+ @param outOff offset into output array to start putting processed bytes.
+ @return the number of bytes added to output.
+ @throws IllegalStateException if the cipher is not appropriately set up.
+ @throws InvalidCipherTextException if the input data is truncated or the mac check fails.
+ @throws DataLengthException if output buffer too short.
+
+
+ implements a Cipher-FeedBack (CFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ A Cipher Text Stealing (CTS) mode cipher. CTS allows block ciphers to
+ be used to produce cipher text which is the same outLength as the plain text.
+
+
+ Create a buffered block cipher that uses Cipher Text Stealing
+
+ @param cipher the underlying block cipher this buffering object wraps.
+
+
+ return the size of the output buffer required for an update of 'length' bytes.
+
+ @param length the outLength of the input.
+ @return the space required to accommodate a call to update
+ with length bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of length bytes.
+
+ @param length the outLength of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with length bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param length the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if cipher text decrypts wrongly (in
+ case the exception will never Get thrown).
+
+
+ A Two-Pass Authenticated-Encryption Scheme Optimized for Simplicity and
+ Efficiency - by M. Bellare, P. Rogaway, D. Wagner.
+
+ http://www.cs.ucdavis.edu/~rogaway/papers/eax.pdf
+
+ EAX is an AEAD scheme based on CTR and OMAC1/CMAC, that uses a single block
+ cipher to encrypt and authenticate data. It's on-line (the length of a
+ message isn't needed to begin processing it), has good performances, it's
+ simple and provably secure (provided the underlying block cipher is secure).
+
+ Of course, this implementations is NOT thread-safe.
+
+
+ Constructor that accepts an instance of a block cipher engine.
+
+ @param cipher the engine to use
+
+
+
+ Implements the Galois/Counter mode (GCM) detailed in
+ NIST Special Publication 800-38D.
+
+
+
+
+ MAC sizes from 32 bits to 128 bits (must be a multiple of 8) are supported. The default is 128 bits.
+ Sizes less than 96 are not recommended, but are supported for specialized applications.
+
+
+
+ implements the GOST 28147 OFB counter mode (GCTR).
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ counter mode (must have a 64 bit block size).
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param encrypting if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param parameters the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/GCTR"
+ and the block size in bits
+
+
+ return the block size we are operating at (in bytes).
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the feedback vector back to the IV and reset the underlying
+ cipher.
+
+
+
+ A block cipher mode that includes authenticated encryption with a streaming mode
+ and optional associated data.
+
+
+
+ The name of the algorithm this cipher implements.
+
+
+ The block cipher underlying this algorithm.
+
+
+ Initialise the cipher.
+ Parameter can either be an AeadParameters or a ParametersWithIV object.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The block size for this cipher, in bytes.
+
+
+ Add a single byte to the associated data check.
+ If the implementation supports it, this will be an online operation and will not retain the associated data.
+ The byte to be processed.
+
+
+ Add a sequence of bytes to the associated data check.
+ If the implementation supports it, this will be an online operation and will not retain the associated data.
+ The input byte array.
+ The offset into the input array where the data to be processed starts.
+ The number of bytes to be processed.
+
+
+ Encrypt/decrypt a single byte.
+
+ @param input the byte to be processed.
+ @param outBytes the output buffer the processed byte goes into.
+ @param outOff the offset into the output byte array the processed data starts at.
+ @return the number of bytes written to out.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ Process a block of bytes from in putting the result into out.
+
+ @param inBytes the input byte array.
+ @param inOff the offset into the in array where the data to be processed starts.
+ @param len the number of bytes to be processed.
+ @param outBytes the output buffer the processed bytes go into.
+ @param outOff the offset into the output byte array the processed data starts at.
+ @return the number of bytes written to out.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ Finish the operation either appending or verifying the MAC at the end of the data.
+
+ @param outBytes space for any resulting output data.
+ @param outOff offset into out to start copying the data at.
+ @return number of bytes written into out.
+ @throws InvalidOperationException if the cipher is in an inappropriate state.
+ @throws InvalidCipherTextException if the MAC fails to match.
+
+
+ Return the value of the MAC associated with the last stream processed.
+
+ @return MAC for plaintext data.
+
+
+ Return the size of the output buffer required for a ProcessBytes
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to ProcessBytes
+ with len bytes of input.
+
+
+ Return the size of the output buffer required for a ProcessBytes plus a
+ DoFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to ProcessBytes and DoFinal
+ with len bytes of input.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+ An implementation of RFC 7253 on The OCB
+ Authenticated-Encryption Algorithm , licensed per:
+
+ License for
+ Open-Source Software Implementations of OCB (Jan 9, 2013) - 'License 1'
+ Under this license, you are authorized to make, use, and distribute open-source software
+ implementations of OCB. This license terminates for you if you sue someone over their open-source
+ software implementation of OCB claiming that you have a patent covering their implementation.
+
+ This is a non-binding summary of a legal document (the link above). The parameters of the license
+ are specified in the license document and that document is controlling.
+
+
+ implements a Output-FeedBack (OFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/OFB"
+ and the block size in bits
+
+
+ return the block size we are operating at (in bytes).
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the feedback vector back to the IV and reset the underlying
+ cipher.
+
+
+ * Implements OpenPGP's rather strange version of Cipher-FeedBack (CFB) mode
+ * on top of a simple cipher. This class assumes the IV has been prepended
+ * to the data stream already, and just accomodates the reset after
+ * (blockSize + 2) bytes have been read.
+ *
+ * For further info see RFC 2440 .
+ *
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/PGPCFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param parameters the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt one byte of data according to CFB mode.
+ @param data the byte to encrypt
+ @param blockOff offset in the current block
+ @returns the encrypted byte
+
+
+ Do the appropriate processing for CFB IV mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB IV mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Implements the Segmented Integer Counter (SIC) mode on top of a simple
+ block cipher.
+
+
+ Basic constructor.
+
+ @param c the block cipher to be used.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Calculator factory class for signature generation in ASN.1 based profiles that use an AlgorithmIdentifier to preserve
+ signature algorithm details.
+
+
+
+
+ Base constructor.
+
+ The name of the signature algorithm to use.
+ The private key to be used in the signing operation.
+
+
+
+ Constructor which also specifies a source of randomness to be used if one is required.
+
+ The name of the signature algorithm to use.
+ The private key to be used in the signing operation.
+ The source of randomness to be used in signature calculation.
+
+
+
+ Allows enumeration of the signature names supported by the verifier provider.
+
+
+
+
+ Verifier class for signature verification in ASN.1 based profiles that use an AlgorithmIdentifier to preserve
+ signature algorithm details.
+
+
+
+
+ Base constructor.
+
+ The name of the signature algorithm to use.
+ The public key to be used in the verification operation.
+
+
+
+ Provider class which supports dynamic creation of signature verifiers.
+
+
+
+
+ Base constructor - specify the public key to be used in verification.
+
+ The public key to be used in creating verifiers provided by this object.
+
+
+
+ Allows enumeration of the signature names supported by the verifier provider.
+
+
+
+ Block cipher padders are expected to conform to this interface
+
+
+ Initialise the padder.
+
+ @param param parameters, if any required.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+ @exception InvalidCipherTextException if the padding is badly formed
+ or invalid.
+
+
+ A padder that adds ISO10126-2 padding to a block.
+
+
+ Initialise the padder.
+
+ @param random a SecureRandom if available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds the padding according to the scheme referenced in
+ ISO 7814-4 - scheme 2 from ISO 9797-1. The first byte is 0x80, rest is 0x00
+
+
+ Initialise the padder.
+
+ @param random - a SecureRandom if available.
+
+
+ Return the name of the algorithm the padder implements.
+
+ @return the name of the algorithm the padder implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A wrapper class that allows block ciphers to be used to process data in
+ a piecemeal fashion with padding. The PaddedBufferedBlockCipher
+ outputs a block only when the buffer is full and more data is being added,
+ or on a doFinal (unless the current block in the buffer is a pad block).
+ The default padding mechanism used is the one outlined in Pkcs5/Pkcs7.
+
+
+ Create a buffered block cipher with the desired padding.
+
+ @param cipher the underlying block cipher this buffering object wraps.
+ @param padding the padding type.
+
+
+ Create a buffered block cipher Pkcs7 padding
+
+ @param cipher the underlying block cipher this buffering object wraps.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the minimum size of the output buffer required for an update
+ plus a doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer. If the buffer is currently
+ full and padding needs to be added a call to doFinal will produce
+ 2 * GetBlockSize() bytes.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output or we are decrypting and the input is not block size aligned.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+
+
+ A padder that adds Pkcs7/Pkcs5 padding to a block.
+
+
+ Initialise the padder.
+
+ @param random - a SecureRandom if available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds Trailing-Bit-Compliment padding to a block.
+
+ This padding pads the block out compliment of the last bit
+ of the plain text.
+
+
+
+
+ Return the name of the algorithm the cipher implements.
+ the name of the algorithm the cipher implements.
+
+
+
+ Initialise the padder.
+ - a SecureRandom if available.
+
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+ Note: this assumes that the last block of plain text is always
+ passed to it inside in. i.e. if inOff is zero, indicating the
+ entire block is to be overwritten with padding the value of in
+ should be the same as the last block of plain text.
+
+
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds X9.23 padding to a block - if a SecureRandom is
+ passed in random padding is assumed, otherwise padding with zeros is used.
+
+
+ Initialise the padder.
+
+ @param random a SecureRandom if one is available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds Null byte padding to a block.
+
+
+ Return the name of the algorithm the cipher implements.
+
+
+ the name of the algorithm the cipher implements.
+
+
+
+ Initialise the padder.
+
+
+ - a SecureRandom if available.
+
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+
+ return the number of pad bytes present in the block.
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+ @param associatedText associated text, if any
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+ @param associatedText associated text, if any
+
+
+ The minimum bitlength of the private value.
+
+
+ The bitlength of the private value.
+
+
+ Construct without a usage index, this will do a random construction of G.
+
+ @param L desired length of prime P in bits (the effective key size).
+ @param N desired length of prime Q in bits.
+ @param certainty certainty level for prime number generation.
+ @param random the source of randomness to use.
+
+
+ Construct for a specific usage index - this has the effect of using verifiable canonical generation of G.
+
+ @param L desired length of prime P in bits (the effective key size).
+ @param N desired length of prime Q in bits.
+ @param certainty certainty level for prime number generation.
+ @param random the source of randomness to use.
+ @param usageIndex a valid usage index.
+
+
+ return true if the passed in key is a DES-EDE weak key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+ @param length number of bytes making up the key
+
+
+ return true if the passed in key is a DES-EDE weak key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 2/3 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 2 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 3 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ DES has 16 weak keys. This method will check
+ if the given DES key material is weak or semi-weak.
+ Key material that is too short is regarded as weak.
+
+ See "Applied
+ Cryptography" by Bruce Schneier for more information.
+
+ @return true if the given DES key material is weak or semi-weak,
+ false otherwise.
+
+
+ DES Keys use the LSB as the odd parity bit. This can
+ be used to check for corrupt keys.
+
+ @param bytes the byte array to set the parity on.
+
+
+ return the generator - g
+
+
+ return private value limit - l
+
+
+ parameters for Key derivation functions for ISO-18033
+
+
+ parameters for using an integrated cipher in stream mode.
+
+
+ @param derivation the derivation parameter for the KDF function.
+ @param encoding the encoding parameter for the KDF function.
+ @param macKeySize the size of the MAC key (in bits).
+
+
+ @param derivation the derivation parameter for the KDF function.
+ @param encoding the encoding parameter for the KDF function.
+ @param macKeySize the size of the MAC key (in bits).
+ @param cipherKeySize the size of the associated Cipher key (in bits).
+
+
+ parameters for Key derivation functions for IEEE P1363a
+
+
+ Parameters for mask derivation functions.
+
+
+ Parameters for NaccacheStern public private key generation. For details on
+ this cipher, please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Parameters for generating a NaccacheStern KeyPair.
+
+ @param random
+ The source of randomness
+ @param strength
+ The desired strength of the Key in Bits
+ @param certainty
+ the probability that the generated primes are not really prime
+ as integer: 2^(-certainty) is then the probability
+ @param countSmallPrimes
+ How many small key factors are desired
+
+
+ * Parameters for a NaccacheStern KeyPair.
+ *
+ * @param random
+ * The source of randomness
+ * @param strength
+ * The desired strength of the Key in Bits
+ * @param certainty
+ * the probability that the generated primes are not really prime
+ * as integer: 2^(-certainty) is then the probability
+ * @param cntSmallPrimes
+ * How many small key factors are desired
+ * @param debug
+ * Ignored
+
+
+ @return Returns the certainty.
+
+
+ @return Returns the countSmallPrimes.
+
+
+ Public key parameters for NaccacheStern cipher. For details on this cipher,
+ please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ @param privateKey
+
+
+ @return Returns the g.
+
+
+ @return Returns the lowerSigmaBound.
+
+
+ @return Returns the n.
+
+
+ Private key parameters for NaccacheStern cipher. For details on this cipher,
+ please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Constructs a NaccacheSternPrivateKey
+
+ @param g
+ the public enryption parameter g
+ @param n
+ the public modulus n = p*q
+ @param lowerSigmaBound
+ the public lower sigma bound up to which data can be encrypted
+ @param smallPrimes
+ the small primes, of which sigma is constructed in the right
+ order
+ @param phi_n
+ the private modulus phi(n) = (p-1)(q-1)
+
+
+ Cipher parameters with a fixed salt value associated with them.
+
+
+
+ Parameters for the Skein hash function - a series of byte[] strings identified by integer tags.
+
+
+ Parameterised Skein can be used for:
+
+ MAC generation, by providing a key .
+ Randomised hashing, by providing a nonce .
+ A hash function for digital signatures, associating a
+ public key with the message digest.
+ A key derivation function, by providing a
+ key identifier .
+ Personalised hashing, by providing a
+ recommended format or
+ arbitrary personalisation string.
+
+
+
+
+
+
+
+
+ The parameter type for a secret key, supporting MAC or KDF functions: 0
+
+
+
+
+ The parameter type for the Skein configuration block: 4
+
+
+
+
+ The parameter type for a personalisation string: 8
+
+
+
+
+ The parameter type for a public key: 12
+
+
+
+
+ The parameter type for a key identifier string: 16
+
+
+
+
+ The parameter type for a nonce: 20
+
+
+
+
+ The parameter type for the message: 48
+
+
+
+
+ The parameter type for the output transformation: 63
+
+
+
+
+ Obtains a map of type (int) to value (byte[]) for the parameters tracked in this object.
+
+
+
+
+ Obtains the value of the key parameter , or null if not
+ set.
+
+ The key.
+
+
+
+ Obtains the value of the personalisation parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the public key parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the key identifier parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the nonce parameter , or null if
+ not set.
+
+
+
+
+ A builder for .
+
+
+
+
+ Sets a parameters to apply to the Skein hash function.
+
+
+ Parameter types must be in the range 0,5..62, and cannot use the value 48
+ (reserved for message body).
+
+ Parameters with type < 48 are processed before
+ the message content, parameters with type > 48
+ are processed after the message and prior to output.
+
+ the type of the parameter, in the range 5..62.
+ the byte sequence of the parameter.
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Implements the recommended personalisation format for Skein defined in Section 4.11 of
+ the Skein 1.3 specification.
+
+
+ The format is YYYYMMDD email@address distinguisher, encoded to a byte
+ sequence using UTF-8 encoding.
+
+ the date the personalised application of the Skein was defined.
+ the email address of the creation of the personalised application.
+ an arbitrary personalisation string distinguishing the application.
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Constructs a new instance with the parameters provided to this
+ builder.
+
+
+
+
+ Parameters for tweakable block ciphers.
+
+
+
+
+ Gets the key.
+
+ the key to use, or null to use the current key.
+
+
+
+ Gets the tweak value.
+
+ The tweak to use, or null to use the current tweak.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ true if the internal state represents the signature described in the passed in array.
+
+
+ Reset the internal state
+
+
+ The Digital Signature Algorithm - as described in "Handbook of Applied
+ Cryptography", pages 452 - 453.
+
+
+ Default configuration, random K values.
+
+
+ Configuration with an alternate, possibly deterministic calculator of K.
+
+ @param kCalculator a K value calculator.
+
+
+ Generate a signature for the given message using the key we were
+ initialised with. For conventional DSA the message should be a SHA-1
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a DSA signature for
+ the passed in message for standard DSA the message should be a
+ SHA-1 hash of the real message to be verified.
+
+
+ EC-DSA as described in X9.62
+
+
+ Default configuration, random K values.
+
+
+ Configuration with an alternate, possibly deterministic calculator of K.
+
+ @param kCalculator a K value calculator.
+
+
+ Generate a signature for the given message using the key we were
+ initialised with. For conventional DSA the message should be a SHA-1
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a DSA signature for
+ the passed in message (for standard DSA the message should be
+ a SHA-1 hash of the real message to be verified).
+
+
+ GOST R 34.10-2001 Signature Algorithm
+
+
+ generate a signature for the given message using the key we were
+ initialised with. For conventional GOST3410 the message should be a GOST3411
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a GOST3410 signature for
+ the passed in message (for standard GOST3410 the message should be
+ a GOST3411 hash of the real message to be verified).
+
+
+ EC-NR as described in IEEE 1363-2000
+
+
+ generate a signature for the given message using the key we were
+ initialised with. Generally, the order of the curve should be at
+ least as long as the hash of the message of interest, and with
+ ECNR it *must* be at least as long.
+
+ @param digest the digest to be signed.
+ @exception DataLengthException if the digest is longer than the key allows
+
+
+ return true if the value r and s represent a signature for the
+ message passed in. Generally, the order of the curve should be at
+ least as long as the hash of the message of interest, and with
+ ECNR, it *must* be at least as long. But just in case the signer
+ applied mod(n) to the longer digest, this implementation will
+ apply mod(n) during verification.
+
+ @param digest the digest to be verified.
+ @param r the r value of the signature.
+ @param s the s value of the signature.
+ @exception DataLengthException if the digest is longer than the key allows
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ true if the internal state represents the signature described in the passed in array.
+
+
+ Reset the internal state
+
+
+ Gost R 34.10-94 Signature Algorithm
+
+
+ generate a signature for the given message using the key we were
+ initialised with. For conventional Gost3410 the message should be a Gost3411
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a Gost3410 signature for
+ the passed in message for standard Gost3410 the message should be a
+ Gost3411 hash of the real message to be verified.
+
+
+ initialise the signer for signing or verification.
+
+ @param forSigning
+ true if for signing, false otherwise
+ @param parameters
+ necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using the key
+ we were initialised with.
+
+
+ return true if the internal state represents the signature described in
+ the passed in array.
+
+
+ A deterministic K calculator based on the algorithm in section 3.2 of RFC 6979.
+
+
+ Base constructor.
+
+ @param digest digest to build the HMAC on.
+
+
+ Interface define calculators of K values for DSA/ECDSA.
+
+
+ Return true if this calculator is deterministic, false otherwise.
+
+ @return true if deterministic, otherwise false.
+
+
+ Non-deterministic initialiser.
+
+ @param n the order of the DSA group.
+ @param random a source of randomness.
+
+
+ Deterministic initialiser.
+
+ @param n the order of the DSA group.
+ @param d the DSA private value.
+ @param message the message being signed.
+
+
+ Return the next valid value of K.
+
+ @return a K value.
+
+
+ ISO9796-2 - mechanism using a hash function with recovery (scheme 2 and 3).
+
+ Note: the usual length for the salt is the length of the hash
+ function used in bytes.
+
+
+
+
+ Return a reference to the recoveredMessage message.
+
+ The full/partial recoveredMessage message.
+
+
+
+
+ Generate a signer with either implicit or explicit trailers for ISO9796-2, scheme 2 or 3.
+
+ base cipher to use for signature creation/verification
+ digest to use.
+ length of salt in bytes.
+ whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+
+ cipher to use.
+
+ digest to sign with.
+
+ length of salt in bytes.
+
+
+
+ Initialise the signer.
+ true if for signing, false if for verification.
+ parameters for signature generation/verification. If the
+ parameters are for generation they should be a ParametersWithRandom,
+ a ParametersWithSalt, or just an RsaKeyParameters object. If RsaKeyParameters
+ are passed in a SecureRandom will be created.
+
+ if wrong parameter type or a fixed
+ salt is passed in which is the wrong length.
+
+
+
+ compare two byte arrays - constant time.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+ Return true if the full message was recoveredMessage.
+
+ true on full message recovery, false otherwise, or if not sure.
+
+
+
+ int to octet string.
+ int to octet string.
+
+
+ long to octet string.
+
+
+ mask generator function, as described in Pkcs1v2.
+
+
+ ISO9796-2 - mechanism using a hash function with recovery (scheme 1)
+
+
+
+ Return a reference to the recoveredMessage message.
+
+ The full/partial recoveredMessage message.
+
+
+
+
+ Generate a signer with either implicit or explicit trailers for ISO9796-2.
+
+ base cipher to use for signature creation/verification
+ digest to use.
+ whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+
+ cipher to use.
+
+ digest to sign with.
+
+
+
+ compare two byte arrays - constant time.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+ Return true if the full message was recoveredMessage.
+
+ true on full message recovery, false otherwise.
+
+
+
+ RSA-PSS as described in Pkcs# 1 v 2.1.
+
+ Note: the usual value for the salt length is the number of
+ bytes in the hash function.
+
+
+
+ Basic constructor
+ the asymmetric cipher to use.
+ the digest to use.
+ the length of the salt to use (in bytes).
+
+
+ Basic constructor
+ the asymmetric cipher to use.
+ the digest to use.
+ the fixed salt to be used.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+
+ int to octet string.
+
+
+ mask generator function, as described in Pkcs1v2.
+
+
+
+ Load oid table.
+
+
+
+ Initialise the signer for signing or verification.
+
+ @param forSigning true if for signing, false otherwise
+ @param param necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+ X9.31-1998 - signing using a hash.
+
+ The message digest hash, H, is encapsulated to form a byte string as follows
+
+
+ EB = 06 || PS || 0xBA || H || TRAILER
+
+ where PS is a string of bytes all of value 0xBB of length such that |EB|=|n|, and TRAILER is the ISO/IEC 10118 part number†for the digest. The byte string, EB, is converted to an integer value, the message representative, f.
+
+
+ Generate a signer with either implicit or explicit trailers for X9.31.
+
+ @param cipher base cipher to use for signature creation/verification
+ @param digest digest to use.
+ @param implicit whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+ @param cipher cipher to use.
+ @param digest digest to sign with.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RFC 5246 7.2
+
+
+
+ This message notifies the recipient that the sender will not send any more messages on this
+ connection. Note that as of TLS 1.1, failure to properly close a connection no longer
+ requires that a session not be resumed. This is a change from TLS 1.0 ("The session becomes
+ unresumable if any connection is terminated without proper close_notify messages with level
+ equal to warning.") to conform with widespread implementation practice.
+
+
+ An inappropriate message was received. This alert is always fatal and should never be
+ observed in communication between proper implementations.
+
+
+ This alert is returned if a record is received with an incorrect MAC. This alert also MUST be
+ returned if an alert is sent because a TLSCiphertext decrypted in an invalid way: either it
+ wasn't an even multiple of the block length, or its padding values, when checked, weren't
+ correct. This message is always fatal and should never be observed in communication between
+ proper implementations (except when messages were corrupted in the network).
+
+
+ This alert was used in some earlier versions of TLS, and may have permitted certain attacks
+ against the CBC mode [CBCATT]. It MUST NOT be sent by compliant implementations.
+
+
+ A TLSCiphertext record was received that had a length more than 2^14+2048 bytes, or a record
+ decrypted to a TLSCompressed record with more than 2^14+1024 bytes. This message is always
+ fatal and should never be observed in communication between proper implementations (except
+ when messages were corrupted in the network).
+
+
+ The decompression function received improper input (e.g., data that would expand to excessive
+ length). This message is always fatal and should never be observed in communication between
+ proper implementations.
+
+
+ Reception of a handshake_failure alert message indicates that the sender was unable to
+ negotiate an acceptable set of security parameters given the options available. This is a
+ fatal error.
+
+
+ This alert was used in SSLv3 but not any version of TLS. It MUST NOT be sent by compliant
+ implementations.
+
+
+ A certificate was corrupt, contained signatures that did not verify correctly, etc.
+
+
+ A certificate was of an unsupported type.
+
+
+ A certificate was revoked by its signer.
+
+
+ A certificate has expired or is not currently valid.
+
+
+ Some other (unspecified) issue arose in processing the certificate, rendering it
+ unacceptable.
+
+
+ A field in the handshake was out of range or inconsistent with other fields. This message is
+ always fatal.
+
+
+ A valid certificate chain or partial chain was received, but the certificate was not accepted
+ because the CA certificate could not be located or couldn't be matched with a known, trusted
+ CA. This message is always fatal.
+
+
+ A valid certificate was received, but when access control was applied, the sender decided not
+ to proceed with negotiation. This message is always fatal.
+
+
+ A message could not be decoded because some field was out of the specified range or the
+ length of the message was incorrect. This message is always fatal and should never be
+ observed in communication between proper implementations (except when messages were corrupted
+ in the network).
+
+
+ A handshake cryptographic operation failed, including being unable to correctly verify a
+ signature or validate a Finished message. This message is always fatal.
+
+
+ This alert was used in some earlier versions of TLS. It MUST NOT be sent by compliant
+ implementations.
+
+
+ The protocol version the client has attempted to negotiate is recognized but not supported.
+ (For example, old protocol versions might be avoided for security reasons.) This message is
+ always fatal.
+
+
+ Returned instead of handshake_failure when a negotiation has failed specifically because the
+ server requires ciphers more secure than those supported by the client. This message is
+ always fatal.
+
+
+ An internal error unrelated to the peer or the correctness of the protocol (such as a memory
+ allocation failure) makes it impossible to continue. This message is always fatal.
+
+
+ This handshake is being canceled for some reason unrelated to a protocol failure. If the user
+ cancels an operation after the handshake is complete, just closing the connection by sending
+ a close_notify is more appropriate. This alert should be followed by a close_notify. This
+ message is generally a warning.
+
+
+ Sent by the client in response to a hello request or by the server in response to a client
+ hello after initial handshaking. Either of these would normally lead to renegotiation; when
+ that is not appropriate, the recipient should respond with this alert. At that point, the
+ original requester can decide whether to proceed with the connection. One case where this
+ would be appropriate is where a server has spawned a process to satisfy a request; the
+ process might receive security parameters (key length, authentication, etc.) at startup, and
+ it might be difficult to communicate changes to these parameters after that point. This
+ message is always a warning.
+
+
+ Sent by clients that receive an extended server hello containing an extension that they did
+ not put in the corresponding client hello. This message is always fatal.
+
+
+ This alert is sent by servers who are unable to retrieve a certificate chain from the URL
+ supplied by the client (see Section 3.3). This message MAY be fatal - for example if client
+ authentication is required by the server for the handshake to continue and the server is
+ unable to retrieve the certificate chain, it may send a fatal alert.
+
+
+ This alert is sent by servers that receive a server_name extension request, but do not
+ recognize the server name. This message MAY be fatal.
+
+
+ This alert is sent by clients that receive an invalid certificate status response (see
+ Section 3.6). This message is always fatal.
+
+
+ This alert is sent by servers when a certificate hash does not match a client provided
+ certificate_hash. This message is always fatal.
+
+
+ If the server does not recognize the PSK identity, it MAY respond with an
+ "unknown_psk_identity" alert message.
+
+
+ If TLS_FALLBACK_SCSV appears in ClientHello.cipher_suites and the highest protocol version
+ supported by the server is higher than the version indicated in ClientHello.client_version,
+ the server MUST respond with an inappropriate_fallback alert.
+
+
+
+ RFC 5246 7.2
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+ A queue for bytes.
+
+ This file could be more optimized.
+
+
+
+
+ The smallest number which can be written as 2^x which is bigger than i.
+
+
+ The initial size for our buffer.
+
+
+ The buffer where we store our data.
+
+
+ How many bytes at the beginning of the buffer are skipped.
+
+
+ How many bytes in the buffer are valid data.
+
+
+ Read data from the buffer.
+ The buffer where the read data will be copied to.
+ How many bytes to skip at the beginning of buf.
+ How many bytes to read at all.
+ How many bytes from our data to skip.
+
+
+ Add some data to our buffer.
+ A byte-array to read data from.
+ How many bytes to skip at the beginning of the array.
+ How many bytes to read from the array.
+
+
+ Remove some bytes from our data from the beginning.
+ How many bytes to remove.
+
+
+ The number of bytes which are available in this buffer.
+
+
+ Parsing and encoding of a Certificate struct from RFC 4346.
+
+
+ opaque ASN.1Cert<2^24-1>;
+
+ struct {
+ ASN.1Cert certificate_list<0..2^24-1>;
+ } Certificate;
+
+
+ @see Org.BouncyCastle.Asn1.X509.X509CertificateStructure
+
+
+ The certificates.
+
+
+ @return an array of {@link org.bouncycastle.asn1.x509.Certificate} representing a certificate
+ chain.
+
+
+ @return true if this certificate chain contains no certificates, or
+ false otherwise.
+
+
+ Encode this {@link Certificate} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link Certificate} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link Certificate} object.
+ @throws IOException
+
+
+ Parsing and encoding of a CertificateRequest struct from RFC 4346.
+
+
+ struct {
+ ClientCertificateType certificate_types<1..2^8-1>;
+ DistinguishedName certificate_authorities<3..2^16-1>
+ } CertificateRequest;
+
+
+ @see ClientCertificateType
+ @see X509Name
+
+
+ @param certificateTypes see {@link ClientCertificateType} for valid constants.
+ @param certificateAuthorities an {@link IList} of {@link X509Name}.
+
+
+ @return an array of certificate types
+ @see {@link ClientCertificateType}
+
+
+ @return an {@link IList} of {@link SignatureAndHashAlgorithm} (or null before TLS 1.2).
+
+
+ @return an {@link IList} of {@link X509Name}
+
+
+ Encode this {@link CertificateRequest} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateRequest} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateRequest} object.
+ @throws IOException
+
+
+ Encode this {@link CertificateStatus} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateStatus} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateStatus} object.
+ @throws IOException
+
+
+ Encode this {@link CertificateStatusRequest} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateStatusRequest} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateStatusRequest} object.
+ @throws IOException
+
+
+ @param type
+ see {@link CertChainType} for valid constants.
+ @param urlAndHashList
+ a {@link IList} of {@link UrlAndHash}.
+
+
+ @return {@link CertChainType}
+
+
+ @return an {@link IList} of {@link UrlAndHash}
+
+
+ Encode this {@link CertificateUrl} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateUrl} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateUrl} object.
+ @throws IOException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RFC 2246 A.5
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ A combined hash, which implements md5(m) || sha1(m).
+
+
+ @see org.bouncycastle.crypto.Digest#update(byte[], int, int)
+
+
+ @see org.bouncycastle.crypto.Digest#doFinal(byte[], int)
+
+
+ @see org.bouncycastle.crypto.Digest#reset()
+
+
+
+ RFC 2246 6.1
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 2246 6.2.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Accept only the group parameters specified in RFC 5054 Appendix A.
+
+
+ Specify a custom set of acceptable group parameters.
+
+ @param groups a {@link Vector} of acceptable {@link SRP6GroupParameters}
+
+
+ Buffers input until the hash algorithm is determined.
+
+
+ @return a {@link SignatureAndHashAlgorithm} (or null before TLS 1.2).
+
+
+ Encode this {@link DigitallySigned} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link DigitallySigned} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link DigitallySigned} object.
+ @throws IOException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Check that there are no "extra" messages left in the current inbound flight
+
+
+ RFC 4347 4.1.2.5 Anti-replay
+
+ Support fast rejection of duplicate records by maintaining a sliding receive window
+
+
+ Check whether a received record with the given sequence number should be rejected as a duplicate.
+
+ @param seq the 48-bit DTLSPlainText.sequence_number field of a received record.
+ @return true if the record should be discarded without further processing.
+
+
+ Report that a received record with the given sequence number passed authentication checks.
+
+ @param seq the 48-bit DTLSPlainText.sequence_number field of an authenticated record.
+
+
+ When a new epoch begins, sequence numbers begin again at 0
+
+
+ RFC 4492 5.4. (Errata ID: 2389)
+
+
+
+ RFC 4492 5.4
+
+
+
+ Indicates the elliptic curve domain parameters are conveyed verbosely, and the
+ underlying finite field is a prime field.
+
+
+ Indicates the elliptic curve domain parameters are conveyed verbosely, and the
+ underlying finite field is a characteristic-2 field.
+
+
+ Indicates that a named curve is used. This option SHOULD be used when applicable.
+
+
+
+ RFC 4492 5.1.2
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 5705
+
+
+ RFC 5246 7.4.1.4.1
+
+
+ Encode this {@link HeartbeatExtension} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link HeartbeatExtension} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link HeartbeatExtension} object.
+ @throws IOException
+
+
+ Encode this {@link HeartbeatMessage} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link HeartbeatMessage} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link HeartbeatMessage} object.
+ @throws IOException
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+ RFC 4492 5.1.1
+ The named curves defined here are those specified in SEC 2 [13]. Note that many of
+ these curves are also recommended in ANSI X9.62 [7] and FIPS 186-2 [11]. Values 0xFE00
+ through 0xFEFF are reserved for private use. Values 0xFF01 and 0xFF02 indicate that the
+ client supports arbitrary prime and characteristic-2 curves, respectively (the curve
+ parameters must be encoded explicitly in ECParameters).
+
+
+
+ Encode this {@link NewSessionTicket} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link NewSessionTicket} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link NewSessionTicket} object.
+ @throws IOException
+
+
+ RFC 3546 3.6
+
+
+ @param responderIDList
+ an {@link IList} of {@link ResponderID}, specifying the list of trusted OCSP
+ responders. An empty list has the special meaning that the responders are
+ implicitly known to the server - e.g., by prior arrangement.
+ @param requestExtensions
+ OCSP request extensions. A null value means that there are no extensions.
+
+
+ @return an {@link IList} of {@link ResponderID}
+
+
+ @return OCSP request extensions
+
+
+ Encode this {@link OcspStatusRequest} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link OcspStatusRequest} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return an {@link OcspStatusRequest} object.
+ @throws IOException
+
+
+ RFC 5246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+
+
+ An implementation of the TLS 1.0/1.1/1.2 record layer, allowing downgrade to SSLv3.
+
+
+ RFC 5246 E.1. "Earlier versions of the TLS specification were not fully clear on what the
+ record layer version number (TLSPlaintext.version) should contain when sending ClientHello
+ (i.e., before it is known which version of the protocol will be employed). Thus, TLS servers
+ compliant with this specification MUST accept any value {03,XX} as the record layer version
+ number for ClientHello."
+
+
+ @return {@link ConnectionEnd}
+
+
+ @return {@link CipherSuite}
+
+
+ @return {@link CompressionMethod}
+
+
+ @return {@link PRFAlgorithm}
+
+
+ Encode this {@link ServerDHParams} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerDHParams} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerDHParams} object.
+ @throws IOException
+
+
+ Encode this {@link ServerName} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerName} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerName} object.
+ @throws IOException
+
+
+ @param serverNameList an {@link IList} of {@link ServerName}.
+
+
+ @return an {@link IList} of {@link ServerName}.
+
+
+ Encode this {@link ServerNameList} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerNameList} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerNameList} object.
+ @throws IOException
+
+
+ Encode this {@link ServerSRPParams} to an {@link OutputStream}.
+
+ @param output
+ the {@link OutputStream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerSRPParams} from an {@link InputStream}.
+
+ @param input
+ the {@link InputStream} to parse from.
+ @return a {@link ServerSRPParams} object.
+ @throws IOException
+
+
+ RFC 5246 7.4.1.4.1 (in RFC 2246, there were no specific values assigned)
+
+
+ RFC 5246 7.4.1.4.1
+
+
+ @param hash {@link HashAlgorithm}
+ @param signature {@link SignatureAlgorithm}
+
+
+ @return {@link HashAlgorithm}
+
+
+ @return {@link SignatureAlgorithm}
+
+
+ Encode this {@link SignatureAndHashAlgorithm} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link SignatureAndHashAlgorithm} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link SignatureAndHashAlgorithm} object.
+ @throws IOException
+
+
+ An implementation of {@link TlsSRPIdentityManager} that simulates the existence of "unknown" identities
+ to obscure the fact that there is no verifier for them.
+
+
+ Create a {@link SimulatedTlsSRPIdentityManager} that implements the algorithm from RFC 5054 2.5.1.3
+
+ @param group the {@link SRP6GroupParameters} defining the group that SRP is operating in
+ @param seedKey the secret "seed key" referred to in RFC 5054 2.5.1.3
+ @return an instance of {@link SimulatedTlsSRPIdentityManager}
+
+
+ HMAC implementation based on original internet draft for HMAC (RFC 2104)
+
+ The difference is that padding is concatentated versus XORed with the key
+
+ H(K + opad, H(K + ipad, text))
+
+
+ Base constructor for one of the standard digest algorithms that the byteLength of
+ the algorithm is know for. Behaviour is undefined for digests other than MD5 or SHA1.
+
+ @param digest the digest.
+
+
+ Reset the mac generator.
+
+
+ RFC 4680
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called by the protocol handler to report the server certificate.
+
+
+ This method is responsible for certificate verification and validation
+
+ The server received
+
+
+
+
+ Return client credentials in response to server's certificate request
+
+
+ A containing server certificate request details
+
+
+ A to be used for client authentication
+ (or null for no client authentication)
+
+
+
+
+
+ A generic TLS 1.0-1.2 / SSLv3 block cipher. This can be used for AES or 3DES for example.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called at the start of a new TLS session, before any other methods.
+
+
+ A
+
+
+
+ Return the session this client wants to resume, if any.
+ Note that the peer's certificate chain for the session (if any) may need to be periodically revalidated.
+
+ A representing the resumable session to be used for this connection,
+ or null to use a new session.
+
+
+
+
+ Return the to use for the TLSPlaintext.version field prior to
+ receiving the server version. NOTE: This method is not called for DTLS.
+
+
+ See RFC 5246 E.1.: "TLS clients that wish to negotiate with older servers MAY send any value
+ {03,XX} as the record layer version number. Typical values would be {03,00}, the lowest
+ version number supported by the client, and the value of ClientHello.client_version. No
+ single value will guarantee interoperability with all old servers, but this is a complex
+ topic beyond the scope of this document."
+
+ The to use.
+
+
+
+ Get the list of cipher suites that this client supports.
+
+
+ An array of values, each specifying a supported cipher suite.
+
+
+
+
+ Get the list of compression methods that this client supports.
+
+
+ An array of values, each specifying a supported compression method.
+
+
+
+
+ Get the (optional) table of client extensions to be included in (extended) client hello.
+
+
+ A (Int32 -> byte[]). May be null.
+
+
+
+
+
+
+
+
+ Notifies the client of the session_id sent in the ServerHello.
+
+ An array of
+
+
+
+ Report the cipher suite that was selected by the server.
+
+
+ The protocol handler validates this value against the offered cipher suites
+
+
+
+ A
+
+
+
+
+ Report the compression method that was selected by the server.
+
+
+ The protocol handler validates this value against the offered compression methods
+
+
+
+ A
+
+
+
+
+ Report the extensions from an extended server hello.
+
+
+ Will only be called if we returned a non-null result from .
+
+
+ A (Int32 -> byte[])
+
+
+
+ A list of
+
+
+
+
+ Return an implementation of to negotiate the key exchange
+ part of the protocol.
+
+
+ A
+
+
+
+
+
+ Return an implementation of to handle authentication
+ part of the protocol.
+
+
+
+
+ A list of
+
+
+
+ RFC 5077 3.3. NewSessionTicket Handshake Message
+
+ This method will be called (only) when a NewSessionTicket handshake message is received. The
+ ticket is opaque to the client and clients MUST NOT examine the ticket under the assumption
+ that it complies with e.g. RFC 5077 4. Recommended Ticket Construction .
+
+ The ticket
+
+
+
+ Constructor for blocking mode.
+ @param stream The bi-directional stream of data to/from the server
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for blocking mode.
+ @param input The stream of data from the server
+ @param output The stream of data to the server
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for non-blocking mode.
+
+ When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to
+ provide the received ciphertext, then use
+ {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+
+ Similarly, when data needs to be sent, use
+ {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use
+ {@link #readOutput(byte[], int, int)} to get the corresponding
+ ciphertext.
+
+ @param secureRandom
+ Random number generator for various cryptographic functions
+
+
+ Initiates a TLS handshake in the role of client.
+
+ In blocking mode, this will not return until the handshake is complete.
+ In non-blocking mode, use {@link TlsPeer#NotifyHandshakeComplete()} to
+ receive a callback when the handshake is complete.
+
+ @param tlsClient The {@link TlsClient} to use for the handshake.
+ @throws IOException If in blocking mode and handshake was not successful.
+
+
+ Used to get the resumable session, if any, used by this connection. Only available after the
+ handshake has successfully completed.
+
+ @return A {@link TlsSession} representing the resumable session used by this connection, or
+ null if no resumable session available.
+ @see TlsPeer#NotifyHandshakeComplete()
+
+
+ Export keying material according to RFC 5705: "Keying Material Exporters for TLS".
+
+ @param asciiLabel indicates which application will use the exported keys.
+ @param context_value allows the application using the exporter to mix its own data with the TLS PRF for
+ the exporter output.
+ @param length the number of bytes to generate
+ @return a pseudorandom bit string of 'length' bytes generated from the master_secret.
+
+
+ (D)TLS DH key exchange.
+
+
+ (D)TLS ECDH key exchange (see RFC 4492).
+
+
+ (D)TLS ECDHE key exchange (see RFC 4492).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A generic interface for key exchange implementations in (D)TLS.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A generic TLS MAC implementation, acting as an HMAC based on some underlying Digest.
+
+
+
+ Generate a new instance of an TlsMac.
+
+ @param context the TLS client context
+ @param digest The digest to use.
+ @param key A byte-array where the key for this MAC is located.
+ @param keyOff The number of bytes to skip, before the key starts in the buffer.
+ @param keyLen The length of the key.
+
+
+ @return the MAC write secret
+
+
+ @return The output length of this MAC.
+
+
+ Calculate the MAC for some given data.
+
+ @param type The message type of the message.
+ @param message A byte-buffer containing the message.
+ @param offset The number of bytes to skip, before the message starts.
+ @param length The length of the message.
+ @return A new byte-buffer containing the MAC value.
+
+
+
+ A NULL CipherSuite, with optional MAC.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ draft-mathewson-no-gmtunixtime-00 2. "If existing users of a TLS implementation may rely on
+ gmt_unix_time containing the current time, we recommend that implementors MAY provide the
+ ability to set gmt_unix_time as an option only, off by default."
+
+
+ true if the current time should be used in the gmt_unix_time field of
+ Random, or false if gmt_unix_time should contain a cryptographically
+ random value.
+
+
+
+
+ Report whether the server supports secure renegotiation
+
+
+ The protocol handler automatically processes the relevant extensions
+
+
+ A , true if the server supports secure renegotiation
+
+
+
+
+
+ Return an implementation of to handle record compression.
+
+ A
+
+
+
+
+ Return an implementation of to use for encryption/decryption.
+
+ A
+
+
+
+ This method will be called when an alert is raised by the protocol.
+
+
+ A human-readable message explaining what caused this alert. May be null.
+ The Exception that caused this alert to be raised. May be null.
+
+
+ This method will be called when an alert is received from the remote peer.
+
+
+
+
+ Notifies the peer that the handshake has been successfully completed.
+
+
+
+ This method is called, when a change cipher spec message is received.
+
+ @throws IOException If the message has an invalid content or the handshake is not in the correct
+ state.
+
+
+ Read data from the network. The method will return immediately, if there is still some data
+ left in the buffer, or block until some application data has been read from the network.
+
+ @param buf The buffer where the data will be copied to.
+ @param offset The position where the data will be placed in the buffer.
+ @param len The maximum number of bytes to read.
+ @return The number of bytes read.
+ @throws IOException If something goes wrong during reading data.
+
+
+ Send some application data to the remote system.
+
+ The method will handle fragmentation internally.
+
+ @param buf The buffer with the data.
+ @param offset The position in the buffer where the data is placed.
+ @param len The length of the data.
+ @throws IOException If something goes wrong during sending.
+
+
+ The secure bidirectional stream for this connection
+ Only allowed in blocking mode.
+
+
+ Offer input from an arbitrary source. Only allowed in non-blocking mode.
+
+ After this method returns, the input buffer is "owned" by this object. Other code
+ must not attempt to do anything with it.
+
+ This method will decrypt and process all records that are fully available.
+ If only part of a record is available, the buffer will be retained until the
+ remainder of the record is offered.
+
+ If any records containing application data were processed, the decrypted data
+ can be obtained using {@link #readInput(byte[], int, int)}. If any records
+ containing protocol data were processed, a response may have been generated.
+ You should always check to see if there is any available output after calling
+ this method by calling {@link #getAvailableOutputBytes()}.
+ @param input The input buffer to offer
+ @throws IOException If an error occurs while decrypting or processing a record
+
+
+ Gets the amount of received application data. A call to {@link #readInput(byte[], int, int)}
+ is guaranteed to be able to return at least this much data.
+
+ Only allowed in non-blocking mode.
+ @return The number of bytes of available application data
+
+
+ Retrieves received application data. Use {@link #getAvailableInputBytes()} to check
+ how much application data is currently available. This method functions similarly to
+ {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data
+ is available, nothing will be copied and zero will be returned.
+
+ Only allowed in non-blocking mode.
+ @param buffer The buffer to hold the application data
+ @param offset The start offset in the buffer at which the data is written
+ @param length The maximum number of bytes to read
+ @return The total number of bytes copied to the buffer. May be less than the
+ length specified if the length was greater than the amount of available data.
+
+
+ Offer output from an arbitrary source. Only allowed in non-blocking mode.
+
+ After this method returns, the specified section of the buffer will have been
+ processed. Use {@link #readOutput(byte[], int, int)} to get the bytes to
+ transmit to the other peer.
+
+ This method must not be called until after the handshake is complete! Attempting
+ to call it before the handshake is complete will result in an exception.
+ @param buffer The buffer containing application data to encrypt
+ @param offset The offset at which to begin reading data
+ @param length The number of bytes of data to read
+ @throws IOException If an error occurs encrypting the data, or the handshake is not complete
+
+
+ Gets the amount of encrypted data available to be sent. A call to
+ {@link #readOutput(byte[], int, int)} is guaranteed to be able to return at
+ least this much data.
+
+ Only allowed in non-blocking mode.
+ @return The number of bytes of available encrypted data
+
+
+ Retrieves encrypted data to be sent. Use {@link #getAvailableOutputBytes()} to check
+ how much encrypted data is currently available. This method functions similarly to
+ {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data
+ is available, nothing will be copied and zero will be returned.
+
+ Only allowed in non-blocking mode.
+ @param buffer The buffer to hold the encrypted data
+ @param offset The start offset in the buffer at which the data is written
+ @param length The maximum number of bytes to read
+ @return The total number of bytes copied to the buffer. May be less than the
+ length specified if the length was greater than the amount of available data.
+
+
+ Terminate this connection with an alert. Can be used for normal closure too.
+
+ @param alertLevel
+ See {@link AlertLevel} for values.
+ @param alertDescription
+ See {@link AlertDescription} for values.
+ @throws IOException
+ If alert was fatal.
+
+
+ Closes this connection.
+
+ @throws IOException If something goes wrong during closing.
+
+
+ Make sure the InputStream 'buf' now empty. Fail otherwise.
+
+ @param buf The InputStream to check.
+ @throws IOException If 'buf' is not empty.
+
+
+ 'sender' only relevant to SSLv3
+
+
+ Both streams can be the same object
+
+
+ (D)TLS PSK key exchange (RFC 4279).
+
+
+ (D)TLS and SSLv3 RSA key exchange.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A (Int32 -> byte[]). Will never be null.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get the (optional) table of server extensions to be included in (extended) server hello.
+
+
+ A (Int32 -> byte[]). May be null.
+
+
+
+
+
+ A ( ). May be null.
+
+
+
+
+
+
+
+
+ This method will be called (only) if the server included an extension of type
+ "status_request" with empty "extension_data" in the extended server hello. See RFC 3546
+ 3.6. Certificate Status Request . If a non-null is returned, it
+ is sent to the client as a handshake message of type "certificate_status".
+
+ A to be sent to the client (or null for none).
+
+
+
+
+
+
+
+
+
+ ( )
+
+
+
+
+ Called by the protocol handler to report the client certificate, only if GetCertificateRequest
+ returned non-null.
+
+ Note: this method is responsible for certificate verification and validation.
+ the effective client certificate (may be an empty chain).
+
+
+
+ RFC 5077 3.3. NewSessionTicket Handshake Message.
+
+ This method will be called (only) if a NewSessionTicket extension was sent by the server. See
+ RFC 5077 4. Recommended Ticket Construction for recommended format and protection.
+
+ The ticket )
+
+
+
+ Constructor for blocking mode.
+ @param stream The bi-directional stream of data to/from the client
+ @param output The stream of data to the client
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for blocking mode.
+ @param input The stream of data from the client
+ @param output The stream of data to the client
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for non-blocking mode.
+
+ When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to
+ provide the received ciphertext, then use
+ {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+
+ Similarly, when data needs to be sent, use
+ {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use
+ {@link #readOutput(byte[], int, int)} to get the corresponding
+ ciphertext.
+
+ @param secureRandom
+ Random number generator for various cryptographic functions
+
+
+ Receives a TLS handshake in the role of server.
+
+ In blocking mode, this will not return until the handshake is complete.
+ In non-blocking mode, use {@link TlsPeer#notifyHandshakeComplete()} to
+ receive a callback when the handshake is complete.
+
+ @param tlsServer
+ @throws IOException If in blocking mode and handshake was not successful.
+
+
+
+
+
+ Check whether the given SRP group parameters are acceptable for use.
+
+ @param group the {@link SRP6GroupParameters} to check
+ @return true if (and only if) the specified group parameters are acceptable
+
+
+ Lookup the {@link TlsSRPLoginParameters} corresponding to the specified identity.
+
+ NOTE: To avoid "identity probing", unknown identities SHOULD be handled as recommended in RFC
+ 5054 2.5.1.3. {@link SimulatedTlsSRPIdentityManager} is provided for this purpose.
+
+ @param identity
+ the SRP identity sent by the connecting client
+ @return the {@link TlsSRPLoginParameters} for the specified identity, or else 'simulated'
+ parameters if the identity is not recognized. A null value is also allowed, but not
+ recommended.
+
+
+ (D)TLS SRP key exchange (RFC 5054).
+
+
+ RFC 5764 DTLS Extension to Establish Keys for SRTP.
+
+
+
+
+
+
+
+
+
+
+
+ Some helper functions for MicroTLS.
+
+
+ Add a 'signature_algorithms' extension to existing extensions.
+
+ @param extensions A {@link Hashtable} to add the extension to.
+ @param supportedSignatureAlgorithms {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @throws IOException
+
+
+ Get a 'signature_algorithms' extension from extensions.
+
+ @param extensions A {@link Hashtable} to get the extension from, if it is present.
+ @return A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}, or null.
+ @throws IOException
+
+
+ Create a 'signature_algorithms' extension value.
+
+ @param supportedSignatureAlgorithms A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @return A byte array suitable for use as an extension value.
+ @throws IOException
+
+
+ Read 'signature_algorithms' extension data.
+
+ @param extensionData The extension data.
+ @return A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @throws IOException
+
+
+ RFC 6066 5.
+
+
+ Encode this {@link UrlAndHash} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link UrlAndHash} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link UrlAndHash} object.
+ @throws IOException
+
+
+ RFC 5764 4.1.1
+
+
+ @param protectionProfiles see {@link SrtpProtectionProfile} for valid constants.
+ @param mki valid lengths from 0 to 255.
+
+
+ @return see {@link SrtpProtectionProfile} for valid constants.
+
+
+ @return valid lengths from 0 to 255.
+
+
+ RFC 4681
+
+
+ return a = a + b - b preserved.
+
+
+ unsigned comparison on two arrays - note the arrays may
+ start with leading zeros.
+
+
+ return z = x / y - done in place (z value preserved, x contains the
+ remainder)
+
+
+ return whether or not a BigInteger is probably prime with a
+ probability of 1 - (1/2)**certainty.
+ From Knuth Vol 2, pg 395.
+
+
+ Calculate the numbers u1, u2, and u3 such that:
+
+ u1 * a + u2 * b = u3
+
+ where u3 is the greatest common divider of a and b.
+ a and b using the extended Euclid algorithm (refer p. 323
+ of The Art of Computer Programming vol 2, 2nd ed).
+ This also seems to have the side effect of calculating
+ some form of multiplicative inverse.
+
+ @param a First number to calculate gcd for
+ @param b Second number to calculate gcd for
+ @param u1Out the return object for the u1 value
+ @return The greatest common divisor of a and b
+
+
+ return w with w = x * x - w is assumed to have enough space.
+
+
+ return x with x = y * z - x is assumed to have enough space.
+
+
+ Calculate mQuote = -m^(-1) mod b with b = 2^32 (32 = word size)
+
+
+ Montgomery multiplication: a = x * y * R^(-1) mod m
+
+ Based algorithm 14.36 of Handbook of Applied Cryptography.
+
+ m, x, y should have length n
+ a should have length (n + 1)
+ b = 2^32, R = b^n
+
+ The result is put in x
+
+ NOTE: the indices of x, y, m, a different in HAC and in Java
+
+
+ return x = x % y - done in place (y value preserved)
+
+
+ do a left shift - this returns a new array.
+
+
+ do a right shift - this does it in place.
+
+
+ do a right shift by one - this does it in place.
+
+
+ returns x = x - y - we assume x is >= y
+
+
+ Utility methods for generating primes and testing for primality.
+
+
+ Used to return the output from the
+ {@linkplain Primes#enhancedMRProbablePrimeTest(BigInteger, SecureRandom, int) Enhanced
+ Miller-Rabin Probabilistic Primality Test}
+
+
+ Used to return the output from the {@linkplain Primes#generateSTRandomPrime(Digest, int, byte[]) Shawe-Taylor Random_Prime Routine}
+
+
+ FIPS 186-4 C.6 Shawe-Taylor Random_Prime Routine
+
+ Construct a provable prime number using a hash function.
+
+ @param hash
+ the {@link Digest} instance to use (as "Hash()"). Cannot be null.
+ @param length
+ the length (in bits) of the prime to be generated. Must be at least 2.
+ @param inputSeed
+ the seed to be used for the generation of the requested prime. Cannot be null or
+ empty.
+ @return an {@link STOutput} instance containing the requested prime.
+
+
+ FIPS 186-4 C.3.2 Enhanced Miller-Rabin Probabilistic Primality Test
+
+ Run several iterations of the Miller-Rabin algorithm with randomly-chosen bases. This is an
+ alternative to {@link #isMRProbablePrime(BigInteger, SecureRandom, int)} that provides more
+ information about a composite candidate, which may be useful when generating or validating
+ RSA moduli.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param random
+ the source of randomness to use to choose bases.
+ @param iterations
+ the number of randomly-chosen bases to perform the test for.
+ @return an {@link MROutput} instance that can be further queried for details.
+
+
+ A fast check for small divisors, up to some implementation-specific limit.
+
+ @param candidate
+ the {@link BigInteger} instance to test for division by small factors.
+
+ @return true if the candidate is found to have any small factors,
+ false otherwise.
+
+
+ FIPS 186-4 C.3.1 Miller-Rabin Probabilistic Primality Test
+
+ Run several iterations of the Miller-Rabin algorithm with randomly-chosen bases.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param random
+ the source of randomness to use to choose bases.
+ @param iterations
+ the number of randomly-chosen bases to perform the test for.
+ @return false if any witness to compositeness is found amongst the chosen bases
+ (so candidate is definitely NOT prime), or else true
+ (indicating primality with some probability dependent on the number of iterations
+ that were performed).
+
+
+ FIPS 186-4 C.3.1 Miller-Rabin Probabilistic Primality Test (to a fixed base).
+
+ Run a single iteration of the Miller-Rabin algorithm against the specified base.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param baseValue
+ the base value to use for this iteration.
+ @return false if the specified base is a witness to compositeness (so
+ candidate is definitely NOT prime), or else true.
+
+
+ Simple shift-and-add multiplication. Serves as reference implementation
+ to verify (possibly faster) implementations, and for very small scalars.
+
+ @param p
+ The point to multiply.
+ @param k
+ The multiplier.
+ @return The result of the point multiplication kP.
+
+
+ Base class for an elliptic curve.
+
+
+ Adds PreCompInfo for a point on this curve, under a given name. Used by
+ ECMultipliers to save the precomputation for this ECPoint for use
+ by subsequent multiplication.
+
+ @param point
+ The ECPoint to store precomputations for.
+ @param name
+ A String used to index precomputations of different types.
+ @param preCompInfo
+ The values precomputed by the ECMultiplier.
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system. Where more
+ than one point is to be normalized, this method will generally be more efficient than
+ normalizing each point separately.
+
+ @param points
+ An array of points that will be updated in place with their normalized versions,
+ where necessary
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system. Where more
+ than one point is to be normalized, this method will generally be more efficient than
+ normalizing each point separately. An (optional) z-scaling factor can be applied; effectively
+ each z coordinate is scaled by this value prior to normalization (but only one
+ actual multiplication is needed).
+
+ @param points
+ An array of points that will be updated in place with their normalized versions,
+ where necessary
+ @param off
+ The start of the range of points to normalize
+ @param len
+ The length of the range of points to normalize
+ @param iso
+ The (optional) z-scaling factor - can be null
+
+
+ Sets the default ECMultiplier, unless already set.
+
+
+ Decode a point on this curve from its ASN.1 encoding. The different
+ encodings are taken account of, including point compression for
+ Fp (X9.62 s 4.2.1 pg 17).
+ @return The decoded point.
+
+
+ Elliptic curve over Fp
+
+
+ The auxiliary values s0 and
+ s1 used for partial modular reduction for
+ Koblitz curves.
+
+
+ Solves a quadratic equation z2 + z = beta(X9.62
+ D.1.6) The other solution is z + 1.
+
+ @param beta
+ The value to solve the qradratic equation for.
+ @return the solution for z2 + z = beta or
+ null if no solution exists.
+
+
+ @return the auxiliary values s0 and
+ s1 used for partial modular reduction for
+ Koblitz curves.
+
+
+ Returns true if this is a Koblitz curve (ABC curve).
+ @return true if this is a Koblitz curve (ABC curve), false otherwise
+
+
+ Elliptic curves over F2m. The Weierstrass equation is given by
+ y2 + xy = x3 + ax2 + b.
+
+
+ The exponent m of F2m .
+
+
+ TPB: The integer k where xm +
+ xk + 1 represents the reduction polynomial
+ f(z).
+ PPB: The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ TPB: Always set to 0
+ PPB: The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ TPB: Always set to 0
+ PPB: The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ The point at infinity on this curve.
+
+
+ Constructor for Trinomial Polynomial Basis (TPB).
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+
+
+ Constructor for Trinomial Polynomial Basis (TPB).
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param order The order of the main subgroup of the elliptic curve.
+ @param cofactor The cofactor of the elliptic curve, i.e.
+ #Ea (F2m ) = h * n.
+
+
+ Constructor for Pentanomial Polynomial Basis (PPB).
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+
+
+ Constructor for Pentanomial Polynomial Basis (PPB).
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param order The order of the main subgroup of the elliptic curve.
+ @param cofactor The cofactor of the elliptic curve, i.e.
+ #Ea (F2m ) = h * n.
+
+
+ Return true if curve uses a Trinomial basis.
+
+ @return true if curve Trinomial, false otherwise.
+
+
+ return the field name for this field.
+
+ @return the string "Fp".
+
+
+ return a sqrt root - the routine verifies that the calculation
+ returns the right value - if none exists it returns null.
+
+
+ Class representing the Elements of the finite field
+ F2m in polynomial basis (PB)
+ representation. Both trinomial (Tpb) and pentanomial (Ppb) polynomial
+ basis representations are supported. Gaussian normal basis (GNB)
+ representation is not supported.
+
+
+ Indicates gaussian normal basis representation (GNB). Number chosen
+ according to X9.62. GNB is not implemented at present.
+
+
+ Indicates trinomial basis representation (Tpb). Number chosen
+ according to X9.62.
+
+
+ Indicates pentanomial basis representation (Ppb). Number chosen
+ according to X9.62.
+
+
+ Tpb or Ppb.
+
+
+ The exponent m of F2m .
+
+
+ The LongArray holding the bits.
+
+
+ Constructor for Ppb.
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param x The BigInteger representing the value of the field element.
+
+
+ Constructor for Tpb.
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param x The BigInteger representing the value of the field element.
+
+
+ Checks, if the ECFieldElements a and b
+ are elements of the same field F2m
+ (having the same representation).
+ @param a field element.
+ @param b field element to be compared.
+ @throws ArgumentException if a and b
+ are not elements of the same field
+ F2m (having the same
+ representation).
+
+
+ @return the representation of the field
+ F2m , either of
+ {@link F2mFieldElement.Tpb} (trinomial
+ basis representation) or
+ {@link F2mFieldElement.Ppb} (pentanomial
+ basis representation).
+
+
+ @return the degree m of the reduction polynomial
+ f(z).
+
+
+ @return Tpb: The integer k where xm +
+ xk + 1 represents the reduction polynomial
+ f(z).
+ Ppb: The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ @return Tpb: Always returns 0
+ Ppb: The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ @return Tpb: Always set to 0
+ Ppb: The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ base class for points on elliptic curves.
+
+
+ Normalizes this point, and then returns the affine x-coordinate.
+
+ Note: normalization can be expensive, this method is deprecated in favour
+ of caller-controlled normalization.
+
+
+ Normalizes this point, and then returns the affine y-coordinate.
+
+ Note: normalization can be expensive, this method is deprecated in favour
+ of caller-controlled normalization.
+
+
+ Returns the affine x-coordinate after checking that this point is normalized.
+
+ @return The affine x-coordinate of this point
+ @throws IllegalStateException if the point is not normalized
+
+
+ Returns the affine y-coordinate after checking that this point is normalized
+
+ @return The affine y-coordinate of this point
+ @throws IllegalStateException if the point is not normalized
+
+
+ Returns the x-coordinate.
+
+ Caution: depending on the curve's coordinate system, this may not be the same value as in an
+ affine coordinate system; use Normalize() to get a point where the coordinates have their
+ affine values, or use AffineXCoord if you expect the point to already have been normalized.
+
+ @return the x-coordinate of this point
+
+
+ Returns the y-coordinate.
+
+ Caution: depending on the curve's coordinate system, this may not be the same value as in an
+ affine coordinate system; use Normalize() to get a point where the coordinates have their
+ affine values, or use AffineYCoord if you expect the point to already have been normalized.
+
+ @return the y-coordinate of this point
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system.
+
+ @return a new ECPoint instance representing the same point, but with normalized coordinates
+
+
+ return the field element encoded with point compression. (S 4.3.6)
+
+
+ Multiplies this ECPoint by the given number.
+ @param k The multiplicator.
+ @return k * this.
+
+
+ Elliptic curve points over Fp
+
+
+ Create a point which encodes without point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+
+
+ Create a point that encodes with or without point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+ @param withCompression if true encode with point compression
+
+
+ Elliptic curve points over F2m
+
+
+ @param curve base curve
+ @param x x point
+ @param y y point
+
+
+ @param curve base curve
+ @param x x point
+ @param y y point
+ @param withCompression true if encode with point compression.
+
+
+ Constructor for point at infinity
+
+
+ Class representing a simple version of a big decimal. A
+ SimpleBigDecimal is basically a
+ {@link java.math.BigInteger BigInteger} with a few digits on the right of
+ the decimal point. The number of (binary) digits on the right of the decimal
+ point is called the scale of the SimpleBigDecimal.
+ Unlike in {@link java.math.BigDecimal BigDecimal}, the scale is not adjusted
+ automatically, but must be set manually. All SimpleBigDecimals
+ taking part in the same arithmetic operation must have equal scale. The
+ result of a multiplication of two SimpleBigDecimals returns a
+ SimpleBigDecimal with double scale.
+
+
+ Returns a SimpleBigDecimal representing the same numerical
+ value as value.
+ @param value The value of the SimpleBigDecimal to be
+ created.
+ @param scale The scale of the SimpleBigDecimal to be
+ created.
+ @return The such created SimpleBigDecimal.
+
+
+ Constructor for SimpleBigDecimal. The value of the
+ constructed SimpleBigDecimal Equals bigInt /
+ 2scale .
+ @param bigInt The bigInt value parameter.
+ @param scale The scale of the constructed SimpleBigDecimal.
+
+
+ Class holding methods for point multiplication based on the window
+ τ-adic nonadjacent form (WTNAF). The algorithms are based on the
+ paper "Improved Algorithms for Arithmetic on Anomalous Binary Curves"
+ by Jerome A. Solinas. The paper first appeared in the Proceedings of
+ Crypto 1997.
+
+
+ The window width of WTNAF. The standard value of 4 is slightly less
+ than optimal for running time, but keeps space requirements for
+ precomputation low. For typical curves, a value of 5 or 6 results in
+ a better running time. When changing this value, the
+ αu 's must be computed differently, see
+ e.g. "Guide to Elliptic Curve Cryptography", Darrel Hankerson,
+ Alfred Menezes, Scott Vanstone, Springer-Verlag New York Inc., 2004,
+ p. 121-122
+
+
+ 24
+
+
+ The αu 's for a=0 as an array
+ of ZTauElements.
+
+
+ The αu 's for a=0 as an array
+ of TNAFs.
+
+
+ The αu 's for a=1 as an array
+ of ZTauElements.
+
+
+ The αu 's for a=1 as an array
+ of TNAFs.
+
+
+ Computes the norm of an element λ of
+ Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ].
+ @return The norm of λ.
+
+
+ Computes the norm of an element λ of
+ R [τ], where λ = u + vτ
+ and u and u are real numbers (elements of
+ R ).
+ @param mu The parameter μ of the elliptic curve.
+ @param u The real part of the element λ of
+ R [τ].
+ @param v The τ-adic part of the element
+ λ of R [τ].
+ @return The norm of λ.
+
+
+ Rounds an element λ of R [τ]
+ to an element of Z [τ], such that their difference
+ has minimal norm. λ is given as
+ λ = λ0 + λ1 τ.
+ @param lambda0 The component λ0 .
+ @param lambda1 The component λ1 .
+ @param mu The parameter μ of the elliptic curve. Must
+ equal 1 or -1.
+ @return The rounded element of Z [τ].
+ @throws ArgumentException if lambda0 and
+ lambda1 do not have same scale.
+
+
+ Approximate division by n. For an integer
+ k, the value λ = s k / n is
+ computed to c bits of accuracy.
+ @param k The parameter k.
+ @param s The curve parameter s0 or
+ s1 .
+ @param vm The Lucas Sequence element Vm .
+ @param a The parameter a of the elliptic curve.
+ @param m The bit length of the finite field
+ F m .
+ @param c The number of bits of accuracy, i.e. the scale of the returned
+ SimpleBigDecimal.
+ @return The value λ = s k / n computed to
+ c bits of accuracy.
+
+
+ Computes the τ-adic NAF (non-adjacent form) of an
+ element λ of Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ].
+ @return The τ-adic NAF of λ.
+
+
+ Applies the operation τ() to an
+ AbstractF2mPoint.
+ @param p The AbstractF2mPoint to which τ() is applied.
+ @return τ(p)
+
+
+ Returns the parameter μ of the elliptic curve.
+ @param curve The elliptic curve from which to obtain μ.
+ The curve must be a Koblitz curve, i.e. a Equals
+ 0 or 1 and b Equals
+ 1.
+ @return μ of the elliptic curve.
+ @throws ArgumentException if the given ECCurve is not a Koblitz
+ curve.
+
+
+ Calculates the Lucas Sequence elements Uk-1 and
+ Uk or Vk-1 and
+ Vk .
+ @param mu The parameter μ of the elliptic curve.
+ @param k The index of the second element of the Lucas Sequence to be
+ returned.
+ @param doV If set to true, computes Vk-1 and
+ Vk , otherwise Uk-1 and
+ Uk .
+ @return An array with 2 elements, containing Uk-1
+ and Uk or Vk-1
+ and Vk .
+
+
+ Computes the auxiliary value tw . If the width is
+ 4, then for mu = 1, tw = 6 and for
+ mu = -1, tw = 10
+ @param mu The parameter μ of the elliptic curve.
+ @param w The window width of the WTNAF.
+ @return the auxiliary value tw
+
+
+ Computes the auxiliary values s0 and
+ s1 used for partial modular reduction.
+ @param curve The elliptic curve for which to compute
+ s0 and s1 .
+ @throws ArgumentException if curve is not a
+ Koblitz curve (Anomalous Binary Curve, ABC).
+
+
+ Partial modular reduction modulo
+ (τm - 1)/(τ - 1).
+ @param k The integer to be reduced.
+ @param m The bitlength of the underlying finite field.
+ @param a The parameter a of the elliptic curve.
+ @param s The auxiliary values s0 and
+ s1 .
+ @param mu The parameter μ of the elliptic curve.
+ @param c The precision (number of bits of accuracy) of the partial
+ modular reduction.
+ @return ρ := k partmod (τm - 1)/(τ - 1)
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by a BigInteger using the reduced τ-adic
+ NAF (RTNAF) method.
+ @param p The AbstractF2mPoint to Multiply.
+ @param k The BigInteger by which to Multiply p.
+ @return k * p
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the τ-adic NAF (TNAF) method.
+ @param p The AbstractF2mPoint to Multiply.
+ @param lambda The element λ of
+ Z [τ].
+ @return λ * p
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the τ-adic NAF (TNAF) method, given the TNAF
+ of λ.
+ @param p The AbstractF2mPoint to Multiply.
+ @param u The the TNAF of λ..
+ @return λ * p
+
+
+ Computes the [τ]-adic window NAF of an element
+ λ of Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ] of which to compute the
+ [τ]-adic NAF.
+ @param width The window width of the resulting WNAF.
+ @param pow2w 2width .
+ @param tw The auxiliary value tw .
+ @param alpha The αu 's for the window width.
+ @return The [τ]-adic window NAF of
+ λ.
+
+
+ Does the precomputation for WTNAF multiplication.
+ @param p The ECPoint for which to do the precomputation.
+ @param a The parameter a of the elliptic curve.
+ @return The precomputation array for p.
+
+
+ Class representing an element of Z [τ]. Let
+ λ be an element of Z [τ]. Then
+ λ is given as λ = u + vτ. The
+ components u and v may be used directly, there
+ are no accessor methods.
+ Immutable class.
+
+
+ The "real" part of λ.
+
+
+ The "τ-adic" part of λ.
+
+
+ Constructor for an element λ of
+ Z [τ].
+ @param u The "real" part of λ.
+ @param v The "τ-adic" part of
+ λ.
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+ @param withCompression if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(boolean)}
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ Joye's double-add algorithm.
+
+
+ Interface for classes encapsulating a point multiplication algorithm
+ for ECPoints.
+
+
+ Multiplies the ECPoint p by k, i.e.
+ p is added k times to itself.
+ @param p The ECPoint to be multiplied.
+ @param k The factor by which p is multiplied.
+ @return p multiplied by k.
+
+
+ Class holding precomputation data for fixed-point multiplications.
+
+
+ Array holding the precomputed ECPoints used for a fixed
+ point multiplication.
+
+
+ The width used for the precomputation. If a larger width precomputation
+ is already available this may be larger than was requested, so calling
+ code should refer to the actual width.
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (right-to-left) using
+ mixed coordinates.
+
+
+ By default, addition will be done in Jacobian coordinates, and doubling will be done in
+ Modified Jacobian coordinates (independent of the original coordinate system of each point).
+
+
+ Montgomery ladder.
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (left-to-right).
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (right-to-left).
+
+
+ Interface for classes storing precomputation data for multiplication
+ algorithms. Used as a Memento (see GOF patterns) for
+ WNafMultiplier.
+
+
+ Class implementing the WNAF (Window Non-Adjacent Form) multiplication
+ algorithm.
+
+
+ Multiplies this by an integer k using the
+ Window NAF method.
+ @param k The integer by which this is multiplied.
+ @return A new ECPoint which equals this
+ multiplied by k.
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @return the window size to use
+
+
+ Class holding precomputation data for the WNAF (Window Non-Adjacent Form)
+ algorithm.
+
+
+ Array holding the precomputed ECPoints used for a Window
+ NAF multiplication.
+
+
+ Array holding the negations of the precomputed ECPoints used
+ for a Window NAF multiplication.
+
+
+ Holds an ECPoint representing Twice(this). Used for the
+ Window NAF multiplication to create or extend the precomputed values.
+
+
+ Computes the Window NAF (non-adjacent Form) of an integer.
+ @param width The width w of the Window NAF. The width is
+ defined as the minimal number w, such that for any
+ w consecutive digits in the resulting representation, at
+ most one is non-zero.
+ @param k The integer of which the Window NAF is computed.
+ @return The Window NAF of the given width, such that the following holds:
+ k = ∑i=0 l-1 ki 2i
+ , where the ki denote the elements of the
+ returned byte[].
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @return the window size to use
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @param windowSizeCutoffs a monotonically increasing list of bit sizes at which to increment the window width
+ @return the window size to use
+
+
+ Class implementing the WTNAF (Window
+ τ-adic Non-Adjacent Form) algorithm.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by k using the reduced τ-adic NAF (RTNAF)
+ method.
+ @param p The AbstractF2mPoint to multiply.
+ @param k The integer by which to multiply k.
+ @return p multiplied by k.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ] using
+ the τ-adic NAF (TNAF) method.
+ @param p The AbstractF2mPoint to multiply.
+ @param lambda The element λ of
+ Z [τ] of which to compute the
+ [τ]-adic NAF.
+ @return p multiplied by λ.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the window τ-adic NAF (TNAF) method, given the
+ WTNAF of λ.
+ @param p The AbstractF2mPoint to multiply.
+ @param u The the WTNAF of λ..
+ @return λ * p
+
+
+ Class holding precomputation data for the WTNAF (Window
+ τ-adic Non-Adjacent Form) algorithm.
+
+
+ Array holding the precomputed AbstractF2mPoints used for the
+ WTNAF multiplication in
+ {@link org.bouncycastle.math.ec.multiplier.WTauNafMultiplier.multiply()
+ WTauNafMultiplier.multiply()}.
+
+
+ 'Zeroless' Signed Digit Left-to-Right.
+
+
+ 'Zeroless' Signed Digit Right-to-Left.
+
+
+
+
+ BasicOcspResponse ::= SEQUENCE {
+ tbsResponseData ResponseData,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL
+ }
+
+
+
+
+ The DER encoding of the tbsResponseData field.
+ In the event of an encoding error.
+
+
+ The certificates, if any, associated with the response.
+ In the event of an encoding error.
+
+
+
+ Verify the signature against the tbsResponseData object we contain.
+
+
+
+ The ASN.1 encoded representation of this object.
+
+
+ Generator for basic OCSP response objects.
+
+
+ basic constructor
+
+
+ construct with the responderID to be the SHA-1 keyHash of the passed in public key.
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param certStatus status of the certificate - null if okay
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param nextUpdate date when next update should be requested
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param thisUpdate date this response was valid on
+ @param nextUpdate date when next update should be requested
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Set the extensions for the response.
+
+ @param responseExtensions the extension object to carry.
+
+
+
+ Generate the signed response using the passed in signature calculator.
+
+ Implementation of signing calculator factory.
+ The certificate chain associated with the response signer.
+ "produced at" date.
+
+
+
+ Return an IEnumerable of the signature names supported by the generator.
+
+ @return an IEnumerable containing recognised names.
+
+
+ create from an issuer certificate and the serial number of the
+ certificate it signed.
+ @exception OcspException if any problems occur creating the id fields.
+
+
+ return the serial number for the certificate associated
+ with this request.
+
+
+ Create a new CertificateID for a new serial number derived from a previous one
+ calculated for the same CA certificate.
+
+ @param original the previously calculated CertificateID for the CA.
+ @param newSerialNumber the serial number for the new certificate of interest.
+
+ @return a new CertificateID for newSerialNumber
+
+
+
+ OcspRequest ::= SEQUENCE {
+ tbsRequest TBSRequest,
+ optionalSignature [0] EXPLICIT Signature OPTIONAL }
+
+ TBSRequest ::= SEQUENCE {
+ version [0] EXPLICIT Version DEFAULT v1,
+ requestorName [1] EXPLICIT GeneralName OPTIONAL,
+ requestList SEQUENCE OF Request,
+ requestExtensions [2] EXPLICIT Extensions OPTIONAL }
+
+ Signature ::= SEQUENCE {
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL}
+
+ Version ::= INTEGER { v1(0) }
+
+ Request ::= SEQUENCE {
+ reqCert CertID,
+ singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL }
+
+ CertID ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ issuerNameHash OCTET STRING, -- Hash of Issuer's DN
+ issuerKeyHash OCTET STRING, -- Hash of Issuers public key
+ serialNumber CertificateSerialNumber }
+
+
+
+ Return the DER encoding of the tbsRequest field.
+ @return DER encoding of tbsRequest
+ @throws OcspException in the event of an encoding error.
+
+
+ return the object identifier representing the signature algorithm
+
+
+ If the request is signed return a possibly empty CertStore containing the certificates in the
+ request. If the request is not signed the method returns null.
+
+ @return null if not signed, a CertStore otherwise
+ @throws OcspException
+
+
+ Return whether or not this request is signed.
+
+ @return true if signed false otherwise.
+
+
+ Verify the signature against the TBSRequest object we contain.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Add a request for the given CertificateID.
+
+ @param certId certificate ID of interest
+
+
+ Add a request with extensions
+
+ @param certId certificate ID of interest
+ @param singleRequestExtensions the extensions to attach to the request
+
+
+ Set the requestor name to the passed in X509Principal
+
+ @param requestorName a X509Principal representing the requestor name.
+
+
+ Generate an unsigned request
+
+ @return the OcspReq
+ @throws OcspException
+
+
+ Return an IEnumerable of the signature names supported by the generator.
+
+ @return an IEnumerable containing recognised names.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ base generator for an OCSP response - at the moment this only supports the
+ generation of responses containing BasicOCSP responses.
+
+
+ note 4 is not used.
+
+
+ Carrier for a ResponderID.
+
+
+ wrapper for the RevokedInfo object
+
+
+ return the revocation reason. Note: this field is optional, test for it
+ with hasRevocationReason() first.
+ @exception InvalidOperationException if a reason is asked for and none is avaliable
+
+
+ Return the status object for the response - null indicates good.
+
+ @return the status object for the response, null if it is good.
+
+
+ return the NextUpdate value - note: this is an optional field so may
+ be returned as null.
+
+ @return nextUpdate, or null if not present.
+
+
+ wrapper for the UnknownInfo object
+
+
+
+ Utility class for creating IBasicAgreement objects from their names/Oids
+
+
+
+
+ Cipher Utility class contains methods that can not be specifically grouped into other classes.
+
+
+
+
+ Returns a ObjectIdentifier for a give encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ Utility class for creating IDigest objects from their names/Oids
+
+
+
+
+ Returns a ObjectIdentifier for a given digest mechanism.
+
+ A string representation of the digest meanism.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ A class containing methods to interface the BouncyCastle world to the .NET Crypto world.
+
+
+
+
+ Create an System.Security.Cryptography.X509Certificate from an X509Certificate Structure.
+
+
+ A System.Security.Cryptography.X509Certificate.
+
+
+
+ Utility class for creating HMac object from their names/Oids
+
+
+
+
+
+
+
+
+
+ Returns a ObjectIdentifier for a give encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ Create and auto-seed an instance based on the given algorithm.
+
+ Equivalent to GetInstance(algorithm, true)
+ e.g. "SHA256PRNG"
+
+
+
+ Create an instance based on the given algorithm, with optional auto-seeding
+
+ e.g. "SHA256PRNG"
+ If true, the instance will be auto-seeded.
+
+
+
+ To replicate existing predictable output, replace with GetInstance("SHA1PRNG", false), followed by SetSeed(seed)
+
+
+
+ Use the specified instance of IRandomGenerator as random source.
+
+ This constructor performs no seeding of either the IRandomGenerator or the
+ constructed SecureRandom . It is the responsibility of the client to provide
+ proper seed material as necessary/appropriate for the given IRandomGenerator
+ implementation.
+
+ The source to generate all random bytes from.
+
+
+ base constructor.
+
+
+ create a SecurityUtilityException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+
+ Signer Utility class contains methods that can not be specifically grouped into other classes.
+
+
+
+
+ Returns an ObjectIdentifier for a given encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the OID is not available.
+
+
+
+ Utility class for creating IWrapper objects from their names/Oids
+
+
+
+ PEM generator for the original set of PEM objects used in Open SSL.
+
+
+ Class for reading OpenSSL PEM encoded streams containing
+ X509 certificates, PKCS8 encoded keys and PKCS7 objects.
+
+ In the case of PKCS7 objects the reader will return a CMS ContentInfo object. Keys and
+ Certificates will be returned using the appropriate java.security type.
+
+
+ Create a new PemReader
+
+ @param reader the Reader
+
+
+ Create a new PemReader with a password finder
+
+ @param reader the Reader
+ @param pFinder the password finder
+
+
+ Reads in a X509Certificate.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a X509CRL.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a PKCS10 certification request.
+
+ @return the certificate request.
+ @throws IOException if an I/O error occured
+
+
+ Reads in a X509 Attribute Certificate.
+
+ @return the X509 Attribute Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a PKCS7 object. This returns a ContentInfo object suitable for use with the CMS
+ API.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Read a Key Pair
+
+
+ General purpose writer for OpenSSL PEM objects.
+
+
+ The TextWriter object to write the output to.
+
+
+ Constructor for an unencrypted private key PEM object.
+
+ @param key private key to be encoded.
+
+
+ Constructor for an encrypted private key PEM object.
+
+ @param key private key to be encoded
+ @param algorithm encryption algorithm to use
+ @param provider provider to use
+ @throws NoSuchAlgorithmException if algorithm/mode cannot be found
+
+
+
+ A class for verifying and creating Pkcs10 Certification requests.
+
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+ see
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ Name of Sig Alg.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+ Matching Private key for nominated (above) public key to be used to sign the request.
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ The factory for signature calculators to sign the PKCS#10 request with.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+ Matching Private key for nominated (above) public key to be used to sign the request.
+
+
+
+ Get the public key.
+
+ The public key.
+
+
+
+ Verify Pkcs10 Cert Request is valid.
+
+ true = valid.
+
+
+
+ A class for creating and verifying Pkcs10 Certification requests (this is an extension on ).
+ The requests are made using delay signing. This is useful for situations where
+ the private key is in another environment and not directly accessible (e.g. HSM)
+ So the first step creates the request, then the signing is done outside this
+ object and the signature is then used to complete the request.
+
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+ see
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ Name of Sig Alg.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+
+ After the object is constructed use the and finally the
+ SignRequest methods to finalize the request.
+
+
+
+ simply return the cert entry for the private key
+
+
+ Utility class for reencoding PKCS#12 files to definite length.
+
+
+ Just re-encode the outer layer of the PKCS#12 file to definite length encoding.
+
+ @param berPKCS12File - original PKCS#12 file
+ @return a byte array representing the DER encoding of the PFX structure
+ @throws IOException
+
+
+ Re-encode the PKCS#12 structure to definite length encoding at the inner layer
+ as well, recomputing the MAC accordingly.
+
+ @param berPKCS12File - original PKCS12 file.
+ @param provider - provider to use for MAC calculation.
+ @return a byte array representing the DER encoding of the PFX structure.
+ @throws IOException on parsing, encoding errors.
+
+
+
+ Returns the revocationDate.
+
+
+
+
+ Returns the certStatus.
+
+
+
+ Returns an immutable Set of X.509 attribute certificate
+ extensions that this PkixAttrCertChecker supports or
+ null if no extensions are supported.
+
+ Each element of the set is a String representing the
+ Object Identifier (OID) of the X.509 extension that is supported.
+
+
+ All X.509 attribute certificate extensions that a
+ PkixAttrCertChecker might possibly be able to process
+ should be included in the set.
+
+
+ @return an immutable Set of X.509 extension OIDs (in
+ String format) supported by this
+ PkixAttrCertChecker, or null if no
+ extensions are supported
+
+
+ Performs checks on the specified attribute certificate. Every handled
+ extension is rmeoved from the unresolvedCritExts
+ collection.
+
+ @param attrCert The attribute certificate to be checked.
+ @param certPath The certificate path which belongs to the attribute
+ certificate issuer public key certificate.
+ @param holderCertPath The certificate path which belongs to the holder
+ certificate.
+ @param unresolvedCritExts a Collection of OID strings
+ representing the current set of unresolved critical extensions
+ @throws CertPathValidatorException if the specified attribute certificate
+ does not pass the check.
+
+
+ Returns a clone of this object.
+
+ @return a copy of this PkixAttrCertChecker
+
+
+ Build and validate a CertPath using the given parameter.
+
+ @param params PKIXBuilderParameters object containing all information to
+ build the CertPath
+
+
+ CertPathValidatorSpi implementation for X.509 Attribute Certificates la RFC 3281.
+
+ @see org.bouncycastle.x509.ExtendedPkixParameters
+
+
+ Validates an attribute certificate with the given certificate path.
+
+
+ params must be an instance of
+ ExtendedPkixParameters.
+
+ The target constraints in the params must be an
+ X509AttrCertStoreSelector with at least the attribute
+ certificate criterion set. Obey that also target informations may be
+ necessary to correctly validate this attribute certificate.
+
+ The attribute certificate issuer must be added to the trusted attribute
+ issuers with {@link ExtendedPkixParameters#setTrustedACIssuers(Set)}.
+
+ @param certPath The certificate path which belongs to the attribute
+ certificate issuer public key certificate.
+ @param params The PKIX parameters.
+ @return A PKIXCertPathValidatorResult of the result of
+ validating the certPath.
+ @throws InvalidAlgorithmParameterException if params is
+ inappropriate for this validator.
+ @throws CertPathValidatorException if the verification fails.
+
+
+
+ Summary description for PkixBuilderParameters.
+
+
+
+ Returns an instance of PkixBuilderParameters.
+
+ This method can be used to get a copy from other
+ PKIXBuilderParameters, PKIXParameters,
+ and ExtendedPKIXParameters instances.
+
+
+ @param pkixParams The PKIX parameters to create a copy of.
+ @return An PkixBuilderParameters instance.
+
+
+
+ Excluded certificates are not used for building a certification path.
+
+ the excluded certificates.
+
+
+
+ Sets the excluded certificates which are not used for building a
+ certification path. If the ISet is null an
+ empty set is assumed.
+
+
+ The given set is cloned to protect it against subsequent modifications.
+
+ The excluded certificates to set.
+
+
+ Can alse handle ExtendedPKIXBuilderParameters and
+ PKIXBuilderParameters.
+
+ @param params Parameters to set.
+ @see org.bouncycastle.x509.ExtendedPKIXParameters#setParams(java.security.cert.PKIXParameters)
+
+
+ Makes a copy of this PKIXParameters object. Changes to the
+ copy will not affect the original and vice versa.
+
+ @return a copy of this PKIXParameters object
+
+
+ An immutable sequence of certificates (a certification path).
+
+ This is an abstract class that defines the methods common to all CertPaths.
+ Subclasses can handle different kinds of certificates (X.509, PGP, etc.).
+
+ All CertPath objects have a type, a list of Certificates, and one or more
+ supported encodings. Because the CertPath class is immutable, a CertPath
+ cannot change in any externally visible way after being constructed. This
+ stipulation applies to all public fields and methods of this class and any
+ added or overridden by subclasses.
+
+ The type is a string that identifies the type of Certificates in the
+ certification path. For each certificate cert in a certification path
+ certPath, cert.getType().equals(certPath.getType()) must be true.
+
+ The list of Certificates is an ordered List of zero or more Certificates.
+ This List and all of the Certificates contained in it must be immutable.
+
+ Each CertPath object must support one or more encodings so that the object
+ can be translated into a byte array for storage or transmission to other
+ parties. Preferably, these encodings should be well-documented standards
+ (such as PKCS#7). One of the encodings supported by a CertPath is considered
+ the default encoding. This encoding is used if no encoding is explicitly
+ requested (for the {@link #getEncoded()} method, for instance).
+
+ All CertPath objects are also Serializable. CertPath objects are resolved
+ into an alternate {@link CertPathRep} object during serialization. This
+ allows a CertPath object to be serialized into an equivalent representation
+ regardless of its underlying implementation.
+
+ CertPath objects can be created with a CertificateFactory or they can be
+ returned by other classes, such as a CertPathBuilder.
+
+ By convention, X.509 CertPaths (consisting of X509Certificates), are ordered
+ starting with the target certificate and ending with a certificate issued by
+ the trust anchor. That is, the issuer of one certificate is the subject of
+ the following one. The certificate representing the
+ {@link TrustAnchor TrustAnchor} should not be included in the certification
+ path. Unvalidated X.509 CertPaths may not follow these conventions. PKIX
+ CertPathValidators will detect any departure from these conventions that
+ cause the certification path to be invalid and throw a
+ CertPathValidatorException.
+
+ Concurrent Access
+
+ All CertPath objects must be thread-safe. That is, multiple threads may
+ concurrently invoke the methods defined in this class on a single CertPath
+ object (or more than one) with no ill effects. This is also true for the List
+ returned by CertPath.getCertificates.
+
+ Requiring CertPath objects to be immutable and thread-safe allows them to be
+ passed around to various pieces of code without worrying about coordinating
+ access. Providing this thread-safety is generally not difficult, since the
+ CertPath and List objects in question are immutable.
+
+ @see CertificateFactory
+ @see CertPathBuilder
+
+ CertPath implementation for X.509 certificates.
+
+
+
+ @param certs
+
+
+ Creates a CertPath of the specified type.
+ This constructor is protected because most users should use
+ a CertificateFactory to create CertPaths.
+ @param type the standard name of the type of Certificatesin this path
+
+
+
+ Creates a CertPath of the specified type.
+ This constructor is protected because most users should use
+ a CertificateFactory to create CertPaths.
+
+ @param type the standard name of the type of Certificatesin this path
+
+
+
+ Returns an iteration of the encodings supported by this
+ certification path, with the default encoding
+ first. Attempts to modify the returned Iterator via its
+ remove method result in an UnsupportedOperationException.
+
+ @return an Iterator over the names of the supported encodings (as Strings)
+
+
+
+ Compares this certification path for equality with the specified object.
+ Two CertPaths are equal if and only if their types are equal and their
+ certificate Lists (and by implication the Certificates in those Lists)
+ are equal. A CertPath is never equal to an object that is not a CertPath.
+
+ This algorithm is implemented by this method. If it is overridden, the
+ behavior specified here must be maintained.
+
+ @param other
+ the object to test for equality with this certification path
+
+ @return true if the specified object is equal to this certification path,
+ false otherwise
+
+ @see Object#hashCode() Object.hashCode()
+
+
+ Returns the encoded form of this certification path, using
+ the default encoding.
+
+ @return the encoded bytes
+ @exception CertificateEncodingException if an encoding error occurs
+
+
+
+ Returns the encoded form of this certification path, using
+ the specified encoding.
+
+ @param encoding the name of the encoding to use
+ @return the encoded bytes
+ @exception CertificateEncodingException if an encoding error
+ occurs or the encoding requested is not supported
+
+
+
+
+ Returns the list of certificates in this certification
+ path.
+
+
+
+ Return a DERObject containing the encoded certificate.
+
+ @param cert the X509Certificate object to be encoded
+
+ @return the DERObject
+
+
+
+ Implements the PKIX CertPathBuilding algorithm for BouncyCastle.
+
+ @see CertPathBuilderSpi
+
+
+ Build and validate a CertPath using the given parameter.
+
+ @param params PKIXBuilderParameters object containing all information to
+ build the CertPath
+
+
+
+ Summary description for PkixCertPathBuilderException.
+
+
+
+
+ Summary description for PkixCertPathBuilderResult.
+
+
+
+ * Initializes the internal state of this PKIXCertPathChecker.
+ *
+ * The forward flag specifies the order that certificates
+ * will be passed to the {@link #check check} method (forward or reverse). A
+ * PKIXCertPathChecker must support reverse checking
+ * and may support forward checking.
+ *
+ *
+ * @param forward
+ * the order that certificates are presented to the
+ * check method. If true,
+ * certificates are presented from target to most-trusted CA
+ * (forward); if false, from most-trusted CA to
+ * target (reverse).
+ * @exception CertPathValidatorException
+ * if this PKIXCertPathChecker is unable to
+ * check certificates in the specified order; it should never
+ * be thrown if the forward flag is false since reverse
+ * checking must be supported
+
+
+ Indicates if forward checking is supported. Forward checking refers to
+ the ability of the PKIXCertPathChecker to perform its
+ checks when certificates are presented to the check method
+ in the forward direction (from target to most-trusted CA).
+
+ @return true if forward checking is supported,
+ false otherwise
+
+
+ * Returns an immutable Set of X.509 certificate extensions
+ * that this PKIXCertPathChecker supports (i.e. recognizes,
+ * is able to process), or null if no extensions are
+ * supported.
+ *
+ * Each element of the set is a String representing the
+ * Object Identifier (OID) of the X.509 extension that is supported. The OID
+ * is represented by a set of nonnegative integers separated by periods.
+ *
+ * All X.509 certificate extensions that a PKIXCertPathChecker
+ * might possibly be able to process should be included in the set.
+ *
+ *
+ * @return an immutable Set of X.509 extension OIDs (in
+ * String format) supported by this
+ * PKIXCertPathChecker, or null if no
+ * extensions are supported
+
+
+ Performs the check(s) on the specified certificate using its internal
+ state and removes any critical extensions that it processes from the
+ specified collection of OID strings that represent the unresolved
+ critical extensions. The certificates are presented in the order
+ specified by the init method.
+
+ @param cert
+ the Certificate to be checked
+ @param unresolvedCritExts
+ a Collection of OID strings representing the
+ current set of unresolved critical extensions
+ @exception CertPathValidatorException
+ if the specified certificate does not pass the check
+
+
+ Returns a clone of this object. Calls the Object.clone()
+ method. All subclasses which maintain state must support and override
+ this method, if necessary.
+
+ @return a copy of this PKIXCertPathChecker
+
+
+ The Service Provider Interface (SPI )
+ for the {@link CertPathValidator CertPathValidator} class. All
+ CertPathValidator implementations must include a class (the
+ SPI class) that extends this class (CertPathValidatorSpi)
+ and implements all of its methods. In general, instances of this class
+ should only be accessed through the CertPathValidator class.
+ For details, see the Java Cryptography Architecture.
+
+ Concurrent Access
+
+ Instances of this class need not be protected against concurrent
+ access from multiple threads. Threads that need to access a single
+ CertPathValidatorSpi instance concurrently should synchronize
+ amongst themselves and provide the necessary locking before calling the
+ wrapping CertPathValidator object.
+
+ However, implementations of CertPathValidatorSpi may still
+ encounter concurrency issues, since multiple threads each
+ manipulating a different CertPathValidatorSpi instance need not
+ synchronize.
+
+ CertPathValidatorSpi implementation for X.509 Certificate validation a la RFC
+ 3280.
+
+
+
+ An exception indicating one of a variety of problems encountered when
+ validating a certification path.
+
+ A CertPathValidatorException provides support for wrapping
+ exceptions. The {@link #getCause getCause} method returns the throwable,
+ if any, that caused this exception to be thrown.
+
+ A CertPathValidatorException may also include the
+ certification path that was being validated when the exception was thrown
+ and the index of the certificate in the certification path that caused the
+ exception to be thrown. Use the {@link #getCertPath getCertPath} and
+ {@link #getIndex getIndex} methods to retrieve this information.
+
+ Concurrent Access
+
+ Unless otherwise specified, the methods defined in this class are not
+ thread-safe. Multiple threads that need to access a single
+ object concurrently should synchronize amongst themselves and
+ provide the necessary locking. Multiple threads each manipulating
+ separate objects need not synchronize.
+
+ @see CertPathValidator
+
+
+
+
+ Creates a PkixCertPathValidatorException with the given detail
+ message. A detail message is a String that describes this
+ particular exception.
+
+ the detail message
+
+
+
+ Creates a PkixCertPathValidatorException with the specified
+ detail message and cause.
+
+ the detail message
+ the cause (which is saved for later retrieval by the
+ {@link #getCause getCause()} method). (A null
+ value is permitted, and indicates that the cause is
+ nonexistent or unknown.)
+
+
+
+ Creates a PkixCertPathValidatorException with the specified
+ detail message, cause, certification path, and index.
+
+ the detail message (or null if none)
+ the cause (or null if none)
+ the certification path that was in the process of being
+ validated when the error was encountered
+ the index of the certificate in the certification path that *
+
+
+
+ Returns the detail message for this CertPathValidatorException.
+
+ the detail message, or null if neither the message nor cause were specified
+
+
+ Returns the certification path that was being validated when the
+ exception was thrown.
+
+ @return the CertPath that was being validated when the
+ exception was thrown (or null if not specified)
+
+
+ Returns the index of the certificate in the certification path that
+ caused the exception to be thrown. Note that the list of certificates in
+ a CertPath is zero based. If no index has been set, -1 is
+ returned.
+
+ @return the index that has been set, or -1 if none has been set
+
+
+
+ Summary description for PkixCertPathValidatorResult.
+
+
+
+
+ Summary description for PkixCertPathValidatorUtilities.
+
+
+
+
+ key usage bits
+
+
+
+
+ Search the given Set of TrustAnchor's for one that is the
+ issuer of the given X509 certificate.
+
+ the X509 certificate
+ a Set of TrustAnchor's
+ the TrustAnchor object if found or
+ null if not.
+
+ @exception
+
+
+
+ Returns the issuer of an attribute certificate or certificate.
+
+ The attribute certificate or certificate.
+ The issuer as X500Principal.
+
+
+ Return the next working key inheriting DSA parameters if necessary.
+
+ This methods inherits DSA parameters from the indexed certificate or
+ previous certificates in the certificate chain to the returned
+ PublicKey. The list is searched upwards, meaning the end
+ certificate is at position 0 and previous certificates are following.
+
+
+ If the indexed certificate does not contain a DSA key this method simply
+ returns the public key. If the DSA key already contains DSA parameters
+ the key is also only returned.
+
+
+ @param certs The certification path.
+ @param index The index of the certificate which contains the public key
+ which should be extended with DSA parameters.
+ @return The public key of the certificate in list position
+ index extended with DSA parameters if applicable.
+ @throws Exception if DSA parameters cannot be inherited.
+
+
+
+ Return a Collection of all certificates or attribute certificates found
+ in the X509Store's that are matching the certSelect criteriums.
+
+ a {@link Selector} object that will be used to select
+ the certificates
+ a List containing only X509Store objects. These
+ are used to search for certificates.
+ a Collection of all found or
+ objects.
+ May be empty but never null.
+
+
+
+ Add the CRL issuers from the cRLIssuer field of the distribution point or
+ from the certificate if not given to the issuer criterion of the
+ selector.
+
+ The issuerPrincipals are a collection with a single
+ X500Principal for X509Certificates. For
+ {@link X509AttributeCertificate}s the issuer may contain more than one
+ X500Principal.
+
+
+ @param dp The distribution point.
+ @param issuerPrincipals The issuers of the certificate or attribute
+ certificate which contains the distribution point.
+ @param selector The CRL selector.
+ @param pkixParams The PKIX parameters containing the cert stores.
+ @throws Exception if an exception occurs while processing.
+ @throws ClassCastException if issuerPrincipals does not
+ contain only X500Principals.
+
+
+ Fetches complete CRLs according to RFC 3280.
+
+ @param dp The distribution point for which the complete CRL
+ @param cert The X509Certificate or
+ {@link org.bouncycastle.x509.X509AttributeCertificate} for
+ which the CRL should be searched.
+ @param currentDate The date for which the delta CRLs must be valid.
+ @param paramsPKIX The extended PKIX parameters.
+ @return A Set of X509CRLs with complete
+ CRLs.
+ @throws Exception if an exception occurs while picking the CRLs
+ or no CRLs are found.
+
+
+ Fetches delta CRLs according to RFC 3280 section 5.2.4.
+
+ @param currentDate The date for which the delta CRLs must be valid.
+ @param paramsPKIX The extended PKIX parameters.
+ @param completeCRL The complete CRL the delta CRL is for.
+ @return A Set of X509CRLs with delta CRLs.
+ @throws Exception if an exception occurs while picking the delta
+ CRLs.
+
+
+ Find the issuer certificates of a given certificate.
+
+ @param cert
+ The certificate for which an issuer should be found.
+ @param pkixParams
+ @return A Collection object containing the issuer
+ X509Certificates. Never null.
+
+ @exception Exception
+ if an error occurs.
+
+
+
+ Extract the value of the given extension, if it exists.
+
+ The extension object.
+ The object identifier to obtain.
+ Asn1Object
+ if the extension cannot be read.
+
+
+
+ crl checking
+ Return a Collection of all CRLs found in the X509Store's that are
+ matching the crlSelect criteriums.
+
+ a {@link X509CRLStoreSelector} object that will be used
+ to select the CRLs
+ a List containing only {@link org.bouncycastle.x509.X509Store
+ X509Store} objects. These are used to search for CRLs
+ a Collection of all found {@link X509CRL X509CRL} objects. May be
+ empty but never null.
+
+
+
+ Returns the intersection of the permitted IP ranges in
+ permitted with ip.
+
+ @param permitted A Set of permitted IP addresses with
+ their subnet mask as byte arrays.
+ @param ips The IP address with its subnet mask.
+ @return The Set of permitted IP ranges intersected with
+ ip.
+
+
+ Returns the union of the excluded IP ranges in excluded
+ with ip.
+
+ @param excluded A Set of excluded IP addresses with their
+ subnet mask as byte arrays.
+ @param ip The IP address with its subnet mask.
+ @return The Set of excluded IP ranges unified with
+ ip as byte arrays.
+
+
+ Calculates the union if two IP ranges.
+
+ @param ipWithSubmask1 The first IP address with its subnet mask.
+ @param ipWithSubmask2 The second IP address with its subnet mask.
+ @return A Set with the union of both addresses.
+
+
+ Calculates the interesction if two IP ranges.
+
+ @param ipWithSubmask1 The first IP address with its subnet mask.
+ @param ipWithSubmask2 The second IP address with its subnet mask.
+ @return A Set with the single IP address with its subnet
+ mask as a byte array or an empty Set.
+
+
+ Concatenates the IP address with its subnet mask.
+
+ @param ip The IP address.
+ @param subnetMask Its subnet mask.
+ @return The concatenated IP address with its subnet mask.
+
+
+ Splits the IP addresses and their subnet mask.
+
+ @param ipWithSubmask1 The first IP address with the subnet mask.
+ @param ipWithSubmask2 The second IP address with the subnet mask.
+ @return An array with two elements. Each element contains the IP address
+ and the subnet mask in this order.
+
+
+ Based on the two IP addresses and their subnet masks the IP range is
+ computed for each IP address - subnet mask pair and returned as the
+ minimum IP address and the maximum address of the range.
+
+ @param ip1 The first IP address.
+ @param subnetmask1 The subnet mask of the first IP address.
+ @param ip2 The second IP address.
+ @param subnetmask2 The subnet mask of the second IP address.
+ @return A array with two elements. The first/second element contains the
+ min and max IP address of the first/second IP address and its
+ subnet mask.
+
+
+ Checks if the IP ip is included in the permitted ISet
+ permitted.
+
+ @param permitted A Set of permitted IP addresses with
+ their subnet mask as byte arrays.
+ @param ip The IP address.
+ @throws PkixNameConstraintValidatorException
+ if the IP is not permitted.
+
+
+ Checks if the IP ip is included in the excluded ISet
+ excluded.
+
+ @param excluded A Set of excluded IP addresses with their
+ subnet mask as byte arrays.
+ @param ip The IP address.
+ @throws PkixNameConstraintValidatorException
+ if the IP is excluded.
+
+
+ Checks if the IP address ip is constrained by
+ constraint.
+
+ @param ip The IP address.
+ @param constraint The constraint. This is an IP address concatenated with
+ its subnetmask.
+ @return true if constrained, false
+ otherwise.
+
+
+ The common part of email1 and email2 is
+ added to the union union. If email1 and
+ email2 have nothing in common they are added both.
+
+ @param email1 Email address constraint 1.
+ @param email2 Email address constraint 2.
+ @param union The union.
+
+
+ The most restricting part from email1 and
+ email2 is added to the intersection intersect.
+
+ @param email1 Email address constraint 1.
+ @param email2 Email address constraint 2.
+ @param intersect The intersection.
+
+
+ Checks if the given GeneralName is in the permitted ISet.
+
+ @param name The GeneralName
+ @throws PkixNameConstraintValidatorException
+ If the name
+
+
+ Check if the given GeneralName is contained in the excluded ISet.
+
+ @param name The GeneralName.
+ @throws PkixNameConstraintValidatorException
+ If the name is
+ excluded.
+
+
+ Updates the permitted ISet of these name constraints with the intersection
+ with the given subtree.
+
+ @param permitted The permitted subtrees
+
+
+ Adds a subtree to the excluded ISet of these name constraints.
+
+ @param subtree A subtree with an excluded GeneralName.
+
+
+ Returns the maximum IP address.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The maximum IP address.
+
+
+ Returns the minimum IP address.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The minimum IP address.
+
+
+ Compares IP address ip1 with ip2. If ip1
+ is equal to ip2 0 is returned. If ip1 is bigger 1 is returned, -1
+ otherwise.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return 0 if ip1 is equal to ip2, 1 if ip1 is bigger, -1 otherwise.
+
+
+ Returns the logical OR of the IP addresses ip1 and
+ ip2.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The OR of ip1 and ip2.
+
+
+ Stringifies an IPv4 or v6 address with subnet mask.
+
+ @param ip The IP with subnet mask.
+ @return The stringified IP address.
+
+
+
+ Summary description for PkixParameters.
+
+
+
+ This is the default PKIX validity model. Actually there are two variants
+ of this: The PKIX model and the modified PKIX model. The PKIX model
+ verifies that all involved certificates must have been valid at the
+ current time. The modified PKIX model verifies that all involved
+ certificates were valid at the signing time. Both are indirectly choosen
+ with the {@link PKIXParameters#setDate(java.util.Date)} method, so this
+ methods sets the Date when all certificates must have been
+ valid.
+
+
+ This model uses the following validity model. Each certificate must have
+ been valid at the moment where is was used. That means the end
+ certificate must have been valid at the time the signature was done. The
+ CA certificate which signed the end certificate must have been valid,
+ when the end certificate was signed. The CA (or Root CA) certificate must
+ have been valid, when the CA certificate was signed and so on. So the
+ {@link PKIXParameters#setDate(java.util.Date)} method sets the time, when
+ the end certificate must have been valid.
It is used e.g.
+ in the German signature law.
+
+
+ Creates an instance of PKIXParameters with the specified Set of
+ most-trusted CAs. Each element of the set is a TrustAnchor.
+
+ Note that the Set is copied to protect against subsequent modifications.
+
+ @param trustAnchors
+ a Set of TrustAnchors
+
+ @exception InvalidAlgorithmParameterException
+ if the specified Set is empty
+ (trustAnchors.isEmpty() == true)
+ @exception NullPointerException
+ if the specified Set is null
+ @exception ClassCastException
+ if any of the elements in the Set are not of type
+ java.security.cert.TrustAnchor
+
+
+ Returns the required constraints on the target certificate. The
+ constraints are returned as an instance of CertSelector. If
+ null, no constraints are defined.
+
+ Note that the CertSelector returned is cloned to protect against
+ subsequent modifications.
+
+ @return a CertSelector specifying the constraints on the target
+ certificate (or null)
+
+ @see #setTargetCertConstraints(CertSelector)
+
+
+ Sets the required constraints on the target certificate. The constraints
+ are specified as an instance of CertSelector. If null, no constraints are
+ defined.
+
+ Note that the CertSelector specified is cloned to protect against
+ subsequent modifications.
+
+ @param selector
+ a CertSelector specifying the constraints on the target
+ certificate (or null)
+
+ @see #getTargetCertConstraints()
+
+
+ Returns an immutable Set of initial policy identifiers (OID strings),
+ indicating that any one of these policies would be acceptable to the
+ certificate user for the purposes of certification path processing. The
+ default return value is an empty Set, which is
+ interpreted as meaning that any policy would be acceptable.
+
+ @return an immutable Set of initial policy OIDs in String
+ format, or an empty Set (implying any policy is
+ acceptable). Never returns null.
+
+ @see #setInitialPolicies(java.util.Set)
+
+
+ Sets the Set of initial policy identifiers (OID strings),
+ indicating that any one of these policies would be acceptable to the
+ certificate user for the purposes of certification path processing. By
+ default, any policy is acceptable (i.e. all policies), so a user that
+ wants to allow any policy as acceptable does not need to call this
+ method, or can call it with an empty Set (or
+ null).
+
+ Note that the Set is copied to protect against subsequent modifications.
+
+
+ @param initialPolicies
+ a Set of initial policy OIDs in String format (or
+ null)
+
+ @exception ClassCastException
+ if any of the elements in the set are not of type String
+
+ @see #getInitialPolicies()
+
+
+ Sets a List of additional certification path checkers. If
+ the specified List contains an object that is not a PKIXCertPathChecker,
+ it is ignored.
+
+ Each PKIXCertPathChecker specified implements additional
+ checks on a certificate. Typically, these are checks to process and
+ verify private extensions contained in certificates. Each
+ PKIXCertPathChecker should be instantiated with any
+ initialization parameters needed to execute the check.
+
+ This method allows sophisticated applications to extend a PKIX
+ CertPathValidator or CertPathBuilder. Each
+ of the specified PKIXCertPathCheckers will be called, in turn, by a PKIX
+ CertPathValidator or CertPathBuilder for
+ each certificate processed or validated.
+
+ Regardless of whether these additional PKIXCertPathCheckers are set, a
+ PKIX CertPathValidator or CertPathBuilder
+ must perform all of the required PKIX checks on each certificate. The one
+ exception to this rule is if the RevocationEnabled flag is set to false
+ (see the {@link #setRevocationEnabled(boolean) setRevocationEnabled}
+ method).
+
+ Note that the List supplied here is copied and each PKIXCertPathChecker
+ in the list is cloned to protect against subsequent modifications.
+
+ @param checkers
+ a List of PKIXCertPathCheckers. May be null, in which case no
+ additional checkers will be used.
+ @exception ClassCastException
+ if any of the elements in the list are not of type
+ java.security.cert.PKIXCertPathChecker
+ @see #getCertPathCheckers()
+
+
+ Returns the List of certification path checkers. Each PKIXCertPathChecker
+ in the returned IList is cloned to protect against subsequent modifications.
+
+ @return an immutable List of PKIXCertPathCheckers (may be empty, but not
+ null)
+
+ @see #setCertPathCheckers(java.util.List)
+
+
+ Adds a PKIXCertPathChecker to the list of certification
+ path checkers. See the {@link #setCertPathCheckers setCertPathCheckers}
+ method for more details.
+
+ Note that the PKIXCertPathChecker is cloned to protect
+ against subsequent modifications.
+
+ @param checker a PKIXCertPathChecker to add to the list of
+ checks. If null, the checker is ignored (not added to list).
+
+
+ Method to support Clone() under J2ME.
+ super.Clone() does not exist and fields are not copied.
+
+ @param params Parameters to set. If this are
+ ExtendedPkixParameters they are copied to.
+
+
+ Whether delta CRLs should be used for checking the revocation status.
+ Defaults to false.
+
+
+ The validity model.
+ @see #CHAIN_VALIDITY_MODEL
+ @see #PKIX_VALIDITY_MODEL
+
+
+ Sets the Bouncy Castle Stores for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ The IList is cloned.
+
+
+ @param stores A list of stores to use.
+ @see #getStores
+ @throws ClassCastException if an element of stores is not
+ a {@link Store}.
+
+
+ Adds a Bouncy Castle {@link Store} to find CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ This method should be used to add local stores, like collection based
+ X.509 stores, if available. Local stores should be considered first,
+ before trying to use additional (remote) locations, because they do not
+ need possible additional network traffic.
+
+ If store is null it is ignored.
+
+
+ @param store The store to add.
+ @see #getStores
+
+
+ Adds an additional Bouncy Castle {@link Store} to find CRLs, certificates,
+ attribute certificates or cross certificates.
+
+ You should not use this method. This method is used for adding additional
+ X.509 stores, which are used to add (remote) locations, e.g. LDAP, found
+ during X.509 object processing, e.g. in certificates or CRLs. This method
+ is used in PKIX certification path processing.
+
+ If store is null it is ignored.
+
+
+ @param store The store to add.
+ @see #getStores()
+
+
+ Returns an IList of additional Bouncy Castle
+ Stores used for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ @return an immutable IList of additional Bouncy Castle
+ Stores. Never null.
+
+ @see #addAddionalStore(Store)
+
+
+ Returns an IList of Bouncy Castle
+ Stores used for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ @return an immutable IList of Bouncy Castle
+ Stores. Never null.
+
+ @see #setStores(IList)
+
+
+ Returns if additional {@link X509Store}s for locations like LDAP found
+ in certificates or CRLs should be used.
+
+ @return Returns true if additional stores are used.
+
+
+ Sets if additional {@link X509Store}s for locations like LDAP found in
+ certificates or CRLs should be used.
+
+ @param enabled true if additional stores are used.
+
+
+ Returns the required constraints on the target certificate or attribute
+ certificate. The constraints are returned as an instance of
+ IX509Selector. If null, no constraints are
+ defined.
+
+
+ The target certificate in a PKIX path may be a certificate or an
+ attribute certificate.
+
+ Note that the IX509Selector returned is cloned to protect
+ against subsequent modifications.
+
+ @return a IX509Selector specifying the constraints on the
+ target certificate or attribute certificate (or null)
+ @see #setTargetConstraints
+ @see X509CertStoreSelector
+ @see X509AttributeCertStoreSelector
+
+
+ Sets the required constraints on the target certificate or attribute
+ certificate. The constraints are specified as an instance of
+ IX509Selector. If null, no constraints are
+ defined.
+
+ The target certificate in a PKIX path may be a certificate or an
+ attribute certificate.
+
+ Note that the IX509Selector specified is cloned to protect
+ against subsequent modifications.
+
+
+ @param selector a IX509Selector specifying the constraints on
+ the target certificate or attribute certificate (or
+ null)
+ @see #getTargetConstraints
+ @see X509CertStoreSelector
+ @see X509AttributeCertStoreSelector
+
+
+ Returns the trusted attribute certificate issuers. If attribute
+ certificates is verified the trusted AC issuers must be set.
+
+ The returned ISet consists of TrustAnchors.
+
+ The returned ISet is immutable. Never null
+
+
+ @return Returns an immutable set of the trusted AC issuers.
+
+
+ Sets the trusted attribute certificate issuers. If attribute certificates
+ is verified the trusted AC issuers must be set.
+
+ The trustedACIssuers must be a ISet of
+ TrustAnchor
+
+ The given set is cloned.
+
+
+ @param trustedACIssuers The trusted AC issuers to set. Is never
+ null.
+ @throws ClassCastException if an element of stores is not
+ a TrustAnchor.
+
+
+ Returns the necessary attributes which must be contained in an attribute
+ certificate.
+
+ The returned ISet is immutable and contains
+ Strings with the OIDs.
+
+
+ @return Returns the necessary AC attributes.
+
+
+ Sets the necessary which must be contained in an attribute certificate.
+
+ The ISet must contain Strings with the
+ OIDs.
+
+ The set is cloned.
+
+
+ @param necessaryACAttributes The necessary AC attributes to set.
+ @throws ClassCastException if an element of
+ necessaryACAttributes is not a
+ String.
+
+
+ Returns the attribute certificates which are not allowed.
+
+ The returned ISet is immutable and contains
+ Strings with the OIDs.
+
+
+ @return Returns the prohibited AC attributes. Is never null.
+
+
+ Sets the attribute certificates which are not allowed.
+
+ The ISet must contain Strings with the
+ OIDs.
+
+ The set is cloned.
+
+
+ @param prohibitedACAttributes The prohibited AC attributes to set.
+ @throws ClassCastException if an element of
+ prohibitedACAttributes is not a
+ String.
+
+
+ Returns the attribute certificate checker. The returned set contains
+ {@link PKIXAttrCertChecker}s and is immutable.
+
+ @return Returns the attribute certificate checker. Is never
+ null.
+
+
+ Sets the attribute certificate checkers.
+
+ All elements in the ISet must a {@link PKIXAttrCertChecker}.
+
+
+ The given set is cloned.
+
+
+ @param attrCertCheckers The attribute certificate checkers to set. Is
+ never null.
+ @throws ClassCastException if an element of attrCertCheckers
+ is not a PKIXAttrCertChecker.
+
+
+
+ Summary description for PkixPolicyNode.
+
+
+
+ Constructors
+
+
+
+ This class helps to handle CRL revocation reasons mask. Each CRL handles a
+ certain set of revocation reasons.
+
+
+
+
+ Constructs are reason mask with the reasons.
+
+ The reasons.
+
+
+
+ A reason mask with no reason.
+
+
+
+
+ A mask with all revocation reasons.
+
+
+
+ Adds all reasons from the reasons mask to this mask.
+
+ @param mask The reasons mask to add.
+
+
+
+ Returns true if this reasons mask contains all possible
+ reasons.
+
+ true if this reasons mask contains all possible reasons.
+
+
+
+
+ Intersects this mask with the given reasons mask.
+
+ mask The mask to intersect with.
+ The intersection of this and teh given mask.
+
+
+
+ Returns true if the passed reasons mask has new reasons.
+
+ The reasons mask which should be tested for new reasons.
+ true if the passed reasons mask has new reasons.
+
+
+
+ Returns the reasons in this mask.
+
+
+
+ If the complete CRL includes an issuing distribution point (IDP) CRL
+ extension check the following:
+
+ (i) If the distribution point name is present in the IDP CRL extension
+ and the distribution field is present in the DP, then verify that one of
+ the names in the IDP matches one of the names in the DP. If the
+ distribution point name is present in the IDP CRL extension and the
+ distribution field is omitted from the DP, then verify that one of the
+ names in the IDP matches one of the names in the cRLIssuer field of the
+ DP.
+
+
+ (ii) If the onlyContainsUserCerts boolean is asserted in the IDP CRL
+ extension, verify that the certificate does not include the basic
+ constraints extension with the cA boolean asserted.
+
+
+ (iii) If the onlyContainsCACerts boolean is asserted in the IDP CRL
+ extension, verify that the certificate includes the basic constraints
+ extension with the cA boolean asserted.
+
+
+ (iv) Verify that the onlyContainsAttributeCerts boolean is not asserted.
+
+
+ @param dp The distribution point.
+ @param cert The certificate.
+ @param crl The CRL.
+ @throws AnnotatedException if one of the conditions is not met or an error occurs.
+
+
+ If the DP includes cRLIssuer, then verify that the issuer field in the
+ complete CRL matches cRLIssuer in the DP and that the complete CRL
+ contains an
+ g distribution point extension with the indirectCRL
+ boolean asserted. Otherwise, verify that the CRL issuer matches the
+ certificate issuer.
+
+ @param dp The distribution point.
+ @param cert The certificate ot attribute certificate.
+ @param crl The CRL for cert.
+ @throws AnnotatedException if one of the above conditions does not apply or an error
+ occurs.
+
+
+ Obtain and validate the certification path for the complete CRL issuer.
+ If a key usage extension is present in the CRL issuer's certificate,
+ verify that the cRLSign bit is set.
+
+ @param crl CRL which contains revocation information for the certificate
+ cert.
+ @param cert The attribute certificate or certificate to check if it is
+ revoked.
+ @param defaultCRLSignCert The issuer certificate of the certificate cert.
+ @param defaultCRLSignKey The public key of the issuer certificate
+ defaultCRLSignCert.
+ @param paramsPKIX paramsPKIX PKIX parameters.
+ @param certPathCerts The certificates on the certification path.
+ @return A Set with all keys of possible CRL issuer
+ certificates.
+ @throws AnnotatedException if the CRL is not valid or the status cannot be checked or
+ some error occurs.
+
+
+ Checks a distribution point for revocation information for the
+ certificate cert.
+
+ @param dp The distribution point to consider.
+ @param paramsPKIX PKIX parameters.
+ @param cert Certificate to check if it is revoked.
+ @param validDate The date when the certificate revocation status should be
+ checked.
+ @param defaultCRLSignCert The issuer certificate of the certificate cert.
+ @param defaultCRLSignKey The public key of the issuer certificate
+ defaultCRLSignCert.
+ @param certStatus The current certificate revocation status.
+ @param reasonMask The reasons mask which is already checked.
+ @param certPathCerts The certificates of the certification path.
+ @throws AnnotatedException if the certificate is revoked or the status cannot be checked
+ or some error occurs.
+
+
+ Checks a certificate if it is revoked.
+
+ @param paramsPKIX PKIX parameters.
+ @param cert Certificate to check if it is revoked.
+ @param validDate The date when the certificate revocation status should be
+ checked.
+ @param sign The issuer certificate of the certificate cert.
+ @param workingPublicKey The public key of the issuer certificate sign.
+ @param certPathCerts The certificates of the certification path.
+ @throws AnnotatedException if the certificate is revoked or the status cannot be checked
+ or some error occurs.
+
+
+ If use-deltas is set, verify the issuer and scope of the delta CRL.
+
+ @param deltaCRL The delta CRL.
+ @param completeCRL The complete CRL.
+ @param pkixParams The PKIX paramaters.
+ @throws AnnotatedException if an exception occurs.
+
+
+ Checks if an attribute certificate is revoked.
+
+ @param attrCert Attribute certificate to check if it is revoked.
+ @param paramsPKIX PKIX parameters.
+ @param issuerCert The issuer certificate of the attribute certificate
+ attrCert.
+ @param validDate The date when the certificate revocation status should
+ be checked.
+ @param certPathCerts The certificates of the certification path to be
+ checked.
+
+ @throws CertPathValidatorException if the certificate is revoked or the
+ status cannot be checked or some error occurs.
+
+
+ Searches for a holder public key certificate and verifies its
+ certification path.
+
+ @param attrCert the attribute certificate.
+ @param pkixParams The PKIX parameters.
+ @return The certificate path of the holder certificate.
+ @throws Exception if
+
+ no public key certificate can be found although holder
+ information is given by an entity name or a base certificate
+ ID
+ support classes cannot be created
+ no certification path for the public key certificate can
+ be built
+
+
+
+
+ Checks a distribution point for revocation information for the
+ certificate attrCert.
+
+ @param dp The distribution point to consider.
+ @param attrCert The attribute certificate which should be checked.
+ @param paramsPKIX PKIX parameters.
+ @param validDate The date when the certificate revocation status should
+ be checked.
+ @param issuerCert Certificate to check if it is revoked.
+ @param reasonMask The reasons mask which is already checked.
+ @param certPathCerts The certificates of the certification path to be
+ checked.
+ @throws Exception if the certificate is revoked or the status
+ cannot be checked or some error occurs.
+
+
+
+ A trust anchor or most-trusted Certification Authority (CA).
+
+ This class represents a "most-trusted CA", which is used as a trust anchor
+ for validating X.509 certification paths. A most-trusted CA includes the
+ public key of the CA, the CA's name, and any constraints upon the set of
+ paths which may be validated using this key. These parameters can be
+ specified in the form of a trusted X509Certificate or as individual
+ parameters.
+
+
+
+
+ Creates an instance of TrustAnchor with the specified X509Certificate and
+ optional name constraints, which are intended to be used as additional
+ constraints when validating an X.509 certification path.
+ The name constraints are specified as a byte array. This byte array
+ should contain the DER encoded form of the name constraints, as they
+ would appear in the NameConstraints structure defined in RFC 2459 and
+ X.509. The ASN.1 definition of this structure appears below.
+
+
+ NameConstraints ::= SEQUENCE {
+ permittedSubtrees [0] GeneralSubtrees OPTIONAL,
+ excludedSubtrees [1] GeneralSubtrees OPTIONAL }
+
+ GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
+
+ GeneralSubtree ::= SEQUENCE {
+ base GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL }
+
+ BaseDistance ::= INTEGER (0..MAX)
+
+ GeneralName ::= CHOICE {
+ otherName [0] OtherName,
+ rfc822Name [1] IA5String,
+ dNSName [2] IA5String,
+ x400Address [3] ORAddress,
+ directoryName [4] Name,
+ ediPartyName [5] EDIPartyName,
+ uniformResourceIdentifier [6] IA5String,
+ iPAddress [7] OCTET STRING,
+ registeredID [8] OBJECT IDENTIFIER}
+
+
+ Note that the name constraints byte array supplied is cloned to protect
+ against subsequent modifications.
+
+ a trusted X509Certificate
+ a byte array containing the ASN.1 DER encoding of a
+ NameConstraints extension to be used for checking name
+ constraints. Only the value of the extension is included, not
+ the OID or criticality flag. Specify null to omit the
+ parameter.
+ if the specified X509Certificate is null
+
+
+
+ Creates an instance of TrustAnchor where the
+ most-trusted CA is specified as an X500Principal and public key.
+
+
+
+ Name constraints are an optional parameter, and are intended to be used
+ as additional constraints when validating an X.509 certification path.
+
+ The name constraints are specified as a byte array. This byte array
+ contains the DER encoded form of the name constraints, as they
+ would appear in the NameConstraints structure defined in RFC 2459
+ and X.509. The ASN.1 notation for this structure is supplied in the
+ documentation for the other constructors.
+
+ Note that the name constraints byte array supplied here is cloned to
+ protect against subsequent modifications.
+
+
+ the name of the most-trusted CA as X509Name
+ the public key of the most-trusted CA
+
+ a byte array containing the ASN.1 DER encoding of a NameConstraints extension to
+ be used for checking name constraints. Only the value of the extension is included,
+ not the OID or criticality flag. Specify null to omit the parameter.
+
+
+ if caPrincipal or pubKey is null
+
+
+
+
+ Creates an instance of TrustAnchor where the most-trusted
+ CA is specified as a distinguished name and public key. Name constraints
+ are an optional parameter, and are intended to be used as additional
+ constraints when validating an X.509 certification path.
+
+ The name constraints are specified as a byte array. This byte array
+ contains the DER encoded form of the name constraints, as they would
+ appear in the NameConstraints structure defined in RFC 2459 and X.509.
+
+ the X.500 distinguished name of the most-trusted CA in RFC
+ 2253 string format
+ the public key of the most-trusted CA
+ a byte array containing the ASN.1 DER encoding of a
+ NameConstraints extension to be used for checking name
+ constraints. Only the value of the extension is included, not
+ the OID or criticality flag. Specify null to omit the
+ parameter.
+ throws NullPointerException, IllegalArgumentException
+
+
+
+ Returns the most-trusted CA certificate.
+
+
+
+
+ Returns the name of the most-trusted CA as an X509Name.
+
+
+
+
+ Returns the name of the most-trusted CA in RFC 2253 string format.
+
+
+
+
+ Returns the public key of the most-trusted CA.
+
+
+
+
+ Decode the name constraints and clone them if not null.
+
+
+
+
+ Returns a formatted string describing the TrustAnchor.
+
+ a formatted string describing the TrustAnchor
+
+
+ Recognised hash algorithms for the time stamp protocol.
+
+
+ Fetches the signature time-stamp attributes from a SignerInformation object.
+ Checks that the MessageImprint for each time-stamp matches the signature field.
+ (see RFC 3161 Appendix A).
+
+ @param signerInfo a SignerInformation to search for time-stamps
+ @return a collection of TimeStampToken objects
+ @throws TSPValidationException
+
+
+ Validate the passed in certificate as being of the correct type to be used
+ for time stamping. To be valid it must have an ExtendedKeyUsage extension
+ which has a key purpose identifier of id-kp-timeStamping.
+
+ @param cert the certificate of interest.
+ @throws TspValidationException if the certicate fails on one of the check points.
+
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Exception thrown if a TSP request or response fails to validate.
+
+ If a failure code is associated with the exception it can be retrieved using
+ the getFailureCode() method.
+
+
+ Return the failure code associated with this exception - if one is set.
+
+ @return the failure code if set, -1 otherwise.
+
+
+ Base class for an RFC 3161 Time Stamp Request.
+
+
+ Create a TimeStampRequest from the past in byte array.
+
+ @param req byte array containing the request.
+ @throws IOException if the request is malformed.
+
+
+ Create a TimeStampRequest from the past in input stream.
+
+ @param in input stream containing the request.
+ @throws IOException if the request is malformed.
+
+
+ Validate the timestamp request, checking the digest to see if it is of an
+ accepted type and whether it is of the correct length for the algorithm specified.
+
+ @param algorithms a set of string OIDS giving accepted algorithms.
+ @param policies if non-null a set of policies we are willing to sign under.
+ @param extensions if non-null a set of extensions we are willing to accept.
+ @throws TspException if the request is invalid, or processing fails.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Generator for RFC 3161 Time Stamp Request objects.
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ @throws IOException
+
+
+ add a given extension field for the standard extensions tag
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ @throws IOException
+
+
+ add a given extension field for the standard extensions tag
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+ Base class for an RFC 3161 Time Stamp Response object.
+
+
+ Create a TimeStampResponse from a byte array containing an ASN.1 encoding.
+
+ @param resp the byte array containing the encoded response.
+ @throws TspException if the response is malformed.
+ @throws IOException if the byte array doesn't represent an ASN.1 encoding.
+
+
+ Create a TimeStampResponse from an input stream containing an ASN.1 encoding.
+
+ @param input the input stream containing the encoded response.
+ @throws TspException if the response is malformed.
+ @throws IOException if the stream doesn't represent an ASN.1 encoding.
+
+
+ Check this response against to see if it a well formed response for
+ the passed in request. Validation will include checking the time stamp
+ token if the response status is GRANTED or GRANTED_WITH_MODS.
+
+ @param request the request to be checked against
+ @throws TspException if the request can not match this response.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Generator for RFC 3161 Time Stamp Responses.
+
+
+ Return an appropriate TimeStampResponse.
+
+ If genTime is null a timeNotAvailable error response will be returned.
+
+ @param request the request this response is for.
+ @param serialNumber serial number for the response token.
+ @param genTime generation time for the response token.
+ @param provider provider to use for signature calculation.
+ @return
+ @throws NoSuchAlgorithmException
+ @throws NoSuchProviderException
+ @throws TSPException
+
+
+
+ Generate a TimeStampResponse with chosen status and FailInfoField.
+
+ @param status the PKIStatus to set.
+ @param failInfoField the FailInfoField to set.
+ @param statusString an optional string describing the failure.
+ @return a TimeStampResponse with a failInfoField and optional statusString
+ @throws TSPException in case the response could not be created
+
+
+ Validate the time stamp token.
+
+ To be valid the token must be signed by the passed in certificate and
+ the certificate must be the one referred to by the SigningCertificate
+ attribute included in the hashed attributes of the token. The
+ certificate must also have the ExtendedKeyUsageExtension with only
+ KeyPurposeID.IdKPTimeStamping and have been valid at the time the
+ timestamp was created.
+
+
+ A successful call to validate means all the above are true.
+
+
+
+ Return the underlying CmsSignedData object.
+
+ @return the underlying CMS structure.
+
+
+ Return a ASN.1 encoded byte stream representing the encoded object.
+
+ @throws IOException if encoding fails.
+
+
+ basic creation - only the default attributes will be included here.
+
+
+ create with a signer with extra signed/unsigned attributes.
+
+
+ @return the nonce value, null if there isn't one.
+
+
+ General array utilities.
+
+
+
+ Are two arrays equal.
+
+ Left side.
+ Right side.
+ True if equal.
+
+
+
+ A constant time equals comparison - does not terminate early if
+ test will fail.
+
+ first array
+ second array
+ true if arrays equal, false otherwise.
+
+
+ Make a copy of a range of bytes from the passed in data array. The range can
+ extend beyond the end of the input array, in which case the return array will
+ be padded with zeroes.
+
+ @param data the array from which the data is to be copied.
+ @param from the start index at which the copying should take place.
+ @param to the final index of the range (exclusive).
+
+ @return a new byte array containing the range given.
+
+
+ BigInteger utilities.
+
+
+ Return the passed in value as an unsigned byte array.
+
+ @param value value to be converted.
+ @return a byte array without a leading zero byte if present in the signed encoding.
+
+
+ Return the passed in value as an unsigned byte array of specified length, zero-extended as necessary.
+
+ @param length desired length of result array.
+ @param n value to be converted.
+ @return a byte array of specified length, with leading zeroes as necessary given the size of n.
+
+
+ Return a random BigInteger not less than 'min' and not greater than 'max'
+
+ @param min the least value that may be generated
+ @param max the greatest value that may be generated
+ @param random the source of randomness
+ @return a random BigInteger value in the range [min,max]
+
+
+
+ Produce a copy of this object with its configuration and in its current state.
+
+
+ The returned object may be used simply to store the state, or may be used as a similar object
+ starting from the copied state.
+
+
+
+
+ Restore a copied object state into this object.
+
+
+ Implementations of this method should try to avoid or minimise memory allocation to perform the reset.
+
+ an object originally {@link #copy() copied} from an object of the same type as this instance.
+ if the provided object is not of the correct type.
+ if the other parameter is in some other way invalid.
+
+
+ Exception to be thrown on a failure to reset an object implementing Memoable.
+
+ The exception extends InvalidCastException to enable users to have a single handling case,
+ only introducing specific handling of this one if required.
+
+
+
+ Basic Constructor.
+
+ @param msg message to be associated with this exception.
+
+
+ General string utilities.
+
+
+
+ Return the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC) for a given DateTime value.
+
+ A UTC DateTime value not before epoch.
+ Number of whole milliseconds after epoch.
+ 'dateTime' is before epoch.
+
+
+
+ Create a DateTime value from the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).
+
+ Number of milliseconds since the epoch.
+ A UTC DateTime value
+
+
+
+ Return the current number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).
+
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+ @return a byte array containing the base 64 encoded data.
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+ @return a byte array containing the base 64 encoded data.
+
+
+ Encode the byte data to base 64 writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Encode the byte data to base 64 writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded input data. It is assumed the input data is valid.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the base 64 encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ encode the input data producing a base 64 output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+
+ A buffering class to allow translation from one format to another to
+ be done in discrete chunks.
+
+
+
+
+ Create a buffered Decoder.
+
+ The translater to use.
+ The size of the buffer.
+
+
+
+ Process one byte of data.
+
+ Data in.
+ Byte array for the output.
+ The offset in the output byte array to start writing from.
+ The amount of output bytes.
+
+
+
+ Process data from a byte array.
+
+ The input data.
+ Start position within input data array.
+ Amount of data to process from input data array.
+ Array to store output.
+ Position in output array to start writing from.
+ The amount of output bytes.
+
+
+
+ A class that allows encoding of data using a specific encoder to be processed in chunks.
+
+
+
+
+ Create.
+
+ The translator to use.
+ Size of the chunks.
+
+
+
+ Process one byte of data.
+
+ The byte.
+ An array to store output in.
+ Offset within output array to start writing from.
+
+
+
+
+ Process data from a byte array.
+
+ Input data Byte array containing data to be processed.
+ Start position within input data array.
+ Amount of input data to be processed.
+ Output data array.
+ Offset within output data array to start writing to.
+ The amount of data written.
+
+
+
+ Class to decode and encode Hex.
+
+
+
+ encode the input data producing a Hex encoded byte array.
+
+ @return a byte array containing the Hex encoded data.
+
+
+ encode the input data producing a Hex encoded byte array.
+
+ @return a byte array containing the Hex encoded data.
+
+
+ Hex encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Hex encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded input data. It is assumed the input data is valid.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the Hex encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the Hex encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ encode the input data producing a Hex output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+
+ A hex translator.
+
+
+
+
+ Return encoded block size.
+
+ 2
+
+
+
+ Encode some data.
+
+ Input data array.
+ Start position within input data array.
+ The amount of data to process.
+ The output data array.
+ The offset within the output data array to start writing from.
+ Amount of data encoded.
+
+
+
+ Returns the decoded block size.
+
+ 1
+
+
+
+ Decode data from a byte array.
+
+ The input data array.
+ Start position within input data array.
+ The amounty of data to process.
+ The output data array.
+ The position within the output data array to start writing from.
+ The amount of data written.
+
+
+ Encode and decode byte arrays (typically from binary to 7-bit ASCII
+ encodings).
+
+
+
+ Translator interface.
+
+
+
+ Convert binary data to and from UrlBase64 encoding. This is identical to
+ Base64 encoding, except that the padding character is "." and the other
+ non-alphanumeric characters are "-" and "_" instead of "+" and "/".
+
+ The purpose of UrlBase64 encoding is to provide a compact encoding of binary
+ data that is safe for use as an URL parameter. Base64 encoding does not
+ produce encoded values that are safe for use in URLs, since "/" can be
+ interpreted as a path delimiter; "+" is the encoded form of a space; and
+ "=" is used to separate a name from the corresponding value in an URL
+ parameter.
+
+
+
+ Encode the input data producing a URL safe base 64 encoded byte array.
+
+ @return a byte array containing the URL safe base 64 encoded data.
+
+
+ Encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Decode the URL safe base 64 encoded input data - white space will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the URL safe base 64 encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the URL safe base 64 encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ Decode the URL safe base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ Convert binary data to and from UrlBase64 encoding. This is identical to
+ Base64 encoding, except that the padding character is "." and the other
+ non-alphanumeric characters are "-" and "_" instead of "+" and "/".
+
+ The purpose of UrlBase64 encoding is to provide a compact encoding of binary
+ data that is safe for use as an URL parameter. Base64 encoding does not
+ produce encoded values that are safe for use in URLs, since "/" can be
+ interpreted as a path delimiter; "+" is the encoded form of a space; and
+ "=" is used to separate a name from the corresponding value in an URL
+ parameter.
+
+
+
+
+ Pipe all bytes from inStr to outStr , throwing StreamFlowException if greater
+ than limit bytes in inStr .
+
+
+ A
+
+
+ A
+
+
+ A
+
+ The number of bytes actually transferred, if not greater than limit
+
+
+
+
+ A
+
+
+
+
+
+ A
+
+
+ A
+
+
+
+
+
+ A
+
+
+
+
+ A generic PEM writer, based on RFC 1421
+
+
+ Base constructor.
+
+ @param out output stream to use.
+
+
+ Return the number of bytes or characters required to contain the
+ passed in object if it is PEM encoded.
+
+ @param obj pem object to be output
+ @return an estimate of the number of bytes
+
+
+ Validate the given IPv4 or IPv6 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid address, false otherwise
+
+
+ Validate the given IPv4 or IPv6 address and netmask.
+
+ @param address the IP address as a string.
+
+ @return true if a valid address with netmask, false otherwise
+
+
+ Validate the given IPv4 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid IPv4 address, false otherwise
+
+
+ Validate the given IPv6 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid IPv4 address, false otherwise
+
+
+
+ Summary description for DeflaterOutputStream.
+
+
+
+
+ Summary description for DeflaterOutputStream.
+
+
+
+
+ The Holder object.
+
+ Holder ::= SEQUENCE {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+
+ Constructs a holder for v2 attribute certificates with a hash value for
+ some type of object.
+
+ digestedObjectType can be one of the following:
+
+ 0 - publicKey - A hash of the public key of the holder must be
+ passed.
+ 1 - publicKeyCert - A hash of the public key certificate of the
+ holder must be passed.
+ 2 - otherObjectDigest - A hash of some other object type must be
+ passed. otherObjectTypeID must not be empty.
+
+
+ This cannot be used if a v1 attribute certificate is used.
+
+ @param digestedObjectType The digest object type.
+ @param digestAlgorithm The algorithm identifier for the hash.
+ @param otherObjectTypeID The object type ID if
+ digestedObjectType is
+ otherObjectDigest.
+ @param objectDigest The hash value.
+
+
+ Returns the digest object type if an object digest info is used.
+
+
+ 0 - publicKey - A hash of the public key of the holder must be
+ passed.
+ 1 - publicKeyCert - A hash of the public key certificate of the
+ holder must be passed.
+ 2 - otherObjectDigest - A hash of some other object type must be
+ passed. otherObjectTypeID must not be empty.
+
+
+
+ @return The digest object type or -1 if no object digest info is set.
+
+
+ Returns the other object type ID if an object digest info is used.
+
+ @return The other object type ID or null if no object
+ digest info is set.
+
+
+ Returns the hash if an object digest info is used.
+
+ @return The hash or null if no object digest info is set.
+
+
+ Returns the digest algorithm ID if an object digest info is used.
+
+ @return The digest algorithm ID or null if no object
+ digest info is set.
+
+
+ Return any principal objects inside the attribute certificate holder entity names field.
+
+ @return an array of IPrincipal objects (usually X509Name), null if no entity names field is set.
+
+
+ Return the principals associated with the issuer attached to this holder
+
+ @return an array of principals, null if no BaseCertificateID is set.
+
+
+ Return the serial number associated with the issuer attached to this holder.
+
+ @return the certificate serial number, null if no BaseCertificateID is set.
+
+
+ Carrying class for an attribute certificate issuer.
+
+
+ Set the issuer directly with the ASN.1 structure.
+
+ @param issuer The issuer
+
+
+ Return any principal objects inside the attribute certificate issuer object.
+ An array of IPrincipal objects (usually X509Principal).
+
+
+ Interface for an X.509 Attribute Certificate.
+
+
+ The version number for the certificate.
+
+
+ The serial number for the certificate.
+
+
+ The UTC DateTime before which the certificate is not valid.
+
+
+ The UTC DateTime after which the certificate is not valid.
+
+
+ The holder of the certificate.
+
+
+ The issuer details for the certificate.
+
+
+ Return the attributes contained in the attribute block in the certificate.
+ An array of attributes.
+
+
+ Return the attributes with the same type as the passed in oid.
+ The object identifier we wish to match.
+ An array of matched attributes, null if there is no match.
+
+
+ Return an ASN.1 encoded byte array representing the attribute certificate.
+ An ASN.1 encoded byte array.
+ If the certificate cannot be encoded.
+
+
+
+ Get all critical extension values, by oid
+
+ IDictionary with string (OID) keys and Asn1OctetString values
+
+
+
+ Get all non-critical extension values, by oid
+
+ IDictionary with string (OID) keys and Asn1OctetString values
+
+
+
+ A utility class that will extract X509Principal objects from X.509 certificates.
+
+ Use this in preference to trying to recreate a principal from a string, not all
+ DNs are what they should be, so it's best to leave them encoded where they
+ can be.
+
+
+
+ Return the issuer of the given cert as an X509Principal.
+
+
+ Return the subject of the given cert as an X509Principal.
+
+
+ Return the issuer of the given CRL as an X509Principal.
+
+
+
+ A factory to produce Public Key Info Objects.
+
+
+
+
+ Create a Subject Public Key Info object for a given public key.
+
+ One of ElGammalPublicKeyParameters, DSAPublicKeyParameter, DHPublicKeyParameters, RsaKeyParameters or ECPublicKeyParameters
+ A subject public key info object.
+ Throw exception if object provided is not one of the above.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate object and initializes it with the data
+ read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the certificates
+ read from the given input stream inStream.
+
+
+ Class for carrying the values in an X.509 Attribute.
+
+
+ @param at an object representing an attribute.
+
+
+ Create an X.509 Attribute with the type given by the passed in oid and
+ the value represented by an ASN.1 Set containing value.
+
+ @param oid type of the attribute
+ @param value value object to go into the atribute's value set.
+
+
+ Create an X.59 Attribute with the type given by the passed in oid and the
+ value represented by an ASN.1 Set containing the objects in value.
+
+ @param oid type of the attribute
+ @param value vector of values to go in the attribute's value set.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ An Object representing an X509 Certificate.
+ Has static methods for loading Certificates encoded in many forms that return X509Certificate Objects.
+
+
+
+
+ Return true if the current time is within the start and end times nominated on the certificate.
+
+ true id certificate is valid for the current time.
+
+
+
+ Return true if the nominated time is within the start and end times nominated on the certificate.
+
+ The time to test validity against.
+ True if certificate is valid for nominated time.
+
+
+
+ Checks if the current date is within certificate's validity period.
+
+
+
+
+ Checks if the given date is within certificate's validity period.
+
+ if the certificate is expired by given date
+ if the certificate is not yet valid on given date
+
+
+
+ Return the certificate's version.
+
+ An integer whose value Equals the version of the cerficate.
+
+
+
+ Return a BigInteger containing the serial number.
+
+ The Serial number.
+
+
+
+ Get the Issuer Distinguished Name. (Who signed the certificate.)
+
+ And X509Object containing name and value pairs.
+
+
+
+ Get the subject of this certificate.
+
+ An X509Name object containing name and value pairs.
+
+
+
+ The time that this certificate is valid from.
+
+ A DateTime object representing that time in the local time zone.
+
+
+
+ The time that this certificate is valid up to.
+
+ A DateTime object representing that time in the local time zone.
+
+
+
+ Return the Der encoded TbsCertificate data.
+ This is the certificate component less the signature.
+ To Get the whole certificate call the GetEncoded() member.
+
+ A byte array containing the Der encoded Certificate component.
+
+
+
+ The signature.
+
+ A byte array containg the signature of the certificate.
+
+
+
+ A meaningful version of the Signature Algorithm. (EG SHA1WITHRSA)
+
+ A sting representing the signature algorithm.
+
+
+
+ Get the Signature Algorithms Object ID.
+
+ A string containg a '.' separated object id.
+
+
+
+ Get the signature algorithms parameters. (EG DSA Parameters)
+
+ A byte array containing the Der encoded version of the parameters or null if there are none.
+
+
+
+ Get the issuers UID.
+
+ A DerBitString.
+
+
+
+ Get the subjects UID.
+
+ A DerBitString.
+
+
+
+ Get a key usage guidlines.
+
+
+
+
+ Get the public key of the subject of the certificate.
+
+ The public key parameters.
+
+
+
+ Return a Der encoded version of this certificate.
+
+ A byte array.
+
+
+
+ Verify the certificate's signature using the nominated public key.
+
+ An appropriate public key parameter object, RsaPublicKeyParameters, DsaPublicKeyParameters or ECDsaPublicKeyParameters
+ True if the signature is valid.
+ If key submitted is not of the above nominated types.
+
+
+
+ Verify the certificate's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the certificate's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the certificate algorithm is invalid.
+
+
+
+ This class contains a cross certificate pair. Cross certificates pairs may
+ contain two cross signed certificates from two CAs. A certificate from the
+ other CA to this CA is contained in the forward certificate, the certificate
+ from this CA to the other CA is contained in the reverse certificate.
+
+
+
+ Constructor
+ Certificate from the other CA to this CA.
+ Certificate from this CA to the other CA.
+
+
+ Constructor from a ASN.1 CertificatePair structure.
+ The CertificatePair ASN.1 object.
+
+
+ Returns the certificate from the other CA to this CA.
+
+
+ Returns the certificate from this CA to the other CA.
+
+
+ class for dealing with X509 certificates.
+
+ At the moment this will deal with "-----BEGIN CERTIFICATE-----" to "-----END CERTIFICATE-----"
+ base 64 encoded certs, as well as the BER binaries of certificates and some classes of PKCS#7
+ objects.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate object and initializes it with the data
+ read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the certificates
+ read from the given input stream inStream.
+
+
+ The following extensions are listed in RFC 2459 as relevant to CRLs
+
+ Authority Key Identifier
+ Issuer Alternative Name
+ CRL Number
+ Delta CRL Indicator (critical)
+ Issuing Distribution Point (critical)
+
+
+
+ Verify the CRL's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the CRL's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the CRL algorithm is invalid.
+
+
+ Returns a string representation of this CRL.
+
+ @return a string representation of this CRL.
+
+
+ Checks whether the given certificate is on this CRL.
+
+ @param cert the certificate to check for.
+ @return true if the given certificate is on this CRL,
+ false otherwise.
+
+
+ The following extensions are listed in RFC 2459 as relevant to CRL Entries
+
+ ReasonCode Hode Instruction Code Invalidity Date Certificate Issuer
+ (critical)
+
+
+ Constructor for CRLEntries of indirect CRLs. If isIndirect
+ is false {@link #getCertificateIssuer()} will always
+ return null, previousCertificateIssuer is
+ ignored. If this isIndirect is specified and this CrlEntry
+ has no certificate issuer CRL entry extension
+ previousCertificateIssuer is returned by
+ {@link #getCertificateIssuer()}.
+
+ @param c
+ TbsCertificateList.CrlEntry object.
+ @param isIndirect
+ true if the corresponding CRL is a indirect
+ CRL.
+ @param previousCertificateIssuer
+ Certificate issuer of the previous CrlEntry.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate revocation list (CRL) object and initializes
+ it with the data read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the CRLs read from
+ the given input stream inStream.
+
+ The inStream may contain a sequence of DER-encoded CRLs, or
+ a PKCS#7 CRL set. This is a PKCS#7 SignedData object, with the
+ only significant field being crls. In particular the signature
+ and the contents are ignored.
+
+
+
+ Get non critical extensions.
+
+ A set of non critical extension oids.
+
+
+
+ Get any critical extensions.
+
+ A sorted list of critical entension.
+
+
+
+ Get the value of a given extension.
+
+ The object ID of the extension.
+ An Asn1OctetString object if that extension is found or null if not.
+
+
+ A holding class for constructing an X509 Key Usage extension.
+
+
+ id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
+
+ KeyUsage ::= BIT STRING {
+ digitalSignature (0),
+ nonRepudiation (1),
+ keyEncipherment (2),
+ dataEncipherment (3),
+ keyAgreement (4),
+ keyCertSign (5),
+ cRLSign (6),
+ encipherOnly (7),
+ decipherOnly (8) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (X509KeyUsage.keyEncipherment | X509KeyUsage.dataEncipherment)
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Class to Generate X509V1 Certificates.
+
+
+
+
+ Default Constructor.
+
+
+
+
+ Reset the generator.
+
+
+
+
+ Set the certificate's serial number.
+
+ Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data.
+ You will be surprised how ugly a serial number collision can get.
+ The serial number.
+
+
+
+ Set the issuer distinguished name.
+ The issuer is the entity whose private key is used to sign the certificate.
+
+ The issuers DN.
+
+
+
+ Set the date that this certificate is to be valid from.
+
+
+
+
+
+ Set the date after which this certificate will no longer be valid.
+
+
+
+
+
+ Set the subject distinguished name.
+ The subject describes the entity associated with the public key.
+
+
+
+
+
+ Set the public key that this certificate identifies.
+
+
+
+
+
+ Set the signature algorithm that will be used to sign this certificate.
+ This can be either a name or an OID, names are treated as case insensitive.
+
+ string representation of the algorithm name
+
+
+
+ Generate a new X509Certificate.
+
+ The private key of the issuer used to sign this certificate.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate specifying a SecureRandom instance that you would like to use.
+
+ The private key of the issuer used to sign this certificate.
+ The Secure Random you want to use.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Certificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ An implementation of a version 2 X.509 Attribute Certificate.
+
+
+
+ Verify the certificate's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the certificate's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the certificate algorithm is invalid.
+
+
+ Class to produce an X.509 Version 2 AttributeCertificate.
+
+
+ Reset the generator
+
+
+ Set the Holder of this Attribute Certificate.
+
+
+ Set the issuer.
+
+
+ Set the serial number for the certificate.
+
+
+
+ Set the signature algorithm. This can be either a name or an OID, names
+ are treated as case insensitive.
+
+ The algorithm name.
+
+
+ Add an attribute.
+
+
+ Add a given extension field for the standard extensions tag.
+
+
+
+ Add a given extension field for the standard extensions tag.
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+
+
+ Generate an X509 certificate, based on the current issuer and subject.
+
+
+
+
+ Generate an X509 certificate, based on the current issuer and subject,
+ using the supplied source of randomness, if required.
+
+
+
+
+ Generate a new X.509 Attribute Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An IX509AttributeCertificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ class to produce an X.509 Version 2 CRL.
+
+
+ reset the generator
+
+
+ Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the
+ certificate.
+
+
+ Reason being as indicated by CrlReason, i.e. CrlReason.KeyCompromise
+ or 0 if CrlReason is not to be used
+
+
+
+ Add a CRL entry with an Invalidity Date extension as well as a CrlReason extension.
+ Reason being as indicated by CrlReason, i.e. CrlReason.KeyCompromise
+ or 0 if CrlReason is not to be used
+
+
+
+ Add a CRL entry with extensions.
+
+
+
+ Add the CRLEntry objects contained in a previous CRL.
+
+ @param other the X509Crl to source the other entries from.
+
+
+
+ Set the signature algorithm that will be used to sign this CRL.
+
+
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+
+ Generate an X.509 CRL, based on the current issuer and subject.
+
+ The private key of the issuer that is signing this certificate.
+ An X509Crl.
+
+
+
+ Generate an X.509 CRL, based on the current issuer and subject using the specified secure random.
+
+ The private key of the issuer that is signing this certificate.
+ Your Secure Random instance.
+ An X509Crl.
+
+
+
+ Generate a new X509Crl using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Crl.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+
+ A class to Generate Version 3 X509Certificates.
+
+
+
+
+ Reset the Generator.
+
+
+
+
+ Set the certificate's serial number.
+
+ Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data.
+ You will be surprised how ugly a serial number collision can Get.
+ The serial number.
+
+
+
+ Set the distinguished name of the issuer.
+ The issuer is the entity which is signing the certificate.
+
+ The issuer's DN.
+
+
+
+ Set the date that this certificate is to be valid from.
+
+
+
+
+
+ Set the date after which this certificate will no longer be valid.
+
+
+
+
+
+ Set the DN of the entity that this certificate is about.
+
+
+
+
+
+ Set the public key that this certificate identifies.
+
+
+
+
+
+ Set the signature algorithm that will be used to sign this certificate.
+
+
+
+
+
+ Set the subject unique ID - note: it is very rare that it is correct to do this.
+
+
+
+
+
+ Set the issuer unique ID - note: it is very rare that it is correct to do this.
+
+
+
+
+
+ Add a given extension field for the standard extensions tag (tag 3).
+
+ string containing a dotted decimal Object Identifier.
+ Is it critical.
+ The value.
+
+
+
+ Add an extension to this certificate.
+
+ Its Object Identifier.
+ Is it critical.
+ The value.
+
+
+
+ Add an extension using a string with a dotted decimal OID.
+
+ string containing a dotted decimal Object Identifier.
+ Is it critical.
+ byte[] containing the value of this extension.
+
+
+
+ Add an extension to this certificate.
+
+ Its Object Identifier.
+ Is it critical.
+ byte[] containing the value of this extension.
+
+
+
+ Add a given extension field for the standard extensions tag (tag 3),
+ copying the extension value from another certificate.
+
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ copying the extension value from another certificate.
+ @throws CertificateParsingException if the extension cannot be extracted.
+
+
+
+ Generate an X509Certificate.
+
+ The private key of the issuer that is signing this certificate.
+ An X509Certificate.
+
+
+
+ Generate an X509Certificate using your own SecureRandom.
+
+ The private key of the issuer that is signing this certificate.
+ You Secure Random instance.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Certificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ A high level authority key identifier.
+
+
+ Constructor which will take the byte[] returned from getExtensionValue()
+
+ @param encodedValue a DER octet encoded string with the extension structure in it.
+ @throws IOException on parsing errors.
+
+
+ Create an AuthorityKeyIdentifier using the passed in certificate's public
+ key, issuer and serial number.
+
+ @param certificate the certificate providing the information.
+ @throws CertificateParsingException if there is a problem processing the certificate
+
+
+ Create an AuthorityKeyIdentifier using just the hash of the
+ public key.
+
+ @param pubKey the key to generate the hash from.
+ @throws InvalidKeyException if there is a problem using the key.
+
+
+ A high level subject key identifier.
+
+
+ Constructor which will take the byte[] returned from getExtensionValue()
+
+ @param encodedValue a DER octet encoded string with the extension structure in it.
+ @throws IOException on parsing errors.
+
+
+ This class is an Selector like implementation to select
+ attribute certificates from a given set of criteria.
+
+ @see org.bouncycastle.x509.X509AttributeCertificate
+ @see org.bouncycastle.x509.X509Store
+
+
+
+ Decides if the given attribute certificate should be selected.
+
+ The attribute certificate to be checked.
+ true if the object matches this selector.
+
+
+ The attribute certificate which must be matched.
+ If null is given, any will do.
+
+
+ The criteria for validity
+ If null is given any will do.
+
+
+ The holder.
+ If null is given any will do.
+
+
+ The issuer.
+ If null is given any will do.
+
+
+ The serial number.
+ If null is given any will do.
+
+
+ Adds a target name criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target names.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name The name as a GeneralName (not null)
+
+
+ Adds a target name criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target names.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name a byte array containing the name in ASN.1 DER encoded form of a GeneralName
+ @throws IOException if a parsing error occurs.
+
+
+ Adds a collection with target names criteria. If null is
+ given any will do.
+
+ The collection consists of either GeneralName objects or byte[] arrays representing
+ DER encoded GeneralName structures.
+
+
+ @param names A collection of target names.
+ @throws IOException if a parsing error occurs.
+ @see #AddTargetName(byte[])
+ @see #AddTargetName(GeneralName)
+
+
+ Gets the target names. The collection consists of Lists
+ made up of an Integer in the first entry and a DER encoded
+ byte array or a String in the second entry.
+ The returned collection is immutable.
+
+ @return The collection of target names
+ @see #setTargetNames(Collection)
+
+
+ Adds a target group criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target groups.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param group The group as GeneralName form (not null)
+
+
+ Adds a target group criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target groups.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name a byte array containing the group in ASN.1 DER encoded form of a GeneralName
+ @throws IOException if a parsing error occurs.
+
+
+ Adds a collection with target groups criteria. If null is
+ given any will do.
+
+ The collection consists of GeneralName objects or byte[]
+ representing DER encoded GeneralNames.
+
+
+ @param names A collection of target groups.
+ @throws IOException if a parsing error occurs.
+ @see #AddTargetGroup(byte[])
+ @see #AddTargetGroup(GeneralName)
+
+
+ Gets the target groups. The collection consists of Lists
+ made up of an Integer in the first entry and a DER encoded
+ byte array or a String in the second entry.
+ The returned collection is immutable.
+
+ @return The collection of target groups.
+ @see #setTargetGroups(Collection)
+
+
+
+ This class is an IX509Selector implementation to select
+ certificate pairs, which are e.g. used for cross certificates. The set of
+ criteria is given from two X509CertStoreSelector objects,
+ each of which, if present, must match the respective component of a pair.
+
+
+
+ The certificate pair which is used for testing on equality.
+
+
+ The certificate selector for the forward part.
+
+
+ The certificate selector for the reverse part.
+
+
+
+ Decides if the given certificate pair should be selected. If
+ obj is not a X509CertificatePair, this method
+ returns false.
+
+ The X509CertificatePair to be tested.
+ true if the object matches this selector.
+
+
+
+ An ISet of DerObjectIdentifier objects.
+
+
+
+ A simple collection backed store.
+
+
+ Basic constructor.
+
+ @param collection - initial contents for the store, this is copied.
+
+
+ Return the matches in the collection for the passed in selector.
+
+ @param selector the selector to match against.
+ @return a possibly empty collection of matching objects.
+
+
+ This class contains a collection for collection based X509Stores.
+
+
+
+ Constructor.
+
+ The collection is copied.
+
+
+ The collection containing X.509 object types.
+ If collection is null.
+
+
+ Returns a copy of the ICollection.
+
+
+ Returns a formatted string describing the parameters.
+
+
+
+ An ICollection of X509Name objects
+
+
+
+ The attribute certificate being checked. This is not a criterion.
+ Rather, it is optional information that may help a {@link X509Store} find
+ CRLs that would be relevant when checking revocation for the specified
+ attribute certificate. If null is specified, then no such
+ optional information is provided.
+
+ @param attrCert the IX509AttributeCertificate being checked (or
+ null)
+ @see #getAttrCertificateChecking()
+
+
+ If true only complete CRLs are returned. Defaults to
+ false.
+
+ @return true if only complete CRLs are returned.
+
+
+ Returns if this selector must match CRLs with the delta CRL indicator
+ extension set. Defaults to false.
+
+ @return Returns true if only CRLs with the delta CRL
+ indicator extension are selected.
+
+
+ The issuing distribution point.
+
+ The issuing distribution point extension is a CRL extension which
+ identifies the scope and the distribution point of a CRL. The scope
+ contains among others information about revocation reasons contained in
+ the CRL. Delta CRLs and complete CRLs must have matching issuing
+ distribution points.
+
+ The byte array is cloned to protect against subsequent modifications.
+
+ You must also enable or disable this criteria with
+ {@link #setIssuingDistributionPointEnabled(bool)}.
+
+ @param issuingDistributionPoint The issuing distribution point to set.
+ This is the DER encoded OCTET STRING extension value.
+ @see #getIssuingDistributionPoint()
+
+
+ Whether the issuing distribution point criteria should be applied.
+ Defaults to false.
+
+ You may also set the issuing distribution point criteria if not a missing
+ issuing distribution point should be assumed.
+
+ @return Returns if the issuing distribution point check is enabled.
+
+
+ The maximum base CRL number. Defaults to null.
+
+ @return Returns the maximum base CRL number.
+ @see #setMaxBaseCRLNumber(BigInteger)
+
+
+
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net40/MimeKit.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net40/MimeKit.dll
new file mode 100644
index 00000000..9a33c999
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net40/MimeKit.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net45/BouncyCastle.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net45/BouncyCastle.dll
new file mode 100644
index 00000000..ee732537
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net45/BouncyCastle.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net45/BouncyCastle.xml b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net45/BouncyCastle.xml
new file mode 100644
index 00000000..33e81f46
--- /dev/null
+++ b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net45/BouncyCastle.xml
@@ -0,0 +1,24206 @@
+
+
+
+ BouncyCastle
+
+
+
+ Base class for both the compress and decompress classes.
+ Holds common arrays, and static data.
+
+ @author Keiron Liddle
+
+
+ An input stream that decompresses from the BZip2 format (with the file
+ header chars) to be read as any other stream.
+
+ @author Keiron Liddle
+
+ NB: note this class has been modified to read the leading BZ from the
+ start of the BZIP2 stream to make it compatible with other PGP programs.
+
+
+ An output stream that compresses into the BZip2 format (with the file
+ header chars) into another stream.
+
+ @author Keiron Liddle
+
+ TODO: Update to BZip2 1.0.1
+ NB: note this class has been modified to add a leading BZ to the
+ start of the BZIP2 stream to make it compatible with other PGP programs.
+
+
+
+ modified by Oliver Merkel, 010128
+
+
+
+ A simple class the hold and calculate the CRC for sanity checking
+ of the data.
+
+ @author Keiron Liddle
+
+
+ Return the DER encoding of the object, null if the DER encoding can not be made.
+
+ @return a DER byte array, null otherwise.
+
+
+ a general purpose ASN.1 decoder - note: this class differs from the
+ others in that it returns null after it has read the last object in
+ the stream. If an ASN.1 Null is encountered a Der/BER Null object is
+ returned.
+
+
+ Create an ASN1InputStream where no DER object will be longer than limit.
+
+ @param input stream containing ASN.1 encoded data.
+ @param limit maximum size of a DER encoded object.
+
+
+ Create an ASN1InputStream based on the input byte array. The length of DER objects in
+ the stream is automatically limited to the length of the input array.
+
+ @param input array containing ASN.1 encoded data.
+
+
+ build an object given its tag and the number of bytes to construct it from.
+
+
+ A Null object.
+
+
+ Create a base ASN.1 object from a byte array.
+ The byte array to parse.
+ The base ASN.1 object represented by the byte array.
+ If there is a problem parsing the data.
+
+
+ Read a base ASN.1 object from a stream.
+ The stream to parse.
+ The base ASN.1 object represented by the byte array.
+ If there is a problem parsing the data.
+
+
+ return an Octet string from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return an Octet string from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ @param string the octets making up the octet string.
+
+
+ return an Asn1Sequence from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Return an ASN1 sequence from a tagged object. There is a special
+ case here, if an object appears to have been explicitly tagged on
+ reading but we were expecting it to be implicitly tagged in the
+ normal course of events it indicates that we lost the surrounding
+ sequence - so we need to add it back (this will happen if the tagged
+ object is a sequence that contains other sequences). If you are
+ dealing with implicitly tagged sequences you really should
+ be using this method.
+
+ @param obj the tagged object.
+ @param explicitly true if the object is meant to be explicitly tagged,
+ false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return the object at the sequence position indicated by index.
+
+ @param index the sequence number (starting at zero) of the object
+ @return the object at the sequence position indicated by index.
+
+
+ return an ASN1Set from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Return an ASN1 set from a tagged object. There is a special
+ case here, if an object appears to have been explicitly tagged on
+ reading but we were expecting it to be implicitly tagged in the
+ normal course of events it indicates that we lost the surrounding
+ set - so we need to add it back (this will happen if the tagged
+ object is a sequence that contains other sequences). If you are
+ dealing with implicitly tagged sets you really should
+ be using this method.
+
+ @param obj the tagged object.
+ @param explicitly true if the object is meant to be explicitly tagged
+ false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return the object at the set position indicated by index.
+
+ @param index the set number (starting at zero) of the object
+ @return the object at the set position indicated by index.
+
+
+ ASN.1 TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if the object is explicitly tagged.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ return whether or not the object may be explicitly tagged.
+
+ Note: if the object has been read from an input stream, the only
+ time you can be sure if isExplicit is returning the true state of
+ affairs is if it returns false. An implicitly tagged object may appear
+ to be explicitly tagged, so you need to understand the context under
+ which the reading was done as well, see GetObject below.
+
+
+ return whatever was following the tag.
+
+ Note: tagged objects are generally context dependent if you're
+ trying to extract a tagged object you should be going via the
+ appropriate GetInstance method.
+
+
+ Return the object held in this tagged object as a parser assuming it has
+ the type of the passed in tag. If the object doesn't have a parser
+ associated with it, the base object is returned.
+
+
+ A BER Null object.
+
+
+ convert a vector of octet strings into a single byte string
+
+
+ The octets making up the octet string.
+
+
+ return the DER octets that make up this string.
+
+
+ create an empty sequence
+
+
+ create a sequence containing one object
+
+
+ create a sequence containing a vector of objects.
+
+
+ create an empty sequence
+
+
+ create a set containing one object
+
+
+ create a set containing a vector of objects.
+
+
+ BER TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if an explicitly tagged object.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ create an implicitly tagged object that contains a zero
+ length sequence.
+
+
+ Class representing the DER-type External
+
+
+ Creates a new instance of DerExternal
+ See X.690 for more informations about the meaning of these parameters
+ @param directReference The direct reference or null if not set.
+ @param indirectReference The indirect reference or null if not set.
+ @param dataValueDescriptor The data value descriptor or null if not set.
+ @param externalData The external data in its encoded form.
+
+
+ Creates a new instance of DerExternal.
+ See X.690 for more informations about the meaning of these parameters
+ @param directReference The direct reference or null if not set.
+ @param indirectReference The indirect reference or null if not set.
+ @param dataValueDescriptor The data value descriptor or null if not set.
+ @param encoding The encoding to be used for the external data
+ @param externalData The external data
+
+
+ The encoding of the content. Valid values are
+
+ 0 single-ASN1-type
+ 1 OCTET STRING
+ 2 BIT STRING
+
+
+
+ Base class for an application specific object
+
+
+ Return the enclosed object assuming explicit tagging.
+
+ @return the resulting object
+ @throws IOException if reconstruction fails.
+
+
+ Return the enclosed object assuming implicit tagging.
+
+ @param derTagNo the type tag that should be applied to the object's contents.
+ @return the resulting object
+ @throws IOException if reconstruction fails.
+
+
+ Der BMPString object.
+
+
+ return a BMP string from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a BMP string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ return a Bit string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Bit string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ @param data the octets making up the bit string.
+ @param padBits the number of extra bits at the end of the string.
+
+
+ Return the octets contained in this BIT STRING, checking that this BIT STRING really
+ does represent an octet aligned string. Only use this method when the standard you are
+ following dictates that the BIT STRING will be octet aligned.
+
+ @return a copy of the octet aligned data.
+
+
+ @return the value of the bit string as an int (truncating if necessary)
+
+
+ return a bool from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a DerBoolean from the passed in bool.
+
+
+ return a Boolean from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return an integer from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Enumerated from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ Generalized time object.
+
+
+ return a generalized time from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Generalized Time object from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ The correct format for this is YYYYMMDDHHMMSS[.f]Z, or without the Z
+ for local time, or Z+-HHMM on the end, for difference between local
+ time and UTC time. The fractional second amount f must consist of at
+ least one number with trailing zeroes removed.
+
+ @param time the time string.
+ @exception ArgumentException if string is an illegal format.
+
+
+ base constructor from a local time object
+
+
+ Return the time.
+ @return The time string as it appeared in the encoded object.
+
+
+ return the time - always in the form of
+ YYYYMMDDhhmmssGMT(+hh:mm|-hh:mm).
+
+ Normally in a certificate we would expect "Z" rather than "GMT",
+ however adding the "GMT" means we can just use:
+
+ dateF = new SimpleDateFormat("yyyyMMddHHmmssz");
+
+ To read in the time and Get a date which is compatible with our local
+ time zone.
+
+
+ return a Graphic String from the passed in object
+
+ @param obj a DerGraphicString or an object that can be converted into one.
+ @exception IllegalArgumentException if the object cannot be converted.
+ @return a DerGraphicString instance, or null.
+
+
+ return a Graphic String from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the tagged object cannot
+ be converted.
+ @return a DerGraphicString instance, or null.
+
+
+ basic constructor - with bytes.
+ @param string the byte encoding of the characters making up the string.
+
+
+ Der IA5String object - this is an ascii string.
+
+
+ return a IA5 string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an IA5 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - without validation.
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in an IA5String.
+
+
+ return true if the passed in String can be represented without
+ loss as an IA5String, false otherwise.
+
+ @return true if in printable set, false otherwise.
+
+
+ return an integer from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Integer from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ in some cases positive values Get crammed into a space,
+ that's not quite big enough...
+
+
+ A Null object.
+
+
+ Der NumericString object - this is an ascii string of characters {0,1,2,3,4,5,6,7,8,9, }.
+
+
+ return a Numeric string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Numeric string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - without validation..
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in a NumericString.
+
+
+ Return true if the string can be represented as a NumericString ('0'..'9', ' ')
+
+ @param str string to validate.
+ @return true if numeric, fale otherwise.
+
+
+ return an Oid from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an object Identifier from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ Return true if this oid is an extension of the passed in branch, stem.
+ @param stem the arc or branch that is a possible parent.
+ @return true if the branch is on the passed in stem, false otherwise.
+
+
+ The octets making up the octet string.
+
+
+ Der PrintableString object.
+
+
+ return a printable string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Printable string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor - this does not validate the string
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in a PrintableString.
+
+
+ return true if the passed in String can be represented without
+ loss as a PrintableString, false otherwise.
+
+ @return true if in printable set, false otherwise.
+
+
+ create an empty sequence
+
+
+ create a sequence containing one object
+
+
+ create a sequence containing a vector of objects.
+
+
+ A Der encoded set object
+
+
+ create an empty set
+
+
+ @param obj - a single object that makes up the set.
+
+
+ @param v - a vector of objects making up the set.
+
+
+ Der T61String (also the teletex string) - 8-bit characters
+
+
+ return a T61 string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an T61 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - with string.
+
+
+ DER TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if an explicitly tagged object.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ create an implicitly tagged object that contains a zero
+ length sequence.
+
+
+ UTC time object.
+
+
+ return an UTC Time from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an UTC Time from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ The correct format for this is YYMMDDHHMMSSZ (it used to be that seconds were
+ never encoded. When you're creating one of these objects from scratch, that's
+ what you want to use, otherwise we'll try to deal with whatever Gets read from
+ the input stream... (this is why the input format is different from the GetTime()
+ method output).
+
+ @param time the time string.
+
+
+ base constructor from a DateTime object
+
+
+ return the time as a date based on whatever a 2 digit year will return. For
+ standardised processing use ToAdjustedDateTime().
+
+ @return the resulting date
+ @exception ParseException if the date string cannot be parsed.
+
+
+ return the time as an adjusted date
+ in the range of 1950 - 2049.
+
+ @return a date in the range of 1950 to 2049.
+ @exception ParseException if the date string cannot be parsed.
+
+
+ return the time - always in the form of
+ YYMMDDhhmmssGMT(+hh:mm|-hh:mm).
+
+ Normally in a certificate we would expect "Z" rather than "GMT",
+ however adding the "GMT" means we can just use:
+
+ dateF = new SimpleDateFormat("yyMMddHHmmssz");
+
+ To read in the time and Get a date which is compatible with our local
+ time zone.
+
+ Note: In some cases, due to the local date processing, this
+ may lead to unexpected results. If you want to stick the normal
+ convention of 1950 to 2049 use the GetAdjustedTime() method.
+
+
+
+ Return a time string as an adjusted date with a 4 digit year.
+ This goes in the range of 1950 - 2049.
+
+
+
+ Der UTF8String object.
+
+
+ return an UTF8 string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an UTF8 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ Der UniversalString object.
+
+
+ return a Universal string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Universal string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ return a Videotex String from the passed in object
+
+ @param obj a DERVideotexString or an object that can be converted into one.
+ @exception IllegalArgumentException if the object cannot be converted.
+ @return a DERVideotexString instance, or null.
+
+
+ return a Videotex String from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the tagged object cannot
+ be converted.
+ @return a DERVideotexString instance, or null.
+
+
+ basic constructor - with bytes.
+ @param string the byte encoding of the characters making up the string.
+
+
+ Der VisibleString object.
+
+
+ return a Visible string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Visible string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ Marker interface for CHOICE objects - if you implement this in a roll-your-own
+ object, any attempt to tag the object implicitly will convert the tag to an
+ explicit one as the encoding rules require.
+
+ If you use this interface your class should also implement the getInstance
+ pattern which takes a tag object and the tagging mode used.
+
+
+
+ basic interface for Der string objects.
+
+
+ class for breaking up an Oid into it's component tokens, ala
+ java.util.StringTokenizer. We need this class as some of the
+ lightweight Java environment don't support classes like
+ StringTokenizer.
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+
+ CAKeyUpdAnnContent ::= SEQUENCE {
+ oldWithNew CmpCertificate, -- old pub signed with new priv
+ newWithOld CmpCertificate, -- new pub signed with old priv
+ newWithNew CmpCertificate -- new pub signed with new priv
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertConfirmContent ::= SEQUENCE OF CertStatus
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertOrEncCert ::= CHOICE {
+ certificate [0] CMPCertificate,
+ encryptedCert [1] EncryptedValue
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertRepMessage ::= SEQUENCE {
+ caPubs [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+ OPTIONAL,
+ response SEQUENCE OF CertResponse
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertResponse ::= SEQUENCE {
+ certReqId INTEGER,
+ -- to match this response with corresponding request (a value
+ -- of -1 is to be used if certReqId is not specified in the
+ -- corresponding request)
+ status PKIStatusInfo,
+ certifiedKeyPair CertifiedKeyPair OPTIONAL,
+ rspInfo OCTET STRING OPTIONAL
+ -- analogous to the id-regInfo-utf8Pairs string defined
+ -- for regInfo in CertReqMsg [CRMF]
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertStatus ::= SEQUENCE {
+ certHash OCTET STRING,
+ -- the hash of the certificate, using the same hash algorithm
+ -- as is used to create and verify the certificate signature
+ certReqId INTEGER,
+ -- to match this confirmation with the corresponding req/rep
+ statusInfo PKIStatusInfo OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertifiedKeyPair ::= SEQUENCE {
+ certOrEncCert CertOrEncCert,
+ privateKey [0] EncryptedValue OPTIONAL,
+ -- see [CRMF] for comment on encoding
+ publicationInfo [1] PKIPublicationInfo OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ Challenge ::= SEQUENCE {
+ owf AlgorithmIdentifier OPTIONAL,
+
+ -- MUST be present in the first Challenge; MAY be omitted in
+ -- any subsequent Challenge in POPODecKeyChallContent (if
+ -- omitted, then the owf used in the immediately preceding
+ -- Challenge is to be used).
+
+ witness OCTET STRING,
+ -- the result of applying the one-way function (owf) to a
+ -- randomly-generated INTEGER, A. [Note that a different
+ -- INTEGER MUST be used for each Challenge.]
+ challenge OCTET STRING
+ -- the encryption (under the public key for which the cert.
+ -- request is being made) of Rand, where Rand is specified as
+ -- Rand ::= SEQUENCE {
+ -- int INTEGER,
+ -- - the randomly-generated INTEGER A (above)
+ -- sender GeneralName
+ -- - the sender's name (as included in PKIHeader)
+ -- }
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Note: the addition of attribute certificates is a BC extension.
+
+
+
+ CMPCertificate ::= CHOICE {
+ x509v3PKCert Certificate
+ x509v2AttrCert [1] AttributeCertificate
+ }
+
+ Note: the addition of attribute certificates is a BC extension.
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CrlAnnContent ::= SEQUENCE OF CertificateList
+
+ @return a basic ASN.1 object representation.
+
+
+
+ ErrorMsgContent ::= SEQUENCE {
+ pKIStatusInfo PKIStatusInfo,
+ errorCode INTEGER OPTIONAL,
+ -- implementation-specific error codes
+ errorDetails PKIFreeText OPTIONAL
+ -- implementation-specific error details
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+
+ GenRepContent ::= SEQUENCE OF InfoTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+ Example InfoTypeAndValue contents include, but are not limited
+ to, the following (un-comment in this ASN.1 module and use as
+ appropriate for a given environment):
+
+ id-it-caProtEncCert OBJECT IDENTIFIER ::= {id-it 1}
+ CAProtEncCertValue ::= CMPCertificate
+ id-it-signKeyPairTypes OBJECT IDENTIFIER ::= {id-it 2}
+ SignKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ id-it-encKeyPairTypes OBJECT IDENTIFIER ::= {id-it 3}
+ EncKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ id-it-preferredSymmAlg OBJECT IDENTIFIER ::= {id-it 4}
+ PreferredSymmAlgValue ::= AlgorithmIdentifier
+ id-it-caKeyUpdateInfo OBJECT IDENTIFIER ::= {id-it 5}
+ CAKeyUpdateInfoValue ::= CAKeyUpdAnnContent
+ id-it-currentCRL OBJECT IDENTIFIER ::= {id-it 6}
+ CurrentCRLValue ::= CertificateList
+ id-it-unsupportedOIDs OBJECT IDENTIFIER ::= {id-it 7}
+ UnsupportedOIDsValue ::= SEQUENCE OF OBJECT IDENTIFIER
+ id-it-keyPairParamReq OBJECT IDENTIFIER ::= {id-it 10}
+ KeyPairParamReqValue ::= OBJECT IDENTIFIER
+ id-it-keyPairParamRep OBJECT IDENTIFIER ::= {id-it 11}
+ KeyPairParamRepValue ::= AlgorithmIdentifer
+ id-it-revPassphrase OBJECT IDENTIFIER ::= {id-it 12}
+ RevPassphraseValue ::= EncryptedValue
+ id-it-implicitConfirm OBJECT IDENTIFIER ::= {id-it 13}
+ ImplicitConfirmValue ::= NULL
+ id-it-confirmWaitTime OBJECT IDENTIFIER ::= {id-it 14}
+ ConfirmWaitTimeValue ::= GeneralizedTime
+ id-it-origPKIMessage OBJECT IDENTIFIER ::= {id-it 15}
+ OrigPKIMessageValue ::= PKIMessages
+ id-it-suppLangTags OBJECT IDENTIFIER ::= {id-it 16}
+ SuppLangTagsValue ::= SEQUENCE OF UTF8String
+
+ where
+
+ id-pkix OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3)
+ dod(6) internet(1) security(5) mechanisms(5) pkix(7)}
+ and
+ id-it OBJECT IDENTIFIER ::= {id-pkix 4}
+
+
+
+
+ InfoTypeAndValue ::= SEQUENCE {
+ infoType OBJECT IDENTIFIER,
+ infoValue ANY DEFINED BY infoType OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ KeyRecRepContent ::= SEQUENCE {
+ status PKIStatusInfo,
+ newSigCert [0] CMPCertificate OPTIONAL,
+ caCerts [1] SEQUENCE SIZE (1..MAX) OF
+ CMPCertificate OPTIONAL,
+ keyPairHist [2] SEQUENCE SIZE (1..MAX) OF
+ CertifiedKeyPair OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ OobCertHash ::= SEQUENCE {
+ hashAlg [0] AlgorithmIdentifier OPTIONAL,
+ certId [1] CertId OPTIONAL,
+ hashVal BIT STRING
+ -- hashVal is calculated over the Der encoding of the
+ -- self-signed certificate with the identifier certID.
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PkiBody.
+ @param type one of the TYPE_* constants
+ @param content message content
+
+
+
+ PkiBody ::= CHOICE { -- message-specific body elements
+ ir [0] CertReqMessages, --Initialization Request
+ ip [1] CertRepMessage, --Initialization Response
+ cr [2] CertReqMessages, --Certification Request
+ cp [3] CertRepMessage, --Certification Response
+ p10cr [4] CertificationRequest, --imported from [PKCS10]
+ popdecc [5] POPODecKeyChallContent, --pop Challenge
+ popdecr [6] POPODecKeyRespContent, --pop Response
+ kur [7] CertReqMessages, --Key Update Request
+ kup [8] CertRepMessage, --Key Update Response
+ krr [9] CertReqMessages, --Key Recovery Request
+ krp [10] KeyRecRepContent, --Key Recovery Response
+ rr [11] RevReqContent, --Revocation Request
+ rp [12] RevRepContent, --Revocation Response
+ ccr [13] CertReqMessages, --Cross-Cert. Request
+ ccp [14] CertRepMessage, --Cross-Cert. Response
+ ckuann [15] CAKeyUpdAnnContent, --CA Key Update Ann.
+ cann [16] CertAnnContent, --Certificate Ann.
+ rann [17] RevAnnContent, --Revocation Ann.
+ crlann [18] CRLAnnContent, --CRL Announcement
+ pkiconf [19] PKIConfirmContent, --Confirmation
+ nested [20] NestedMessageContent, --Nested Message
+ genm [21] GenMsgContent, --General Message
+ genp [22] GenRepContent, --General Response
+ error [23] ErrorMsgContent, --Error Message
+ certConf [24] CertConfirmContent, --Certificate confirm
+ pollReq [25] PollReqContent, --Polling request
+ pollRep [26] PollRepContent --Polling response
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiConfirmContent ::= NULL
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PKIFailureInfo ::= BIT STRING {
+ badAlg (0),
+ -- unrecognized or unsupported Algorithm Identifier
+ badMessageCheck (1), -- integrity check failed (e.g., signature did not verify)
+ badRequest (2),
+ -- transaction not permitted or supported
+ badTime (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+ badCertId (4), -- no certificate could be found matching the provided criteria
+ badDataFormat (5),
+ -- the data submitted has the wrong format
+ wrongAuthority (6), -- the authority indicated in the request is different from the one creating the response token
+ incorrectData (7), -- the requester's data is incorrect (for notary services)
+ missingTimeStamp (8), -- when the timestamp is missing but should be there (by policy)
+ badPOP (9) -- the proof-of-possession failed
+ certRevoked (10),
+ certConfirmed (11),
+ wrongIntegrity (12),
+ badRecipientNonce (13),
+ timeNotAvailable (14),
+ -- the TSA's time source is not available
+ unacceptedPolicy (15),
+ -- the requested TSA policy is not supported by the TSA
+ unacceptedExtension (16),
+ -- the requested extension is not supported by the TSA
+ addInfoNotAvailable (17)
+ -- the additional information requested could not be understood
+ -- or is not available
+ badSenderNonce (18),
+ badCertTemplate (19),
+ signerNotTrusted (20),
+ transactionIdInUse (21),
+ unsupportedVersion (22),
+ notAuthorized (23),
+ systemUnavail (24),
+ systemFailure (25),
+ -- the request cannot be handled due to system failure
+ duplicateCertReq (26)
+
+
+
+ Basic constructor.
+
+
+ Return the number of string elements present.
+
+ @return number of elements present.
+
+
+ Return the UTF8STRING at index.
+
+ @param index index of the string of interest
+ @return the string at index.
+
+
+
+ PkiFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String
+
+
+
+ Value for a "null" recipient or sender.
+
+
+
+ PkiHeader ::= SEQUENCE {
+ pvno INTEGER { cmp1999(1), cmp2000(2) },
+ sender GeneralName,
+ -- identifies the sender
+ recipient GeneralName,
+ -- identifies the intended recipient
+ messageTime [0] GeneralizedTime OPTIONAL,
+ -- time of production of this message (used when sender
+ -- believes that the transport will be "suitable"; i.e.,
+ -- that the time will still be meaningful upon receipt)
+ protectionAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used for calculation of protection bits
+ senderKID [2] KeyIdentifier OPTIONAL,
+ recipKID [3] KeyIdentifier OPTIONAL,
+ -- to identify specific keys used for protection
+ transactionID [4] OCTET STRING OPTIONAL,
+ -- identifies the transaction; i.e., this will be the same in
+ -- corresponding request, response, certConf, and PKIConf
+ -- messages
+ senderNonce [5] OCTET STRING OPTIONAL,
+ recipNonce [6] OCTET STRING OPTIONAL,
+ -- nonces used to provide replay protection, senderNonce
+ -- is inserted by the creator of this message; recipNonce
+ -- is a nonce previously inserted in a related message by
+ -- the intended recipient of this message
+ freeText [7] PKIFreeText OPTIONAL,
+ -- this may be used to indicate context-specific instructions
+ -- (this field is intended for human consumption)
+ generalInfo [8] SEQUENCE SIZE (1..MAX) OF
+ InfoTypeAndValue OPTIONAL
+ -- this may be used to convey context-specific information
+ -- (this field not primarily intended for human consumption)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PKIHeader ::= SEQUENCE {
+ pvno INTEGER { cmp1999(1), cmp2000(2) },
+ sender GeneralName,
+ -- identifies the sender
+ recipient GeneralName,
+ -- identifies the intended recipient
+ messageTime [0] GeneralizedTime OPTIONAL,
+ -- time of production of this message (used when sender
+ -- believes that the transport will be "suitable"; i.e.,
+ -- that the time will still be meaningful upon receipt)
+ protectionAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used for calculation of protection bits
+ senderKID [2] KeyIdentifier OPTIONAL,
+ recipKID [3] KeyIdentifier OPTIONAL,
+ -- to identify specific keys used for protection
+ transactionID [4] OCTET STRING OPTIONAL,
+ -- identifies the transaction; i.e., this will be the same in
+ -- corresponding request, response, certConf, and PKIConf
+ -- messages
+ senderNonce [5] OCTET STRING OPTIONAL,
+ recipNonce [6] OCTET STRING OPTIONAL,
+ -- nonces used to provide replay protection, senderNonce
+ -- is inserted by the creator of this message; recipNonce
+ -- is a nonce previously inserted in a related message by
+ -- the intended recipient of this message
+ freeText [7] PKIFreeText OPTIONAL,
+ -- this may be used to indicate context-specific instructions
+ -- (this field is intended for human consumption)
+ generalInfo [8] SEQUENCE SIZE (1..MAX) OF
+ InfoTypeAndValue OPTIONAL
+ -- this may be used to convey context-specific information
+ -- (this field not primarily intended for human consumption)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PkiMessage.
+
+ @param header message header
+ @param body message body
+ @param protection message protection (may be null)
+ @param extraCerts extra certificates (may be null)
+
+
+
+ PkiMessage ::= SEQUENCE {
+ header PKIHeader,
+ body PKIBody,
+ protection [0] PKIProtection OPTIONAL,
+ extraCerts [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+ OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiMessages ::= SEQUENCE SIZE (1..MAX) OF PkiMessage
+
+ @return a basic ASN.1 object representation.
+
+
+ @param status
+
+
+ @param status
+ @param statusString
+
+
+
+ PkiStatusInfo ::= SEQUENCE {
+ status PKIStatus, (INTEGER)
+ statusString PkiFreeText OPTIONAL,
+ failInfo PkiFailureInfo OPTIONAL (BIT STRING)
+ }
+
+ PKIStatus:
+ granted (0), -- you got exactly what you asked for
+ grantedWithMods (1), -- you got something like what you asked for
+ rejection (2), -- you don't get it, more information elsewhere in the message
+ waiting (3), -- the request body part has not yet been processed, expect to hear more later
+ revocationWarning (4), -- this message contains a warning that a revocation is imminent
+ revocationNotification (5), -- notification that a revocation has occurred
+ keyUpdateWarning (6) -- update already done for the oldCertId specified in CertReqMsg
+
+ PkiFailureInfo:
+ badAlg (0), -- unrecognized or unsupported Algorithm Identifier
+ badMessageCheck (1), -- integrity check failed (e.g., signature did not verify)
+ badRequest (2), -- transaction not permitted or supported
+ badTime (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+ badCertId (4), -- no certificate could be found matching the provided criteria
+ badDataFormat (5), -- the data submitted has the wrong format
+ wrongAuthority (6), -- the authority indicated in the request is different from the one creating the response token
+ incorrectData (7), -- the requester's data is incorrect (for notary services)
+ missingTimeStamp (8), -- when the timestamp is missing but should be there (by policy)
+ badPOP (9) -- the proof-of-possession failed
+
+
+
+
+
+ PbmParameter ::= SEQUENCE {
+ salt OCTET STRING,
+ -- note: implementations MAY wish to limit acceptable sizes
+ -- of this string to values appropriate for their environment
+ -- in order to reduce the risk of denial-of-service attacks
+ owf AlgorithmIdentifier,
+ -- AlgId for a One-Way Function (SHA-1 recommended)
+ iterationCount INTEGER,
+ -- number of times the OWF is applied
+ -- note: implementations MAY wish to limit acceptable sizes
+ -- of this integer to values appropriate for their environment
+ -- in order to reduce the risk of denial-of-service attacks
+ mac AlgorithmIdentifier
+ -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
+ } -- or HMAC [RFC2104, RFC2202])
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PollRepContent ::= SEQUENCE OF SEQUENCE {
+ certReqId INTEGER,
+ checkAfter INTEGER, -- time in seconds
+ reason PKIFreeText OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PollReqContent ::= SEQUENCE OF SEQUENCE {
+ certReqId INTEGER
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoDecKeyChallContent ::= SEQUENCE OF Challenge
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoDecKeyRespContent ::= SEQUENCE OF INTEGER
+
+ @return a basic ASN.1 object representation.
+
+
+
+ ProtectedPart ::= SEQUENCE {
+ header PKIHeader,
+ body PKIBody
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevAnnContent ::= SEQUENCE {
+ status PKIStatus,
+ certId CertId,
+ willBeRevokedAt GeneralizedTime,
+ badSinceDate GeneralizedTime,
+ crlDetails Extensions OPTIONAL
+ -- extra CRL details (e.g., crl number, reason, location, etc.)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevDetails ::= SEQUENCE {
+ certDetails CertTemplate,
+ -- allows requester to specify as much as they can about
+ -- the cert. for which revocation is requested
+ -- (e.g., for cases in which serialNumber is not available)
+ crlEntryDetails Extensions OPTIONAL
+ -- requested crlEntryExtensions
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevRepContent ::= SEQUENCE {
+ status SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
+ -- in same order as was sent in RevReqContent
+ revCerts [0] SEQUENCE SIZE (1..MAX) OF CertId OPTIONAL,
+ -- IDs for which revocation was requested
+ -- (same order as status)
+ crls [1] SEQUENCE SIZE (1..MAX) OF CertificateList OPTIONAL
+ -- the resulting CRLs (there may be more than one)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevReqContent ::= SEQUENCE OF RevDetails
+
+ @return a basic ASN.1 object representation.
+
+
+ return an Attribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attribute ::= SEQUENCE {
+ attrType OBJECT IDENTIFIER,
+ attrValues SET OF AttributeValue
+ }
+
+
+
+ Return the first attribute matching the given OBJECT IDENTIFIER
+
+
+ Return all the attributes matching the OBJECT IDENTIFIER oid. The vector will be
+ empty if there are no attributes of the required type present.
+
+ @param oid type of attribute required.
+ @return a vector of all the attributes found of type oid.
+
+
+ Return a new table with the passed in attribute added.
+
+ @param attrType
+ @param attrValue
+ @return
+
+
+
+ Attributes ::=
+ SET SIZE(1..MAX) OF Attribute -- according to RFC 5652
+
+ @return
+
+
+ return an AuthEnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthEnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthEnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ authEncryptedContentInfo EncryptedContentInfo,
+ authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+ AuthEnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ authEncryptedContentInfo EncryptedContentInfo,
+ authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+
+
+
+ return an AuthenticatedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthenticatedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthenticatedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ macAlgorithm MessageAuthenticationCodeAlgorithm,
+ digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+ encapContentInfo EncapsulatedContentInfo,
+ authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+
+ AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ MessageAuthenticationCode ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthenticatedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ macAlgorithm MessageAuthenticationCodeAlgorithm,
+ digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+ encapContentInfo EncapsulatedContentInfo,
+ authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+
+ AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ MessageAuthenticationCode ::= OCTET STRING
+
+
+
+ The other Revocation Info arc
+ id-ri OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
+ dod(6) internet(1) security(5) mechanisms(5) pkix(7) ri(16) }
+
+
+ RFC 3274 - CMS Compressed Data.
+
+ CompressedData ::= Sequence {
+ version CMSVersion,
+ compressionAlgorithm CompressionAlgorithmIdentifier,
+ encapContentInfo EncapsulatedContentInfo
+ }
+
+
+
+ return a CompressedData object from a tagged object.
+
+ @param ato the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a CompressedData object from the given object.
+
+ @param _obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ RFC 3274 - CMS Compressed Data.
+
+ CompressedData ::= SEQUENCE {
+ version CMSVersion,
+ compressionAlgorithm CompressionAlgorithmIdentifier,
+ encapContentInfo EncapsulatedContentInfo
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= Sequence {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= SEQUENCE {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ return an EncryptedContentInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EncryptedContentInfo ::= Sequence {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+
+
+
+ EncryptedContentInfo ::= SEQUENCE {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+
+
+
+ EncryptedData ::= SEQUENCE {
+ version CMSVersion,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ return an EnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an EnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EnvelopedData ::= Sequence {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+ }
+
+
+
+ return a KekIdentifier object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KekIdentifier object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KekIdentifier ::= Sequence {
+ keyIdentifier OCTET STRING,
+ date GeneralizedTime OPTIONAL,
+ other OtherKeyAttribute OPTIONAL
+ }
+
+
+
+ return a KekRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KekRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KekRecipientInfo ::= Sequence {
+ version CMSVersion, -- always set to 4
+ kekID KekIdentifier,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+ return an KeyAgreeRecipientIdentifier object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an KeyAgreeRecipientIdentifier object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeyAgreeRecipientIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ rKeyId [0] IMPLICIT RecipientKeyIdentifier
+ }
+
+
+
+ return a KeyAgreeRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KeyAgreeRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * KeyAgreeRecipientInfo ::= Sequence {
+ * version CMSVersion, -- always set to 3
+ * originator [0] EXPLICIT OriginatorIdentifierOrKey,
+ * ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
+ * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ * recipientEncryptedKeys RecipientEncryptedKeys
+ * }
+ *
+ * UserKeyingMaterial ::= OCTET STRING
+ *
+
+
+ return a KeyTransRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeyTransRecipientInfo ::= Sequence {
+ version CMSVersion, -- always set to 0 or 2
+ rid RecipientIdentifier,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+
+ MetaData ::= SEQUENCE {
+ hashProtected BOOLEAN,
+ fileName UTF8String OPTIONAL,
+ mediaType IA5String OPTIONAL,
+ otherMetaData Attributes OPTIONAL
+ }
+
+ @return
+
+
+ return an OriginatorIdentifierOrKey object from a tagged object.
+
+ @param o the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorIdentifierOrKey object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorIdentifierOrKey ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier,
+ originatorKey [1] OriginatorPublicKey
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ return an OriginatorInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorInfo ::= Sequence {
+ certs [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL
+ }
+
+
+
+ return an OriginatorPublicKey object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorPublicKey object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorPublicKey ::= Sequence {
+ algorithm AlgorithmIdentifier,
+ publicKey BIT STRING
+ }
+
+
+
+ return an OtherKeyAttribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherKeyAttribute ::= Sequence {
+ keyAttrId OBJECT IDENTIFIER,
+ keyAttr ANY DEFINED BY keyAttrId OPTIONAL
+ }
+
+
+
+ return a OtherRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a OtherRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherRecipientInfo ::= Sequence {
+ oriType OBJECT IDENTIFIER,
+ oriValue ANY DEFINED BY oriType }
+
+
+
+ return a OtherRevocationInfoFormat object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a OtherRevocationInfoFormat object from the given object.
+
+ @param obj the object we want converted.
+ @exception IllegalArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an ASN1OutputStream.
+
+ OtherRevocationInfoFormat ::= SEQUENCE {
+ otherRevInfoFormat OBJECT IDENTIFIER,
+ otherRevInfo ANY DEFINED BY otherRevInfoFormat }
+
+
+
+ return a PasswordRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a PasswordRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ PasswordRecipientInfo ::= Sequence {
+ version CMSVersion, -- Always set to 0
+ keyDerivationAlgorithm [0] KeyDerivationAlgorithmIdentifier
+ OPTIONAL,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey }
+
+
+
+ return an RecipientEncryptedKey object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a RecipientEncryptedKey object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientEncryptedKey ::= SEQUENCE {
+ rid KeyAgreeRecipientIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+ return a RecipientIdentifier object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientInfo ::= CHOICE {
+ ktri KeyTransRecipientInfo,
+ kari [1] KeyAgreeRecipientInfo,
+ kekri [2] KekRecipientInfo,
+ pwri [3] PasswordRecipientInfo,
+ ori [4] OtherRecipientInfo }
+
+
+
+ return a RecipientKeyIdentifier object from a tagged object.
+
+ @param _ato the tagged object holding the object we want.
+ @param _explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a RecipientKeyIdentifier object from the given object.
+
+ @param _obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientKeyIdentifier ::= Sequence {
+ subjectKeyIdentifier SubjectKeyIdentifier,
+ date GeneralizedTime OPTIONAL,
+ other OtherKeyAttribute OPTIONAL
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+
+ ScvpReqRes ::= SEQUENCE {
+ request [0] EXPLICIT ContentInfo OPTIONAL,
+ response ContentInfo }
+
+ @return the ASN.1 primitive representation.
+
+
+ a signed data object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignedData ::= Sequence {
+ version CMSVersion,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ encapContentInfo EncapsulatedContentInfo,
+ certificates [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos
+ }
+
+
+
+
+ SignedData ::= SEQUENCE {
+ version CMSVersion,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ encapContentInfo EncapsulatedContentInfo,
+ certificates [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos
+ }
+
+
+
+ return a SignerIdentifier object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerInfo ::= Sequence {
+ version Version,
+ SignerIdentifier sid,
+ digestAlgorithm DigestAlgorithmIdentifier,
+ authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+ digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+ encryptedDigest EncryptedDigest,
+ unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+ }
+
+ EncryptedDigest ::= OCTET STRING
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+
+ DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+
+
+
+ creates a time object from a given date - if the date is between 1950
+ and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime
+ is used.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Time ::= CHOICE {
+ utcTime UTCTime,
+ generalTime GeneralizedTime }
+
+
+
+
+ TimeStampAndCRL ::= SEQUENCE {
+ timeStamp TimeStampToken, -- according to RFC 3161
+ crl CertificateList OPTIONAL -- according to RFC 5280
+ }
+
+ @return
+
+
+
+ TimeStampTokenEvidence ::=
+ SEQUENCE SIZE(1..MAX) OF TimeStampAndCrl
+
+ @return
+
+
+
+ TimeStampedData ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ dataUri IA5String OPTIONAL,
+ metaData MetaData OPTIONAL,
+ content OCTET STRING OPTIONAL,
+ temporalEvidence Evidence
+ }
+
+ @return
+
+
+ return an AuthEnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthEnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ MQVuserKeyingMaterial ::= SEQUENCE {
+ ephemeralPublicKey OriginatorPublicKey,
+ addedukm [0] EXPLICIT UserKeyingMaterial OPTIONAL }
+
+
+
+
+ AttributeTypeAndValue ::= SEQUENCE {
+ type OBJECT IDENTIFIER,
+ value ANY DEFINED BY type }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertId ::= SEQUENCE {
+ issuer GeneralName,
+ serialNumber INTEGER }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertReqMessages ::= SEQUENCE SIZE (1..MAX) OF CertReqMsg
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new CertReqMsg.
+ @param certReq CertRequest
+ @param popo may be null
+ @param regInfo may be null
+
+
+
+ CertReqMsg ::= SEQUENCE {
+ certReq CertRequest,
+ pop ProofOfPossession OPTIONAL,
+ -- content depends upon key type
+ regInfo SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertRequest ::= SEQUENCE {
+ certReqId INTEGER, -- ID for matching request and reply
+ certTemplate CertTemplate, -- Selected fields of cert to be issued
+ controls Controls OPTIONAL } -- Attributes affecting issuance
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertTemplate ::= SEQUENCE {
+ version [0] Version OPTIONAL,
+ serialNumber [1] INTEGER OPTIONAL,
+ signingAlg [2] AlgorithmIdentifier OPTIONAL,
+ issuer [3] Name OPTIONAL,
+ validity [4] OptionalValidity OPTIONAL,
+ subject [5] Name OPTIONAL,
+ publicKey [6] SubjectPublicKeyInfo OPTIONAL,
+ issuerUID [7] UniqueIdentifier OPTIONAL,
+ subjectUID [8] UniqueIdentifier OPTIONAL,
+ extensions [9] Extensions OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ Sets the X.509 version. Note: for X509v3, use 2 here.
+
+
+ Sets the issuer unique ID (deprecated in X.509v3)
+
+
+ Sets the subject unique ID (deprecated in X.509v3)
+
+
+
+ CertTemplate ::= SEQUENCE {
+ version [0] Version OPTIONAL,
+ serialNumber [1] INTEGER OPTIONAL,
+ signingAlg [2] AlgorithmIdentifier OPTIONAL,
+ issuer [3] Name OPTIONAL,
+ validity [4] OptionalValidity OPTIONAL,
+ subject [5] Name OPTIONAL,
+ publicKey [6] SubjectPublicKeyInfo OPTIONAL,
+ issuerUID [7] UniqueIdentifier OPTIONAL,
+ subjectUID [8] UniqueIdentifier OPTIONAL,
+ extensions [9] Extensions OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ Controls ::= SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+
+ EncKeyWithID ::= SEQUENCE {
+ privateKey PrivateKeyInfo,
+ identifier CHOICE {
+ string UTF8String,
+ generalName GeneralName
+ } OPTIONAL
+ }
+
+ @return
+
+
+
+ EncryptedKey ::= CHOICE {
+ encryptedValue EncryptedValue, -- deprecated
+ envelopedData [0] EnvelopedData }
+ -- The encrypted private key MUST be placed in the envelopedData
+ -- encryptedContentInfo encryptedContent OCTET STRING.
+
+
+
+
+ EncryptedValue ::= SEQUENCE {
+ intendedAlg [0] AlgorithmIdentifier OPTIONAL,
+ -- the intended algorithm for which the value will be used
+ symmAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- the symmetric algorithm used to encrypt the value
+ encSymmKey [2] BIT STRING OPTIONAL,
+ -- the (encrypted) symmetric key used to encrypt the value
+ keyAlg [3] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used to encrypt the symmetric key
+ valueHint [4] OCTET STRING OPTIONAL,
+ -- a brief description or identifier of the encValue content
+ -- (may be meaningful only to the sending entity, and used only
+ -- if EncryptedValue might be re-examined by the sending entity
+ -- in the future)
+ encValue BIT STRING }
+ -- the encrypted value itself
+
+ @return a basic ASN.1 object representation.
+
+
+
+ OptionalValidity ::= SEQUENCE {
+ notBefore [0] Time OPTIONAL,
+ notAfter [1] Time OPTIONAL } --at least one MUST be present
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiArchiveOptions ::= CHOICE {
+ encryptedPrivKey [0] EncryptedKey,
+ -- the actual value of the private key
+ keyGenParameters [1] KeyGenParameters,
+ -- parameters which allow the private key to be re-generated
+ archiveRemGenPrivKey [2] BOOLEAN }
+ -- set to TRUE if sender wishes receiver to archive the private
+ -- key of a key pair that the receiver generates in response to
+ -- this request; set to FALSE if no archival is desired.
+
+
+
+
+ PkiPublicationInfo ::= SEQUENCE {
+ action INTEGER {
+ dontPublish (0),
+ pleasePublish (1) },
+ pubInfos SEQUENCE SIZE (1..MAX) OF SinglePubInfo OPTIONAL }
+ -- pubInfos MUST NOT be present if action is "dontPublish"
+ -- (if action is "pleasePublish" and pubInfos is omitted,
+ -- "dontCare" is assumed)
+
+ @return a basic ASN.1 object representation.
+
+
+ Password-based MAC value for use with POPOSigningKeyInput.
+
+
+ Creates a new PKMACValue.
+ @param params parameters for password-based MAC
+ @param value MAC of the DER-encoded SubjectPublicKeyInfo
+
+
+ Creates a new PKMACValue.
+ @param aid CMPObjectIdentifiers.passwordBasedMAC, with PBMParameter
+ @param value MAC of the DER-encoded SubjectPublicKeyInfo
+
+
+
+ PKMACValue ::= SEQUENCE {
+ algId AlgorithmIdentifier,
+ -- algorithm value shall be PasswordBasedMac 1.2.840.113533.7.66.13
+ -- parameter value is PBMParameter
+ value BIT STRING }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoPrivKey ::= CHOICE {
+ thisMessage [0] BIT STRING, -- Deprecated
+ -- possession is proven in this message (which contains the private
+ -- key itself (encrypted for the CA))
+ subsequentMessage [1] SubsequentMessage,
+ -- possession will be proven in a subsequent message
+ dhMAC [2] BIT STRING, -- Deprecated
+ agreeMAC [3] PKMACValue,
+ encryptedKey [4] EnvelopedData }
+
+
+
+ Creates a new Proof of Possession object for a signing key.
+ @param poposkIn the PopoSigningKeyInput structure, or null if the
+ CertTemplate includes both subject and publicKey values.
+ @param aid the AlgorithmIdentifier used to sign the proof of possession.
+ @param signature a signature over the DER-encoded value of poposkIn,
+ or the DER-encoded value of certReq if poposkIn is null.
+
+
+
+ PopoSigningKey ::= SEQUENCE {
+ poposkInput [0] PopoSigningKeyInput OPTIONAL,
+ algorithmIdentifier AlgorithmIdentifier,
+ signature BIT STRING }
+ -- The signature (using "algorithmIdentifier") is on the
+ -- DER-encoded value of poposkInput. NOTE: If the CertReqMsg
+ -- certReq CertTemplate contains the subject and publicKey values,
+ -- then poposkInput MUST be omitted and the signature MUST be
+ -- computed on the DER-encoded value of CertReqMsg certReq. If
+ -- the CertReqMsg certReq CertTemplate does not contain the public
+ -- key and subject values, then poposkInput MUST be present and
+ -- MUST be signed. This strategy ensures that the public key is
+ -- not present in both the poposkInput and CertReqMsg certReq
+ -- CertTemplate fields.
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PopoSigningKeyInput with sender name as authInfo.
+
+
+ Creates a new PopoSigningKeyInput using password-based MAC.
+
+
+ Returns the sender field, or null if authInfo is publicKeyMac
+
+
+ Returns the publicKeyMac field, or null if authInfo is sender
+
+
+
+ PopoSigningKeyInput ::= SEQUENCE {
+ authInfo CHOICE {
+ sender [0] GeneralName,
+ -- used only if an authenticated identity has been
+ -- established for the sender (e.g., a DN from a
+ -- previously-issued and currently-valid certificate
+ publicKeyMac PKMacValue },
+ -- used if no authenticated GeneralName currently exists for
+ -- the sender; publicKeyMac contains a password-based MAC
+ -- on the DER-encoded value of publicKey
+ publicKey SubjectPublicKeyInfo } -- from CertTemplate
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a ProofOfPossession with type raVerified.
+
+
+ Creates a ProofOfPossession for a signing key.
+
+
+ Creates a ProofOfPossession for key encipherment or agreement.
+ @param type one of TYPE_KEY_ENCIPHERMENT or TYPE_KEY_AGREEMENT
+
+
+
+ ProofOfPossession ::= CHOICE {
+ raVerified [0] NULL,
+ -- used if the RA has already verified that the requester is in
+ -- possession of the private key
+ signature [1] PopoSigningKey,
+ keyEncipherment [2] PopoPrivKey,
+ keyAgreement [3] PopoPrivKey }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ SinglePubInfo ::= SEQUENCE {
+ pubMethod INTEGER {
+ dontCare (0),
+ x500 (1),
+ web (2),
+ ldap (3) },
+ pubLocation GeneralName OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ table of the available named parameters for GOST 3410-2001.
+
+
+ return the ECDomainParameters object for the given OID, null if it
+ isn't present.
+
+ @param oid an object identifier representing a named parameters, if present.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+
+ Gost28147-89-Parameters ::=
+ SEQUENCE {
+ iv Gost28147-89-IV,
+ encryptionParamSet OBJECT IDENTIFIER
+ }
+
+ Gost28147-89-IV ::= OCTET STRING (SIZE (8))
+
+
+
+ table of the available named parameters for GOST 3410-94.
+
+
+ return the GOST3410ParamSetParameters object for the given OID, null if it
+ isn't present.
+
+ @param oid an object identifier representing a named parameters, if present.
+
+
+ returns an enumeration containing the name strings for parameters
+ contained in this structure.
+
+
+
+ RFC 3126: 4.3.1 Certificate Values Attribute Definition
+
+ CertificateValues ::= SEQUENCE OF Certificate
+
+
+
+
+
+ CommitmentTypeIndication ::= SEQUENCE {
+ commitmentTypeId CommitmentTypeIdentifier,
+ commitmentTypeQualifier SEQUENCE SIZE (1..MAX) OF
+ CommitmentTypeQualifier OPTIONAL }
+
+
+
+ Commitment type qualifiers, used in the Commitment-Type-Indication attribute (RFC3126).
+
+
+ CommitmentTypeQualifier ::= SEQUENCE {
+ commitmentTypeIdentifier CommitmentTypeIdentifier,
+ qualifier ANY DEFINED BY commitmentTypeIdentifier OPTIONAL }
+
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param commitmentTypeIdentifier a CommitmentTypeIdentifier value
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param commitmentTypeIdentifier a CommitmentTypeIdentifier value
+ @param qualifier the qualifier, defined by the above field.
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param as CommitmentTypeQualifier structure
+ encoded as an Asn1Sequence.
+
+
+ Returns a DER-encodable representation of this instance.
+
+ @return a Asn1Object value
+
+
+
+ RFC 3126: 4.2.1 Complete Certificate Refs Attribute Definition
+
+ CompleteCertificateRefs ::= SEQUENCE OF OtherCertID
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CompleteRevocationRefs ::= SEQUENCE OF CrlOcspRef
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlIdentifier ::= SEQUENCE
+ {
+ crlissuer Name,
+ crlIssuedTime UTCTime,
+ crlNumber INTEGER OPTIONAL
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CRLListID ::= SEQUENCE
+ {
+ crls SEQUENCE OF CrlValidatedID
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlOcspRef ::= SEQUENCE {
+ crlids [0] CRLListID OPTIONAL,
+ ocspids [1] OcspListID OPTIONAL,
+ otherRev [2] OtherRevRefs OPTIONAL
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlValidatedID ::= SEQUENCE {
+ crlHash OtherHash,
+ crlIdentifier CrlIdentifier OPTIONAL}
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspIdentifier ::= SEQUENCE {
+ ocspResponderID ResponderID,
+ -- As in OCSP response data
+ producedAt GeneralizedTime
+ -- As in OCSP response data
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspListID ::= SEQUENCE {
+ ocspResponses SEQUENCE OF OcspResponsesID
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspResponsesID ::= SEQUENCE {
+ ocspIdentifier OcspIdentifier,
+ ocspRepHash OtherHash OPTIONAL
+ }
+
+
+
+
+
+
+ OtherCertID ::= SEQUENCE {
+ otherCertHash OtherHash,
+ issuerSerial IssuerSerial OPTIONAL
+ }
+
+
+
+
+
+
+ OtherHash ::= CHOICE {
+ sha1Hash OtherHashValue, -- This contains a SHA-1 hash
+ otherHash OtherHashAlgAndValue
+ }
+
+ OtherHashValue ::= OCTET STRING
+
+
+
+
+
+ Summary description for OtherHashAlgAndValue.
+
+
+
+ OtherHashAlgAndValue ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashValue OtherHashValue
+ }
+
+ OtherHashValue ::= OCTET STRING
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OtherRevRefs ::= SEQUENCE
+ {
+ otherRevRefType OtherRevRefType,
+ otherRevRefs ANY DEFINED BY otherRevRefType
+ }
+
+ OtherRevRefType ::= OBJECT IDENTIFIER
+
+
+
+
+
+ RFC 3126: 4.3.2 Revocation Values Attribute Definition
+
+ OtherRevVals ::= SEQUENCE
+ {
+ otherRevValType OtherRevValType,
+ otherRevVals ANY DEFINED BY otherRevValType
+ }
+
+ OtherRevValType ::= OBJECT IDENTIFIER
+
+
+
+
+
+
+ OtherSigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF OtherCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+
+
+
+
+ RFC 5126: 6.3.4. revocation-values Attribute Definition
+
+ RevocationValues ::= SEQUENCE {
+ crlVals [0] SEQUENCE OF CertificateList OPTIONAL,
+ ocspVals [1] SEQUENCE OF BasicOCSPResponse OPTIONAL,
+ otherRevVals [2] OtherRevVals OPTIONAL
+ }
+
+
+
+
+
+
+ SigPolicyQualifierInfo ::= SEQUENCE {
+ sigPolicyQualifierId SigPolicyQualifierId,
+ sigQualifier ANY DEFINED BY sigPolicyQualifierId
+ }
+
+ SigPolicyQualifierId ::= OBJECT IDENTIFIER
+
+
+
+
+
+
+ SignaturePolicyId ::= SEQUENCE {
+ sigPolicyIdentifier SigPolicyId,
+ sigPolicyHash SigPolicyHash,
+ sigPolicyQualifiers SEQUENCE SIZE (1..MAX) OF SigPolicyQualifierInfo OPTIONAL
+ }
+
+ SigPolicyId ::= OBJECT IDENTIFIER
+
+ SigPolicyHash ::= OtherHashAlgAndValue
+
+
+
+
+
+
+ SignaturePolicyIdentifier ::= CHOICE {
+ SignaturePolicyId SignaturePolicyId,
+ SignaturePolicyImplied SignaturePolicyImplied
+ }
+
+ SignaturePolicyImplied ::= NULL
+
+
+
+
+
+
+ SignerAttribute ::= SEQUENCE OF CHOICE {
+ claimedAttributes [0] ClaimedAttributes,
+ certifiedAttributes [1] CertifiedAttributes }
+
+ ClaimedAttributes ::= SEQUENCE OF Attribute
+ CertifiedAttributes ::= AttributeCertificate -- as defined in RFC 3281: see clause 4.1.
+
+
+
+ Signer-Location attribute (RFC3126).
+
+
+ SignerLocation ::= SEQUENCE {
+ countryName [0] DirectoryString OPTIONAL,
+ localityName [1] DirectoryString OPTIONAL,
+ postalAddress [2] PostalAddress OPTIONAL }
+
+ PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+
+
+
+
+ SignerLocation ::= SEQUENCE {
+ countryName [0] DirectoryString OPTIONAL,
+ localityName [1] DirectoryString OPTIONAL,
+ postalAddress [2] PostalAddress OPTIONAL }
+
+ PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+
+ DirectoryString ::= CHOICE {
+ teletexString TeletexString (SIZE (1..MAX)),
+ printableString PrintableString (SIZE (1..MAX)),
+ universalString UniversalString (SIZE (1..MAX)),
+ utf8String UTF8String (SIZE (1.. MAX)),
+ bmpString BMPString (SIZE (1..MAX)) }
+
+
+
+ constructor
+
+
+
+ ContentHints ::= SEQUENCE {
+ contentDescription UTF8String (SIZE (1..MAX)) OPTIONAL,
+ contentType ContentType }
+
+
+
+ Create from OCTET STRING whose octets represent the identifier.
+
+
+ Create from byte array representing the identifier.
+
+
+ The definition of ContentIdentifier is
+
+ ContentIdentifier ::= OCTET STRING
+
+ id-aa-contentIdentifier OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 7 }
+
+
+ constructor
+
+
+
+ EssCertID ::= SEQUENCE {
+ certHash Hash,
+ issuerSerial IssuerSerial OPTIONAL }
+
+
+
+
+ EssCertIDv2 ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier
+ DEFAULT {algorithm id-sha256},
+ certHash Hash,
+ issuerSerial IssuerSerial OPTIONAL
+ }
+
+ Hash ::= OCTET STRING
+
+ IssuerSerial ::= SEQUENCE {
+ issuer GeneralNames,
+ serialNumber CertificateSerialNumber
+ }
+
+
+
+ constructor
+
+
+
+ OtherCertID ::= SEQUENCE {
+ otherCertHash OtherHash,
+ issuerSerial IssuerSerial OPTIONAL }
+
+ OtherHash ::= CHOICE {
+ sha1Hash OCTET STRING,
+ otherHash OtherHashAlgAndValue }
+
+ OtherHashAlgAndValue ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashValue OCTET STRING }
+
+
+
+
+ constructors
+
+
+ The definition of OtherSigningCertificate is
+
+ OtherSigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF OtherCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-ets-otherSigCert OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 19 }
+
+
+ constructors
+
+
+ The definition of SigningCertificate is
+
+ SigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF EssCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-signingCertificate OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 12 }
+
+
+ The definition of SigningCertificateV2 is
+
+ SigningCertificateV2 ::= SEQUENCE {
+ certs SEQUENCE OF EssCertIDv2,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-signingCertificateV2 OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 47 }
+
+
+ The CscaMasterList object. This object can be wrapped in a
+ CMSSignedData to be published in LDAP.
+
+
+ CscaMasterList ::= SEQUENCE {
+ version CscaMasterListVersion,
+ certList SET OF Certificate }
+
+ CscaMasterListVersion :: INTEGER {v0(0)}
+
+
+
+ The DataGroupHash object.
+
+ DataGroupHash ::= SEQUENCE {
+ dataGroupNumber DataGroupNumber,
+ dataGroupHashValue OCTET STRING }
+
+ DataGroupNumber ::= INTEGER {
+ dataGroup1 (1),
+ dataGroup1 (2),
+ dataGroup1 (3),
+ dataGroup1 (4),
+ dataGroup1 (5),
+ dataGroup1 (6),
+ dataGroup1 (7),
+ dataGroup1 (8),
+ dataGroup1 (9),
+ dataGroup1 (10),
+ dataGroup1 (11),
+ dataGroup1 (12),
+ dataGroup1 (13),
+ dataGroup1 (14),
+ dataGroup1 (15),
+ dataGroup1 (16) }
+
+
+
+
+ The LDSSecurityObject object (V1.8).
+
+ LDSSecurityObject ::= SEQUENCE {
+ version LDSSecurityObjectVersion,
+ hashAlgorithm DigestAlgorithmIdentifier,
+ dataGroupHashValues SEQUENCE SIZE (2..ub-DataGroups) OF DataHashGroup,
+ ldsVersionInfo LDSVersionInfo OPTIONAL
+ -- if present, version MUST be v1 }
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier,
+
+ LDSSecurityObjectVersion :: INTEGER {V0(0)}
+
+
+
+
+ LDSVersionInfo ::= SEQUENCE {
+ ldsVersion PRINTABLE STRING
+ unicodeVersion PRINTABLE STRING
+ }
+
+ @return
+
+
+ The id-isismtt-cp-accredited OID indicates that the certificate is a
+ qualified certificate according to Directive 1999/93/EC of the European
+ Parliament and of the Council of 13 December 1999 on a Community
+ Framework for Electronic Signatures, which additionally conforms the
+ special requirements of the SigG and has been issued by an accredited CA.
+
+
+ Certificate extensionDate of certificate generation
+
+
+ DateOfCertGenSyntax ::= GeneralizedTime
+
+
+
+ Attribute to indicate that the certificate holder may sign in the name of
+ a third person. May also be used as extension in a certificate.
+
+
+ Attribute to indicate admissions to certain professions. May be used as
+ attribute in attribute certificate or as extension in a certificate
+
+
+ Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST
+ be used in new certificates in place of the extension/attribute
+ MonetaryLimit since January 1, 2004. For the sake of backward
+ compatibility with certificates already in use, SigG conforming
+ components MUST support MonetaryLimit (as well as QcEuLimitValue).
+
+
+ A declaration of majority. May be used as attribute in attribute
+ certificate or as extension in a certificate
+
+
+
+ Serial number of the smart card containing the corresponding private key
+
+
+ ICCSNSyntax ::= OCTET STRING (SIZE(8..20))
+
+
+
+
+ Reference for a file of a smartcard that stores the public key of this
+ certificate and that is used as �security anchor�.
+
+
+ PKReferenceSyntax ::= OCTET STRING (SIZE(20))
+
+
+
+ Some other restriction regarding the usage of this certificate. May be
+ used as attribute in attribute certificate or as extension in a
+ certificate.
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.Restriction
+
+
+
+ (Single)Request extension: Clients may include this extension in a
+ (single) Request to request the responder to send the certificate in the
+ response message along with the status information. Besides the LDAP
+ service, this extension provides another mechanism for the distribution
+ of certificates, which MAY optionally be provided by certificate
+ repositories.
+
+
+ RetrieveIfAllowed ::= BOOLEAN
+
+
+
+ SingleOCSPResponse extension: The certificate requested by the client by
+ inserting the RetrieveIfAllowed extension in the request, will be
+ returned in this extension.
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.Ocsp.RequestedCertificate
+
+
+ Base ObjectIdentifier for naming authorities
+
+
+ SingleOCSPResponse extension: Date, when certificate has been published
+ in the directory and status information has become available. Currently,
+ accrediting authorities enforce that SigG-conforming OCSP servers include
+ this extension in the responses.
+
+
+ CertInDirSince ::= GeneralizedTime
+
+
+
+ Hash of a certificate in OCSP.
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.Ocsp.CertHash
+
+
+
+ NameAtBirth ::= DirectoryString(SIZE(1..64)
+
+
+ Used in
+ {@link Org.BouncyCastle.Asn1.X509.SubjectDirectoryAttributes SubjectDirectoryAttributes}
+
+
+ Some other information of non-restrictive nature regarding the usage of
+ this certificate. May be used as attribute in atribute certificate or as
+ extension in a certificate.
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdditionalInformationSyntax
+
+
+ Indicates that an attribute certificate exists, which limits the
+ usability of this public key certificate. Whenever verifying a signature
+ with the help of this certificate, the content of the corresponding
+ attribute certificate should be concerned. This extension MUST be
+ included in a PKC, if a corresponding attribute certificate (having the
+ PKC as base certificate) contains some attribute that restricts the
+ usability of the PKC too. Attribute certificates with restricting content
+ MUST always be included in the signed document.
+
+
+ LiabilityLimitationFlagSyntax ::= BOOLEAN
+
+
+
+ ISIS-MTT PROFILE: The responder may include this extension in a response to
+ send the hash of the requested certificate to the responder. This hash is
+ cryptographically bound to the certificate and serves as evidence that the
+ certificate is known to the responder (i.e. it has been issued and is present
+ in the directory). Hence, this extension is a means to provide a positive
+ statement of availability as described in T8.[8]. As explained in T13.[1],
+ clients may rely on this information to be able to validate signatures after
+ the expiry of the corresponding certificate. Hence, clients MUST support this
+ extension. If a positive statement of availability is to be delivered, this
+ extension syntax and OID MUST be used.
+
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type CertHash:
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param hashAlgorithm The hash algorithm identifier.
+ @param certificateHash The hash of the whole DER encoding of the certificate.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+ @return an Asn1Object
+
+
+ ISIS-MTT-Optional: The certificate requested by the client by inserting the
+ RetrieveIfAllowed extension in the request, will be returned in this
+ extension.
+
+ ISIS-MTT-SigG: The signature act allows publishing certificates only then,
+ when the certificate owner gives his isExplicit permission. Accordingly, there
+ may be �nondownloadable� certificates, about which the responder must provide
+ status information, but MUST NOT include them in the response. Clients may
+ get therefore the following three kind of answers on a single request
+ including the RetrieveIfAllowed extension:
+
+ a) the responder supports the extension and is allowed to publish the
+ certificate: RequestedCertificate returned including the requested
+ certificate
+ b) the responder supports the extension but is NOT allowed to publish
+ the certificate: RequestedCertificate returned including an empty OCTET
+ STRING
+ c) the responder does not support the extension: RequestedCertificate is
+ not included in the response
+
+ Clients requesting RetrieveIfAllowed MUST be able to handle these cases. If
+ any of the OCTET STRING options is used, it MUST contain the DER encoding of
+ the requested certificate.
+
+
+ RequestedCertificate ::= CHOICE {
+ Certificate Certificate,
+ publicKeyCertificate [0] EXPLICIT OCTET STRING,
+ attributeCertificate [1] EXPLICIT OCTET STRING
+ }
+
+
+
+ Constructor from a given details.
+
+ Only one parameter can be given. All other must be null.
+
+ @param certificate Given as Certificate
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ RequestedCertificate ::= CHOICE {
+ Certificate Certificate,
+ publicKeyCertificate [0] EXPLICIT OCTET STRING,
+ attributeCertificate [1] EXPLICIT OCTET STRING
+ }
+
+
+ @return an Asn1Object
+
+
+ Some other information of non-restrictive nature regarding the usage of this
+ certificate.
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+
+ Constructor from a given details.
+
+ @param information The describtion of the information.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+ @return an Asn1Object
+
+
+ Attribute to indicate admissions to certain professions.
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+
+ ISIS-MTT PROFILE: The relatively complex structure of AdmissionSyntax
+ supports the following concepts and requirements:
+
+ External institutions (e.g. professional associations, chambers, unions,
+ administrative bodies, companies, etc.), which are responsible for granting
+ and verifying professional admissions, are indicated by means of the data
+ field admissionAuthority. An admission authority is indicated by a
+ GeneralName object. Here an X.501 directory name (distinguished name) can be
+ indicated in the field directoryName, a URL address can be indicated in the
+ field uniformResourceIdentifier, and an object identifier can be indicated in
+ the field registeredId.
+ The names of authorities which are responsible for the administration of
+ title registers are indicated in the data field namingAuthority. The name of
+ the authority can be identified by an object identifier in the field
+ namingAuthorityId, by means of a text string in the field
+ namingAuthorityText, by means of a URL address in the field
+ namingAuthorityUrl, or by a combination of them. For example, the text string
+ can contain the name of the authority, the country and the name of the title
+ register. The URL-option refers to a web page which contains lists with
+ officially registered professions (text and possibly OID) as well as
+ further information on these professions. Object identifiers for the
+ component namingAuthorityId are grouped under the OID-branch
+ id-isis-at-namingAuthorities and must be applied for.
+ See http://www.teletrust.de/anwend.asp?Id=30200&Sprache=E_&HomePG=0
+ for an application form and http://www.teletrust.de/links.asp?id=30220,11
+ for an overview of registered naming authorities.
+ By means of the data type ProfessionInfo certain professions,
+ specializations, disciplines, fields of activity, etc. are identified. A
+ profession is represented by one or more text strings, resp. profession OIDs
+ in the fields professionItems and professionOIDs and by a registration number
+ in the field registrationNumber. An indication in text form must always be
+ present, whereas the other indications are optional. The component
+ addProfessionInfo may contain additional applicationspecific information in
+ DER-encoded form.
+
+
+ By means of different namingAuthority-OIDs or profession OIDs hierarchies of
+ professions, specializations, disciplines, fields of activity, etc. can be
+ expressed. The issuing admission authority should always be indicated (field
+ admissionAuthority), whenever a registration number is presented. Still,
+ information on admissions can be given without indicating an admission or a
+ naming authority by the exclusive use of the component professionItems. In
+ this case the certification authority is responsible for the verification of
+ the admission information.
+
+
+
+ This attribute is single-valued. Still, several admissions can be captured in
+ the sequence structure of the component contentsOfAdmissions of
+ AdmissionSyntax or in the component professionInfos of Admissions. The
+ component admissionAuthority of AdmissionSyntax serves as default value for
+ the component admissionAuthority of Admissions. Within the latter component
+ the default value can be overwritten, in case that another authority is
+ responsible. The component namingAuthority of Admissions serves as a default
+ value for the component namingAuthority of ProfessionInfo. Within the latter
+ component the default value can be overwritten, in case that another naming
+ authority needs to be recorded.
+
+ The length of the string objects is limited to 128 characters. It is
+ recommended to indicate a namingAuthorityURL in all issued attribute
+ certificates. If a namingAuthorityURL is indicated, the field professionItems
+ of ProfessionInfo should contain only registered titles. If the field
+ professionOIDs exists, it has to contain the OIDs of the professions listed
+ in professionItems in the same order. In general, the field professionInfos
+ should contain only one entry, unless the admissions that are to be listed
+ are logically connected (e.g. they have been issued under the same admission
+ number).
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.Admissions
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from given details.
+
+ @param admissionAuthority The admission authority.
+ @param contentsOfAdmissions The admissions.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ @return Returns the admissionAuthority if present, null otherwise.
+
+
+ @return Returns the contentsOfAdmissions.
+
+
+ An Admissions structure.
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ Parameter professionInfos is mandatory.
+
+ @param admissionAuthority The admission authority.
+ @param namingAuthority The naming authority.
+ @param professionInfos The profession infos.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+
+ @return an Asn1Object
+
+
+ A declaration of majority.
+
+
+ DeclarationOfMajoritySyntax ::= CHOICE
+ {
+ notYoungerThan [0] IMPLICIT INTEGER,
+ fullAgeAtCountry [1] IMPLICIT SEQUENCE
+ {
+ fullAge BOOLEAN DEFAULT TRUE,
+ country PrintableString (SIZE(2))
+ }
+ dateOfBirth [2] IMPLICIT GeneralizedTime
+ }
+
+
+ fullAgeAtCountry indicates the majority of the owner with respect to the laws
+ of a specific country.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ DeclarationOfMajoritySyntax ::= CHOICE
+ {
+ notYoungerThan [0] IMPLICIT INTEGER,
+ fullAgeAtCountry [1] IMPLICIT SEQUENCE
+ {
+ fullAge BOOLEAN DEFAULT TRUE,
+ country PrintableString (SIZE(2))
+ }
+ dateOfBirth [2] IMPLICIT GeneralizedTime
+ }
+
+
+ @return an Asn1Object
+
+
+ @return notYoungerThan if that's what we are, -1 otherwise
+
+
+ Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST be
+ used in new certificates in place of the extension/attribute MonetaryLimit
+ since January 1, 2004. For the sake of backward compatibility with
+ certificates already in use, components SHOULD support MonetaryLimit (as well
+ as QcEuLimitValue).
+
+ Indicates a monetary limit within which the certificate holder is authorized
+ to act. (This value DOES NOT express a limit on the liability of the
+ certification authority).
+
+
+ MonetaryLimitSyntax ::= SEQUENCE
+ {
+ currency PrintableString (SIZE(3)),
+ amount INTEGER,
+ exponent INTEGER
+ }
+
+
+ currency must be the ISO code.
+
+ value = amount�10*exponent
+
+
+ Constructor from a given details.
+
+
+ value = amount�10^exponent
+
+ @param currency The currency. Must be the ISO code.
+ @param amount The amount
+ @param exponent The exponent
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ MonetaryLimitSyntax ::= SEQUENCE
+ {
+ currency PrintableString (SIZE(3)),
+ amount INTEGER,
+ exponent INTEGER
+ }
+
+
+ @return an Asn1Object
+
+
+ Names of authorities which are responsible for the administration of title
+ registers.
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+
+
+
+ Profession OIDs should always be defined under the OID branch of the
+ responsible naming authority. At the time of this writing, the work group
+ �Recht, Wirtschaft, Steuern� (�Law, Economy, Taxes�) is registered as the
+ first naming authority under the OID id-isismtt-at-namingAuthorities.
+
+
+ Constructor from Asn1Sequence.
+
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ @return Returns the namingAuthorityID.
+
+
+ @return Returns the namingAuthorityText.
+
+
+ @return Returns the namingAuthorityUrl.
+
+
+ Constructor from given details.
+
+ All parameters can be combined.
+
+ @param namingAuthorityID ObjectIdentifier for naming authority.
+ @param namingAuthorityUrl URL for naming authority.
+ @param namingAuthorityText Textual representation of naming authority.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ Attribute to indicate that the certificate holder may sign in the name of a
+ third person.
+
+ ISIS-MTT PROFILE: The corresponding ProcurationSyntax contains either the
+ name of the person who is represented (subcomponent thirdPerson) or a
+ reference to his/her base certificate (in the component signingFor,
+ subcomponent certRef), furthermore the optional components country and
+ typeSubstitution to indicate the country whose laws apply, and respectively
+ the type of procuration (e.g. manager, procuration, custody).
+
+
+ ISIS-MTT PROFILE: The GeneralName MUST be of type directoryName and MAY only
+ contain: - RFC3039 attributes, except pseudonym (countryName, commonName,
+ surname, givenName, serialNumber, organizationName, organizationalUnitName,
+ stateOrProvincename, localityName, postalAddress) and - SubjectDirectoryName
+ attributes (title, dateOfBirth, placeOfBirth, gender, countryOfCitizenship,
+ countryOfResidence and NameAtBirth).
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+
+ Either generalName or certRef MUST be
+ null.
+
+ @param country The country code whose laws apply.
+ @param typeOfSubstitution The type of procuration.
+ @param certRef Reference to certificate of the person who is represented.
+
+
+ Constructor from a given details.
+
+
+ Either generalName or certRef MUST be
+ null.
+
+ @param country The country code whose laws apply.
+ @param typeOfSubstitution The type of procuration.
+ @param thirdPerson The GeneralName of the person who is represented.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+ @return an Asn1Object
+
+
+ Professions, specializations, disciplines, fields of activity, etc.
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+
+
+ Rechtsanw�ltin
+
+
+ Rechtsanwalt
+
+
+ Rechtsbeistand
+
+
+ Steuerberaterin
+
+
+ Steuerberater
+
+
+ Steuerbevollm�chtigte
+
+
+ Steuerbevollm�chtigter
+
+
+ Notarin
+
+
+ Notar
+
+
+ Notarvertreterin
+
+
+ Notarvertreter
+
+
+ Notariatsverwalterin
+
+
+ Notariatsverwalter
+
+
+ Wirtschaftspr�ferin
+
+
+ Wirtschaftspr�fer
+
+
+ Vereidigte Buchpr�ferin
+
+
+ Vereidigter Buchpr�fer
+
+
+ Patentanw�ltin
+
+
+ Patentanwalt
+
+
+ Constructor from Asn1Sequence.
+
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from given details.
+
+ professionItems is mandatory, all other parameters are
+ optional.
+
+ @param namingAuthority The naming authority.
+ @param professionItems Directory strings of the profession.
+ @param professionOids DERObjectIdentfier objects for the
+ profession.
+ @param registrationNumber Registration number.
+ @param addProfessionInfo Additional infos in encoded form.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ @return Returns the addProfessionInfo.
+
+
+ @return Returns the namingAuthority.
+
+
+ @return Returns the professionItems.
+
+
+ @return Returns the professionOids.
+
+
+ @return Returns the registrationNumber.
+
+
+ Some other restriction regarding the usage of this certificate.
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+
+ Constructor from DirectoryString.
+
+ The DirectoryString is of type RestrictionSyntax:
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+ @param restriction A IAsn1String.
+
+
+ Constructor from a given details.
+
+ @param restriction The description of the restriction.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+
+ @return an Asn1Object
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ cast5CBCParameters ::= Sequence {
+ iv OCTET STRING DEFAULT 0,
+ -- Initialization vector
+ keyLength Integer
+ -- Key length, in bits
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ IDEA-CBCPar ::= Sequence {
+ iv OCTET STRING OPTIONAL -- exactly 8 octets
+ }
+
+
+
+ The NetscapeCertType object.
+
+ NetscapeCertType ::= BIT STRING {
+ SSLClient (0),
+ SSLServer (1),
+ S/MIME (2),
+ Object Signing (3),
+ Reserved (4),
+ SSL CA (5),
+ S/MIME CA (6),
+ Object Signing CA (7) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (X509NetscapeCertType.sslCA | X509NetscapeCertType.smimeCA)
+
+
+ This is designed to parse
+ the PublicKeyAndChallenge created by the KEYGEN tag included by
+ Mozilla based browsers.
+
+ PublicKeyAndChallenge ::= SEQUENCE {
+ spki SubjectPublicKeyInfo,
+ challenge IA5STRING
+ }
+
+
+
+
+ Utility class for fetching curves using their NIST names as published in FIPS-PUB 186-3
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ From RFC 3657
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ BasicOcspResponse ::= Sequence {
+ tbsResponseData ResponseData,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT Sequence OF Certificate OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CertID ::= Sequence {
+ hashAlgorithm AlgorithmIdentifier,
+ issuerNameHash OCTET STRING, -- Hash of Issuer's DN
+ issuerKeyHash OCTET STRING, -- Hash of Issuers public key
+ serialNumber CertificateSerialNumber }
+
+
+
+ create a CertStatus object with a tag of zero.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CertStatus ::= CHOICE {
+ good [0] IMPLICIT Null,
+ revoked [1] IMPLICIT RevokedInfo,
+ unknown [2] IMPLICIT UnknownInfo }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CrlID ::= Sequence {
+ crlUrl [0] EXPLICIT IA5String OPTIONAL,
+ crlNum [1] EXPLICIT Integer OPTIONAL,
+ crlTime [2] EXPLICIT GeneralizedTime OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OcspRequest ::= Sequence {
+ tbsRequest TBSRequest,
+ optionalSignature [0] EXPLICIT Signature OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OcspResponse ::= Sequence {
+ responseStatus OcspResponseStatus,
+ responseBytes [0] EXPLICIT ResponseBytes OPTIONAL }
+
+
+
+ The OcspResponseStatus enumeration.
+
+ OcspResponseStatus ::= Enumerated {
+ successful (0), --Response has valid confirmations
+ malformedRequest (1), --Illegal confirmation request
+ internalError (2), --Internal error in issuer
+ tryLater (3), --Try again later
+ --(4) is not used
+ sigRequired (5), --Must sign the request
+ unauthorized (6) --Request unauthorized
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Request ::= Sequence {
+ reqCert CertID,
+ singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponderID ::= CHOICE {
+ byName [1] Name,
+ byKey [2] KeyHash }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponseBytes ::= Sequence {
+ responseType OBJECT IDENTIFIER,
+ response OCTET STRING }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponseData ::= Sequence {
+ version [0] EXPLICIT Version DEFAULT v1,
+ responderID ResponderID,
+ producedAt GeneralizedTime,
+ responses Sequence OF SingleResponse,
+ responseExtensions [1] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RevokedInfo ::= Sequence {
+ revocationTime GeneralizedTime,
+ revocationReason [0] EXPLICIT CRLReason OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ServiceLocator ::= Sequence {
+ issuer Name,
+ locator AuthorityInfoAccessSyntax OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Signature ::= Sequence {
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT Sequence OF Certificate OPTIONAL}
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SingleResponse ::= Sequence {
+ certID CertID,
+ certStatus CertStatus,
+ thisUpdate GeneralizedTime,
+ nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL,
+ singleExtensions [1] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ TBSRequest ::= Sequence {
+ version [0] EXPLICIT Version DEFAULT v1,
+ requestorName [1] EXPLICIT GeneralName OPTIONAL,
+ requestList Sequence OF Request,
+ requestExtensions [2] EXPLICIT Extensions OPTIONAL }
+
+
+
+ return an Attribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attr ::= Sequence {
+ attrType OBJECT IDENTIFIER,
+ attrValues Set OF AttributeValue
+ }
+
+
+
+ Pkcs10 Certfication request object.
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+
+
+ Pkcs10 CertificationRequestInfo object.
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= Sequence {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ The EncryptedData object.
+
+ EncryptedData ::= Sequence {
+ version Version,
+ encryptedContentInfo EncryptedContentInfo
+ }
+
+
+ EncryptedContentInfo ::= Sequence {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+ EncryptedContent ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EncryptedPrivateKeyInfo ::= Sequence {
+ encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
+ encryptedData EncryptedData
+ }
+
+ EncryptedData ::= OCTET STRING
+
+ KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
+ ... -- For local profiles
+ }
+
+
+
+
+ MacData ::= SEQUENCE {
+ mac DigestInfo,
+ macSalt OCTET STRING,
+ iterations INTEGER DEFAULT 1
+ -- Note: The default is for historic reasons and its use is deprecated. A
+ -- higher value, like 1024 is recommended.
+
+ @return the basic DERObject construction.
+
+
+ the infamous Pfx from Pkcs12
+
+
+ write out an RSA private key with its associated information
+ as described in Pkcs8.
+
+ PrivateKeyInfo ::= Sequence {
+ version Version,
+ privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}},
+ privateKey PrivateKey,
+ attributes [0] IMPLICIT Attributes OPTIONAL
+ }
+ Version ::= Integer {v1(0)} (v1,...)
+
+ PrivateKey ::= OCTET STRING
+
+ Attributes ::= Set OF Attr
+
+
+
+ The default version
+
+
+
+ RSAES-OAEP-params ::= SEQUENCE {
+ hashAlgorithm [0] OAEP-PSSDigestAlgorithms DEFAULT sha1,
+ maskGenAlgorithm [1] PKCS1MGFAlgorithms DEFAULT mgf1SHA1,
+ pSourceAlgorithm [2] PKCS1PSourceAlgorithms DEFAULT pSpecifiedEmpty
+ }
+
+ OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-sha1 PARAMETERS NULL }|
+ { OID id-sha256 PARAMETERS NULL }|
+ { OID id-sha384 PARAMETERS NULL }|
+ { OID id-sha512 PARAMETERS NULL },
+ ... -- Allows for future expansion --
+ }
+ PKCS1MGFAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+ ... -- Allows for future expansion --
+ }
+ PKCS1PSourceAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-pSpecified PARAMETERS OCTET STRING },
+ ... -- Allows for future expansion --
+ }
+
+ @return the asn1 primitive representing the parameters.
+
+
+ This outputs the key in Pkcs1v2 format.
+
+ RsaPrivateKey ::= Sequence {
+ version Version,
+ modulus Integer, -- n
+ publicExponent Integer, -- e
+ privateExponent Integer, -- d
+ prime1 Integer, -- p
+ prime2 Integer, -- q
+ exponent1 Integer, -- d mod (p-1)
+ exponent2 Integer, -- d mod (q-1)
+ coefficient Integer -- (inverse of q) mod p
+ }
+
+ Version ::= Integer
+
+ This routine is written to output Pkcs1 version 0, private keys.
+
+
+ The default version
+
+
+
+ RSASSA-PSS-params ::= SEQUENCE {
+ hashAlgorithm [0] OAEP-PSSDigestAlgorithms DEFAULT sha1,
+ maskGenAlgorithm [1] PKCS1MGFAlgorithms DEFAULT mgf1SHA1,
+ saltLength [2] INTEGER DEFAULT 20,
+ trailerField [3] TrailerField DEFAULT trailerFieldBC
+ }
+
+ OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-sha1 PARAMETERS NULL }|
+ { OID id-sha256 PARAMETERS NULL }|
+ { OID id-sha384 PARAMETERS NULL }|
+ { OID id-sha512 PARAMETERS NULL },
+ ... -- Allows for future expansion --
+ }
+
+ PKCS1MGFAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+ ... -- Allows for future expansion --
+ }
+
+ TrailerField ::= INTEGER { trailerFieldBC(1) }
+
+ @return the asn1 primitive representing the parameters.
+
+
+ a Pkcs#7 signed data object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignedData ::= Sequence {
+ version Version,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ contentInfo ContentInfo,
+ certificates
+ [0] IMPLICIT ExtendedCertificatesAndCertificates
+ OPTIONAL,
+ crls
+ [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos }
+
+
+
+ a Pkcs#7 signer info object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerInfo ::= Sequence {
+ version Version,
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ digestAlgorithm DigestAlgorithmIdentifier,
+ authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+ digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+ encryptedDigest EncryptedDigest,
+ unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+ }
+
+ EncryptedDigest ::= OCTET STRING
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+
+ DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+
+
+
+ the elliptic curve private key object from SEC 1
+
+
+ ECPrivateKey ::= SEQUENCE {
+ version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1),
+ privateKey OCTET STRING,
+ parameters [0] Parameters OPTIONAL,
+ publicKey [1] BIT STRING OPTIONAL }
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ EllipticCurve OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0)
+ }
+
+
+ Handler class for dealing with S/MIME Capabilities
+
+
+ general preferences
+
+
+ encryption algorithms preferences
+
+
+ return an Attr object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ returns an ArrayList with 0 or more objects of all the capabilities
+ matching the passed in capability Oid. If the Oid passed is null the
+ entire set is returned.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SMIMECapabilities ::= Sequence OF SMIMECapability
+
+
+
+ general preferences
+
+
+ encryption algorithms preferences
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SMIMECapability ::= Sequence {
+ capabilityID OBJECT IDENTIFIER,
+ parameters ANY DEFINED BY capabilityID OPTIONAL
+ }
+
+
+
+ Handler for creating a vector S/MIME Capabilities
+
+
+ The SmimeEncryptionKeyPreference object.
+
+ SmimeEncryptionKeyPreference ::= CHOICE {
+ issuerAndSerialNumber [0] IssuerAndSerialNumber,
+ receipentKeyId [1] RecipientKeyIdentifier,
+ subjectAltKeyIdentifier [2] SubjectKeyIdentifier
+ }
+
+
+
+ @param sKeyId the subjectKeyIdentifier value (normally the X.509 one)
+
+
+ elliptic curves defined in "ECC Brainpool Standard Curves and Curve Generation"
+ http://www.ecc-brainpool.org/download/draft_pkix_additional_ecc_dp.txt
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+
+ Accuracy ::= SEQUENCE {
+ seconds INTEGER OPTIONAL,
+ millis [0] INTEGER (1..999) OPTIONAL,
+ micros [1] INTEGER (1..999) OPTIONAL
+ }
+
+
+
+ @param o
+ @return a MessageImprint object.
+
+
+
+ MessageImprint ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashedMessage OCTET STRING }
+
+
+
+
+
+ TstInfo ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ policy TSAPolicyId,
+ messageImprint MessageImprint,
+ -- MUST have the same value as the similar field in
+ -- TimeStampReq
+ serialNumber INTEGER,
+ -- Time-Stamping users MUST be ready to accommodate integers
+ -- up to 160 bits.
+ genTime GeneralizedTime,
+ accuracy Accuracy OPTIONAL,
+ ordering BOOLEAN DEFAULT FALSE,
+ nonce INTEGER OPTIONAL,
+ -- MUST be present if the similar field was present
+ -- in TimeStampReq. In that case it MUST have the same value.
+ tsa [0] GeneralName OPTIONAL,
+ extensions [1] IMPLICIT Extensions OPTIONAL }
+
+
+
+
+
+ TimeStampReq ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ messageImprint MessageImprint,
+ --a hash algorithm OID and the hash value of the data to be
+ --time-stamped
+ reqPolicy TSAPolicyId OPTIONAL,
+ nonce INTEGER OPTIONAL,
+ certReq BOOLEAN DEFAULT FALSE,
+ extensions [0] IMPLICIT Extensions OPTIONAL
+ }
+
+
+
+
+ TimeStampResp ::= SEQUENCE {
+ status PkiStatusInfo,
+ timeStampToken TimeStampToken OPTIONAL }
+
+
+
+ dump a Der object as a formatted string with indentation
+
+ @param obj the Asn1Object to be dumped out.
+
+
+ dump out a DER object as a formatted string, in non-verbose mode
+
+ @param obj the Asn1Encodable to be dumped out.
+ @return the resulting string.
+
+
+ Dump out the object as a string
+
+ @param obj the Asn1Encodable to be dumped out.
+ @param verbose if true, dump out the contents of octet and bit strings.
+ @return the resulting string.
+
+
+
+ DirectoryString ::= CHOICE {
+ teletexString TeletexString (SIZE (1..MAX)),
+ printableString PrintableString (SIZE (1..MAX)),
+ universalString UniversalString (SIZE (1..MAX)),
+ utf8String UTF8String (SIZE (1..MAX)),
+ bmpString BMPString (SIZE (1..MAX)) }
+
+
+
+ The AccessDescription object.
+
+ AccessDescription ::= SEQUENCE {
+ accessMethod OBJECT IDENTIFIER,
+ accessLocation GeneralName }
+
+
+
+ create an AccessDescription with the oid and location provided.
+
+
+
+ @return the access method.
+
+
+
+ @return the access location
+
+
+
+ Return the OID in the Algorithm entry of this identifier.
+
+
+
+
+ Return the parameters structure in the Parameters entry of this identifier.
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AlgorithmIdentifier ::= Sequence {
+ algorithm OBJECT IDENTIFIER,
+ parameters ANY DEFINED BY algorithm OPTIONAL }
+
+
+
+
+ Don't use this one if you are trying to be RFC 3281 compliant.
+ Use it for v1 attribute certificates only.
+
+ Our GeneralNames structure
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttCertIssuer ::= CHOICE {
+ v1Form GeneralNames, -- MUST NOT be used in this
+ -- profile
+ v2Form [0] V2Form -- v2 only
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttCertValidityPeriod ::= Sequence {
+ notBeforeTime GeneralizedTime,
+ notAfterTime GeneralizedTime
+ }
+
+
+
+ return an Attr object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attr ::= Sequence {
+ attrType OBJECT IDENTIFIER,
+ attrValues Set OF AttributeValue
+ }
+
+
+
+ @param obj
+ @return
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttributeCertificate ::= Sequence {
+ acinfo AttributeCertificateInfo,
+ signatureAlgorithm AlgorithmIdentifier,
+ signatureValue BIT STRING
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttributeCertificateInfo ::= Sequence {
+ version AttCertVersion -- version is v2,
+ holder Holder,
+ issuer AttCertIssuer,
+ signature AlgorithmIdentifier,
+ serialNumber CertificateSerialNumber,
+ attrCertValidityPeriod AttCertValidityPeriod,
+ attributes Sequence OF Attr,
+ issuerUniqueID UniqueIdentifier OPTIONAL,
+ extensions Extensions OPTIONAL
+ }
+
+ AttCertVersion ::= Integer { v2(1) }
+
+
+
+ The AuthorityInformationAccess object.
+
+ id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 1 }
+
+ AuthorityInfoAccessSyntax ::=
+ Sequence SIZE (1..MAX) OF AccessDescription
+ AccessDescription ::= Sequence {
+ accessMethod OBJECT IDENTIFIER,
+ accessLocation GeneralName }
+
+ id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
+ id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 }
+ id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 }
+
+
+
+ create an AuthorityInformationAccess with the oid and location provided.
+
+
+ The AuthorityKeyIdentifier object.
+
+ id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 35 }
+
+ AuthorityKeyIdentifier ::= Sequence {
+ keyIdentifier [0] IMPLICIT KeyIdentifier OPTIONAL,
+ authorityCertIssuer [1] IMPLICIT GeneralNames OPTIONAL,
+ authorityCertSerialNumber [2] IMPLICIT CertificateSerialNumber OPTIONAL }
+
+ KeyIdentifier ::= OCTET STRING
+
+
+
+
+ *
+ * Calulates the keyidentifier using a SHA1 hash over the BIT STRING
+ * from SubjectPublicKeyInfo as defined in RFC2459.
+ *
+ * Example of making a AuthorityKeyIdentifier:
+ *
+ * SubjectPublicKeyInfo apki = new SubjectPublicKeyInfo((ASN1Sequence)new ASN1InputStream(
+ * publicKey.getEncoded()).readObject());
+ * AuthorityKeyIdentifier aki = new AuthorityKeyIdentifier(apki);
+ *
+ *
+ *
+
+
+ create an AuthorityKeyIdentifier with the GeneralNames tag and
+ the serial number provided as well.
+
+
+ create an AuthorityKeyIdentifier with the GeneralNames tag and
+ the serial number provided.
+
+
+ create an AuthorityKeyIdentifier with a precomputed key identifier
+
+
+ create an AuthorityKeyIdentifier with a precomupted key identifier
+ and the GeneralNames tag and the serial number provided as well.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+ create a cA=true object for the given path length constraint.
+
+ @param pathLenConstraint
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ BasicConstraints := Sequence {
+ cA Boolean DEFAULT FALSE,
+ pathLenConstraint Integer (0..MAX) OPTIONAL
+ }
+
+
+
+ Return the distribution points making up the sequence.
+
+ @return DistributionPoint[]
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CrlDistPoint ::= Sequence SIZE {1..MAX} OF DistributionPoint
+
+
+
+ The CRLNumber object.
+
+ CRLNumber::= Integer(0..MAX)
+
+
+
+ The CRLReason enumeration.
+
+ CRLReason ::= Enumerated {
+ unspecified (0),
+ keyCompromise (1),
+ cACompromise (2),
+ affiliationChanged (3),
+ superseded (4),
+ cessationOfOperation (5),
+ certificateHold (6),
+ removeFromCRL (8),
+ privilegeWithdrawn (9),
+ aACompromise (10)
+ }
+
+
+
+ CertPolicyId, used in the CertificatePolicies and PolicyMappings
+ X509V3 Extensions.
+
+
+ CertPolicyId ::= OBJECT IDENTIFIER
+
+
+
+ PKIX RFC-2459
+
+ The X.509 v2 CRL syntax is as follows. For signature calculation,
+ the data that is to be signed is ASN.1 Der encoded.
+
+
+ CertificateList ::= Sequence {
+ tbsCertList TbsCertList,
+ signatureAlgorithm AlgorithmIdentifier,
+ signatureValue BIT STRING }
+
+
+
+ This class helps to support crossCerfificatePairs in a LDAP directory
+ according RFC 2587
+
+
+ crossCertificatePairATTRIBUTE::={
+ WITH SYNTAX CertificatePair
+ EQUALITY MATCHING RULE certificatePairExactMatch
+ ID joint-iso-ccitt(2) ds(5) attributeType(4) crossCertificatePair(40)}
+
+
+ The forward elements of the crossCertificatePair attribute of a
+ CA's directory entry shall be used to store all, except self-issued
+ certificates issued to this CA. Optionally, the reverse elements of the
+ crossCertificatePair attribute, of a CA's directory entry may contain a
+ subset of certificates issued by this CA to other CAs. When both the forward
+ and the reverse elements are present in a single attribute value, issuer name
+ in one certificate shall match the subject name in the other and vice versa,
+ and the subject public key in one certificate shall be capable of verifying
+ the digital signature on the other certificate and vice versa.
+
+ When a reverse element is present, the forward element value and the reverse
+ element value need not be stored in the same attribute value; in other words,
+ they can be stored in either a single attribute value or two attribute
+ values.
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type CertificatePair:
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param forward Certificates issued to this CA.
+ @param reverse Certificates issued by this CA to other CAs.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+ @return a DERObject
+
+
+ @return Returns the forward.
+
+
+ @return Returns the reverse.
+
+
+ Construct a CertificatePolicies object containing one PolicyInformation.
+
+ @param name the name to be contained.
+
+
+ Produce an object suitable for an ASN1OutputStream.
+
+ CertificatePolicies ::= SEQUENCE SIZE {1..MAX} OF PolicyInformation
+
+
+
+ The DigestInfo object.
+
+ DigestInfo::=Sequence{
+ digestAlgorithm AlgorithmIdentifier,
+ digest OCTET STRING }
+
+
+
+ DisplayText class, used in
+ CertificatePolicies X509 V3 extensions (in policy qualifiers).
+
+ It stores a string in a chosen encoding.
+
+ DisplayText ::= CHOICE {
+ ia5String IA5String (SIZE (1..200)),
+ visibleString VisibleString (SIZE (1..200)),
+ bmpString BMPString (SIZE (1..200)),
+ utf8String UTF8String (SIZE (1..200)) }
+
+ @see PolicyQualifierInfo
+ @see PolicyInformation
+
+
+ Constant corresponding to ia5String encoding.
+
+
+
+ Constant corresponding to bmpString encoding.
+
+
+
+ Constant corresponding to utf8String encoding.
+
+
+
+ Constant corresponding to visibleString encoding.
+
+
+
+ Describe constant DisplayTextMaximumSize here.
+
+
+
+ Creates a new DisplayText instance.
+
+ @param type the desired encoding type for the text.
+ @param text the text to store. Strings longer than 200
+ characters are truncated.
+
+
+ Creates a new DisplayText instance.
+
+ @param text the text to encapsulate. Strings longer than 200
+ characters are truncated.
+
+
+ Creates a new DisplayText instance.
+ Useful when reading back a DisplayText class
+ from it's Asn1Encodable form.
+
+ @param contents an Asn1Encodable instance.
+
+
+ Returns the stored string object.
+
+ @return the stored text as a string.
+
+
+ The DistributionPoint object.
+
+ DistributionPoint ::= Sequence {
+ distributionPoint [0] DistributionPointName OPTIONAL,
+ reasons [1] ReasonFlags OPTIONAL,
+ cRLIssuer [2] GeneralNames OPTIONAL
+ }
+
+
+
+ The DistributionPointName object.
+
+ DistributionPointName ::= CHOICE {
+ fullName [0] GeneralNames,
+ nameRelativeToCRLIssuer [1] RDN
+ }
+
+
+
+ The extendedKeyUsage object.
+
+ extendedKeyUsage ::= Sequence SIZE (1..MAX) OF KeyPurposeId
+
+
+
+ Returns all extended key usages.
+ The returned ArrayList contains DerObjectIdentifier instances.
+ @return An ArrayList with all key purposes.
+
+
+ The GeneralName object.
+
+ GeneralName ::= CHOICE {
+ otherName [0] OtherName,
+ rfc822Name [1] IA5String,
+ dNSName [2] IA5String,
+ x400Address [3] ORAddress,
+ directoryName [4] Name,
+ ediPartyName [5] EDIPartyName,
+ uniformResourceIdentifier [6] IA5String,
+ iPAddress [7] OCTET STRING,
+ registeredID [8] OBJECT IDENTIFIER}
+
+ OtherName ::= Sequence {
+ type-id OBJECT IDENTIFIER,
+ value [0] EXPLICIT ANY DEFINED BY type-id }
+
+ EDIPartyName ::= Sequence {
+ nameAssigner [0] DirectoryString OPTIONAL,
+ partyName [1] DirectoryString }
+
+
+
+ When the subjectAltName extension contains an Internet mail address,
+ the address MUST be included as an rfc822Name. The format of an
+ rfc822Name is an "addr-spec" as defined in RFC 822 [RFC 822].
+
+ When the subjectAltName extension contains a domain name service
+ label, the domain name MUST be stored in the dNSName (an IA5String).
+ The name MUST be in the "preferred name syntax," as specified by RFC
+ 1034 [RFC 1034].
+
+ When the subjectAltName extension contains a URI, the name MUST be
+ stored in the uniformResourceIdentifier (an IA5String). The name MUST
+ be a non-relative URL, and MUST follow the URL syntax and encoding
+ rules specified in [RFC 1738]. The name must include both a scheme
+ (e.g., "http" or "ftp") and a scheme-specific-part. The scheme-
+ specific-part must include a fully qualified domain name or IP
+ address as the host.
+
+ When the subjectAltName extension contains a iPAddress, the address
+ MUST be stored in the octet string in "network byte order," as
+ specified in RFC 791 [RFC 791]. The least significant bit (LSB) of
+ each octet is the LSB of the corresponding byte in the network
+ address. For IP Version 4, as specified in RFC 791, the octet string
+ MUST contain exactly four octets. For IP Version 6, as specified in
+ RFC 1883, the octet string MUST contain exactly sixteen octets [RFC
+ 1883].
+
+
+ Create a GeneralName for the given tag from the passed in string.
+
+ This constructor can handle:
+
+ rfc822Name
+ iPAddress
+ directoryName
+ dNSName
+ uniformResourceIdentifier
+ registeredID
+
+ For x400Address, otherName and ediPartyName there is no common string
+ format defined.
+
+ Note: A directory name can be encoded in different ways into a byte
+ representation. Be aware of this if the byte representation is used for
+ comparing results.
+
+
+ @param tag tag number
+ @param name string representation of name
+ @throws ArgumentException if the string encoding is not correct or
+ not supported.
+
+
+ Construct a GeneralNames object containing one GeneralName.
+ The name to be contained.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ GeneralNames ::= Sequence SIZE {1..MAX} OF GeneralName
+
+
+
+ Class for containing a restriction object subtrees in NameConstraints. See
+ RFC 3280.
+
+
+
+ GeneralSubtree ::= SEQUENCE
+ {
+ baseName GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.NameConstraints
+
+
+
+ Constructor from a given details.
+
+ According RFC 3280, the minimum and maximum fields are not used with any
+ name forms, thus minimum MUST be zero, and maximum MUST be absent.
+
+ If minimum is null, zero is assumed, if
+ maximum is null, maximum is absent.
+
+ @param baseName
+ A restriction.
+ @param minimum
+ Minimum
+
+ @param maximum
+ Maximum
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ GeneralSubtree ::= SEQUENCE
+ {
+ baseName GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL
+ }
+
+
+ @return a DERObject
+
+
+ The Holder object.
+
+ For an v2 attribute certificate this is:
+
+
+ Holder ::= SEQUENCE {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+ For an v1 attribute certificate this is:
+
+
+ subject CHOICE {
+ baseCertificateID [0] IssuerSerial,
+ -- associated with a Public Key Certificate
+ subjectName [1] GeneralNames },
+ -- associated with a name
+
+
+
+
+ Constructor for a holder for an v1 attribute certificate.
+
+ @param tagObj The ASN.1 tagged holder object.
+
+
+ Constructor for a holder for an v2 attribute certificate. *
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructs a holder from a IssuerSerial.
+ @param baseCertificateID The IssuerSerial.
+ @param version The version of the attribute certificate.
+
+
+ Returns 1 for v2 attribute certificates or 0 for v1 attribute
+ certificates.
+ @return The version of the attribute certificate.
+
+
+ Constructs a holder with an entityName for v2 attribute certificates or
+ with a subjectName for v1 attribute certificates.
+
+ @param entityName The entity or subject name.
+
+
+ Constructs a holder with an entityName for v2 attribute certificates or
+ with a subjectName for v1 attribute certificates.
+
+ @param entityName The entity or subject name.
+ @param version The version of the attribute certificate.
+
+
+ Constructs a holder from an object digest info.
+
+ @param objectDigestInfo The object digest info object.
+
+
+ Returns the entityName for an v2 attribute certificate or the subjectName
+ for an v1 attribute certificate.
+
+ @return The entityname or subjectname.
+
+
+ The Holder object.
+
+ Holder ::= Sequence {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+ Implementation of IetfAttrSyntax as specified by RFC3281.
+
+
+
+
+
+
+
+
+ IetfAttrSyntax ::= Sequence {
+ policyAuthority [0] GeneralNames OPTIONAL,
+ values Sequence OF CHOICE {
+ octets OCTET STRING,
+ oid OBJECT IDENTIFIER,
+ string UTF8String
+ }
+ }
+
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ IssuerSerial ::= Sequence {
+ issuer GeneralNames,
+ serial CertificateSerialNumber,
+ issuerUid UniqueIdentifier OPTIONAL
+ }
+
+
+
+
+ IssuingDistributionPoint ::= SEQUENCE {
+ distributionPoint [0] DistributionPointName OPTIONAL,
+ onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE,
+ onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE,
+ onlySomeReasons [3] ReasonFlags OPTIONAL,
+ indirectCRL [4] BOOLEAN DEFAULT FALSE,
+ onlyContainsAttributeCerts [5] BOOLEAN DEFAULT FALSE }
+
+
+
+ Constructor from given details.
+
+ @param distributionPoint
+ May contain an URI as pointer to most current CRL.
+ @param onlyContainsUserCerts Covers revocation information for end certificates.
+ @param onlyContainsCACerts Covers revocation information for CA certificates.
+
+ @param onlySomeReasons
+ Which revocation reasons does this point cover.
+ @param indirectCRL
+ If true then the CRL contains revocation
+ information about certificates ssued by other CAs.
+ @param onlyContainsAttributeCerts Covers revocation information for attribute certificates.
+
+
+ Constructor from Asn1Sequence
+
+
+ @return Returns the distributionPoint.
+
+
+ @return Returns the onlySomeReasons.
+
+
+ The KeyPurposeID object.
+
+ KeyPurposeID ::= OBJECT IDENTIFIER
+
+
+
+ The KeyUsage object.
+
+ id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
+
+ KeyUsage ::= BIT STRING {
+ digitalSignature (0),
+ nonRepudiation (1),
+ keyEncipherment (2),
+ dataEncipherment (3),
+ keyAgreement (4),
+ keyCertSign (5),
+ cRLSign (6),
+ encipherOnly (7),
+ decipherOnly (8) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment)
+
+
+ Constructor from a given details.
+
+ permitted and excluded are Vectors of GeneralSubtree objects.
+
+ @param permitted Permitted subtrees
+ @param excluded Excluded subtrees
+
+
+ NoticeReference class, used in
+ CertificatePolicies X509 V3 extensions
+ (in policy qualifiers).
+
+
+ NoticeReference ::= Sequence {
+ organization DisplayText,
+ noticeNumbers Sequence OF Integer }
+
+
+
+ @see PolicyQualifierInfo
+ @see PolicyInformation
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization a String value
+ @param numbers a Vector value
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization a String value
+ @param noticeNumbers an ASN1EncodableVector value
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization displayText
+ @param noticeNumbers an ASN1EncodableVector value
+
+
+ Creates a new NoticeReference instance.
+ Useful for reconstructing a NoticeReference
+ instance from its encodable/encoded form.
+
+ @param as an Asn1Sequence value obtained from either
+ calling @{link ToAsn1Object()} for a NoticeReference
+ instance or from parsing it from a Der-encoded stream.
+
+
+ Describe ToAsn1Object method here.
+
+ @return a Asn1Object value
+
+
+ ObjectDigestInfo ASN.1 structure used in v2 attribute certificates.
+
+
+
+ ObjectDigestInfo ::= SEQUENCE {
+ digestedObjectType ENUMERATED {
+ publicKey (0),
+ publicKeyCert (1),
+ otherObjectTypes (2) },
+ -- otherObjectTypes MUST NOT
+ -- be used in this profile
+ otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
+ digestAlgorithm AlgorithmIdentifier,
+ objectDigest BIT STRING
+ }
+
+
+
+
+
+ The public key is hashed.
+
+
+ The public key certificate is hashed.
+
+
+ An other object is hashed.
+
+
+ Constructor from given details.
+
+ If digestedObjectType is not {@link #publicKeyCert} or
+ {@link #publicKey} otherObjectTypeID must be given,
+ otherwise it is ignored.
+
+ @param digestedObjectType The digest object type.
+ @param otherObjectTypeID The object type ID for
+ otherObjectDigest.
+ @param digestAlgorithm The algorithm identifier for the hash.
+ @param objectDigest The hash value.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+
+ ObjectDigestInfo ::= SEQUENCE {
+ digestedObjectType ENUMERATED {
+ publicKey (0),
+ publicKeyCert (1),
+ otherObjectTypes (2) },
+ -- otherObjectTypes MUST NOT
+ -- be used in this profile
+ otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
+ digestAlgorithm AlgorithmIdentifier,
+ objectDigest BIT STRING
+ }
+
+
+
+
+ PolicyMappings V3 extension, described in RFC3280.
+
+ PolicyMappings ::= Sequence SIZE (1..MAX) OF Sequence {
+ issuerDomainPolicy CertPolicyId,
+ subjectDomainPolicy CertPolicyId }
+
+
+ @see RFC 3280, section 4.2.1.6
+
+
+ Creates a new PolicyMappings instance.
+
+ @param seq an Asn1Sequence constructed as specified
+ in RFC 3280
+
+
+ Creates a new PolicyMappings instance.
+
+ @param mappings a HashMap value that maps
+ string oids
+ to other string oids.
+
+
+ PolicyQualifierId, used in the CertificatePolicies
+ X509V3 extension.
+
+
+ id-qt OBJECT IDENTIFIER ::= { id-pkix 2 }
+ id-qt-cps OBJECT IDENTIFIER ::= { id-qt 1 }
+ id-qt-unotice OBJECT IDENTIFIER ::= { id-qt 2 }
+ PolicyQualifierId ::=
+ OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
+
+
+
+ Policy qualifiers, used in the X509V3 CertificatePolicies
+ extension.
+
+
+ PolicyQualifierInfo ::= Sequence {
+ policyQualifierId PolicyQualifierId,
+ qualifier ANY DEFINED BY policyQualifierId }
+
+
+
+ Creates a new PolicyQualifierInfo instance.
+
+ @param policyQualifierId a PolicyQualifierId value
+ @param qualifier the qualifier, defined by the above field.
+
+
+ Creates a new PolicyQualifierInfo containing a
+ cPSuri qualifier.
+
+ @param cps the CPS (certification practice statement) uri as a
+ string.
+
+
+ Creates a new PolicyQualifierInfo instance.
+
+ @param as PolicyQualifierInfo X509 structure
+ encoded as an Asn1Sequence.
+
+
+ Returns a Der-encodable representation of this instance.
+
+ @return a Asn1Object value
+
+
+
+
+ PrivateKeyUsagePeriod ::= SEQUENCE
+ {
+ notBefore [0] GeneralizedTime OPTIONAL,
+ notAfter [1] GeneralizedTime OPTIONAL }
+
+
+
+
+ This outputs the key in Pkcs1v2 format.
+
+ RSAPublicKey ::= Sequence {
+ modulus Integer, -- n
+ publicExponent Integer, -- e
+ }
+
+
+
+ The ReasonFlags object.
+
+ ReasonFlags ::= BIT STRING {
+ unused(0),
+ keyCompromise(1),
+ cACompromise(2),
+ affiliationChanged(3),
+ superseded(4),
+ cessationOfOperation(5),
+ certficateHold(6)
+ }
+
+
+
+ @param reasons - the bitwise OR of the Key Reason flags giving the
+ allowed uses for the key.
+
+
+ Implementation of the RoleSyntax object as specified by the RFC3281.
+
+
+ RoleSyntax ::= SEQUENCE {
+ roleAuthority [0] GeneralNames OPTIONAL,
+ roleName [1] GeneralName
+ }
+
+
+
+ RoleSyntax factory method.
+ @param obj the object used to construct an instance of
+ RoleSyntax. It must be an instance of RoleSyntax
+ or Asn1Sequence.
+ @return the instance of RoleSyntax built from the
+ supplied object.
+ @throws java.lang.ArgumentException if the object passed
+ to the factory is not an instance of RoleSyntax or
+ Asn1Sequence.
+
+
+ Constructor.
+ @param roleAuthority the role authority of this RoleSyntax.
+ @param roleName the role name of this RoleSyntax.
+
+
+ Constructor. Invoking this constructor is the same as invoking
+ new RoleSyntax(null, roleName).
+ @param roleName the role name of this RoleSyntax.
+
+
+ Utility constructor. Takes a string argument representing
+ the role name, builds a GeneralName to hold the role name
+ and calls the constructor that takes a GeneralName.
+ @param roleName
+
+
+ Constructor that builds an instance of RoleSyntax by
+ extracting the encoded elements from the Asn1Sequence
+ object supplied.
+ @param seq an instance of Asn1Sequence that holds
+ the encoded elements used to build this RoleSyntax.
+
+
+ Gets the role authority of this RoleSyntax.
+ @return an instance of GeneralNames holding the
+ role authority of this RoleSyntax.
+
+
+ Gets the role name of this RoleSyntax.
+ @return an instance of GeneralName holding the
+ role name of this RoleSyntax.
+
+
+ Gets the role name as a java.lang.string object.
+ @return the role name of this RoleSyntax represented as a
+ string object.
+
+
+ Gets the role authority as a string[] object.
+ @return the role authority of this RoleSyntax represented as a
+ string[] array.
+
+
+ Implementation of the method ToAsn1Object as
+ required by the superclass ASN1Encodable.
+
+
+ RoleSyntax ::= SEQUENCE {
+ roleAuthority [0] GeneralNames OPTIONAL,
+ roleName [1] GeneralName
+ }
+
+
+
+ This extension may contain further X.500 attributes of the subject. See also
+ RFC 3039.
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @see org.bouncycastle.asn1.x509.X509Name for AttributeType ObjectIdentifiers.
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type SubjectDirectoryAttributes:
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @param seq
+ The ASN.1 sequence.
+
+
+ Constructor from an ArrayList of attributes.
+
+ The ArrayList consists of attributes of type {@link Attribute Attribute}
+
+ @param attributes The attributes.
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @return a DERObject
+
+
+ @return Returns the attributes.
+
+
+ The SubjectKeyIdentifier object.
+
+ SubjectKeyIdentifier::= OCTET STRING
+
+
+
+ Calculates the keyIdentifier using a SHA1 hash over the BIT STRING
+ from SubjectPublicKeyInfo as defined in RFC3280.
+
+ @param spki the subject public key info.
+
+
+ Return a RFC 3280 type 1 key identifier. As in:
+
+ (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the
+ value of the BIT STRING subjectPublicKey (excluding the tag,
+ length, and number of unused bits).
+
+ @param keyInfo the key info object containing the subjectPublicKey field.
+ @return the key identifier.
+
+
+ Return a RFC 3280 type 2 key identifier. As in:
+
+ (2) The keyIdentifier is composed of a four bit type field with
+ the value 0100 followed by the least significant 60 bits of the
+ SHA-1 hash of the value of the BIT STRING subjectPublicKey.
+
+ @param keyInfo the key info object containing the subjectPublicKey field.
+ @return the key identifier.
+
+
+ The object that contains the public key stored in a certficate.
+
+ The GetEncoded() method in the public keys in the JCE produces a DER
+ encoded one of these.
+
+
+ for when the public key is an encoded object - if the bitstring
+ can't be decoded this routine raises an IOException.
+
+ @exception IOException - if the bit string doesn't represent a Der
+ encoded object.
+
+
+ for when the public key is raw bits...
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SubjectPublicKeyInfo ::= Sequence {
+ algorithm AlgorithmIdentifier,
+ publicKey BIT STRING }
+
+
+
+ PKIX RFC-2459 - TbsCertList object.
+
+ TbsCertList ::= Sequence {
+ version Version OPTIONAL,
+ -- if present, shall be v2
+ signature AlgorithmIdentifier,
+ issuer Name,
+ thisUpdate Time,
+ nextUpdate Time OPTIONAL,
+ revokedCertificates Sequence OF Sequence {
+ userCertificate CertificateSerialNumber,
+ revocationDate Time,
+ crlEntryExtensions Extensions OPTIONAL
+ -- if present, shall be v2
+ } OPTIONAL,
+ crlExtensions [0] EXPLICIT Extensions OPTIONAL
+ -- if present, shall be v2
+ }
+
+
+
+ The TbsCertificate object.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ extensions [ 3 ] Extensions OPTIONAL
+ }
+
+
+ Note: issuerUniqueID and subjectUniqueID are both deprecated by the IETF. This class
+ will parse them, but you really shouldn't be creating new ones.
+
+
+ Target structure used in target information extension for attribute
+ certificates from RFC 3281.
+
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+
+
+ The targetCert field is currently not supported and must not be used
+ according to RFC 3281.
+
+
+ Creates an instance of a Target from the given object.
+
+ obj can be a Target or a {@link Asn1TaggedObject}
+
+ @param obj The object.
+ @return A Target instance.
+ @throws ArgumentException if the given object cannot be
+ interpreted as Target.
+
+
+ Constructor from Asn1TaggedObject.
+
+ @param tagObj The tagged object.
+ @throws ArgumentException if the encoding is wrong.
+
+
+ Constructor from given details.
+
+ Exactly one of the parameters must be not null.
+
+ @param type the choice type to apply to the name.
+ @param name the general name.
+ @throws ArgumentException if type is invalid.
+
+
+ @return Returns the targetGroup.
+
+
+ @return Returns the targetName.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+
+ @return an Asn1Object
+
+
+ Target information extension for attributes certificates according to RFC
+ 3281.
+
+
+ SEQUENCE OF Targets
+
+
+
+
+ Creates an instance of a TargetInformation from the given object.
+
+ obj can be a TargetInformation or a {@link Asn1Sequence}
+
+ @param obj The object.
+ @return A TargetInformation instance.
+ @throws ArgumentException if the given object cannot be interpreted as TargetInformation.
+
+
+ Constructor from a Asn1Sequence.
+
+ @param seq The Asn1Sequence.
+ @throws ArgumentException if the sequence does not contain
+ correctly encoded Targets elements.
+
+
+ Returns the targets in this target information extension.
+
+ The ArrayList is cloned before it is returned.
+
+ @return Returns the targets.
+
+
+ Constructs a target information from a single targets element.
+ According to RFC 3281 only one targets element must be produced.
+
+ @param targets A Targets instance.
+
+
+ According to RFC 3281 only one targets element must be produced. If
+ multiple targets are given they must be merged in
+ into one targets element.
+
+ @param targets An array with {@link Targets}.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ SEQUENCE OF Targets
+
+
+
+ According to RFC 3281 only one targets element must be produced. If
+ multiple targets are given in the constructor they are merged into one
+ targets element. If this was produced from a
+ {@link Org.BouncyCastle.Asn1.Asn1Sequence} the encoding is kept.
+
+ @return an Asn1Object
+
+
+ Targets structure used in target information extension for attribute
+ certificates from RFC 3281.
+
+
+ Targets ::= SEQUENCE OF Target
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+ TargetCert ::= SEQUENCE {
+ targetCertificate IssuerSerial,
+ targetName GeneralName OPTIONAL,
+ certDigestInfo ObjectDigestInfo OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.Target
+ @see org.bouncycastle.asn1.x509.TargetInformation
+
+
+ Creates an instance of a Targets from the given object.
+
+ obj can be a Targets or a {@link Asn1Sequence}
+
+ @param obj The object.
+ @return A Targets instance.
+ @throws ArgumentException if the given object cannot be interpreted as Target.
+
+
+ Constructor from Asn1Sequence.
+
+ @param targets The ASN.1 SEQUENCE.
+ @throws ArgumentException if the contents of the sequence are
+ invalid.
+
+
+ Constructor from given targets.
+
+ The ArrayList is copied.
+
+ @param targets An ArrayList of {@link Target}s.
+ @see Target
+ @throws ArgumentException if the ArrayList contains not only Targets.
+
+
+ Returns the targets in an ArrayList.
+
+ The ArrayList is cloned before it is returned.
+
+ @return Returns the targets.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Targets ::= SEQUENCE OF Target
+
+
+ @return an Asn1Object
+
+
+ creates a time object from a given date - if the date is between 1950
+ and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime
+ is used.
+
+
+
+ Return our time as DateTime.
+
+ A date time.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Time ::= CHOICE {
+ utcTime UTCTime,
+ generalTime GeneralizedTime }
+
+
+
+ UserNotice class, used in
+ CertificatePolicies X509 extensions (in policy
+ qualifiers).
+
+ UserNotice ::= Sequence {
+ noticeRef NoticeReference OPTIONAL,
+ explicitText DisplayText OPTIONAL}
+
+
+
+ @see PolicyQualifierId
+ @see PolicyInformation
+
+
+ Creates a new UserNotice instance.
+
+ @param noticeRef a NoticeReference value
+ @param explicitText a DisplayText value
+
+
+ Creates a new UserNotice instance.
+
+ @param noticeRef a NoticeReference value
+ @param str the explicitText field as a string.
+
+
+ Creates a new UserNotice instance.
+ Useful from reconstructing a UserNotice instance
+ from its encodable/encoded form.
+
+ @param as an ASN1Sequence value obtained from either
+ calling @{link toASN1Object()} for a UserNotice
+ instance or from parsing it from a DER-encoded stream.
+
+
+ Generator for Version 1 TbsCertificateStructures.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ }
+
+
+
+
+ Generator for Version 2 AttributeCertificateInfo
+
+ AttributeCertificateInfo ::= Sequence {
+ version AttCertVersion -- version is v2,
+ holder Holder,
+ issuer AttCertIssuer,
+ signature AlgorithmIdentifier,
+ serialNumber CertificateSerialNumber,
+ attrCertValidityPeriod AttCertValidityPeriod,
+ attributes Sequence OF Attr,
+ issuerUniqueID UniqueIdentifier OPTIONAL,
+ extensions Extensions OPTIONAL
+ }
+
+
+
+
+ @param attribute
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ V2Form ::= Sequence {
+ issuerName GeneralNames OPTIONAL,
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ objectDigestInfo [1] ObjectDigestInfo OPTIONAL
+ -- issuerName MUST be present in this profile
+ -- baseCertificateID and objectDigestInfo MUST NOT
+ -- be present in this profile
+ }
+
+
+
+ Generator for Version 2 TbsCertList structures.
+
+ TbsCertList ::= Sequence {
+ version Version OPTIONAL,
+ -- if present, shall be v2
+ signature AlgorithmIdentifier,
+ issuer Name,
+ thisUpdate Time,
+ nextUpdate Time OPTIONAL,
+ revokedCertificates Sequence OF Sequence {
+ userCertificate CertificateSerialNumber,
+ revocationDate Time,
+ crlEntryExtensions Extensions OPTIONAL
+ -- if present, shall be v2
+ } OPTIONAL,
+ crlExtensions [0] EXPLICIT Extensions OPTIONAL
+ -- if present, shall be v2
+ }
+
+
+ Note: This class may be subject to change
+
+
+ Generator for Version 3 TbsCertificateStructures.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ extensions [ 3 ] Extensions OPTIONAL
+ }
+
+
+
+
+ an X509Certificate structure.
+
+ Certificate ::= Sequence {
+ tbsCertificate TbsCertificate,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING
+ }
+
+
+
+ The default converter for X509 DN entries when going from their
+ string value to ASN.1 strings.
+
+
+ Apply default conversion for the given value depending on the oid
+ and the character range of the value.
+
+ @param oid the object identifier for the DN entry
+ @param value the value associated with it
+ @return the ASN.1 equivalent for the string value.
+
+
+ an object for the elements in the X.509 V3 extension block.
+
+
+ Convert the value of the passed in extension to an object.
+ The extension to parse.
+ The object the value string contains.
+ If conversion is not possible.
+
+
+ Subject Directory Attributes
+
+
+ Subject Key Identifier
+
+
+ Key Usage
+
+
+ Private Key Usage Period
+
+
+ Subject Alternative Name
+
+
+ Issuer Alternative Name
+
+
+ Basic Constraints
+
+
+ CRL Number
+
+
+ Reason code
+
+
+ Hold Instruction Code
+
+
+ Invalidity Date
+
+
+ Delta CRL indicator
+
+
+ Issuing Distribution Point
+
+
+ Certificate Issuer
+
+
+ Name Constraints
+
+
+ CRL Distribution Points
+
+
+ Certificate Policies
+
+
+ Policy Mappings
+
+
+ Authority Key Identifier
+
+
+ Policy Constraints
+
+
+ Extended Key Usage
+
+
+ Freshest CRL
+
+
+ Inhibit Any Policy
+
+
+ Authority Info Access
+
+
+ Subject Info Access
+
+
+ Logo Type
+
+
+ BiometricInfo
+
+
+ QCStatements
+
+
+ Audit identity extension in attribute certificates.
+
+
+ NoRevAvail extension in attribute certificates.
+
+
+ TargetInformation extension in attribute certificates.
+
+
+ Constructor from Asn1Sequence.
+
+ the extensions are a list of constructed sequences, either with (Oid, OctetString) or (Oid, Boolean, OctetString)
+
+
+ constructor from a table of extensions.
+
+ it's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from a table of extensions with ordering.
+
+ It's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from two vectors
+
+ @param objectIDs an ArrayList of the object identifiers.
+ @param values an ArrayList of the extension values.
+
+
+ constructor from a table of extensions.
+
+ it's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from a table of extensions with ordering.
+
+ It's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from two vectors
+
+ @param objectIDs an ArrayList of the object identifiers.
+ @param values an ArrayList of the extension values.
+
+
+ return an Enumeration of the extension field's object ids.
+
+
+ return the extension represented by the object identifier
+ passed in.
+
+ @return the extension if it's present, null otherwise.
+
+
+
+ Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
+
+ Extension ::= SEQUENCE {
+ extnId EXTENSION.&id ({ExtensionSet}),
+ critical BOOLEAN DEFAULT FALSE,
+ extnValue OCTET STRING }
+
+
+
+ Generator for X.509 extensions
+
+
+ Reset the generator
+
+
+
+ Add an extension with the given oid and the passed in value to be included
+ in the OCTET STRING associated with the extension.
+
+ OID for the extension.
+ True if critical, false otherwise.
+ The ASN.1 object to be included in the extension.
+
+
+
+ Add an extension with the given oid and the passed in byte array to be wrapped
+ in the OCTET STRING associated with the extension.
+
+ OID for the extension.
+ True if critical, false otherwise.
+ The byte array to be wrapped.
+
+
+ Return true if there are no extension present in this generator.
+ True if empty, false otherwise
+
+
+ Generate an X509Extensions object based on the current state of the generator.
+ An X509Extensions object
+
+
+
+ RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
+
+ RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
+
+ AttributeTypeAndValue ::= SEQUENCE {
+ type OBJECT IDENTIFIER,
+ value ANY }
+
+
+
+ country code - StringType(SIZE(2))
+
+
+ organization - StringType(SIZE(1..64))
+
+
+ organizational unit name - StringType(SIZE(1..64))
+
+
+ Title
+
+
+ common name - StringType(SIZE(1..64))
+
+
+ street - StringType(SIZE(1..64))
+
+
+ device serial number name - StringType(SIZE(1..64))
+
+
+ locality name - StringType(SIZE(1..64))
+
+
+ state, or province name - StringType(SIZE(1..64))
+
+
+ Naming attributes of type X520name
+
+
+ businessCategory - DirectoryString(SIZE(1..128)
+
+
+ postalCode - DirectoryString(SIZE(1..40)
+
+
+ dnQualifier - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z
+
+
+ RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)
+
+
+ RFC 3039 DateOfBirth - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"
+
+
+ RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166
+ codes only
+
+
+ RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166
+ codes only
+
+
+ ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF
+ DirectoryString(SIZE(1..30))
+
+
+ RFC 2256 dmdName
+
+
+ id-at-telephoneNumber
+
+
+ id-at-name
+
+
+ Email address (RSA PKCS#9 extension) - IA5String.
+ Note: if you're trying to be ultra orthodox, don't use this! It shouldn't be in here.
+
+
+ more from PKCS#9
+
+
+ email address in Verisign certificates
+
+
+ LDAP User id.
+
+
+ determines whether or not strings should be processed and printed
+ from back to front.
+
+
+ default look up table translating OID values into their common symbols following
+ the convention in RFC 2253 with a few extras
+
+
+ look up table translating OID values into their common symbols following the convention in RFC 2253
+
+
+ look up table translating OID values into their common symbols following the convention in RFC 1779
+
+
+
+ look up table translating common symbols into their OIDS.
+
+
+ Return a X509Name based on the passed in tagged object.
+
+ @param obj tag object holding name.
+ @param explicitly true if explicitly tagged false otherwise.
+ @return the X509Name
+
+
+ Constructor from Asn1Sequence
+
+ the principal will be a list of constructed sets, each containing an (OID, string) pair.
+
+
+ Constructor from a table of attributes with ordering.
+
+ it's is assumed the table contains OID/string pairs, and the contents
+ of the table are copied into an internal table as part of the
+ construction process. The ordering ArrayList should contain the OIDs
+ in the order they are meant to be encoded or printed in ToString.
+
+
+ Constructor from a table of attributes with ordering.
+
+ it's is assumed the table contains OID/string pairs, and the contents
+ of the table are copied into an internal table as part of the
+ construction process. The ordering ArrayList should contain the OIDs
+ in the order they are meant to be encoded or printed in ToString.
+
+ The passed in converter will be used to convert the strings into their
+ ASN.1 counterparts.
+
+
+ Takes two vectors one of the oids and the other of the values.
+
+
+ Takes two vectors one of the oids and the other of the values.
+
+ The passed in converter will be used to convert the strings into their
+ ASN.1 counterparts.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes with each
+ string value being converted to its associated ASN.1 type using the passed
+ in converter.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. If reverse
+ is true, create the encoded version of the sequence starting from the
+ last element in the string.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes with each
+ string value being converted to its associated ASN.1 type using the passed
+ in converter. If reverse is true the ASN.1 sequence representing the DN will
+ be built by starting at the end of the string, rather than the start.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. lookUp
+ should provide a table of lookups, indexed by lowercase only strings and
+ yielding a DerObjectIdentifier, other than that OID. and numeric oids
+ will be processed automatically.
+
+ If reverse is true, create the encoded version of the sequence
+ starting from the last element in the string.
+ @param reverse true if we should start scanning from the end (RFC 2553).
+ @param lookUp table of names and their oids.
+ @param dirName the X.500 string to be parsed.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. lookUp
+ should provide a table of lookups, indexed by lowercase only strings and
+ yielding a DerObjectIdentifier, other than that OID. and numeric oids
+ will be processed automatically. The passed in converter is used to convert the
+ string values to the right of each equals sign to their ASN.1 counterparts.
+
+ @param reverse true if we should start scanning from the end, false otherwise.
+ @param lookUp table of names and oids.
+ @param dirName the string dirName
+ @param converter the converter to convert string values into their ASN.1 equivalents
+
+
+ return an IList of the oids in the name, in the order they were found.
+
+
+ return an IList of the values found in the name, in the order they
+ were found.
+
+
+ return an IList of the values found in the name, in the order they
+ were found, with the DN label corresponding to passed in oid.
+
+
+ The X509Name object to test equivalency against.
+ If true, the order of elements must be the same,
+ as well as the values associated with each element.
+
+
+ test for equivalence - note: case is ignored.
+
+
+ convert the structure to a string - if reverse is true the
+ oids and values are listed out starting with the last element
+ in the sequence (ala RFC 2253), otherwise the string will begin
+ with the first element of the structure. If no string definition
+ for the oid is found in oidSymbols the string value of the oid is
+ added. Two standard symbol tables are provided DefaultSymbols, and
+ RFC2253Symbols as part of this class.
+
+ @param reverse if true start at the end of the sequence and work back.
+ @param oidSymbols look up table strings for oids.
+
+
+ * It turns out that the number of standard ways the fields in a DN should be
+ * encoded into their ASN.1 counterparts is rapidly approaching the
+ * number of machines on the internet. By default the X509Name class
+ * will produce UTF8Strings in line with the current recommendations (RFC 3280).
+ *
+ * An example of an encoder look like below:
+ *
+ * public class X509DirEntryConverter
+ * : X509NameEntryConverter
+ * {
+ * public Asn1Object GetConvertedValue(
+ * DerObjectIdentifier oid,
+ * string value)
+ * {
+ * if (str.Length() != 0 && str.charAt(0) == '#')
+ * {
+ * return ConvertHexEncoded(str, 1);
+ * }
+ * if (oid.Equals(EmailAddress))
+ * {
+ * return new DerIA5String(str);
+ * }
+ * else if (CanBePrintable(str))
+ * {
+ * return new DerPrintableString(str);
+ * }
+ * else if (CanBeUTF8(str))
+ * {
+ * return new DerUtf8String(str);
+ * }
+ * else
+ * {
+ * return new DerBmpString(str);
+ * }
+ * }
+ * }
+ *
+ *
+
+
+ Convert an inline encoded hex string rendition of an ASN.1
+ object back into its corresponding ASN.1 object.
+
+ @param str the hex encoded object
+ @param off the index at which the encoding starts
+ @return the decoded object
+
+
+ return true if the passed in string can be represented without
+ loss as a PrintableString, false otherwise.
+
+
+ Convert the passed in string value into the appropriate ASN.1
+ encoded object.
+
+ @param oid the oid associated with the value in the DN.
+ @param value the value of the particular DN component.
+ @return the ASN.1 equivalent for the value.
+
+
+ class for breaking up an X500 Name into it's component tokens, ala
+ java.util.StringTokenizer. We need this class as some of the
+ lightweight Java environment don't support classes like
+ StringTokenizer.
+
+
+ The BiometricData object.
+
+ BiometricData ::= SEQUENCE {
+ typeOfBiometricData TypeOfBiometricData,
+ hashAlgorithm AlgorithmIdentifier,
+ biometricDataHash OCTET STRING,
+ sourceDataUri IA5String OPTIONAL }
+
+
+
+ The Iso4217CurrencyCode object.
+
+ Iso4217CurrencyCode ::= CHOICE {
+ alphabetic PrintableString (SIZE 3), --Recommended
+ numeric INTEGER (1..999) }
+ -- Alphabetic or numeric currency code as defined in ISO 4217
+ -- It is recommended that the Alphabetic form is used
+
+
+
+ The MonetaryValue object.
+
+ MonetaryValue ::= SEQUENCE {
+ currency Iso4217CurrencyCode,
+ amount INTEGER,
+ exponent INTEGER }
+ -- value = amount * 10^exponent
+
+
+
+ The QCStatement object.
+
+ QCStatement ::= SEQUENCE {
+ statementId OBJECT IDENTIFIER,
+ statementInfo ANY DEFINED BY statementId OPTIONAL}
+
+
+
+ The SemanticsInformation object.
+
+ SemanticsInformation ::= SEQUENCE {
+ semanticsIdentifier OBJECT IDENTIFIER OPTIONAL,
+ nameRegistrationAuthorities NameRegistrationAuthorities
+ OPTIONAL }
+ (WITH COMPONENTS {..., semanticsIdentifier PRESENT}|
+ WITH COMPONENTS {..., nameRegistrationAuthorities PRESENT})
+
+ NameRegistrationAuthorities ::= SEQUENCE SIZE (1..MAX) OF
+ GeneralName
+
+
+
+ The TypeOfBiometricData object.
+
+ TypeOfBiometricData ::= CHOICE {
+ predefinedBiometricType PredefinedBiometricType,
+ biometricDataOid OBJECT IDENTIFIER }
+
+ PredefinedBiometricType ::= INTEGER {
+ picture(0),handwritten-signature(1)}
+ (picture|handwritten-signature)
+
+
+
+ Structure for a name or pseudonym.
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @see org.bouncycastle.asn1.x509.sigi.PersonalData
+
+
+
+ Constructor from DERString.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+ @param pseudonym pseudonym value to use.
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param pseudonym The pseudonym.
+
+
+ Constructor from a given details.
+
+ @param surname The surname.
+ @param givenName A sequence of directory strings making up the givenName
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @return an Asn1Object
+
+
+ Contains personal data for the otherName field in the subjectAltNames
+ extension.
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.sigi.NameOrPseudonym
+ @see org.bouncycastle.asn1.x509.sigi.SigIObjectIdentifiers
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param nameOrPseudonym Name or pseudonym.
+ @param nameDistinguisher Name distinguisher.
+ @param dateOfBirth Date of birth.
+ @param placeOfBirth Place of birth.
+ @param gender Gender.
+ @param postalAddress Postal Address.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ Object Identifiers of SigI specifciation (German Signature Law
+ Interoperability specification).
+
+
+ Key purpose IDs for German SigI (Signature Interoperability
+ Specification)
+
+
+ Certificate policy IDs for German SigI (Signature Interoperability
+ Specification)
+
+
+ Other Name IDs for German SigI (Signature Interoperability Specification)
+
+
+ To be used for for the generation of directory service certificates.
+
+
+ ID for PersonalData
+
+
+ Certificate is conform to german signature law.
+
+
+ A general class that reads all X9.62 style EC curve tables.
+
+
+ return a X9ECParameters object representing the passed in named
+ curve. The routine returns null if the curve is not present.
+
+ @param name the name of the curve requested
+ @return an X9ECParameters object or null if the curve is not available.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return a X9ECParameters object representing the passed in named
+ curve.
+
+ @param oid the object id of the curve requested
+ @return an X9ECParameters object or null if the curve is not available.
+
+
+ return an enumeration of the names of the available curves.
+
+ @return an enumeration of the names of the available curves.
+
+
+ ASN.1 def for Diffie-Hellman key exchange KeySpecificInfo structure. See
+ RFC 2631, or X9.42, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeySpecificInfo ::= Sequence {
+ algorithm OBJECT IDENTIFIER,
+ counter OCTET STRING SIZE (4..4)
+ }
+
+
+
+ ANS.1 def for Diffie-Hellman key exchange OtherInfo structure. See
+ RFC 2631, or X9.42, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherInfo ::= Sequence {
+ keyInfo KeySpecificInfo,
+ partyAInfo [0] OCTET STRING OPTIONAL,
+ suppPubInfo [2] OCTET STRING
+ }
+
+
+
+ table of the current named curves defined in X.962 EC-DSA.
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Parameters ::= CHOICE {
+ ecParameters ECParameters,
+ namedCurve CURVES.&id({CurveNames}),
+ implicitlyCA Null
+ }
+
+
+
+ ASN.1 def for Elliptic-Curve Curve structure. See
+ X9.62, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Curve ::= Sequence {
+ a FieldElement,
+ b FieldElement,
+ seed BIT STRING OPTIONAL
+ }
+
+
+
+ ASN.1 def for Elliptic-Curve ECParameters structure. See
+ X9.62, for further details.
+
+
+ Return the ASN.1 entry representing the Curve.
+
+ @return the X9Curve for the curve in these parameters.
+
+
+ Return the ASN.1 entry representing the FieldID.
+
+ @return the X9FieldID for the FieldID in these parameters.
+
+
+ Return the ASN.1 entry representing the base point G.
+
+ @return the X9ECPoint for the base point in these parameters.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ECParameters ::= Sequence {
+ version Integer { ecpVer1(1) } (ecpVer1),
+ fieldID FieldID {{FieldTypes}},
+ curve X9Curve,
+ base X9ECPoint,
+ order Integer,
+ cofactor Integer OPTIONAL
+ }
+
+
+
+ class for describing an ECPoint as a Der object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ECPoint ::= OCTET STRING
+
+
+ Octet string produced using ECPoint.GetEncoded().
+
+
+ Class for processing an ECFieldElement as a DER object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ FieldElement ::= OCTET STRING
+
+
+
+ if q is an odd prime then the field element is
+ processed as an Integer and converted to an octet string
+ according to x 9.62 4.3.1.
+ if q is 2m then the bit string
+ contained in the field element is converted into an octet
+ string with the same ordering padded at the front if necessary.
+
+
+
+
+
+ ASN.1 def for Elliptic-Curve Field ID structure. See
+ X9.62, for further details.
+
+
+ Constructor for elliptic curves over prime fields
+ F2 .
+ @param primeP The prime p defining the prime field.
+
+
+ Constructor for elliptic curves over binary fields
+ F2m .
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ Constructor for elliptic curves over binary fields
+ F2m .
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z)..
+
+
+ Produce a Der encoding of the following structure.
+
+ FieldID ::= Sequence {
+ fieldType FIELD-ID.&id({IOSet}),
+ parameters FIELD-ID.&Type({IOSet}{@fieldType})
+ }
+
+
+
+ id-dsa-with-sha1 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ us(840) x9-57 (10040) x9cm(4) 3 }
+
+
+ X9.63
+
+
+ X9.42
+
+
+ reader for Base64 armored objects - read the headers and then start returning
+ bytes when the data is reached. An IOException is thrown if the CRC check
+ fails.
+
+
+ decode the base 64 encoded input data.
+
+ @return the offset the data starts in out.
+
+
+ Create a stream for reading a PGP armoured message, parsing up to a header
+ and then reading the data that follows.
+
+ @param input
+
+
+ Create an armoured input stream which will assume the data starts
+ straight away, or parse for headers first depending on the value of
+ hasHeaders.
+
+ @param input
+ @param hasHeaders true if headers are to be looked for, false otherwise.
+
+
+ @return true if we are inside the clear text section of a PGP
+ signed message.
+
+
+ @return true if the stream is actually at end of file.
+
+
+ Return the armor header line (if there is one)
+ @return the armor header line, null if none present.
+
+
+ Return the armor headers (the lines after the armor header line),
+ @return an array of armor headers, null if there aren't any.
+
+
+ Basic output stream.
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+
+ Set an additional header entry.
+
+ @param name the name of the header entry.
+ @param v the value of the header entry.
+
+
+ Reset the headers to only contain a Version string.
+
+
+ Start a clear text signed message.
+ @param hashAlgorithm
+
+
+ Note : Close() does not close the underlying stream. So it is possible to write
+ multiple objects using armoring to a single stream.
+
+
+ Reader for PGP objects.
+
+
+ Returns the next packet tag in the stream.
+
+
+
+ A stream that overlays our input stream, allowing the user to only read a segment of it.
+ NB: dataLength will be negative if the segment length is in the upper range above 2**31.
+
+
+
+ Base class for a PGP object.
+
+
+ Basic output stream.
+
+
+ Create a stream representing a general packet.
+ Output stream to write to.
+
+
+ Create a stream representing an old style partial object.
+ Output stream to write to.
+ The packet tag for the object.
+
+
+ Create a stream representing a general packet.
+ Output stream to write to.
+ Packet tag.
+ Size of chunks making up the packet.
+ If true, the header is written out in old format.
+
+
+ Create a new style partial input stream buffered into chunks.
+ Output stream to write to.
+ Packet tag.
+ Size of chunks making up the packet.
+
+
+ Create a new style partial input stream buffered into chunks.
+ Output stream to write to.
+ Packet tag.
+ Buffer to use for collecting chunks.
+
+
+ Flush the underlying stream.
+
+
+ Finish writing out the current packet without closing the underlying stream.
+
+
+ Generic compressed data object.
+
+
+ The algorithm tag value.
+
+
+ Basic tags for compression algorithms.
+
+
+ Basic type for a PGP packet.
+
+
+ Base class for a DSA public key.
+
+
+ The stream to read the packet from.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for a DSA secret key.
+
+
+ @param in
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ @return x
+
+
+ Base class for an ECDH Public Key.
+
+
+ The stream to read the packet from.
+
+
+ Base class for an ECDSA Public Key.
+
+
+ The stream to read the packet from.
+
+
+ Base class for an EC Public Key.
+
+
+ The stream to read the packet from.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an EC Secret Key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an ElGamal public key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an ElGamal secret key.
+
+
+ @param in
+
+
+ @param x
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Basic packet for an experimental packet.
+
+
+ Basic tags for hash algorithms.
+
+
+ Base interface for a PGP key.
+
+
+
+ The base format for this key - in the case of the symmetric keys it will generally
+ be raw indicating that the key is just a straight byte representation, for an asymmetric
+ key the format will be PGP, indicating the key is a string of MPIs encoded in PGP format.
+
+ "RAW" or "PGP".
+
+
+ Note: you can only read from this once...
+
+
+ Generic literal data packet.
+
+
+ The format tag value.
+
+
+ The modification time of the file in milli-seconds (since Jan 1, 1970 UTC)
+
+
+ A multiple precision integer
+
+
+ Basic type for a marker packet.
+
+
+ Basic packet for a modification detection code packet.
+
+
+ Generic signature object
+
+
+ The encryption algorithm tag.
+
+
+ The hash algorithm tag.
+
+
+ Basic PGP packet tag types.
+
+
+ Public Key Algorithm tag numbers.
+
+
+ Basic packet for a PGP public key.
+
+
+ Basic packet for a PGP public key.
+
+
+ Construct a version 4 public key packet.
+
+
+ Basic packet for a PGP public subkey
+
+
+ Construct a version 4 public subkey packet.
+
+
+ Base class for an RSA public key.
+
+
+ Construct an RSA public key from the passed in stream.
+
+
+ The modulus.
+ The public exponent.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an RSA secret (or priate) key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ The string to key specifier class.
+
+
+ The hash algorithm.
+
+
+ The IV for the key generation algorithm.
+
+
+ The iteration count
+
+
+ The protection mode - only if GnuDummyS2K
+
+
+ Basic packet for a PGP secret key.
+
+
+ Basic packet for a PGP secret key.
+
+
+ Generic signature packet.
+
+
+ Generate a version 4 signature packet.
+
+ @param signatureType
+ @param keyAlgorithm
+ @param hashAlgorithm
+ @param hashedData
+ @param unhashedData
+ @param fingerprint
+ @param signature
+
+
+ Generate a version 2/3 signature packet.
+
+ @param signatureType
+ @param keyAlgorithm
+ @param hashAlgorithm
+ @param fingerprint
+ @param signature
+
+
+ return the keyId
+ @return the keyId that created the signature.
+
+
+ return the signature trailer that must be included with the data
+ to reconstruct the signature
+
+ @return byte[]
+
+
+ * return the signature as a set of integers - note this is normalised to be the
+ * ASN.1 encoding of what appears in the signature packet.
+
+
+ Return the byte encoding of the signature section.
+ @return uninterpreted signature bytes.
+
+
+ Return the creation time in milliseconds since 1 Jan., 1970 UTC.
+
+
+ Basic type for a PGP Signature sub-packet.
+
+
+ Return the generic data making up the packet.
+
+
+ Basic PGP signature sub-packet tag types.
+
+
+ reader for signature sub-packets
+
+
+ Basic type for a symmetric key encrypted packet.
+
+
+ Basic tags for symmetric key algorithms
+
+
+ Basic type for a symmetric encrypted session key packet
+
+
+ @return int
+
+
+ @return S2k
+
+
+ @return byte[]
+
+
+ @return int
+
+
+ Basic type for a trust packet.
+
+
+ Basic type for a user attribute packet.
+
+
+ Basic type for a user attribute sub-packet.
+
+
+ return the generic data making up the packet.
+
+
+ Basic PGP user attribute sub-packet tag types.
+
+
+ reader for user attribute sub-packets
+
+
+ Basic type for a user ID packet.
+
+
+ Basic type for a image attribute packet.
+
+
+ Packet embedded signature
+
+
+ packet giving signature creation time.
+
+
+ packet giving signature expiration time.
+
+
+ Identifier for the modification detection feature
+
+
+ Returns if modification detection is supported.
+
+
+ Returns if a particular feature is supported.
+
+
+ Sets support for a particular feature.
+
+
+ packet giving signature creation time.
+
+
+ packet giving time after creation at which the key expires.
+
+
+ Return the number of seconds after creation time a key is valid for.
+
+ @return second count for key validity.
+
+
+ Packet holding the key flag values.
+
+
+
+ Return the flag values contained in the first 4 octets (note: at the moment
+ the standard only uses the first one).
+
+
+
+ Class provided a NotationData object according to
+ RFC2440, Chapter 5.2.3.15. Notation Data
+
+
+ packet giving signature creation time.
+
+
+ packet giving whether or not the signature is signed using the primary user ID for the key.
+
+
+ packet giving whether or not is revocable.
+
+
+ packet giving signature creation time.
+
+
+ packet giving signature expiration time.
+
+
+ return time in seconds before signature expires after creation time.
+
+
+ packet giving the User ID of the signer.
+
+
+ packet giving trust.
+
+
+
+ Represents revocation key OpenPGP signature sub packet.
+
+
+
+
+ Represents revocation reason OpenPGP signature sub packet.
+
+
+
+ Compressed data objects
+
+
+ The algorithm used for compression
+
+
+ Get the raw input stream contained in the object.
+
+
+ Return an uncompressed input stream which allows reading of the compressed data.
+
+
+ Class for producing compressed data packets.
+
+
+
+
+ Return an output stream which will save the data being written to
+ the compressed object.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Stream to be used for output.
+ A Stream for output of the compressed data.
+
+
+
+
+
+
+
+ Return an output stream which will compress the data as it is written to it.
+ The stream will be written out in chunks according to the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+
+ Note : using this may break compatibility with RFC 1991 compliant tools.
+ Only recent OpenPGP implementations are capable of accepting these streams.
+
+
+ Stream to be used for output.
+ The buffer to use.
+ A Stream for output of the compressed data.
+
+
+
+
+
+
+ Close the compressed object. summary>
+
+
+
+ Thrown if the IV at the start of a data stream indicates the wrong key is being used.
+
+
+
+ Return the raw input stream for the data stream.
+
+
+ Return true if the message is integrity protected.
+ True, if there is a modification detection code namespace associated
+ with this stream.
+
+
+ Note: This can only be called after the message has been read.
+ True, if the message verifies, false otherwise
+
+
+ Generator for encrypted objects.
+
+
+ Existing SecureRandom constructor.
+ The symmetric algorithm to use.
+ Source of randomness.
+
+
+ Creates a cipher stream which will have an integrity packet associated with it.
+
+
+ Base constructor.
+ The symmetric algorithm to use.
+ Source of randomness.
+ PGP 2.6.x compatibility required.
+
+
+
+ Add a PBE encryption method to the encrypted object using the default algorithm (S2K_SHA1).
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ Add a public key encrypted session key to the encrypted object.
+
+
+
+
+ If buffer is non null stream assumed to be partial, otherwise the length will be used
+ to output a fixed length packet.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+
+
+
+
+ Return an output stream which will encrypt the data as it is written to it.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+
+
+
+
+ Return an output stream which will encrypt the data as it is written to it.
+ The stream will be written out in chunks according to the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+
+
+
+
+
+ Close off the encrypted object - this is equivalent to calling Close() on the stream
+ returned by the Open() method.
+
+
+ Note : This does not close the underlying output stream, only the stream on top of
+ it created by the Open() method.
+
+
+
+
+ A holder for a list of PGP encryption method packets.
+
+
+ Generic exception class for PGP encoding/decoding problems.
+
+
+ Key flag values for the KeyFlags subpacket.
+
+
+
+ General class to handle JCA key pairs and convert them into OpenPGP ones.
+
+ A word for the unwary, the KeyId for an OpenPGP public key is calculated from
+ a hash that includes the time of creation, if you pass a different date to the
+ constructor below with the same public private key pair the KeyIs will not be the
+ same as for previous generations of the key, so ideally you only want to do
+ this once.
+
+
+
+
+ Create a key pair from a PgpPrivateKey and a PgpPublicKey.
+ The public key.
+ The private key.
+
+
+ The keyId associated with this key pair.
+
+
+
+ Generator for a PGP master and subkey ring.
+ This class will generate both the secret and public key rings
+
+
+
+
+ Create a new key ring generator using old style checksumming. It is recommended to use
+ SHA1 checksumming where possible.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+
+ If true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+
+ If true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+ Add a subkey to the key ring to be generated with default certification.
+
+
+
+ Add a subkey to the key ring to be generated with default certification.
+
+ The key pair.
+ The hash algorithm.
+
+
+
+ Add a subkey with specific hashed and unhashed packets associated with it and
+ default certification.
+
+ Public/private key pair.
+ Hashed packet values to be included in certification.
+ Unhashed packets values to be included in certification.
+
+
+
+
+ Add a subkey with specific hashed and unhashed packets associated with it and
+ default certification.
+
+ Public/private key pair.
+ Hashed packet values to be included in certification.
+ Unhashed packets values to be included in certification.
+ The hash algorithm.
+ exception adding subkey:
+
+
+
+ Return the secret key ring.
+
+
+ Return the public key ring that corresponds to the secret key ring.
+
+
+
+ Thrown if the key checksum is invalid.
+
+
+
+ Class for processing literal data objects.
+
+
+ The special name indicating a "for your eyes only" packet.
+
+
+ The format of the data stream - Binary or Text
+
+
+ The file name that's associated with the data stream.
+
+
+ Return the file name as an unintrepreted byte array.
+
+
+ The modification time for the file.
+
+
+ The raw input stream for the data stream.
+
+
+ The input stream representing the data stream.
+
+
+ Class for producing literal data packets.
+
+
+ The special name indicating a "for your eyes only" packet.
+
+
+
+ Generates literal data objects in the old format.
+ This is important if you need compatibility with PGP 2.6.x.
+
+ If true, uses old format.
+
+
+
+
+ Open a literal data packet, returning a stream to store the data inside the packet.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ The stream we want the packet in.
+ The format we are using.
+ The name of the 'file'.
+ The length of the data we will write.
+ The time of last modification we want stored.
+
+
+
+
+ Open a literal data packet, returning a stream to store the data inside the packet,
+ as an indefinite length stream. The stream is written out as a series of partial
+ packets with a chunk size determined by the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+ The stream we want the packet in.
+ The format we are using.
+ The name of the 'file'.
+ The time of last modification we want stored.
+ The buffer to use for collecting data to put into chunks.
+
+
+
+
+ Open a literal data packet for the passed in FileInfo object, returning
+ an output stream for saving the file contents.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ The stream we want the packet in.
+ The format we are using.
+ The FileInfo object containg the packet details.
+
+
+
+ Close the literal data packet - this is equivalent to calling Close()
+ on the stream returned by the Open() method.
+
+
+
+
+ A PGP marker packet - in general these should be ignored other than where
+ the idea is to preserve the original input stream.
+
+
+
+
+ General class for reading a PGP object stream.
+
+ Note: if this class finds a PgpPublicKey or a PgpSecretKey it
+ will create a PgpPublicKeyRing, or a PgpSecretKeyRing for each
+ key found. If all you are trying to do is read a key ring file use
+ either PgpPublicKeyRingBundle or PgpSecretKeyRingBundle.
+
+
+
+ Return the next object in the stream, or null if the end is reached.
+ On a parse error
+
+
+
+ Return all available objects in a list.
+
+ An IList containing all objects from this factory, in order.
+
+
+ A one pass signature object.
+
+
+ Initialise the signature object for verification.
+
+
+ Verify the calculated signature against the passed in PgpSignature.
+
+
+ Holder for a list of PgpOnePassSignature objects.
+
+
+ Padding functions.
+
+
+ A password based encryption object.
+
+
+ Return the raw input stream for the data stream.
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ General class to contain a private key for use with other OpenPGP objects.
+
+
+
+ Create a PgpPrivateKey from a keyID, the associated public data packet, and a regular private key.
+
+ ID of the corresponding public key.
+ the public key data packet to be associated with this private key.
+ the private key data packet to be associated with this private key.
+
+
+ The keyId associated with the contained private key.
+
+
+ The public key packet associated with this private key, if available.
+
+
+ The contained private key.
+
+
+ General class to handle a PGP public key object.
+
+
+
+ Create a PgpPublicKey from the passed in lightweight one.
+
+
+ Note: the time passed in affects the value of the key's keyId, so you probably only want
+ to do this once for a lightweight key, or make sure you keep track of the time you used.
+
+ Asymmetric algorithm type representing the public key.
+ Actual public key to associate.
+ Date of creation.
+ If pubKey is not public.
+ On key creation problem.
+
+
+ Constructor for a sub-key.
+
+
+ Copy constructor.
+ The public key to copy.
+
+
+ The version of this key.
+
+
+ The creation time of this key.
+
+
+ The number of valid days from creation time - zero means no expiry.
+ WARNING: This method will return 1 for keys with version > 3 that expire in less than 1 day
+
+
+ Return the trust data associated with the public key, if present.
+ A byte array with trust data, null otherwise.
+
+
+ The number of valid seconds from creation time - zero means no expiry.
+
+
+ The keyId associated with the public key.
+
+
+ The fingerprint of the key
+
+
+
+ Check if this key has an algorithm type that makes it suitable to use for encryption.
+
+
+ Note: with version 4 keys KeyFlags subpackets should also be considered when present for
+ determining the preferred use of the key.
+
+
+ true if this key algorithm is suitable for encryption.
+
+
+
+ True, if this is a master key.
+
+
+ The algorithm code associated with the public key.
+
+
+ The strength of the key in bits.
+
+
+ The public key contained in the object.
+ A lightweight public key.
+ If the key algorithm is not recognised.
+
+
+ Allows enumeration of any user IDs associated with the key.
+ An IEnumerable of string objects.
+
+
+ Allows enumeration of any user attribute vectors associated with the key.
+ An IEnumerable of PgpUserAttributeSubpacketVector objects.
+
+
+ Allows enumeration of any signatures associated with the passed in id.
+ The ID to be matched.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of signatures associated with the passed in user attributes.
+ The vector of user attributes to be matched.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of signatures of the passed in type that are on this key.
+ The type of the signature to be returned.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of all signatures/certifications associated with this key.
+ An IEnumerable with all signatures/certifications.
+
+
+ Return all signatures/certifications directly associated with this key (ie, not to a user id).
+
+ @return an iterator (possibly empty) with all signatures/certifications.
+
+
+ Check whether this (sub)key has a revocation signature on it.
+ True, if this (sub)key has been revoked.
+
+
+ Add a certification for an id to the given public key.
+ The key the certification is to be added to.
+ The ID the certification is associated with.
+ The new certification.
+ The re-certified key.
+
+
+ Add a certification for the given UserAttributeSubpackets to the given public key.
+ The key the certification is to be added to.
+ The attributes the certification is associated with.
+ The new certification.
+ The re-certified key.
+
+
+
+ Remove any certifications associated with a user attribute subpacket on a key.
+
+ The key the certifications are to be removed from.
+ The attributes to be removed.
+
+ The re-certified key, or null if the user attribute subpacket was not found on the key.
+
+
+
+ Remove any certifications associated with a given ID on a key.
+ The key the certifications are to be removed from.
+ The ID that is to be removed.
+ The re-certified key, or null if the ID was not found on the key.
+
+
+ Remove a certification associated with a given ID on a key.
+ The key the certifications are to be removed from.
+ The ID that the certfication is to be removed from.
+ The certfication to be removed.
+ The re-certified key, or null if the certification was not found.
+
+
+ Remove a certification associated with a given user attributes on a key.
+ The key the certifications are to be removed from.
+ The user attributes that the certfication is to be removed from.
+ The certification to be removed.
+ The re-certified key, or null if the certification was not found.
+
+
+ Add a revocation or some other key certification to a key.
+ The key the revocation is to be added to.
+ The key signature to be added.
+ The new changed public key object.
+
+
+ Remove a certification from the key.
+ The key the certifications are to be removed from.
+ The certfication to be removed.
+ The modified key, null if the certification was not found.
+
+
+ A public key encrypted data object.
+
+
+ The key ID for the key used to encrypt the data.
+
+
+
+ Return the algorithm code for the symmetric algorithm used to encrypt the data.
+
+
+
+ Return the decrypted data stream for the packet.
+
+
+
+ Class to hold a single master public key and its subkeys.
+
+ Often PGP keyring files consist of multiple master keys, if you are trying to process
+ or construct one of these you should use the PgpPublicKeyRingBundle class.
+
+
+
+
+ Return the first public key in the ring.
+
+
+ Return the public key referred to by the passed in key ID if it is present.
+
+
+ Allows enumeration of all the public keys.
+ An IEnumerable of PgpPublicKey objects.
+
+
+
+ Returns a new key ring with the public key passed in either added or
+ replacing an existing one.
+
+ The public key ring to be modified.
+ The public key to be inserted.
+ A new PgpPublicKeyRing
+
+
+ Returns a new key ring with the public key passed in removed from the key ring.
+ The public key ring to be modified.
+ The public key to be removed.
+ A new PgpPublicKeyRing , or null if pubKey is not found.
+
+
+
+ Often a PGP key ring file is made up of a succession of master/sub-key key rings.
+ If you want to read an entire public key file in one hit this is the class for you.
+
+
+
+ Build a PgpPublicKeyRingBundle from the passed in input stream.
+ Input stream containing data.
+ If a problem parsing the stream occurs.
+ If an object is encountered which isn't a PgpPublicKeyRing.
+
+
+ Return the number of key rings in this collection.
+
+
+ Allow enumeration of the public key rings making up this collection.
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ If true, case is ignored in user ID comparisons.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Return the PGP public key associated with the given key id.
+ The ID of the public key to return.
+
+
+ Return the public key ring which contains the key referred to by keyId
+ key ID to match against
+
+
+
+ Return true if a key matching the passed in key ID is present, false otherwise.
+
+ key ID to look for.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle and
+ the passed in public key ring.
+
+ The PgpPublicKeyRingBundle the key ring is to be added to.
+ The key ring to be added.
+ A new PgpPublicKeyRingBundle merging the current one with the passed in key ring.
+ If the keyId for the passed in key ring is already present.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle with
+ the passed in public key ring removed.
+
+ The PgpPublicKeyRingBundle the key ring is to be removed from.
+ The key ring to be removed.
+ A new PgpPublicKeyRingBundle not containing the passed in key ring.
+ If the keyId for the passed in key ring is not present.
+
+
+ General class to handle a PGP secret key object.
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ If utf8PassPhrase is true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ If utf8PassPhrase is true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Check if this key has an algorithm type that makes it suitable to use for signing.
+
+
+ Note: with version 4 keys KeyFlags subpackets should also be considered when present for
+ determining the preferred use of the key.
+
+
+ true if this key algorithm is suitable for use with signing.
+
+
+
+ True, if this is a master key.
+
+
+ Detect if the Secret Key's Private Key is empty or not
+
+
+ The algorithm the key is encrypted with.
+
+
+ The key ID of the public key associated with this key.
+
+
+ Return the S2K usage associated with this key.
+
+
+ Return the S2K used to process this key.
+
+
+ The public key associated with this key.
+
+
+ Allows enumeration of any user IDs associated with the key.
+ An IEnumerable of string objects.
+
+
+ Allows enumeration of any user attribute vectors associated with the key.
+ An IEnumerable of string objects.
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+ Replace the passed the public key on the passed in secret key.
+ Secret key to change.
+ New public key.
+ A new secret key.
+ If KeyId's do not match.
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+
+
+ Class to hold a single master secret key and its subkeys.
+
+ Often PGP keyring files consist of multiple master keys, if you are trying to process
+ or construct one of these you should use the PgpSecretKeyRingBundle class.
+
+
+
+
+ Return the public key for the master key.
+
+
+ Return the master private key.
+
+
+ Allows enumeration of the secret keys.
+ An IEnumerable of PgpSecretKey objects.
+
+
+
+ Return an iterator of the public keys in the secret key ring that
+ have no matching private key. At the moment only personal certificate data
+ appears in this fashion.
+
+ An IEnumerable of unattached, or extra, public keys.
+
+
+
+ Replace the public key set on the secret ring with the corresponding key off the public ring.
+
+ Secret ring to be changed.
+ Public ring containing the new public key set.
+
+
+
+ Return a copy of the passed in secret key ring, with the master key and sub keys encrypted
+ using a new password and the passed in algorithm.
+
+ The PgpSecretKeyRing to be copied.
+ The current password for key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Returns a new key ring with the secret key passed in either added or
+ replacing an existing one with the same key ID.
+
+ The secret key ring to be modified.
+ The secret key to be inserted.
+ A new PgpSecretKeyRing
+
+
+ Returns a new key ring with the secret key passed in removed from the key ring.
+ The secret key ring to be modified.
+ The secret key to be removed.
+ A new PgpSecretKeyRing , or null if secKey is not found.
+
+
+
+ Often a PGP key ring file is made up of a succession of master/sub-key key rings.
+ If you want to read an entire secret key file in one hit this is the class for you.
+
+
+
+ Build a PgpSecretKeyRingBundle from the passed in input stream.
+ Input stream containing data.
+ If a problem parsing the stream occurs.
+ If an object is encountered which isn't a PgpSecretKeyRing.
+
+
+ Return the number of rings in this collection.
+
+
+ Allow enumeration of the secret key rings making up this collection.
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ If true, case is ignored in user ID comparisons.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Return the PGP secret key associated with the given key id.
+ The ID of the secret key to return.
+
+
+ Return the secret key ring which contains the key referred to by keyId
+ The ID of the secret key
+
+
+
+ Return true if a key matching the passed in key ID is present, false otherwise.
+
+ key ID to look for.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle and
+ the passed in secret key ring.
+
+ The PgpSecretKeyRingBundle the key ring is to be added to.
+ The key ring to be added.
+ A new PgpSecretKeyRingBundle merging the current one with the passed in key ring.
+ If the keyId for the passed in key ring is already present.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle with
+ the passed in secret key ring removed.
+
+ The PgpSecretKeyRingBundle the key ring is to be removed from.
+ The key ring to be removed.
+ A new PgpSecretKeyRingBundle not containing the passed in key ring.
+ If the keyId for the passed in key ring is not present.
+
+
+ A PGP signature object.
+
+
+ The OpenPGP version number for this signature.
+
+
+ The key algorithm associated with this signature.
+
+
+ The hash algorithm associated with this signature.
+
+
+
+ Verify the signature as certifying the passed in public key as associated
+ with the passed in user attributes.
+
+ User attributes the key was stored under.
+ The key to be verified.
+ True, if the signature matches, false otherwise.
+
+
+
+ Verify the signature as certifying the passed in public key as associated
+ with the passed in ID.
+
+ ID the key was stored under.
+ The key to be verified.
+ True, if the signature matches, false otherwise.
+
+
+ Verify a certification for the passed in key against the passed in master key.
+ The key we are verifying against.
+ The key we are verifying.
+ True, if the certification is valid, false otherwise.
+
+
+ Verify a key certification, such as revocation, for the passed in key.
+ The key we are checking.
+ True, if the certification is valid, false otherwise.
+
+
+ The ID of the key that created the signature.
+
+
+ The creation time of this signature.
+
+
+
+ Return true if the signature has either hashed or unhashed subpackets.
+
+
+
+ Generator for PGP signatures.
+
+
+ Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
+
+
+ Initialise the generator for signing.
+
+
+ Initialise the generator for signing.
+
+
+ Return the one pass header associated with the current signature.
+
+
+ Return a signature object containing the current signature state.
+
+
+ Generate a certification for the passed in ID and key.
+ The ID we are certifying against the public key.
+ The key we are certifying against the ID.
+ The certification.
+
+
+ Generate a certification for the passed in userAttributes.
+ The ID we are certifying against the public key.
+ The key we are certifying against the ID.
+ The certification.
+
+
+ Generate a certification for the passed in key against the passed in master key.
+ The key we are certifying against.
+ The key we are certifying.
+ The certification.
+
+
+ Generate a certification, such as a revocation, for the passed in key.
+ The key we are certifying.
+ The certification.
+
+
+ A list of PGP signatures - normally in the signature block after literal data.
+
+
+ Generator for signature subpackets.
+
+
+
+ Add a TrustSignature packet to the signature. The values for depth and trust are largely
+ installation dependent but there are some guidelines in RFC 4880 - 5.2.3.13.
+
+ true if the packet is critical.
+ depth level.
+ trust amount.
+
+
+
+ Set the number of seconds a key is valid for after the time of its creation.
+ A value of zero means the key never expires.
+
+ True, if should be treated as critical, false otherwise.
+ The number of seconds the key is valid, or zero if no expiry.
+
+
+
+ Set the number of seconds a signature is valid for after the time of its creation.
+ A value of zero means the signature never expires.
+
+ True, if should be treated as critical, false otherwise.
+ The number of seconds the signature is valid, or zero if no expiry.
+
+
+
+ Set the creation time for the signature.
+
+ Note: this overrides the generation of a creation time when the signature
+ is generated.
+
+
+
+
+ Sets revocation reason sub packet
+
+
+
+
+ Sets revocation key sub packet
+
+
+
+
+ Sets issuer key sub packet
+
+
+
+ Container for a list of signature subpackets.
+
+
+ Return true if a particular subpacket type exists.
+
+ @param type type to look for.
+ @return true if present, false otherwise.
+
+
+ Return all signature subpackets of the passed in type.
+ @param type subpacket type code
+ @return an array of zero or more matching subpackets.
+
+
+
+ Return the number of seconds a signature is valid for after its creation date.
+ A value of zero means the signature never expires.
+
+ Seconds a signature is valid for.
+
+
+
+ Return the number of seconds a key is valid for after its creation date.
+ A value of zero means the key never expires.
+
+ Seconds a signature is valid for.
+
+
+ Return the number of packets this vector contains.
+
+
+ Container for a list of user attribute subpackets.
+
+
+ Basic utility class.
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ Write out the passed in file as a literal data packet.
+
+
+ Write out the passed in file as a literal data packet in partial packet format.
+
+
+
+ Return either an ArmoredInputStream or a BcpgInputStream based on whether
+ the initial characters of the stream are binary PGP encodings or not.
+
+
+
+ Generator for old style PGP V3 Signatures.
+
+
+ Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
+
+
+ Initialise the generator for signing.
+
+
+ Initialise the generator for signing.
+
+
+ Return the one pass header associated with the current signature.
+
+
+ Return a V3 signature object containing the current signature state.
+
+
+ Utility functions for looking a S-expression keys. This class will move when it finds a better home!
+
+ Format documented here:
+ http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=agent/keyformat.txt;h=42c4b1f06faf1bbe71ffadc2fee0fad6bec91a97;hb=refs/heads/master
+
+
+
+
+ The 'Signature' parameter is only available when generating unsigned attributes.
+
+
+
+ containing class for an CMS AuthEnveloped Data object
+
+
+ containing class for an CMS Authenticated Data object
+
+
+ return the object identifier for the content MAC algorithm.
+
+
+ return a store of the intended recipients for this message
+
+
+ return the ContentInfo
+
+
+ return a table of the digested attributes indexed by
+ the OID of the attribute.
+
+
+ return a table of the undigested attributes indexed by
+ the OID of the attribute.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ General class for generating a CMS authenticated-data message.
+
+ A simple example of usage.
+
+
+ CMSAuthenticatedDataGenerator fact = new CMSAuthenticatedDataGenerator();
+
+ fact.addKeyTransRecipient(cert);
+
+ CMSAuthenticatedData data = fact.generate(content, algorithm, "BC");
+
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+ @param rand instance of SecureRandom to use
+
+
+ generate an enveloped object that contains an CMS Enveloped Data
+ object using the given provider and the passed in key generator.
+
+
+ generate an authenticated object that contains an CMS Authenticated Data object
+
+
+ Parsing class for an CMS Authenticated Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one recipient can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ Example of use - assuming the first recipient matches the private key we have.
+
+ CMSAuthenticatedDataParser ad = new CMSAuthenticatedDataParser(inputStream);
+
+ RecipientInformationStore recipients = ad.getRecipientInfos();
+
+ Collection c = recipients.getRecipients();
+ Iterator it = c.iterator();
+
+ if (it.hasNext())
+ {
+ RecipientInformation recipient = (RecipientInformation)it.next();
+
+ CMSTypedStream recData = recipient.getContentStream(privateKey, "BC");
+
+ processDataStream(recData.getContentStream());
+
+ if (!Arrays.equals(ad.getMac(), recipient.getMac())
+ {
+ System.err.println("Data corrupted!!!!");
+ }
+ }
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CMSAuthenticatedDataParser ep = new CMSAuthenticatedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+
+ return the object identifier for the mac algorithm.
+
+
+ return the ASN.1 encoded encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a store of the intended recipients for this message
+
+
+ return a table of the unauthenticated attributes indexed by
+ the OID of the attribute.
+ @exception java.io.IOException
+
+
+ return a table of the unauthenticated attributes indexed by
+ the OID of the attribute.
+ @exception java.io.IOException
+
+
+ General class for generating a CMS authenticated-data message stream.
+
+ A simple example of usage.
+
+ CMSAuthenticatedDataStreamGenerator edGen = new CMSAuthenticatedDataStreamGenerator();
+
+ edGen.addKeyTransRecipient(cert);
+
+ ByteArrayOutputStream bOut = new ByteArrayOutputStream();
+
+ OutputStream out = edGen.open(
+ bOut, CMSAuthenticatedDataGenerator.AES128_CBC, "BC");*
+ out.write(data);
+
+ out.close();
+
+
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+ @param rand instance of SecureRandom to use
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ Use a BER Set to store the recipient information
+
+
+ generate an enveloped object that contains an CMS Enveloped Data
+ object using the given provider and the passed in key generator.
+ @throws java.io.IOException
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+
+ @param rand instance of SecureRandom to use
+
+
+ containing class for an CMS Compressed Data object
+
+
+ Return the uncompressed content.
+
+ @return the uncompressed content
+ @throws CmsException if there is an exception uncompressing the data.
+
+
+ Return the uncompressed content, throwing an exception if the data size
+ is greater than the passed in limit. If the content is exceeded getCause()
+ on the CMSException will contain a StreamOverflowException
+
+ @param limit maximum number of bytes to read
+ @return the content read
+ @throws CMSException if there is an exception uncompressing the data.
+
+
+ return the ContentInfo
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ * General class for generating a compressed CMS message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * CMSCompressedDataGenerator fact = new CMSCompressedDataGenerator();
+ * CMSCompressedData data = fact.Generate(content, algorithm);
+ *
+ *
+
+
+ Generate an object that contains an CMS Compressed Data
+
+
+ Class for reading a CMS Compressed Data stream.
+
+ CMSCompressedDataParser cp = new CMSCompressedDataParser(inputStream);
+
+ process(cp.GetContent().GetContentStream());
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CMSCompressedDataParser ep = new CMSCompressedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+ General class for generating a compressed CMS message stream.
+
+ A simple example of usage.
+
+
+ CMSCompressedDataStreamGenerator gen = new CMSCompressedDataStreamGenerator();
+
+ Stream cOut = gen.Open(outputStream, CMSCompressedDataStreamGenerator.ZLIB);
+
+ cOut.Write(data);
+
+ cOut.Close();
+
+
+
+ base constructor
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ Close the underlying data stream.
+ @throws IOException if the close fails.
+
+
+ containing class for an CMS Enveloped Data object
+
+
+ return the object identifier for the content encryption algorithm.
+
+
+ return a store of the intended recipients for this message
+
+
+ return the ContentInfo
+
+
+ return a table of the unprotected attributes indexed by
+ the OID of the attribute.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+
+ General class for generating a CMS enveloped-data message.
+
+ A simple example of usage.
+
+
+ CmsEnvelopedDataGenerator fact = new CmsEnvelopedDataGenerator();
+
+ fact.AddKeyTransRecipient(cert);
+
+ CmsEnvelopedData data = fact.Generate(content, algorithm);
+
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+
+ Generate an enveloped object that contains a CMS Enveloped Data
+ object using the passed in key generator.
+
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data object.
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data object.
+
+
+ Parsing class for an CMS Enveloped Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one recipient can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ Example of use - assuming the first recipient matches the private key we have.
+
+ CmsEnvelopedDataParser ep = new CmsEnvelopedDataParser(inputStream);
+
+ RecipientInformationStore recipients = ep.GetRecipientInfos();
+
+ Collection c = recipients.getRecipients();
+ Iterator it = c.iterator();
+
+ if (it.hasNext())
+ {
+ RecipientInformation recipient = (RecipientInformation)it.next();
+
+ CMSTypedStream recData = recipient.getContentStream(privateKey);
+
+ processDataStream(recData.getContentStream());
+ }
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CmsEnvelopedDataParser ep = new CmsEnvelopedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+
+ return the object identifier for the content encryption algorithm.
+
+
+ return the ASN.1 encoded encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a store of the intended recipients for this message
+
+
+ return a table of the unprotected attributes indexed by
+ the OID of the attribute.
+ @throws IOException
+
+
+ General class for generating a CMS enveloped-data message stream.
+
+ A simple example of usage.
+
+ CmsEnvelopedDataStreamGenerator edGen = new CmsEnvelopedDataStreamGenerator();
+
+ edGen.AddKeyTransRecipient(cert);
+
+ MemoryStream bOut = new MemoryStream();
+
+ Stream out = edGen.Open(
+ bOut, CMSEnvelopedDataGenerator.AES128_CBC);*
+ out.Write(data);
+
+ out.Close();
+
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Set the underlying string size for encapsulated data.
+ Length of octet strings to buffer the data.
+
+
+ Use a BER Set to store the recipient information.
+
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data
+ object using the passed in key generator.
+
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+ @throws IOException
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+ @throws IOException
+
+
+ General class for generating a CMS enveloped-data message.
+
+ A simple example of usage.
+
+
+ CMSEnvelopedDataGenerator fact = new CMSEnvelopedDataGenerator();
+
+ fact.addKeyTransRecipient(cert);
+
+ CMSEnvelopedData data = fact.generate(content, algorithm, "BC");
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ add a recipient.
+
+ @param cert recipient's public key certificate
+ @exception ArgumentException if there is a problem with the certificate
+
+
+ add a recipient
+
+ @param key the public key used by the recipient
+ @param subKeyId the identifier for the recipient's public key
+ @exception ArgumentException if there is a problem with the key
+
+
+ add a KEK recipient.
+ @param key the secret key to use for wrapping
+ @param keyIdentifier the byte string that identifies the key
+
+
+ add a KEK recipient.
+ @param key the secret key to use for wrapping
+ @param keyIdentifier the byte string that identifies the key
+
+
+ Add a key agreement based recipient.
+
+ @param agreementAlgorithm key agreement algorithm to use.
+ @param senderPrivateKey private key to initialise sender side of agreement with.
+ @param senderPublicKey sender public key to include with message.
+ @param recipientCert recipient's public key certificate.
+ @param cekWrapAlgorithm OID for key wrapping algorithm to use.
+ @exception SecurityUtilityException if the algorithm requested cannot be found
+ @exception InvalidKeyException if the keys are inappropriate for the algorithm specified
+
+
+ Add multiple key agreement based recipients (sharing a single KeyAgreeRecipientInfo structure).
+
+ @param agreementAlgorithm key agreement algorithm to use.
+ @param senderPrivateKey private key to initialise sender side of agreement with.
+ @param senderPublicKey sender public key to include with message.
+ @param recipientCerts recipients' public key certificates.
+ @param cekWrapAlgorithm OID for key wrapping algorithm to use.
+ @exception SecurityUtilityException if the algorithm requested cannot be found
+ @exception InvalidKeyException if the keys are inappropriate for the algorithm specified
+
+
+
+ Generic routine to copy out the data we want processed.
+
+
+ This routine may be called multiple times.
+
+
+
+ a holding class for a byte array of data to be processed.
+
+
+ A clone of the byte array
+
+
+ a holding class for a file of data to be processed.
+
+
+ The file handle
+
+
+ general class for handling a pkcs7-signature message.
+
+ A simple example of usage - note, in the example below the validity of
+ the certificate isn't verified, just the fact that one of the certs
+ matches the given signer...
+
+
+ IX509Store certs = s.GetCertificates();
+ SignerInformationStore signers = s.GetSignerInfos();
+
+ foreach (SignerInformation signer in signers.GetSigners())
+ {
+ ArrayList certList = new ArrayList(certs.GetMatches(signer.SignerID));
+ X509Certificate cert = (X509Certificate) certList[0];
+
+ if (signer.Verify(cert.GetPublicKey()))
+ {
+ verified++;
+ }
+ }
+
+
+
+ Content with detached signature, digests precomputed
+
+ @param hashes a map of precomputed digests for content indexed by name of hash.
+ @param sigBlock the signature object.
+
+
+ base constructor - content with detached signature.
+
+ @param signedContent the content that was signed.
+ @param sigData the signature object.
+
+
+ base constructor - with encapsulated content
+
+
+ Return the version number for this object.
+
+
+ return the collection of signers that are associated with the
+ signatures for the message.
+
+
+ return a X509Store containing the attribute certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of attribute certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing the public key certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of public key certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing CRLs, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of CRLs
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+
+ Return the DerObjectIdentifier associated with the encapsulated
+ content info structure carried in the signed data.
+
+
+
+ return the ContentInfo
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Replace the signerinformation store associated with this
+ CmsSignedData object with the new one passed in. You would
+ probably only want to do this if you wanted to change the unsigned
+ attributes associated with a signer, or perhaps delete one.
+
+ @param signedData the signed data object to be used as a base.
+ @param signerInformationStore the new signer information store to use.
+ @return a new signed data object.
+
+
+ Replace the certificate and CRL information associated with this
+ CmsSignedData object with the new one passed in.
+
+ @param signedData the signed data object to be used as a base.
+ @param x509Certs the new certificates to be used.
+ @param x509Crls the new CRLs to be used.
+ @return a new signed data object.
+ @exception CmsException if there is an error processing the stores
+
+
+ * general class for generating a pkcs7-signature message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * IX509Store certs...
+ * IX509Store crls...
+ * CmsSignedDataGenerator gen = new CmsSignedDataGenerator();
+ *
+ * gen.AddSigner(privKey, cert, CmsSignedGenerator.DigestSha1);
+ * gen.AddCertificates(certs);
+ * gen.AddCrls(crls);
+ *
+ * CmsSignedData data = gen.Generate(content);
+ *
+ *
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ * add a signer - no attributes other than the default ones will be
+ * provided here.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param digestOID digest algorithm OID
+
+
+ add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be
+ provided here.
+
+ @param key signing key to use
+ @param cert certificate containing corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+
+
+ add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be
+ provided here.
+
+
+ * add a signer with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes.
+
+ @param key signing key to use
+ @param cert certificate containing corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+ @param signedAttr table of attributes to be included in signature
+ @param unsignedAttr table of attributes to be included as unsigned
+
+
+ * add a signer with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param subjectKeyID subjectKeyID of corresponding public key
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes.
+
+ @param key signing key to use
+ @param subjectKeyID subjectKeyID of corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+ @param signedAttr table of attributes to be included in signature
+ @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer with extra signed/unsigned attributes based on generators.
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes based on generators.
+
+
+ add a signer with extra signed/unsigned attributes based on generators.
+
+
+ add a signer, including digest encryption algorithm, with extra signed/unsigned attributes based on generators.
+
+
+ generate a signed object that for a CMS Signed Data object
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data".
+
+
+ generate a set of one or more SignerInformation objects representing counter signatures on
+ the passed in SignerInformation object.
+
+ @param signer the signer to be countersigned
+ @param sigProvider the provider to be used for counter signing.
+ @return a store containing the signers.
+
+
+ Parsing class for an CMS Signed Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one signer can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ A simple example of usage for an encapsulated signature.
+
+
+ Two notes: first, in the example below the validity of
+ the certificate isn't verified, just the fact that one of the certs
+ matches the given signer, and, second, because we are in a streaming
+ mode the order of the operations is important.
+
+
+ CmsSignedDataParser sp = new CmsSignedDataParser(encapSigData);
+
+ sp.GetSignedContent().Drain();
+
+ IX509Store certs = sp.GetCertificates();
+ SignerInformationStore signers = sp.GetSignerInfos();
+
+ foreach (SignerInformation signer in signers.GetSigners())
+ {
+ ArrayList certList = new ArrayList(certs.GetMatches(signer.SignerID));
+ X509Certificate cert = (X509Certificate) certList[0];
+
+ Console.WriteLine("verify returns: " + signer.Verify(cert));
+ }
+
+ Note also: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CmsSignedDataParser ep = new CmsSignedDataParser(new BufferedInputStream(encapSigData, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+ base constructor - with encapsulated content
+
+
+ base constructor
+
+ @param signedContent the content that was signed.
+ @param sigData the signature object.
+
+
+ Return the version number for the SignedData object
+
+ @return the version number
+
+
+ return the collection of signers that are associated with the
+ signatures for the message.
+ @throws CmsException
+
+
+ return a X509Store containing the attribute certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of attribute certificates
+ @exception org.bouncycastle.x509.NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing the public key certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of public key certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing CRLs, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of CRLs
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+
+ Return the DerObjectIdentifier associated with the encapsulated
+ content info structure carried in the signed data.
+
+
+
+ Replace the signerinformation store associated with the passed
+ in message contained in the stream original with the new one passed in.
+ You would probably only want to do this if you wanted to change the unsigned
+ attributes associated with a signer, or perhaps delete one.
+
+ The output stream is returned unclosed.
+
+ @param original the signed data stream to be used as a base.
+ @param signerInformationStore the new signer information store to use.
+ @param out the stream to Write the new signed data object to.
+ @return out.
+
+
+ Replace the certificate and CRL information associated with this
+ CMSSignedData object with the new one passed in.
+
+ The output stream is returned unclosed.
+
+ @param original the signed data stream to be used as a base.
+ @param certsAndCrls the new certificates and CRLs to be used.
+ @param out the stream to Write the new signed data object to.
+ @return out.
+ @exception CmsException if there is an error processing the CertStore
+
+
+ General class for generating a pkcs7-signature message stream.
+
+ A simple example of usage.
+
+
+ IX509Store certs...
+ CmsSignedDataStreamGenerator gen = new CmsSignedDataStreamGenerator();
+
+ gen.AddSigner(privateKey, cert, CmsSignedDataStreamGenerator.DIGEST_SHA1);
+
+ gen.AddCertificates(certs);
+
+ Stream sigOut = gen.Open(bOut);
+
+ sigOut.Write(Encoding.UTF8.GetBytes("Hello World!"));
+
+ sigOut.Close();
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer, specifying the digest encryption algorithm - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes - specifying digest
+ encryption algorithm.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ generate a signed object that for a CMS Signed Data object
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data".
+
+
+ generate a signed object that for a CMS Signed Data
+ object using the given provider - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data". If dataOutputStream is non null the data
+ being signed will be written to the stream as it is processed.
+ @param out stream the CMS object is to be written to.
+ @param encapsulate true if data should be encapsulated.
+ @param dataOutputStream output stream to copy the data being signed to.
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+
+
+ generate a signed object that for a CMS Signed Data
+ object using the given provider - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+ @param out stream the CMS object is to be written to.
+ @param signedContentType OID for data to be signed.
+ @param encapsulate true if data should be encapsulated.
+ @param dataOutputStream output stream to copy the data being signed to.
+
+
+ Default type for the signed data.
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Add the attribute certificates contained in the passed in store to the
+ generator.
+
+ @param store a store of Version 2 attribute certificates
+ @throws CmsException if an error occurse processing the store.
+
+
+ Add a store of precalculated signers to the generator.
+
+ @param signerStore store of signers
+
+
+ Return a map of oids and byte arrays representing the digests calculated on the content during
+ the last generate.
+
+ @return a map of oids (as String objects) and byte[] representing digests.
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+ Return the digest encryption algorithm using one of the standard
+ JCA string representations rather than the algorithm identifier (if
+ possible).
+
+
+ Default authenticated attributes generator.
+
+
+ Initialise to use all defaults
+
+
+ Initialise with some extra attributes or overrides.
+
+ @param attributeTable initial attribute table to use.
+
+
+ Create a standard attribute table from the passed in parameters - this will
+ normally include contentType and messageDigest. If the constructor
+ using an AttributeTable was used, entries in it for contentType and
+ messageDigest will override the generated ones.
+
+ @param parameters source parameters for table generation.
+
+ @return a filled in IDictionary of attributes.
+
+
+ @param parameters source parameters
+ @return the populated attribute table
+
+
+ Default signed attributes generator.
+
+
+ Initialise to use all defaults
+
+
+ Initialise with some extra attributes or overrides.
+
+ @param attributeTable initial attribute table to use.
+
+
+ Create a standard attribute table from the passed in parameters - this will
+ normally include contentType, signingTime, and messageDigest. If the constructor
+ using an AttributeTable was used, entries in it for contentType, signingTime, and
+ messageDigest will override the generated ones.
+
+ @param parameters source parameters for table generation.
+
+ @return a filled in Hashtable of attributes.
+
+
+ @param parameters source parameters
+ @return the populated attribute table
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using a secret key known to the other side.
+
+
+ decrypt the content and return an input stream.
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using key agreement.
+
+
+ decrypt the content and return an input stream.
+
+
+ the KeyTransRecipientInformation class for a recipient who has been sent a secret
+ key encrypted using their public key that needs to be used to
+ extract the message.
+
+
+ decrypt the content and return it as a byte array.
+
+
+ a basic index for an originator.
+
+
+ Return the certificates stored in the underlying OriginatorInfo object.
+
+ @return a Store of X509CertificateHolder objects.
+
+
+ Return the CRLs stored in the underlying OriginatorInfo object.
+
+ @return a Store of X509CRLHolder objects.
+
+
+ Return the underlying ASN.1 object defining this SignerInformation object.
+
+ @return a OriginatorInfo.
+
+
+
+ PKCS5 scheme-2 - password converted to bytes assuming ASCII.
+
+
+
+ PKCS5 scheme-2 - password converted to bytes using UTF-8.
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using a password.
+
+
+ return the object identifier for the key derivation algorithm, or null
+ if there is none present.
+
+ @return OID for key derivation algorithm, if present.
+
+
+ decrypt the content and return an input stream.
+
+
+
+ Generate a RecipientInfo object for the given key.
+
+
+ A
+
+
+ A
+
+
+ A
+
+
+
+
+ * return the object identifier for the key encryption algorithm.
+ *
+ * @return OID for key encryption algorithm.
+
+
+ * return the ASN.1 encoded key encryption algorithm parameters, or null if
+ * there aren't any.
+ *
+ * @return ASN.1 encoding of key encryption algorithm parameters.
+
+
+ Return the MAC calculated for the content stream. Note: this call is only meaningful once all
+ the content has been read.
+
+ @return byte array containing the mac.
+
+
+ Return the first RecipientInformation object that matches the
+ passed in selector. Null if there are no matches.
+
+ @param selector to identify a recipient
+ @return a single RecipientInformation object. Null if none matches.
+
+
+ Return the number of recipients in the collection.
+
+ @return number of recipients identified.
+
+
+ Return all recipients in the collection
+
+ @return a collection of recipients.
+
+
+ Return possible empty collection with recipients matching the passed in RecipientID
+
+ @param selector a recipient id to select against.
+ @return a collection of RecipientInformation objects.
+
+
+ a basic index for a signer.
+
+
+ If the passed in flag is true, the signer signature will be based on the data, not
+ a collection of signed attributes, and no signed attributes will be included.
+
+ @return the builder object
+
+
+ Provide a custom signed attribute generator.
+
+ @param signedGen a generator of signed attributes.
+ @return the builder object
+
+
+ Provide a generator of unsigned attributes.
+
+ @param unsignedGen a generator for signed attributes.
+ @return the builder object
+
+
+ Build a generator with the passed in certHolder issuer and serial number as the signerIdentifier.
+
+ @param contentSigner operator for generating the final signature in the SignerInfo with.
+ @param certHolder carrier for the X.509 certificate related to the contentSigner.
+ @return a SignerInfoGenerator
+ @throws OperatorCreationException if the generator cannot be built.
+
+
+ Build a generator with the passed in subjectKeyIdentifier as the signerIdentifier. If used you should
+ try to follow the calculation described in RFC 5280 section 4.2.1.2.
+
+ @param signerFactory operator factory for generating the final signature in the SignerInfo with.
+ @param subjectKeyIdentifier key identifier to identify the public key for verifying the signature.
+ @return a SignerInfoGenerator
+
+
+ an expanded SignerInfo block from a CMS Signed message
+
+
+ return the version number for this objects underlying SignerInfo structure.
+
+
+ return the object identifier for the signature.
+
+
+ return the signature parameters, or null if there aren't any.
+
+
+ return the content digest that was calculated during verification.
+
+
+ return the object identifier for the signature.
+
+
+ return the signature/encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a table of the signed attributes - indexed by
+ the OID of the attribute.
+
+
+ return a table of the unsigned attributes indexed by
+ the OID of the attribute.
+
+
+ return the encoded signature
+
+
+ Return a SignerInformationStore containing the counter signatures attached to this
+ signer. If no counter signatures are present an empty store is returned.
+
+
+ return the DER encoding of the signed attributes.
+ @throws IOException if an encoding error occurs.
+
+
+ verify that the given public key successfully handles and confirms the
+ signature associated with this signer.
+
+
+ verify that the given certificate successfully handles and confirms
+ the signature associated with this signer and, if a signingTime
+ attribute is available, that the certificate was valid at the time the
+ signature was generated.
+
+
+ Return the base ASN.1 CMS structure that this object contains.
+
+ @return an object containing a CMS SignerInfo structure.
+
+
+ Return a signer information object with the passed in unsigned
+ attributes replacing the ones that are current associated with
+ the object passed in.
+
+ @param signerInformation the signerInfo to be used as the basis.
+ @param unsignedAttributes the unsigned attributes to add.
+ @return a copy of the original SignerInformationObject with the changed attributes.
+
+
+ Return a signer information object with passed in SignerInformationStore representing counter
+ signatures attached as an unsigned attribute.
+
+ @param signerInformation the signerInfo to be used as the basis.
+ @param counterSigners signer info objects carrying counter signature.
+ @return a copy of the original SignerInformationObject with the changed attributes.
+
+
+ Create a store containing a single SignerInformation object.
+
+ @param signerInfo the signer information to contain.
+
+
+ Create a store containing a collection of SignerInformation objects.
+
+ @param signerInfos a collection signer information objects to contain.
+
+
+ Return the first SignerInformation object that matches the
+ passed in selector. Null if there are no matches.
+
+ @param selector to identify a signer
+ @return a single SignerInformation object. Null if none matches.
+
+
+ The number of signers in the collection.
+
+
+ An ICollection of all signers in the collection
+
+
+ Return possible empty collection with signers matching the passed in SignerID
+
+ @param selector a signer id to select against.
+ @return a collection of SignerInformation objects.
+
+
+ Basic generator that just returns a preconstructed attribute table
+
+
+ a holding class for public/private parameter pairs.
+
+
+ basic constructor.
+
+ @param publicParam a public key parameters object.
+ @param privateParam the corresponding private key parameters.
+
+
+ return the public key parameters.
+
+ @return the public key parameters.
+
+
+ return the private key parameters.
+
+ @return the private key parameters.
+
+
+ The AEAD block ciphers already handle buffering internally, so this class
+ just takes care of implementing IBufferedCipher methods.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the blocksize for the underlying cipher.
+
+ @return the blocksize for the underlying cipher.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output, or the input is not block size aligned and should be.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+ @exception DataLengthException if the input is not block size
+ aligned.
+
+
+ Reset the buffer and cipher. After resetting the object is in the same
+ state as it was after the last init (if there was one).
+
+
+ a buffer wrapper for an asymmetric block cipher, allowing input
+ to be accumulated in a piecemeal fashion until final processing.
+
+
+ base constructor.
+
+ @param cipher the cipher this buffering object wraps.
+
+
+ return the amount of data sitting in the buffer.
+
+ @return the amount of data sitting in the buffer.
+
+
+ initialise the buffer and the underlying cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+
+
+ process the contents of the buffer using the underlying
+ cipher.
+
+ @return the result of the encryption/decryption process on the
+ buffer.
+ @exception InvalidCipherTextException if we are given a garbage block.
+
+
+ Reset the buffer
+
+
+ A wrapper class that allows block ciphers to be used to process data in
+ a piecemeal fashion. The BufferedBlockCipher outputs a block only when the
+ buffer is full and more data is being added, or on a doFinal.
+
+ Note: in the case where the underlying cipher is either a CFB cipher or an
+ OFB one the last block may not be a multiple of the block size.
+
+
+
+ constructor for subclasses
+
+
+ Create a buffered block cipher without padding.
+
+ @param cipher the underlying block cipher this buffering object wraps.
+ false otherwise.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the blocksize for the underlying cipher.
+
+ @return the blocksize for the underlying cipher.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output, or the input is not block size aligned and should be.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+ @exception DataLengthException if the input is not block size
+ aligned.
+
+
+ Reset the buffer and cipher. After resetting the object is in the same
+ state as it was after the last init (if there was one).
+
+
+ The base class for symmetric, or secret, cipher key generators.
+
+
+ initialise the key generator.
+
+ @param param the parameters to be used for key generation
+
+
+ Generate a secret key.
+
+ @return a byte array containing the key value.
+
+
+ this exception is thrown if a buffer that is meant to have output
+ copied into it turns out to be too short, or if we've been given
+ insufficient input. In general this exception will Get thrown rather
+ than an ArrayOutOfBounds exception.
+
+
+ base constructor.
+
+
+ create a DataLengthException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+ Wrapper removes exposure to the IMemoable interface on an IDigest implementation.
+
+
+ Base constructor.
+
+ @param baseDigest underlying digest to use.
+ @exception IllegalArgumentException if baseDigest is null
+
+
+ implementation of GOST R 34.11-94
+
+
+ Standard constructor
+
+
+ Constructor to allow use of a particular sbox with GOST28147
+ @see GOST28147Engine#getSBox(String)
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ base implementation of MD4 family style digest as outlined in
+ "Handbook of Applied Cryptography", pages 344 - 347.
+
+
+
+ Implementation of Keccak based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+ Return the size of block that the compression function is applied to in bytes.
+
+ @return internal byte length of a block.
+
+
+ Base class for SHA-384 and SHA-512.
+
+
+ Constructor for variable length word
+
+
+ Copy constructor. We are using copy constructors in place
+ of the object.Clone() interface as this interface is not
+ supported by J2ME.
+
+
+ adjust the byte counts so that byteCount2 represents the
+ upper long (less 3 bits) word of the byte count.
+
+
+ implementation of MD2
+ as outlined in RFC1319 by B.Kaliski from RSA Laboratories April 1992
+
+
+ return the algorithm name
+
+ @return the algorithm name
+
+
+ Close the digest, producing the final digest value. The doFinal
+ call leaves the digest reset.
+
+ @param out the array the digest is to be copied into.
+ @param outOff the offset into the out array the digest is to start at.
+
+
+ reset the digest back to it's initial state.
+
+
+ update the message digest with a single byte.
+
+ @param in the input byte to be entered.
+
+
+ update the message digest with a block of bytes.
+
+ @param in the byte array containing the data.
+ @param inOff the offset into the byte array where the data starts.
+ @param len the length of the data.
+
+
+ implementation of MD4 as RFC 1320 by R. Rivest, MIT Laboratory for
+ Computer Science and RSA Data Security, Inc.
+
+ NOTE : This algorithm is only included for backwards compatibility
+ with legacy applications, it's not secure, don't use it for anything new!
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of MD5 as outlined in "Handbook of Applied Cryptography", pages 346 - 347.
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of RipeMD128
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of RipeMD see,
+ http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of RipeMD256.
+ Note: this algorithm offers the same level of security as RipeMD128.
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of RipeMD 320.
+ Note: this algorithm offers the same level of security as RipeMD160.
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of SHA-3 based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+
+ Implementation of Chinese SM3 digest as described at
+ http://tools.ietf.org/html/draft-shen-sm3-hash-00
+ and at .... ( Chinese PDF )
+
+
+ The specification says "process a bit stream",
+ but this is written to process bytes in blocks of 4,
+ meaning this will process 32-bit word groups.
+ But so do also most other digest specifications,
+ including the SHA-256 which was a origin for
+ this specification.
+
+
+
+
+ Standard constructor
+
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+
+ reset the chaining variables
+
+
+
+ implementation of SHA-1 as outlined in "Handbook of Applied Cryptography", pages 346 - 349.
+
+ It is interesting to ponder why the, apart from the extra IV, the other difference here from MD5
+ is the "endianness" of the word processing!
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ SHA-224 as described in RFC 3874
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-224 512 32 224
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-256. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-384. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-512. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ FIPS 180-4 implementation of SHA-512/t
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+
+ Implementation of SHAKE based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+ Wrapper class that reduces the output length of a particular digest to
+ only the first n bytes of the digest function.
+
+
+ Base constructor.
+
+ @param baseDigest underlying digest to use.
+ @param length length in bytes of the output of doFinal.
+ @exception ArgumentException if baseDigest is null, or length is greater than baseDigest.GetDigestSize().
+
+
+
+ Implementation of the Skein parameterised hash function in 256, 512 and 1024 bit block sizes,
+ based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+
+ Constructs a Skein digest with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/digest size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Optionally initialises the Skein digest with the provided parameters.
+
+ See for details on the parameterisation of the Skein hash function.
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+
+ Implementation of the Skein family of parameterised hash functions in 256, 512 and 1024 bit block
+ sizes, based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+ This implementation is the basis for and , implementing the
+ parameter based configuration system that allows Skein to be adapted to multiple applications.
+ Initialising the engine with allows standard and arbitrary parameters to
+ be applied during the Skein hash function.
+
+ Implemented:
+
+ 256, 512 and 1024 bit internal states.
+ Full 96 bit input length.
+ Parameters defined in the Skein specification, and arbitrary other pre and post message
+ parameters.
+ Arbitrary output size in 1 byte intervals.
+
+
+ Not implemented:
+
+ Sub-byte length input (bit padding).
+ Tree hashing.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+ The parameter type for the Skein key.
+
+
+ The parameter type for the Skein configuration block.
+
+
+ The parameter type for the message.
+
+
+ The parameter type for the output transformation.
+
+
+ Precalculated UBI(CFG) states for common state/output combinations without key or other
+ pre-message params.
+
+
+ Point at which position might overflow long, so switch to add with carry logic
+
+
+ Bit 127 = final
+
+
+ Bit 126 = first
+
+
+ UBI uses a 128 bit tweak
+
+
+ Whether 64 bit position exceeded
+
+
+ Advances the position in the tweak by the specified value.
+
+
+ The Unique Block Iteration chaining mode.
+
+
+ Buffer for the current block of message data
+
+
+ Offset into the current message block
+
+
+ Buffer for message words for feedback into encrypted block
+
+
+ Underlying Threefish tweakable block cipher
+
+
+ Size of the digest output, in bytes
+
+
+ The current chaining/state value
+
+
+ The initial state value
+
+
+ The (optional) key parameter
+
+
+ Parameters to apply prior to the message
+
+
+ Parameters to apply after the message, but prior to output
+
+
+ The current UBI operation
+
+
+ Buffer for single byte update method
+
+
+
+ Constructs a Skein digest with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/digest size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Creates a SkeinEngine as an exact copy of an existing instance.
+
+
+
+
+ Initialises the Skein engine with the provided parameters. See for
+ details on the parameterisation of the Skein hash function.
+
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+ Calculate the initial (pre message block) chaining state.
+
+
+
+ Reset the engine to the initial state (with the key and any pre-message parameters , ready to
+ accept message input.
+
+
+
+ implementation of Tiger based on:
+
+ http://www.cs.technion.ac.il/~biham/Reports/Tiger
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Implementation of WhirlpoolDigest, based on Java source published by Barreto
+ and Rijmen.
+
+
+
+ Copy constructor. This will copy the state of the provided message
+ digest.
+
+
+ Reset the chaining variables
+
+
+ initialise a Serpent cipher.
+
+ @param encrypting whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @throws IllegalArgumentException if the params argument is
+ inappropriate.
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @return the number of bytes processed and produced.
+ @throws DataLengthException if there isn't enough data in in, or
+ space in out.
+ @throws IllegalStateException if the cipher isn't initialised.
+
+
+ InvSO - {13, 3,11, 0,10, 6, 5,12, 1,14, 4, 7,15, 9, 8, 2 } - 15 terms.
+
+
+ S1 - {15,12, 2, 7, 9, 0, 5,10, 1,11,14, 8, 6,13, 3, 4 } - 14 terms.
+
+
+ InvS1 - { 5, 8, 2,14,15, 6,12, 3,11, 4, 7, 9, 1,13,10, 0 } - 14 steps.
+
+
+ S2 - { 8, 6, 7, 9, 3,12,10,15,13, 1,14, 4, 0,11, 5, 2 } - 16 terms.
+
+
+ InvS2 - {12, 9,15, 4,11,14, 1, 2, 0, 3, 6,13, 5, 8,10, 7 } - 16 steps.
+
+
+ S3 - { 0,15,11, 8,12, 9, 6, 3,13, 1, 2, 4,10, 7, 5,14 } - 16 terms.
+
+
+ InvS3 - { 0, 9,10, 7,11,14, 6,13, 3, 5,12, 2, 4, 8,15, 1 } - 15 terms
+
+
+ S4 - { 1,15, 8, 3,12, 0,11, 6, 2, 5, 4,10, 9,14, 7,13 } - 15 terms.
+
+
+ InvS4 - { 5, 0, 8, 3,10, 9, 7,14, 2,12,11, 6, 4,15,13, 1 } - 15 terms.
+
+
+ S5 - {15, 5, 2,11, 4,10, 9,12, 0, 3,14, 8,13, 6, 7, 1 } - 16 terms.
+
+
+ InvS5 - { 8,15, 2, 9, 4, 1,13,14,11, 6, 5, 3, 7,12,10, 0 } - 16 terms.
+
+
+ S6 - { 7, 2,12, 5, 8, 4, 6,11,14, 9, 1,15,13, 3,10, 0 } - 15 terms.
+
+
+ InvS6 - {15,10, 1,13, 5, 3, 6, 0, 4, 9,14, 7, 2,12, 8,11 } - 15 terms.
+
+
+ S7 - { 1,13,15, 0,14, 8, 2,11, 7, 4,12,10, 9, 3, 5, 6 } - 16 terms.
+
+
+ InvS7 - { 3, 0, 6,13, 9,14,15, 8, 5,12,11, 7,10, 1, 4, 2 } - 17 terms.
+
+
+ Apply the linear transformation to the register set.
+
+
+ Apply the inverse of the linear transformation to the register set.
+
+
+ Tnepres is a 128-bit 32-round block cipher with variable key lengths,
+ including 128, 192 and 256 bit keys conjectured to be at least as
+ secure as three-key triple-DES.
+
+ Tnepres is based on Serpent which was designed by Ross Anderson, Eli Biham and Lars Knudsen as a
+ candidate algorithm for the NIST AES Quest. Unfortunately there was an endianness issue
+ with test vectors in the AES submission and the resulting confusion lead to the Tnepres cipher
+ as well, which is a byte swapped version of Serpent.
+
+
+ For full details see The Serpent home page
+
+
+
+ Expand a user-supplied key material into a session key.
+
+ @param key The user-key bytes (multiples of 4) to use.
+ @exception ArgumentException
+
+
+ Encrypt one block of plaintext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ Decrypt one block of ciphertext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ an implementation of the AES (Rijndael), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor, they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations, 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each, for a total of 2Kbytes,
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first.
+
+ The slowest version uses no static tables at all and computes the values in each round.
+
+
+ This file contains the middle performance version with 2Kbytes of static tables for round precomputation.
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ an implementation of the AES (Rijndael)), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor), they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations), 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each), for a total of 2Kbytes),
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first
+
+ The slowest version uses no static tables at all and computes the values in each round
+
+
+ This file contains the fast version with 8Kbytes of static tables for round precomputation
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ an implementation of the AES (Rijndael), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor, they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations, 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each, for a total of 2Kbytes,
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first
+
+ The slowest version uses no static tables at all and computes the values
+ in each round.
+
+
+ This file contains the slowest performance version with no static tables
+ for round precomputation, but it has the smallest foot print.
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+
+ An implementation of the AES Key Wrapper from the NIST Key Wrap Specification.
+
+ For further details see: http://csrc.nist.gov/encryption/kms/key-wrap.pdf .
+
+
+
+ A class that provides Blowfish key encryption operations,
+ such as encoding data and generating keys.
+ All the algorithms herein are from Applied Cryptography
+ and implement a simplified cryptography interface.
+
+
+ initialise a Blowfish cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ apply the encryption cycle to each value pair in the table.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Camellia - based on RFC 3713.
+
+
+ Camellia - based on RFC 3713, smaller implementation, about half the size of CamelliaEngine.
+
+
+
+ An implementation of the Camellia key wrapper based on RFC 3657/RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc3657.txt .
+
+
+
+ A class that provides CAST key encryption operations,
+ such as encoding data and generating keys.
+
+ All the algorithms herein are from the Internet RFC's
+
+ RFC2144 - Cast5 (64bit block, 40-128bit key)
+ RFC2612 - CAST6 (128bit block, 128-256bit key)
+
+ and implement a simplified cryptography interface.
+
+
+ initialise a CAST cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ The first of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ The second of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ The third of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ Does the 16 rounds to encrypt the block.
+
+ @param L0 the LH-32bits of the plaintext block
+ @param R0 the RH-32bits of the plaintext block
+
+
+ A class that provides CAST6 key encryption operations,
+ such as encoding data and generating keys.
+
+ All the algorithms herein are from the Internet RFC
+
+ RFC2612 - CAST6 (128bit block, 128-256bit key)
+
+ and implement a simplified cryptography interface.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Does the 12 quad rounds rounds to encrypt the block.
+
+ @param A the 00-31 bits of the plaintext block
+ @param B the 32-63 bits of the plaintext block
+ @param C the 64-95 bits of the plaintext block
+ @param D the 96-127 bits of the plaintext block
+ @param result the resulting ciphertext
+
+
+ Does the 12 quad rounds rounds to decrypt the block.
+
+ @param A the 00-31 bits of the ciphertext block
+ @param B the 32-63 bits of the ciphertext block
+ @param C the 64-95 bits of the ciphertext block
+ @param D the 96-127 bits of the ciphertext block
+ @param result the resulting plaintext
+
+
+
+ Implementation of Daniel J. Bernstein's ChaCha stream cipher.
+
+
+
+
+ Creates a 20 rounds ChaCha engine.
+
+
+
+
+ Creates a ChaCha engine with a specific number of rounds.
+
+ the number of rounds (must be an even number).
+
+
+
+ ChacCha function.
+
+ The number of ChaCha rounds to execute
+ The input words.
+ The ChaCha state to modify.
+
+
+ A class that provides a basic DESede (or Triple DES) engine.
+
+
+ initialise a DESede cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ * Wrap keys according to
+ *
+ * draft-ietf-smime-key-wrap-01.txt .
+ *
+ * Note:
+ *
+ * this is based on a draft, and as such is subject to change - don't use this class for anything requiring long term storage.
+ * if you are using this to wrap triple-des keys you need to set the
+ * parity bits on the key and, if it's a two-key triple-des key, pad it
+ * yourself.
+ *
+ *
+
+
+ Field engine
+
+
+ Field param
+
+
+ Field paramPlusIV
+
+
+ Field iv
+
+
+ Field forWrapping
+
+
+ Field IV2
+
+
+ Method init
+
+ @param forWrapping
+ @param param
+
+
+ Method GetAlgorithmName
+
+ @return
+
+
+ Method wrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+
+
+ Method unwrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+ @throws InvalidCipherTextException
+
+
+ Some key wrap algorithms make use of the Key Checksum defined
+ in CMS [CMS-Algorithms]. This is used to provide an integrity
+ check value for the key being wrapped. The algorithm is
+
+ - Compute the 20 octet SHA-1 hash on the key being wrapped.
+ - Use the first 8 octets of this hash as the checksum value.
+
+ @param key
+ @return
+ @throws Exception
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ @param key
+ @param checksum
+ @return
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ A class that provides a basic DES engine.
+
+
+ initialise a DES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ what follows is mainly taken from "Applied Cryptography", by
+ Bruce Schneier, however it also bears great resemblance to Richard
+ Outerbridge's D3DES...
+
+
+ Generate an integer based working key based on our secret key
+ and what we processing we are planning to do.
+
+ Acknowledgements for this routine go to James Gillogly and Phil Karn.
+ (whoever, and wherever they are!).
+
+
+ the DES engine.
+
+
+ this does your basic ElGamal algorithm.
+
+
+ initialise the ElGamal engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary ElGamal key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For ElGamal this is always one byte less than the size of P on
+ encryption, and twice the length as the size of P on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For ElGamal this is always one byte less than the size of P on
+ decryption, and twice the length as the size of P on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic ElGamal algorithm.
+
+ @param in the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param length the length of the data to be processed.
+ @return the result of the ElGamal process.
+ @exception DataLengthException the input block is too large.
+
+
+ implementation of GOST 28147-89
+
+
+ standard constructor.
+
+
+ initialise an Gost28147 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is inappropriate.
+
+
+ Return the S-Box associated with SBoxName
+ @param sBoxName name of the S-Box
+ @return byte array representing the S-Box
+
+
+ HC-128 is a software-efficient stream cipher created by Hongjun Wu. It
+ generates keystream from a 128-bit secret key and a 128-bit initialization
+ vector.
+
+ http://www.ecrypt.eu.org/stream/p3ciphers/hc/hc128_p3.pdf
+
+ It is a third phase candidate in the eStream contest, and is patent-free.
+ No attacks are known as of today (April 2007). See
+
+ http://www.ecrypt.eu.org/stream/hcp3.html
+
+
+
+ Initialise a HC-128 cipher.
+
+ @param forEncryption whether or not we are for encryption. Irrelevant, as
+ encryption and decryption are the same.
+ @param params the parameters required to set up the cipher.
+ @throws ArgumentException if the params argument is
+ inappropriate (ie. the key is not 128 bit long).
+
+
+ HC-256 is a software-efficient stream cipher created by Hongjun Wu. It
+ generates keystream from a 256-bit secret key and a 256-bit initialization
+ vector.
+
+ http://www.ecrypt.eu.org/stream/p3ciphers/hc/hc256_p3.pdf
+
+ Its brother, HC-128, is a third phase candidate in the eStream contest.
+ The algorithm is patent-free. No attacks are known as of today (April 2007).
+ See
+
+ http://www.ecrypt.eu.org/stream/hcp3.html
+
+
+
+ Initialise a HC-256 cipher.
+
+ @param forEncryption whether or not we are for encryption. Irrelevant, as
+ encryption and decryption are the same.
+ @param params the parameters required to set up the cipher.
+ @throws ArgumentException if the params argument is
+ inappropriate (ie. the key is not 256 bit long).
+
+
+ Implementation of Bob Jenkin's ISAAC (Indirection Shift Accumulate Add and Count).
+ see: http://www.burtleburtle.net/bob/rand/isaacafa.html
+
+
+ initialise an ISAAC cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ A class that provides a basic International Data Encryption Algorithm (IDEA) engine.
+
+ This implementation is based on the "HOWTO: INTERNATIONAL DATA ENCRYPTION ALGORITHM"
+ implementation summary by Fauzan Mirza (F.U.Mirza@sheffield.ac.uk). (baring 1 typo at the
+ end of the mulinv function!).
+
+
+ It can be found at ftp://ftp.funet.fi/pub/crypt/cryptography/symmetric/idea/
+
+
+ Note 1: This algorithm is patented in the USA, Japan, and Europe including
+ at least Austria, France, Germany, Italy, Netherlands, Spain, Sweden, Switzerland
+ and the United Kingdom. Non-commercial use is free, however any commercial
+ products are liable for royalties. Please see
+ www.mediacrypt.com for
+ further details. This announcement has been included at the request of
+ the patent holders.
+
+
+ Note 2: Due to the requests concerning the above, this algorithm is now only
+ included in the extended assembly. It is not included in the default distributions.
+
+
+
+ standard constructor.
+
+
+ initialise an IDEA cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return x = x * y where the multiplication is done modulo
+ 65537 (0x10001) (as defined in the IDEA specification) and
+ a zero input is taken to be 65536 (0x10000).
+
+ @param x the x value
+ @param y the y value
+ @return x = x * y
+
+
+ The following function is used to expand the user key to the encryption
+ subkey. The first 16 bytes are the user key, and the rest of the subkey
+ is calculated by rotating the previous 16 bytes by 25 bits to the left,
+ and so on until the subkey is completed.
+
+
+ This function computes multiplicative inverse using Euclid's Greatest
+ Common Divisor algorithm. Zero and one are self inverse.
+
+ i.e. x * MulInv(x) == 1 (modulo BASE)
+
+
+
+ Return the additive inverse of x.
+
+ i.e. x + AddInv(x) == 0
+
+
+
+ The function to invert the encryption subkey to the decryption subkey.
+ It also involves the multiplicative inverse and the additive inverse functions.
+
+
+ support class for constructing intergrated encryption ciphers
+ for doing basic message exchanges on top of key agreement ciphers
+
+
+ set up for use with stream mode, where the key derivation function
+ is used to provide a stream of bytes to xor with the message.
+
+ @param agree the key agreement used as the basis for the encryption
+ @param kdf the key derivation function used for byte generation
+ @param mac the message authentication code generator for the message
+
+
+ set up for use in conjunction with a block cipher to handle the
+ message.
+
+ @param agree the key agreement used as the basis for the encryption
+ @param kdf the key derivation function used for byte generation
+ @param mac the message authentication code generator for the message
+ @param cipher the cipher to used for encrypting the message
+
+
+ Initialise the encryptor.
+
+ @param forEncryption whether or not this is encryption/decryption.
+ @param privParam our private key parameters
+ @param pubParam the recipient's/sender's public key parameters
+ @param param encoding and derivation parameters.
+
+
+ NaccacheStern Engine. For details on this cipher, please see
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Initializes this algorithm. Must be called before all other Functions.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#init(bool,
+ org.bouncycastle.crypto.CipherParameters)
+
+
+ Returns the input block size of this algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#GetInputBlockSize()
+
+
+ Returns the output block size of this algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#GetOutputBlockSize()
+
+
+ Process a single Block using the Naccache-Stern algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#ProcessBlock(byte[],
+ int, int)
+
+
+ Encrypts a BigInteger aka Plaintext with the public key.
+
+ @param plain
+ The BigInteger to encrypt
+ @return The byte[] representation of the encrypted BigInteger (i.e.
+ crypted.toByteArray())
+
+
+ Adds the contents of two encrypted blocks mod sigma
+
+ @param block1
+ the first encrypted block
+ @param block2
+ the second encrypted block
+ @return encrypt((block1 + block2) mod sigma)
+ @throws InvalidCipherTextException
+
+
+ Convenience Method for data exchange with the cipher.
+
+ Determines blocksize and splits data to blocksize.
+
+ @param data the data to be processed
+ @return the data after it went through the NaccacheSternEngine.
+ @throws InvalidCipherTextException
+
+
+ Computes the integer x that is expressed through the given primes and the
+ congruences with the chinese remainder theorem (CRT).
+
+ @param congruences
+ the congruences c_i
+ @param primes
+ the primes p_i
+ @return an integer x for that x % p_i == c_i
+
+
+ A Noekeon engine, using direct-key mode.
+
+
+ Create an instance of the Noekeon encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ The no-op engine that just copies bytes through, irrespective of whether encrypting and decrypting.
+ Provided for the sake of completeness.
+
+
+ an implementation of RC2 as described in RFC 2268
+ "A Description of the RC2(r) Encryption Algorithm" R. Rivest.
+
+
+ initialise a RC2 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the result rotating the 16 bit number in x left by y
+
+
+ Wrap keys according to RFC 3217 - RC2 mechanism
+
+
+ Field engine
+
+
+ Field param
+
+
+ Field paramPlusIV
+
+
+ Field iv
+
+
+ Field forWrapping
+
+
+ Field IV2
+
+
+ Method init
+
+ @param forWrapping
+ @param param
+
+
+ Method GetAlgorithmName
+
+ @return
+
+
+ Method wrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+
+
+ Method unwrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+ @throws InvalidCipherTextException
+
+
+ Some key wrap algorithms make use of the Key Checksum defined
+ in CMS [CMS-Algorithms]. This is used to provide an integrity
+ check value for the key being wrapped. The algorithm is
+
+ - Compute the 20 octet SHA-1 hash on the key being wrapped.
+ - Use the first 8 octets of this hash as the checksum value.
+
+ @param key
+ @return
+ @throws Exception
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ @param key
+ @param checksum
+ @return
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ initialise a RC4 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ The specification for RC5 came from the RC5 Encryption Algorithm
+ publication in RSA CryptoBytes, Spring of 1995.
+ http://www.rsasecurity.com/rsalabs/cryptobytes .
+
+ This implementation has a word size of 32 bits.
+
+
+ Create an instance of the RC5 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-32 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Encrypt the given block starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param in in byte buffer containing data to encrypt
+ @param inOff offset into src buffer
+ @param out out buffer where encrypted data is written
+ @param outOff offset into out buffer
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(32) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % 32
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(32) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % 32
+
+
+ The specification for RC5 came from the RC5 Encryption Algorithm
+ publication in RSA CryptoBytes, Spring of 1995.
+ http://www.rsasecurity.com/rsalabs/cryptobytes .
+
+ This implementation is set to work with a 64 bit word size.
+
+
+ Create an instance of the RC5 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-64 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Encrypt the given block starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param in in byte buffer containing data to encrypt
+ @param inOff offset into src buffer
+ @param out out buffer where encrypted data is written
+ @param outOff offset into out buffer
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ An RC6 engine.
+
+
+ Create an instance of the RC6 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-32 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param inKey the key to be used
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ an implementation of the RFC 3211 Key Wrap
+ Specification.
+
+
+
+ An implementation of the AES Key Wrapper from the NIST Key Wrap
+ Specification as described in RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc3394.txt
+ and http://csrc.nist.gov/encryption/kms/key-wrap.pdf .
+
+
+
+ this does your basic RSA algorithm with blinding
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic RSA algorithm.
+
+ @param inBuf the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @exception DataLengthException the input block is too large.
+
+
+ This does your basic RSA Chaum's blinding and unblinding as outlined in
+ "Handbook of Applied Cryptography", page 475. You need to use this if you are
+ trying to get another party to generate signatures without them being aware
+ of the message they are signing.
+
+
+ Initialise the blinding engine.
+
+ @param forEncryption true if we are encrypting (blinding), false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the RSA blinding algorithm.
+
+ @param in the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @throws DataLengthException the input block is too large.
+
+
+ this does your basic RSA algorithm.
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ an implementation of Rijndael, based on the documentation and reference implementation
+ by Paulo Barreto, Vincent Rijmen, for v2.0 August '99.
+
+ Note: this implementation is based on information prior to readonly NIST publication.
+
+
+
+ multiply two elements of GF(2^m)
+ needed for MixColumn and InvMixColumn
+
+
+ xor corresponding text input and round key input bytes
+
+
+ Row 0 remains unchanged
+ The other three rows are shifted a variable amount
+
+
+ Replace every byte of the input by the byte at that place
+ in the nonlinear S-box
+
+
+ Mix the bytes of every column in a linear way
+
+
+ Mix the bytes of every column in a linear way
+ This is the opposite operation of Mixcolumn
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on keyBits and blockBits
+
+
+ default constructor - 128 bit block size.
+
+
+ basic constructor - set the cipher up for a given blocksize
+
+ @param blocksize the blocksize in bits, must be 128, 192, or 256.
+
+
+ initialise a Rijndael cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ this does your basic RSA algorithm.
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic RSA algorithm.
+
+ @param inBuf the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @exception DataLengthException the input block is too large.
+
+
+ Implementation of the SEED algorithm as described in RFC 4009
+
+
+
+ An implementation of the SEED key wrapper based on RFC 4010/RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc4010.txt .
+
+
+
+
+ Implementation of Daniel J. Bernstein's Salsa20 stream cipher, Snuffle 2005
+
+
+
+ Constants
+
+
+
+ Creates a 20 round Salsa20 engine.
+
+
+
+
+ Creates a Salsa20 engine with a specific number of rounds.
+
+ the number of rounds (must be an even number).
+
+
+ Rotate left
+
+ @param x value to rotate
+ @param y amount to rotate x
+
+ @return rotated x
+
+
+ * Serpent is a 128-bit 32-round block cipher with variable key lengths,
+ * including 128, 192 and 256 bit keys conjectured to be at least as
+ * secure as three-key triple-DES.
+ *
+ * Serpent was designed by Ross Anderson, Eli Biham and Lars Knudsen as a
+ * candidate algorithm for the NIST AES Quest.
+ *
+ *
+ * For full details see The Serpent home page
+ *
+
+
+ Expand a user-supplied key material into a session key.
+
+ @param key The user-key bytes (multiples of 4) to use.
+ @exception ArgumentException
+
+
+ Encrypt one block of plaintext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ Decrypt one block of ciphertext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ a class that provides a basic SKIPJACK engine.
+
+
+ initialise a SKIPJACK cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ The G permutation
+
+
+ the inverse of the G permutation.
+
+
+ An TEA engine.
+
+
+ Create an instance of the TEA encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+
+ Implementation of the Threefish tweakable large block cipher in 256, 512 and 1024 bit block
+ sizes.
+
+
+ This is the 1.3 version of Threefish defined in the Skein hash function submission to the NIST
+ SHA-3 competition in October 2010.
+
+ Threefish was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+ This implementation inlines all round functions, unrolls 8 rounds, and uses 1.2k of static tables
+ to speed up key schedule injection.
+ 2 x block size state is retained by each cipher instance.
+
+
+
+
+ 256 bit block size - Threefish-256
+
+
+
+
+ 512 bit block size - Threefish-512
+
+
+
+
+ 1024 bit block size - Threefish-1024
+
+
+
+ Size of the tweak in bytes (always 128 bit/16 bytes)
+
+
+ Rounds in Threefish-256
+
+
+ Rounds in Threefish-512
+
+
+ Rounds in Threefish-1024
+
+
+ Max rounds of any of the variants
+
+
+ Key schedule parity constant
+
+
+ Block size in bytes
+
+
+ Block size in 64 bit words
+
+
+ Buffer for byte oriented processBytes to call internal word API
+
+
+ Tweak bytes (2 byte t1,t2, calculated t3 and repeat of t1,t2 for modulo free lookup
+
+
+ Key schedule words
+
+
+ The internal cipher implementation (varies by blocksize)
+
+
+
+ Constructs a new Threefish cipher, with a specified block size.
+
+ the block size in bits, one of , ,
+ .
+
+
+
+ Initialise the engine.
+
+ Initialise for encryption if true, for decryption if false.
+ an instance of or (to
+ use a 0 tweak)
+
+
+
+ Initialise the engine, specifying the key and tweak directly.
+
+ the cipher mode.
+ the words of the key, or null to use the current key.
+ the 2 word (128 bit) tweak, or null to use the current tweak.
+
+
+
+ Process a block of data represented as 64 bit words.
+
+ the number of 8 byte words processed (which will be the same as the block size).
+ a block sized buffer of words to process.
+ a block sized buffer of words to receive the output of the operation.
+ if either the input or output is not block sized
+ if this engine is not initialised
+
+
+
+ Read a single 64 bit word from input in LSB first order.
+
+
+
+
+ Write a 64 bit word to output in LSB first order.
+
+
+
+ Rotate left + xor part of the mix operation.
+
+
+ Rotate xor + rotate right part of the unmix operation.
+
+
+ The extended + repeated tweak words
+
+
+ The extended + repeated key words
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ A class that provides Twofish encryption operations.
+
+ This Java implementation is based on the Java reference
+ implementation provided by Bruce Schneier and developed
+ by Raif S. Naffah.
+
+
+ Define the fixed p0/p1 permutations used in keyed S-box lookup.
+ By changing the following constant definitions, the S-boxes will
+ automatically Get changed in the Twofish engine.
+
+
+ gSubKeys[] and gSBox[] are eventually used in the
+ encryption and decryption methods.
+
+
+ initialise a Twofish cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+ encryptBlock uses the pre-calculated gSBox[] and subKey[]
+ arrays.
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Use (12, 8) Reed-Solomon code over GF(256) to produce
+ a key S-box 32-bit entity from 2 key material 32-bit
+ entities.
+
+ @param k0 first 32-bit entity
+ @param k1 second 32-bit entity
+ @return Remainder polynomial Generated using RS code
+
+
+ * Reed-Solomon code parameters: (12,8) reversible code:
+ *
+ *
+ * G(x) = x^4 + (a+1/a)x^3 + ax^2 + (a+1/a)x + 1
+ *
+ * where a = primitive root of field generator 0x14D
+ *
+
+
+ initialise a VMPC cipher.
+
+ @param forEncryption
+ whether or not we are for encryption.
+ @param params
+ the parameters required to set up the cipher.
+ @exception ArgumentException
+ if the params argument is inappropriate.
+
+
+
+ Implementation of Daniel J. Bernstein's XSalsa20 stream cipher - Salsa20 with an extended nonce.
+
+
+ XSalsa20 requires a 256 bit key, and a 192 bit nonce.
+
+
+
+
+ XSalsa20 key generation: process 256 bit input key and 128 bits of the input nonce
+ using a core Salsa20 function without input addition to produce 256 bit working key
+ and use that with the remaining 64 bits of nonce to initialize a standard Salsa20 engine state.
+
+
+
+ An XTEA engine.
+
+
+ Create an instance of the TEA encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Base interface for a public/private key block cipher.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The maximum size, in bytes, an input block may be.
+
+
+ The maximum size, in bytes, an output block will be.
+
+
+ Process a block.
+ The input buffer.
+ The offset into inBuf that the input block begins.
+ The length of the input block.
+ Input decrypts improperly.
+ Input is too large for the cipher.
+
+
+ interface that a public/private key pair generator should conform to.
+
+
+ intialise the key pair generator.
+
+ @param the parameters the key pair is to be initialised with.
+
+
+ return an AsymmetricCipherKeyPair containing the Generated keys.
+
+ @return an AsymmetricCipherKeyPair containing the Generated keys.
+
+
+ The basic interface that basic Diffie-Hellman implementations
+ conforms to.
+
+
+ initialise the agreement engine.
+
+
+ return the field size for the agreement algorithm in bytes.
+
+
+ given a public key from a given party calculate the next
+ message in the agreement sequence.
+
+
+ Base interface for a symmetric key block cipher.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The block size for this cipher, in bytes.
+
+
+ Indicates whether this cipher can handle partial blocks.
+
+
+ Process a block.
+ The input buffer.
+ The offset into inBuf that the input block begins.
+ The output buffer.
+ The offset into outBuf to write the output block.
+ If input block is wrong size, or outBuf too small.
+ The number of bytes processed and produced.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+
+ Operators that reduce their input to a single block return an object
+ of this type.
+
+
+
+
+ Return the final result of the operation.
+
+ A block of bytes, representing the result of an operation.
+
+
+
+ Store the final result of the operation by copying it into the destination array.
+
+ The number of bytes copied into destination.
+ The byte array to copy the result into.
+ The offset into destination to start copying the result at.
+
+
+ Block cipher engines are expected to conform to this interface.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ If true the cipher is initialised for encryption,
+ if false for decryption.
+ The key and other data required by the cipher.
+
+
+
+ Reset the cipher. After resetting the cipher is in the same state
+ as it was after the last init (if there was one).
+
+
+
+ all parameter classes implement this.
+
+
+ interface for classes implementing the Digital Signature Algorithm
+
+
+ initialise the signer for signature generation or signature
+ verification.
+
+ @param forSigning true if we are generating a signature, false
+ otherwise.
+ @param param key parameters for signature generation.
+
+
+ sign the passed in message (usually the output of a hash function).
+
+ @param message the message to be signed.
+ @return two big integers representing the r and s values respectively.
+
+
+ verify the message message against the signature values r and s.
+
+ @param message the message that was supposed to have been signed.
+ @param r the r signature value.
+ @param s the s signature value.
+
+
+ base interface for general purpose byte derivation functions.
+
+
+ return the message digest used as the basis for the function
+
+
+ Parameters for key/byte stream derivation classes
+
+
+ interface that a message digest conforms to.
+
+
+ return the algorithm name
+
+ @return the algorithm name
+
+
+ return the size, in bytes, of the digest produced by this message digest.
+
+ @return the size, in bytes, of the digest produced by this message digest.
+
+
+ return the size, in bytes, of the internal buffer used by this digest.
+
+ @return the size, in bytes, of the internal buffer used by this digest.
+
+
+ update the message digest with a single byte.
+
+ @param inByte the input byte to be entered.
+
+
+ update the message digest with a block of bytes.
+
+ @param input the byte array containing the data.
+ @param inOff the offset into the byte array where the data starts.
+ @param len the length of the data.
+
+
+ Close the digest, producing the final digest value. The doFinal
+ call leaves the digest reset.
+
+ @param output the array the digest is to be copied into.
+ @param outOff the offset into the out array the digest is to start at.
+
+
+ reset the digest back to it's initial state.
+
+
+
+ Base interface describing an entropy source for a DRBG.
+
+
+
+
+ Return whether or not this entropy source is regarded as prediction resistant.
+
+ true if this instance is prediction resistant; otherwise, false .
+
+
+
+ Return a byte array of entropy.
+
+ The entropy bytes.
+
+
+
+ Return the number of bits of entropy this source can produce.
+
+ The size, in bits, of the return value of getEntropy.
+
+
+
+ Base interface describing a provider of entropy sources.
+
+
+
+
+ Return an entropy source providing a block of entropy.
+
+ The size of the block of entropy required.
+ An entropy source providing bitsRequired blocks of entropy.
+
+
+ The base interface for implementations of message authentication codes (MACs).
+
+
+ Initialise the MAC.
+
+ @param param the key and other data required by the MAC.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Return the name of the algorithm the MAC implements.
+
+ @return the name of the algorithm the MAC implements.
+
+
+ Return the block size for this MAC (in bytes).
+
+ @return the block size for this MAC in bytes.
+
+
+ add a single byte to the mac for processing.
+
+ @param in the byte to be processed.
+ @exception InvalidOperationException if the MAC is not initialised.
+
+
+ @param in the array containing the input.
+ @param inOff the index in the array the data begins at.
+ @param len the length of the input starting at inOff.
+ @exception InvalidOperationException if the MAC is not initialised.
+ @exception DataLengthException if there isn't enough data in in.
+
+
+ Compute the final stage of the MAC writing the output to the out
+ parameter.
+
+ doFinal leaves the MAC in the same state it was after the last init.
+
+ @param out the array the MAC is to be output to.
+ @param outOff the offset into the out buffer the output is to start at.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the MAC is not initialised.
+
+
+ Reset the MAC. At the end of resetting the MAC should be in the
+ in the same state it was after the last init (if there was one).
+
+
+
+ Base interface for operators that serve as stream-based signature calculators.
+
+
+
+ The algorithm details object for this calculator.
+
+
+
+ Create a stream calculator for this signature calculator. The stream
+ calculator is used for the actual operation of entering the data to be signed
+ and producing the signature block.
+
+ A calculator producing an IBlockResult with a signature in it.
+
+
+
+ Base interface for cryptographic operations such as Hashes, MACs, and Signatures which reduce a stream of data
+ to a single value.
+
+
+
+ Return a "sink" stream which only exists to update the implementing object.
+ A stream to write to in order to update the implementing object.
+
+
+
+ Return the result of processing the stream. This value is only available once the stream
+ has been closed.
+
+ The result of processing the stream.
+
+
+ Return the name of the algorithm the signer implements.
+
+ @return the name of the algorithm the signer implements.
+
+
+ Initialise the signer for signing or verification.
+
+ @param forSigning true if for signing, false otherwise
+ @param param necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+ reset the internal state
+
+
+ Signer with message recovery.
+
+
+ Returns true if the signer has recovered the full message as
+ part of signature verification.
+
+ @return true if full message recovered.
+
+
+ Returns a reference to what message was recovered (if any).
+
+ @return full/partial message, null if nothing.
+
+
+ Perform an update with the recovered message before adding any other data. This must
+ be the first update method called, and calling it will result in the signer assuming
+ that further calls to update will include message content past what is recoverable.
+
+ @param signature the signature that we are in the process of verifying.
+ @throws IllegalStateException
+
+
+ The interface stream ciphers conform to.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ If true the cipher is initialised for encryption,
+ if false for decryption.
+ The key and other data required by the cipher.
+
+ If the parameters argument is inappropriate.
+
+
+
+ encrypt/decrypt a single byte returning the result.
+ the byte to be processed.
+ the result of processing the input byte.
+
+
+
+ Process a block of bytes from input putting the result into output .
+
+ The input byte array.
+
+ The offset into input where the data to be processed starts.
+
+ The number of bytes to be processed.
+ The output buffer the processed bytes go into.
+
+ The offset into output the processed data starts at.
+
+ If the output buffer is too small.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+
+ Operators that reduce their input to the validation of a signature produce this type.
+
+
+
+
+ Return true if the passed in data matches what is expected by the verification result.
+
+ The bytes representing the signature.
+ true if the signature verifies, false otherwise.
+
+
+
+ Return true if the length bytes from off in the source array match the signature
+ expected by the verification result.
+
+ Byte array containing the signature.
+ The offset into the source array where the signature starts.
+ The number of bytes in source making up the signature.
+ true if the signature verifies, false otherwise.
+
+
+
+ Base interface for operators that serve as stream-based signature verifiers.
+
+
+
+ The algorithm details object for this verifier.
+
+
+
+ Create a stream calculator for this verifier. The stream
+ calculator is used for the actual operation of entering the data to be verified
+ and producing a result which can be used to verify the original signature.
+
+ A calculator producing an IVerifier which can verify the signature.
+
+
+
+ Base interface for a provider to support the dynamic creation of signature verifiers.
+
+
+
+
+ Return a signature verfier for signature algorithm described in the passed in algorithm details object.
+
+ The details of the signature algorithm verification is required for.
+ A new signature verifier.
+
+
+ The name of the algorithm this cipher implements.
+
+
+
+ With FIPS PUB 202 a new kind of message digest was announced which supported extendable output, or variable digest sizes.
+ This interface provides the extra method required to support variable output on a digest implementation.
+
+
+
+ Output the results of the final calculation for this digest to outLen number of bytes.
+
+ @param out output array to write the output bytes to.
+ @param outOff offset to start writing the bytes at.
+ @param outLen the number of output bytes requested.
+ @return the number of bytes written
+
+
+ this exception is thrown whenever we find something we don't expect in a
+ message.
+
+
+ base constructor.
+
+
+ create a InvalidCipherTextException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+ The base class for parameters to key generators.
+
+
+ initialise the generator with a source of randomness
+ and a strength (in bits).
+
+ @param random the random byte source.
+ @param strength the size, in bits, of the keys we want to produce.
+
+
+ return the random source associated with this
+ generator.
+
+ @return the generators random source.
+
+
+ return the bit strength for keys produced by this generator,
+
+ @return the strength of the keys this generator produces (in bits).
+
+
+
+ This exception is thrown whenever a cipher requires a change of key, iv
+ or similar after x amount of bytes enciphered
+
+
+
+ super class for all Password Based Encyrption (Pbe) parameter generator classes.
+
+
+ base constructor.
+
+
+ initialise the Pbe generator.
+
+ @param password the password converted into bytes (see below).
+ @param salt the salt to be mixed with the password.
+ @param iterationCount the number of iterations the "mixing" function
+ is to be applied for.
+
+
+ return the password byte array.
+
+ @return the password byte array.
+
+
+ return the salt byte array.
+
+ @return the salt byte array.
+
+
+ return the iteration count.
+
+ @return the iteration count.
+
+
+ Generate derived parameters for a key of length keySize.
+
+ @param keySize the length, in bits, of the key required.
+ @return a parameters object representing a key.
+
+
+ Generate derived parameters for a key of length keySize, and
+ an initialisation vector (IV) of length ivSize.
+
+ @param keySize the length, in bits, of the key required.
+ @param ivSize the length, in bits, of the iv required.
+ @return a parameters object representing a key and an IV.
+
+
+ Generate derived parameters for a key of length keySize, specifically
+ for use with a MAC.
+
+ @param keySize the length, in bits, of the key required.
+ @return a parameters object representing a key.
+
+
+ converts a password to a byte array according to the scheme in
+ Pkcs5 (ascii, no padding)
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ converts a password to a byte array according to the scheme in
+ PKCS5 (UTF-8, no padding)
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ converts a password to a byte array according to the scheme in
+ Pkcs12 (unicode, big endian, 2 zero pad bytes at the end).
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ An EntropySourceProvider where entropy generation is based on a SecureRandom output using SecureRandom.generateSeed().
+
+
+ Create a entropy source provider based on the passed in SecureRandom.
+
+ @param secureRandom the SecureRandom to base EntropySource construction on.
+ @param isPredictionResistant boolean indicating if the SecureRandom is based on prediction resistant entropy or not (true if it is).
+
+
+ Return an entropy source that will create bitsRequired bits of entropy on
+ each invocation of getEntropy().
+
+ @param bitsRequired size (in bits) of entropy to be created by the provided source.
+ @return an EntropySource that generates bitsRequired bits of entropy on each call to its getEntropy() method.
+
+
+ A SP800-90A CTR DRBG.
+
+
+ Construct a SP800-90A CTR DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param engine underlying block cipher to use to support DRBG
+ @param keySizeInBits size of the key to use with the block cipher.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each internal round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Pad out a key for TDEA, setting odd parity for each byte.
+
+ @param keyMaster
+ @param keyOff
+ @param tmp
+ @param tmpOff
+
+
+ Used by both Dual EC and Hash.
+
+
+ A SP800-90A Hash DRBG.
+
+
+ Construct a SP800-90A Hash DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param digest source digest to use for DRB stream.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each internal round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ A SP800-90A HMAC DRBG.
+
+
+ Construct a SP800-90A Hash DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param hMac Hash MAC to base the DRBG on.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Interface to SP800-90A deterministic random bit generators.
+
+
+ Return the block size of the DRBG.
+
+ @return the block size (in bits) produced by each round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Generate numBytes worth of entropy from the passed in entropy source.
+
+ @param entropySource the entropy source to request the data from.
+ @param numBytes the number of bytes of entropy requested.
+ @return a byte array populated with the random data.
+
+
+ Builder class for making SecureRandom objects based on SP 800-90A Deterministic Random Bit Generators (DRBG).
+
+
+ Basic constructor, creates a builder using an EntropySourceProvider based on the default SecureRandom with
+ predictionResistant set to false.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the default SecureRandom does for its generateSeed() call.
+
+
+
+ Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value
+ for prediction resistance.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the passed in SecureRandom does for its generateSeed() call.
+
+ @param entropySource
+ @param predictionResistant
+
+
+ Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.
+
+ Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored.
+
+ @param entropySourceProvider a provider of EntropySource objects.
+
+
+ Set the personalization string for DRBG SecureRandoms created by this builder
+ @param personalizationString the personalisation string for the underlying DRBG.
+ @return the current builder.
+
+
+ Set the security strength required for DRBGs used in building SecureRandom objects.
+
+ @param securityStrength the security strength (in bits)
+ @return the current builder.
+
+
+ Set the amount of entropy bits required for seeding and reseeding DRBGs used in building SecureRandom objects.
+
+ @param entropyBitsRequired the number of bits of entropy to be requested from the entropy source on each seed/reseed.
+ @return the current builder.
+
+
+ Build a SecureRandom based on a SP 800-90A Hash DRBG.
+
+ @param digest digest algorithm to use in the DRBG underneath the SecureRandom.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a Hash DRBG.
+
+
+ Build a SecureRandom based on a SP 800-90A CTR DRBG.
+
+ @param cipher the block cipher to base the DRBG on.
+ @param keySizeInBits key size in bits to be used with the block cipher.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a CTR DRBG.
+
+
+ Build a SecureRandom based on a SP 800-90A HMAC DRBG.
+
+ @param hMac HMAC algorithm to use in the DRBG underneath the SecureRandom.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a HMAC DRBG.
+
+
+
+ @param engine
+ @param entropySource
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the RNG.
+
+
+ Basic constructor, creates a builder using an EntropySourceProvider based on the default SecureRandom with
+ predictionResistant set to false.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the default SecureRandom does for its generateSeed() call.
+
+
+
+ Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value
+ for prediction resistance.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the passed in SecureRandom does for its generateSeed() call.
+
+ @param entropySource
+ @param predictionResistant
+
+
+ Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.
+
+ Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored.
+
+ @param entropySourceProvider a provider of EntropySource objects.
+
+
+ Construct a X9.31 secure random generator using the passed in engine and key. If predictionResistant is true the
+ generator will be reseeded on each request.
+
+ @param engine a block cipher to use as the operator.
+ @param key the block cipher key to initialise engine with.
+ @param predictionResistant true if engine to be reseeded on each use, false otherwise.
+ @return a SecureRandom.
+
+
+
+ Uses Microsoft's RNGCryptoServiceProvider
+
+
+
+ Random generation based on the digest with counter. Calling AddSeedMaterial will
+ always increase the entropy of the hash.
+
+ Internal access to the digest is synchronized so a single one of these can be shared.
+
+
+
+ Generic interface for objects generating random bytes.
+
+
+ Add more seed material to the generator.
+ A byte array to be mixed into the generator's state.
+
+
+ Add more seed material to the generator.
+ A long value to be mixed into the generator's state.
+
+
+ Fill byte array with random values.
+ Array to be filled.
+
+
+ Fill byte array with random values.
+ Array to receive bytes.
+ Index to start filling at.
+ Length of segment to fill.
+
+
+
+ Takes bytes generated by an underling RandomGenerator and reverses the order in
+ each small window (of configurable size).
+
+ Access to internals is synchronized so a single one of these can be shared.
+
+
+
+
+ Add more seed material to the generator.
+ A byte array to be mixed into the generator's state.
+
+
+ Add more seed material to the generator.
+ A long value to be mixed into the generator's state.
+
+
+ Fill byte array with random values.
+ Array to be filled.
+
+
+ Fill byte array with random values.
+ Array to receive bytes.
+ Index to start filling at.
+ Length of segment to fill.
+
+
+ A thread based seed generator - one source of randomness.
+
+ Based on an idea from Marcus Lippert.
+
+
+
+ Generate seed bytes. Set fast to false for best quality.
+
+ If fast is set to true, the code should be round about 8 times faster when
+ generating a long sequence of random bytes. 20 bytes of random values using
+ the fast mode take less than half a second on a Nokia e70. If fast is set to false,
+ it takes round about 2500 ms.
+
+ @param numBytes the number of bytes to generate
+ @param fast true if fast mode should be used
+
+
+
+ Permutation generated by code:
+
+ // First 1850 fractional digit of Pi number.
+ byte[] key = new BigInteger("14159265358979323846...5068006422512520511").ToByteArray();
+ s = 0;
+ P = new byte[256];
+ for (int i = 0; i < 256; i++)
+ {
+ P[i] = (byte) i;
+ }
+ for (int m = 0; m < 768; m++)
+ {
+ s = P[(s + P[m & 0xff] + key[m % key.length]) & 0xff];
+ byte temp = P[m & 0xff];
+ P[m & 0xff] = P[s & 0xff];
+ P[s & 0xff] = temp;
+ }
+
+
+
+ Value generated in the same way as P .
+
+
+ a wrapper for block ciphers with a single byte block size, so that they
+ can be treated like stream ciphers.
+
+
+ basic constructor.
+
+ @param cipher the block cipher to be wrapped.
+ @exception ArgumentException if the cipher has a block size other than
+ one.
+
+
+ initialise the underlying cipher.
+
+ @param forEncryption true if we are setting up for encryption, false otherwise.
+ @param param the necessary parameters for the underlying cipher to be initialised.
+
+
+ return the name of the algorithm we are wrapping.
+
+ @return the name of the algorithm we are wrapping.
+
+
+ encrypt/decrypt a single byte returning the result.
+
+ @param in the byte to be processed.
+ @return the result of processing the input byte.
+
+
+ process a block of bytes from in putting the result into out.
+
+ @param in the input byte array.
+ @param inOff the offset into the in array where the data to be processed starts.
+ @param len the number of bytes to be processed.
+ @param out the output buffer the processed bytes go into.
+ @param outOff the offset into the output byte array the processed data stars at.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ reset the underlying cipher. This leaves it in the same state
+ it was at after the last init (if there was one).
+
+
+ a Diffie-Hellman key exchange engine.
+
+ note: This uses MTI/A0 key agreement in order to make the key agreement
+ secure against passive attacks. If you're doing Diffie-Hellman and both
+ parties have long term public keys you should look at using this. For
+ further information have a look at RFC 2631.
+
+ It's possible to extend this to more than two parties as well, for the moment
+ that is left as an exercise for the reader.
+
+
+ calculate our initial message.
+
+
+ given a message from a given party and the corresponding public key
+ calculate the next message in the agreement sequence. In this case
+ this will represent the shared secret.
+
+
+ a Diffie-Hellman key agreement class.
+
+ note: This is only the basic algorithm, it doesn't take advantage of
+ long term public keys if they are available. See the DHAgreement class
+ for a "better" implementation.
+
+
+ given a short term public key from a given party calculate the next
+ message in the agreement sequence.
+
+
+ Standard Diffie-Hellman groups from various IETF specifications.
+
+
+ P1363 7.2.1 ECSVDP-DH
+
+ ECSVDP-DH is Elliptic Curve Secret Value Derivation Primitive,
+ Diffie-Hellman version. It is based on the work of [DH76], [Mil86],
+ and [Kob87]. This primitive derives a shared secret value from one
+ party's private key and another party's public key, where both have
+ the same set of EC domain parameters. If two parties correctly
+ execute this primitive, they will produce the same output. This
+ primitive can be invoked by a scheme to derive a shared secret key;
+ specifically, it may be used with the schemes ECKAS-DH1 and
+ DL/ECKAS-DH2. It assumes that the input keys are valid (see also
+ Section 7.2.2).
+
+
+ P1363 7.2.2 ECSVDP-DHC
+
+ ECSVDP-DHC is Elliptic Curve Secret Value Derivation Primitive,
+ Diffie-Hellman version with cofactor multiplication. It is based on
+ the work of [DH76], [Mil86], [Kob87], [LMQ98] and [Kal98a]. This
+ primitive derives a shared secret value from one party's private key
+ and another party's public key, where both have the same set of EC
+ domain parameters. If two parties correctly execute this primitive,
+ they will produce the same output. This primitive can be invoked by a
+ scheme to derive a shared secret key; specifically, it may be used
+ with the schemes ECKAS-DH1 and DL/ECKAS-DH2. It does not assume the
+ validity of the input public key (see also Section 7.2.1).
+
+ Note: As stated P1363 compatibility mode with ECDH can be preset, and
+ in this case the implementation doesn't have a ECDH compatibility mode
+ (if you want that just use ECDHBasicAgreement and note they both implement
+ BasicAgreement!).
+
+
+
+ A participant in a Password Authenticated Key Exchange by Juggling (J-PAKE) exchange.
+
+ The J-PAKE exchange is defined by Feng Hao and Peter Ryan in the paper
+
+ "Password Authenticated Key Exchange by Juggling, 2008."
+
+ The J-PAKE protocol is symmetric.
+ There is no notion of a client or server , but rather just two participants .
+ An instance of JPakeParticipant represents one participant, and
+ is the primary interface for executing the exchange.
+
+ To execute an exchange, construct a JPakeParticipant on each end,
+ and call the following 7 methods
+ (once and only once, in the given order, for each participant, sending messages between them as described):
+
+ CreateRound1PayloadToSend() - and send the payload to the other participant
+ ValidateRound1PayloadReceived(JPakeRound1Payload) - use the payload received from the other participant
+ CreateRound2PayloadToSend() - and send the payload to the other participant
+ ValidateRound2PayloadReceived(JPakeRound2Payload) - use the payload received from the other participant
+ CalculateKeyingMaterial()
+ CreateRound3PayloadToSend(BigInteger) - and send the payload to the other participant
+ ValidateRound3PayloadReceived(JPakeRound3Payload, BigInteger) - use the payload received from the other participant
+
+ Each side should derive a session key from the keying material returned by CalculateKeyingMaterial().
+ The caller is responsible for deriving the session key using a secure key derivation function (KDF).
+
+ Round 3 is an optional key confirmation process.
+ If you do not execute round 3, then there is no assurance that both participants are using the same key.
+ (i.e. if the participants used different passwords, then their session keys will differ.)
+
+ If the round 3 validation succeeds, then the keys are guaranteed to be the same on both sides.
+
+ The symmetric design can easily support the asymmetric cases when one party initiates the communication.
+ e.g. Sometimes the round1 payload and round2 payload may be sent in one pass.
+ Also, in some cases, the key confirmation payload can be sent together with the round2 payload.
+ These are the trivial techniques to optimize the communication.
+
+ The key confirmation process is implemented as specified in
+ NIST SP 800-56A Revision 1 ,
+ Section 8.2 Unilateral Key Confirmation for Key Agreement Schemes.
+
+ This class is stateful and NOT threadsafe.
+ Each instance should only be used for ONE complete J-PAKE exchange
+ (i.e. a new JPakeParticipant should be constructed for each new J-PAKE exchange).
+
+
+
+
+ Convenience constructor for a new JPakeParticipant that uses
+ the JPakePrimeOrderGroups#NIST_3072 prime order group,
+ a SHA-256 digest, and a default SecureRandom implementation.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+
+
+
+ Convenience constructor for a new JPakeParticipant that uses
+ a SHA-256 digest, and a default SecureRandom implementation.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+ Prime order group. See JPakePrimeOrderGroups for standard groups.
+
+
+
+ Constructor for a new JPakeParticipant.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+ Prime order group. See JPakePrimeOrderGroups for standard groups.
+ Digest to use during zero knowledge proofs and key confirmation
+ (SHA-256 or stronger preferred).
+ Source of secure random data for x1 and x2, and for the zero knowledge proofs.
+
+
+
+ Gets the current state of this participant.
+ See the STATE_* constants for possible values.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 1.
+
+ After execution, the State state} will be STATE_ROUND_1_CREATED}.
+
+
+
+
+ Validates the payload received from the other participant during round 1.
+
+ Must be called prior to CreateRound2PayloadToSend().
+
+ After execution, the State state will be STATE_ROUND_1_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws InvalidOperationException
+ if called multiple times.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 2.
+
+ ValidateRound1PayloadReceived(JPakeRound1Payload) must be called prior to this method.
+
+ After execution, the State state will be STATE_ROUND_2_CREATED.
+
+ Throws InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times
+
+
+
+
+ Validates the payload received from the other participant during round 2.
+ Note that this DOES NOT detect a non-common password.
+ The only indication of a non-common password is through derivation
+ of different keys (which can be detected explicitly by executing round 3 and round 4)
+
+ Must be called prior to CalculateKeyingMaterial().
+
+ After execution, the State state will be STATE_ROUND_2_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws
+ InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times
+
+
+
+
+ Calculates and returns the key material.
+ A session key must be derived from this key material using a secure key derivation function (KDF).
+ The KDF used to derive the key is handled externally (i.e. not by JPakeParticipant).
+
+ The keying material will be identical for each participant if and only if
+ each participant's password is the same. i.e. If the participants do not
+ share the same password, then each participant will derive a different key.
+ Therefore, if you immediately start using a key derived from
+ the keying material, then you must handle detection of incorrect keys.
+ If you want to handle this detection explicitly, you can optionally perform
+ rounds 3 and 4. See JPakeParticipant for details on how to execute
+ rounds 3 and 4.
+
+ The keying material will be in the range [0, p-1] .
+
+ ValidateRound2PayloadReceived(JPakeRound2Payload) must be called prior to this method.
+
+ As a side effect, the internal password array is cleared, since it is no longer needed.
+
+ After execution, the State state will be STATE_KEY_CALCULATED.
+
+ Throws InvalidOperationException if called prior to ValidateRound2PayloadReceived(JPakeRound2Payload),
+ or if called multiple times.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 3.
+
+ See JPakeParticipant for more details on round 3.
+
+ After execution, the State state} will be STATE_ROUND_3_CREATED.
+ Throws InvalidOperationException if called prior to CalculateKeyingMaterial, or multiple
+ times.
+
+ The keying material as returned from CalculateKeyingMaterial().
+
+
+
+ Validates the payload received from the other participant during round 3.
+
+ See JPakeParticipant for more details on round 3.
+
+ After execution, the State state will be STATE_ROUND_3_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws InvalidOperationException if called prior to
+ CalculateKeyingMaterial or multiple times
+
+ The round 3 payload received from the other participant.
+ The keying material as returned from CalculateKeyingMaterial().
+
+
+
+ A pre-computed prime order group for use during a J-PAKE exchange.
+
+ Typically a Schnorr group is used. In general, J-PAKE can use any prime order group
+ that is suitable for public key cryptography, including elliptic curve cryptography.
+
+ See JPakePrimeOrderGroups for convenient standard groups.
+
+ NIST publishes
+ many groups that can be used for the desired level of security.
+
+
+
+
+ Constructs a new JPakePrimeOrderGroup.
+
+ In general, you should use one of the pre-approved groups from
+ JPakePrimeOrderGroups, rather than manually constructing one.
+
+ The following basic checks are performed:
+
+ p-1 must be evenly divisible by q
+ g must be in [2, p-1]
+ g^q mod p must equal 1
+ p must be prime (within reasonably certainty)
+ q must be prime (within reasonably certainty)
+
+ The prime checks are performed using BigInteger#isProbablePrime(int),
+ and are therefore subject to the same probability guarantees.
+
+ These checks prevent trivial mistakes.
+ However, due to the small uncertainties if p and q are not prime,
+ advanced attacks are not prevented.
+ Use it at your own risk.
+
+ Throws NullReferenceException if any argument is null. Throws
+ InvalidOperationException is any of the above validations fail.
+
+
+
+
+ Constructor used by the pre-approved groups in JPakePrimeOrderGroups.
+ These pre-approved groups can avoid the expensive checks.
+ User-specified groups should not use this constructor.
+
+
+
+
+ Standard pre-computed prime order groups for use by J-PAKE.
+ (J-PAKE can use pre-computed prime order groups, same as DSA and Diffie-Hellman.)
+
+ This class contains some convenient constants for use as input for
+ constructing {@link JPAKEParticipant}s.
+
+ The prime order groups below are taken from Sun's JDK JavaDoc (docs/guide/security/CryptoSpec.html#AppB),
+ and from the prime order groups
+ published by NIST .
+
+
+
+
+ From Sun's JDK JavaDoc (docs/guide/security/CryptoSpec.html#AppB)
+ 1024-bit p, 160-bit q and 1024-bit g for 80-bit security.
+
+
+
+
+ From NIST.
+ 2048-bit p, 224-bit q and 2048-bit g for 112-bit security.
+
+
+
+
+ From NIST.
+ 3072-bit p, 256-bit q and 3072-bit g for 128-bit security.
+
+
+
+
+ The payload sent/received during the first round of a J-PAKE exchange.
+
+ Each JPAKEParticipant creates and sends an instance of this payload to
+ the other. The payload to send should be created via
+ JPAKEParticipant.CreateRound1PayloadToSend().
+
+ Each participant must also validate the payload received from the other.
+ The received payload should be validated via
+ JPAKEParticipant.ValidateRound1PayloadReceived(JPakeRound1Payload).
+
+
+
+
+ The id of the JPAKEParticipant who created/sent this payload.
+
+
+
+
+ The value of g^x1
+
+
+
+
+ The value of g^x2
+
+
+
+
+ The zero knowledge proof for x1.
+
+ This is a two element array, containing {g^v, r} for x1.
+
+
+
+
+ The zero knowledge proof for x2.
+
+ This is a two element array, containing {g^v, r} for x2.
+
+
+
+
+ The payload sent/received during the second round of a J-PAKE exchange.
+
+ Each JPAKEParticipant creates and sends an instance
+ of this payload to the other JPAKEParticipant.
+ The payload to send should be created via
+ JPAKEParticipant#createRound2PayloadToSend()
+
+ Each JPAKEParticipant must also validate the payload
+ received from the other JPAKEParticipant.
+ The received payload should be validated via
+ JPAKEParticipant#validateRound2PayloadReceived(JPakeRound2Payload)
+
+
+
+
+ The id of the JPAKEParticipant who created/sent this payload.
+
+
+
+
+ The value of A, as computed during round 2.
+
+
+
+
+ The zero knowledge proof for x2 * s.
+
+ This is a two element array, containing {g^v, r} for x2 * s.
+
+
+
+
+ The payload sent/received during the optional third round of a J-PAKE exchange,
+ which is for explicit key confirmation.
+
+ Each JPAKEParticipant creates and sends an instance
+ of this payload to the other JPAKEParticipant.
+ The payload to send should be created via
+ JPAKEParticipant#createRound3PayloadToSend(BigInteger)
+
+ Eeach JPAKEParticipant must also validate the payload
+ received from the other JPAKEParticipant.
+ The received payload should be validated via
+ JPAKEParticipant#validateRound3PayloadReceived(JPakeRound3Payload, BigInteger)
+
+
+
+
+ The id of the {@link JPAKEParticipant} who created/sent this payload.
+
+
+
+
+ The value of MacTag, as computed by round 3.
+
+ See JPAKEUtil#calculateMacTag(string, string, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, org.bouncycastle.crypto.Digest)
+
+
+
+
+ Primitives needed for a J-PAKE exchange.
+
+ The recommended way to perform a J-PAKE exchange is by using
+ two JPAKEParticipants. Internally, those participants
+ call these primitive operations in JPakeUtilities.
+
+ The primitives, however, can be used without a JPAKEParticipant if needed.
+
+
+
+
+ Return a value that can be used as x1 or x3 during round 1.
+ The returned value is a random value in the range [0, q-1].
+
+
+
+
+ Return a value that can be used as x2 or x4 during round 1.
+ The returned value is a random value in the range [1, q-1].
+
+
+
+
+ Converts the given password to a BigInteger
+ for use in arithmetic calculations.
+
+
+
+
+ Calculate g^x mod p as done in round 1.
+
+
+
+
+ Calculate ga as done in round 2.
+
+
+
+
+ Calculate x2 * s as done in round 2.
+
+
+
+
+ Calculate A as done in round 2.
+
+
+
+
+ Calculate a zero knowledge proof of x using Schnorr's signature.
+ The returned array has two elements {g^v, r = v-x*h} for x.
+
+
+
+
+ Validates that g^x4 is not 1.
+ throws CryptoException if g^x4 is 1
+
+
+
+
+ Validates that ga is not 1.
+
+ As described by Feng Hao...
+ Alice could simply check ga != 1 to ensure it is a generator.
+ In fact, as we will explain in Section 3, (x1 + x3 + x4 ) is random over Zq even in the face of active attacks.
+ Hence, the probability for ga = 1 is extremely small - on the order of 2^160 for 160-bit q.
+
+ throws CryptoException if ga is 1
+
+
+
+
+ Validates the zero knowledge proof (generated by
+ calculateZeroKnowledgeProof(BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, string, Digest, SecureRandom)
+ is correct.
+
+ throws CryptoException if the zero knowledge proof is not correct
+
+
+
+
+ Calculates the keying material, which can be done after round 2 has completed.
+ A session key must be derived from this key material using a secure key derivation function (KDF).
+ The KDF used to derive the key is handled externally (i.e. not by JPAKEParticipant).
+
+ KeyingMaterial = (B/g^{x2*x4*s})^x2
+
+
+
+
+ Validates that the given participant ids are not equal.
+ (For the J-PAKE exchange, each participant must use a unique id.)
+
+ Throws CryptoException if the participantId strings are equal.
+
+
+
+
+ Validates that the given participant ids are equal.
+ This is used to ensure that the payloads received from
+ each round all come from the same participant.
+
+
+
+
+ Validates that the given object is not null.
+ throws NullReferenceException if the object is null.
+
+ object in question
+ name of the object (to be used in exception message)
+
+
+
+ Calculates the MacTag (to be used for key confirmation), as defined by
+ NIST SP 800-56A Revision 1 ,
+ Section 8.2 Unilateral Key Confirmation for Key Agreement Schemes.
+
+ MacTag = HMAC(MacKey, MacLen, MacData)
+ MacKey = H(K || "JPAKE_KC")
+ MacData = "KC_1_U" || participantId || partnerParticipantId || gx1 || gx2 || gx3 || gx4
+
+ Note that both participants use "KC_1_U" because the sender of the round 3 message
+ is always the initiator for key confirmation.
+
+ HMAC = {@link HMac} used with the given {@link Digest}
+ H = The given {@link Digest}
+ MacLen = length of MacTag
+
+
+
+
+ Calculates the MacKey (i.e. the key to use when calculating the MagTag for key confirmation).
+
+ MacKey = H(K || "JPAKE_KC")
+
+
+
+
+ Validates the MacTag received from the partner participant.
+
+ throws CryptoException if the participantId strings are equal.
+
+
+
+ RFC 2631 Diffie-hellman KEK derivation function.
+
+
+ X9.63 based key derivation function for ECDH CMS.
+
+
+ Implements the client side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe.
+ This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper
+ "SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002"
+
+
+ Initialises the client to begin new authentication attempt
+ @param N The safe prime associated with the client's verifier
+ @param g The group parameter associated with the client's verifier
+ @param digest The digest algorithm associated with the client's verifier
+ @param random For key generation
+
+
+ Generates client's credentials given the client's salt, identity and password
+ @param salt The salt used in the client's verifier.
+ @param identity The user's identity (eg. username)
+ @param password The user's password
+ @return Client's public value to send to server
+
+
+ Generates client's verification message given the server's credentials
+ @param serverB The server's credentials
+ @return Client's verification message for the server
+ @throws CryptoException If server's credentials are invalid
+
+
+ Computes the client evidence message M1 using the previously received values.
+ To be called after calculating the secret S.
+ @return M1: the client side generated evidence message
+ @throws CryptoException
+
+
+ Authenticates the server evidence message M2 received and saves it only if correct.
+ @param M2: the server side generated evidence message
+ @return A boolean indicating if the server message M2 was the expected one.
+ @throws CryptoException
+
+
+ Computes the final session key as a result of the SRP successful mutual authentication
+ To be called after verifying the server evidence message M2.
+ @return Key: the mutually authenticated symmetric session key
+ @throws CryptoException
+
+
+ Implements the server side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe.
+ This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper
+ "SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002"
+
+
+ Initialises the server to accept a new client authentication attempt
+ @param N The safe prime associated with the client's verifier
+ @param g The group parameter associated with the client's verifier
+ @param v The client's verifier
+ @param digest The digest algorithm associated with the client's verifier
+ @param random For key generation
+
+
+ Generates the server's credentials that are to be sent to the client.
+ @return The server's public value to the client
+
+
+ Processes the client's credentials. If valid the shared secret is generated and returned.
+ @param clientA The client's credentials
+ @return A shared secret BigInteger
+ @throws CryptoException If client's credentials are invalid
+
+
+ Authenticates the received client evidence message M1 and saves it only if correct.
+ To be called after calculating the secret S.
+ @param M1: the client side generated evidence message
+ @return A boolean indicating if the client message M1 was the expected one.
+ @throws CryptoException
+
+
+ Computes the server evidence message M2 using the previously verified values.
+ To be called after successfully verifying the client evidence message M1.
+ @return M2: the server side generated evidence message
+ @throws CryptoException
+
+
+ Computes the final session key as a result of the SRP successful mutual authentication
+ To be called after calculating the server evidence message M2.
+ @return Key: the mutual authenticated symmetric session key
+ @throws CryptoException
+
+
+ Computes the client evidence message (M1) according to the standard routine:
+ M1 = H( A | B | S )
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param A The public client value
+ @param B The public server value
+ @param S The secret calculated by both sides
+ @return M1 The calculated client evidence message
+
+
+ Computes the server evidence message (M2) according to the standard routine:
+ M2 = H( A | M1 | S )
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param A The public client value
+ @param M1 The client evidence message
+ @param S The secret calculated by both sides
+ @return M2 The calculated server evidence message
+
+
+ Computes the final Key according to the standard routine: Key = H(S)
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param S The secret calculated by both sides
+ @return
+
+
+ Generates new SRP verifier for user
+
+
+ Initialises generator to create new verifiers
+ @param N The safe prime to use (see DHParametersGenerator)
+ @param g The group parameter to use (see DHParametersGenerator)
+ @param digest The digest to use. The same digest type will need to be used later for the actual authentication
+ attempt. Also note that the final session key size is dependent on the chosen digest.
+
+
+ Creates a new SRP verifier
+ @param salt The salt to use, generally should be large and random
+ @param identity The user's identifying information (eg. username)
+ @param password The user's password
+ @return A new verifier for use in future SRP authentication
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ ISO 9796-1 padding. Note in the light of recent results you should
+ only use this with RSA (rather than the "simpler" Rabin keys) and you
+ should never use it with anything other than a hash (ie. even if the
+ message is small don't sign the message, sign it's hash) or some "random"
+ value. See your favorite search engine for details.
+
+
+ return the input block size. The largest message we can process
+ is (key_size_in_bits + 3)/16, which in our world comes to
+ key_size_in_bytes / 2.
+
+
+ return the maximum possible size for the output.
+
+
+ set the number of bits in the next message to be treated as
+ pad bits.
+
+
+ retrieve the number of pad bits in the last decoded message.
+
+
+ @exception InvalidCipherTextException if the decrypted block is not a valid ISO 9796 bit string
+
+
+ Optimal Asymmetric Encryption Padding (OAEP) - see PKCS 1 V 2.
+
+
+ @exception InvalidCipherTextException if the decrypted block turns out to
+ be badly formatted.
+
+
+ int to octet string.
+
+
+ mask generator function, as described in PKCS1v2.
+
+
+ this does your basic Pkcs 1 v1.5 padding - whether or not you should be using this
+ depends on your application - see Pkcs1 Version 2 for details.
+
+
+ some providers fail to include the leading zero in PKCS1 encoded blocks. If you need to
+ work with one of these set the system property Org.BouncyCastle.Pkcs1.Strict to false.
+
+
+ The same effect can be achieved by setting the static property directly
+
+ The static property is checked during construction of the encoding object, it is set to
+ true by default.
+
+
+
+ Basic constructor.
+ @param cipher
+
+
+ Constructor for decryption with a fixed plaintext length.
+
+ @param cipher The cipher to use for cryptographic operation.
+ @param pLen Length of the expected plaintext.
+
+
+ Constructor for decryption with a fixed plaintext length and a fallback
+ value that is returned, if the padding is incorrect.
+
+ @param cipher
+ The cipher to use for cryptographic operation.
+ @param fallback
+ The fallback value, we don't to a arraycopy here.
+
+
+ Checks if the argument is a correctly PKCS#1.5 encoded Plaintext
+ for encryption.
+
+ @param encoded The Plaintext.
+ @param pLen Expected length of the plaintext.
+ @return Either 0, if the encoding is correct, or -1, if it is incorrect.
+
+
+ Decode PKCS#1.5 encoding, and return a random value if the padding is not correct.
+
+ @param in The encrypted block.
+ @param inOff Offset in the encrypted block.
+ @param inLen Length of the encrypted block.
+ @param pLen Length of the desired output.
+ @return The plaintext without padding, or a random value if the padding was incorrect.
+
+ @throws InvalidCipherTextException
+
+
+ @exception InvalidCipherTextException if the decrypted block is not in Pkcs1 format.
+
+
+ Basic KDF generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on ISO 18033/P1363a.
+
+
+ Construct a KDF Parameters generator.
+
+ @param counterStart value of counter.
+ @param digest the digest to be used as the source of derived keys.
+
+
+ return the underlying digest.
+
+
+ fill len bytes of the output buffer with bytes generated from
+ the derivation function.
+
+ @throws ArgumentException if the size of the request will cause an overflow.
+ @throws DataLengthException if the out buffer is too small.
+
+
+ a basic Diffie-Hellman key pair generator.
+
+ This generates keys consistent for use with the basic algorithm for
+ Diffie-Hellman.
+
+
+ a Diffie-Hellman key pair generator.
+
+ This generates keys consistent for use in the MTI/A0 key agreement protocol
+ as described in "Handbook of Applied Cryptography", Pages 516-519.
+
+
+ which Generates the p and g values from the given parameters,
+ returning the DHParameters object.
+
+ Note: can take a while...
+
+
+ initialise the key generator - if strength is set to zero
+ the key Generated will be 192 bits in size, otherwise
+ strength can be 128 or 192 (or 112 or 168 if you don't count
+ parity bits), depending on whether you wish to do 2-key or 3-key
+ triple DES.
+
+ @param param the parameters to be used for key generation
+
+
+ initialise the key generator - if strength is set to zero
+ the key generated will be 64 bits in size, otherwise
+ strength can be 64 or 56 bits (if you don't count the parity bits).
+
+ @param param the parameters to be used for key generation
+
+
+ a DSA key pair generator.
+
+ This Generates DSA keys in line with the method described
+ in FIPS 186-3 B.1 FFC Key Pair Generation .
+
+
+ Generate suitable parameters for DSA, in line with FIPS 186-2, or FIPS 186-3.
+
+
+ Initialise the generator
+ This form can only be used for older DSA (pre-DSA2) parameters
+ the size of keys in bits (from 512 up to 1024, and a multiple of 64)
+ measure of robustness of primes (at least 80 for FIPS 186-2 compliance)
+ the source of randomness to use
+
+
+ Initialise the generator for DSA 2
+ You must use this Init method if you need to generate parameters for DSA 2 keys
+ An instance of DsaParameterGenerationParameters used to configure this generator
+
+
+ Generates a set of DsaParameters
+ Can take a while...
+
+
+ generate suitable parameters for DSA, in line with
+ FIPS 186-3 A.1 Generation of the FFC Primes p and q .
+
+
+ Given the domain parameters this routine generates an EC key
+ pair in accordance with X9.62 section 5.2.1 pages 26, 27.
+
+
+ a ElGamal key pair generator.
+
+ This Generates keys consistent for use with ElGamal as described in
+ page 164 of "Handbook of Applied Cryptography".
+
+
+ * which Generates the p and g values from the given parameters,
+ * returning the ElGamalParameters object.
+ *
+ * Note: can take a while...
+ *
+
+
+ a GOST3410 key pair generator.
+ This generates GOST3410 keys in line with the method described
+ in GOST R 34.10-94.
+
+
+ generate suitable parameters for GOST3410.
+
+
+ initialise the key generator.
+
+ @param size size of the key
+ @param typeProcedure type procedure A,B = 1; A',B' - else
+ @param random random byte source.
+
+
+ Procedure C
+ procedure generates the a value from the given p,q,
+ returning the a value.
+
+
+ which generates the p , q and a values from the given parameters,
+ returning the Gost3410Parameters object.
+
+
+ KFD2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on IEEE P1363/ISO 18033.
+
+
+ Construct a KDF1 byte generator.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ KDF2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on IEEE P1363/ISO 18033.
+
+
+ Construct a KDF2 bytes generator. Generates key material
+ according to IEEE P1363 or ISO 18033 depending on the initialisation.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ Generator for MGF1 as defined in Pkcs 1v2
+
+
+ @param digest the digest to be used as the source of Generated bytes
+
+
+ return the underlying digest.
+
+
+ int to octet string.
+
+
+ fill len bytes of the output buffer with bytes Generated from
+ the derivation function.
+
+ @throws DataLengthException if the out buffer is too small.
+
+
+ Key generation parameters for NaccacheStern cipher. For details on this cipher, please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Generates a permuted ArrayList from the original one. The original List
+ is not modified
+
+ @param arr
+ the ArrayList to be permuted
+ @param rand
+ the source of Randomness for permutation
+ @return a new IList with the permuted elements.
+
+
+ Finds the first 'count' primes starting with 3
+
+ @param count
+ the number of primes to find
+ @return a vector containing the found primes as Integer
+
+
+ Generator for PBE derived keys and ivs as usd by OpenSSL.
+
+ The scheme is a simple extension of PKCS 5 V2.0 Scheme 1 using MD5 with an
+ iteration count of 1.
+
+
+
+ Construct a OpenSSL Parameters generator.
+
+
+ Initialise - note the iteration count for this algorithm is fixed at 1.
+
+ @param password password to use.
+ @param salt salt to use.
+
+
+ the derived key function, the ith hash of the password and the salt.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+ @exception ArgumentException if keySize + ivSize is larger than the base hash size.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 12 V1.0.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs12 Page
+
+
+
+ Construct a Pkcs 12 Parameters generator.
+
+ @param digest the digest to be used as the source of derived keys.
+ @exception ArgumentException if an unknown digest is passed in.
+
+
+ add a + b + 1, returning the result in a. The a value is treated
+ as a BigInteger of length (b.Length * 8) bits. The result is
+ modulo 2^b.Length in case of overflow.
+
+
+ generation of a derived key ala Pkcs12 V1.0.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 5 V2.0 Scheme 1.
+ Note this generator is limited to the size of the hash produced by the
+ digest used to drive it.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs5 Page
+
+
+
+ Construct a Pkcs 5 Scheme 1 Parameters generator.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ the derived key function, the ith hash of the mPassword and the mSalt.
+
+
+ Generate a key parameter derived from the mPassword, mSalt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the mPassword, mSalt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+ @exception ArgumentException if keySize + ivSize is larger than the base hash size.
+
+
+ Generate a key parameter for use with a MAC derived from the mPassword,
+ mSalt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 5 V2.0 Scheme 2.
+ This generator uses a SHA-1 HMac as the calculation function.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs5 Page
+
+
+ construct a Pkcs5 Scheme 2 Parameters generator.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+
+ Generates keys for the Poly1305 MAC.
+
+
+ Poly1305 keys are 256 bit keys consisting of a 128 bit secret key used for the underlying block
+ cipher followed by a 128 bit {@code r} value used for the polynomial portion of the Mac.
+ The {@code r} value has a specific format with some bits required to be cleared, resulting in an
+ effective 106 bit key.
+ A separately generated 256 bit key can be modified to fit the Poly1305 key format by using the
+ {@link #clamp(byte[])} method to clear the required bits.
+
+
+
+
+
+ Initialises the key generator.
+
+
+ Poly1305 keys are always 256 bits, so the key length in the provided parameters is ignored.
+
+
+
+
+ Generates a 256 bit key in the format required for Poly1305 - e.g.
+ k[0] ... k[15], r[0] ... r[15] with the required bits in r cleared
+ as per .
+
+
+
+
+ Modifies an existing 32 byte key value to comply with the requirements of the Poly1305 key by
+ clearing required bits in the r (second 16 bytes) portion of the key.
+ Specifically:
+
+ r[3], r[7], r[11], r[15] have top four bits clear (i.e., are {0, 1, . . . , 15})
+ r[4], r[8], r[12] have bottom two bits clear (i.e., are in {0, 4, 8, . . . , 252})
+
+
+ a 32 byte key value k[0] ... k[15], r[0] ... r[15]
+
+
+
+ Checks a 32 byte key for compliance with the Poly1305 key requirements, e.g.
+ k[0] ... k[15], r[0] ... r[15] with the required bits in r cleared
+ as per .
+
+ Key.
+ if the key is of the wrong length, or has invalid bits set
+ in the r portion of the key.
+
+
+ Generate a random factor suitable for use with RSA blind signatures
+ as outlined in Chaum's blinding and unblinding as outlined in
+ "Handbook of Applied Cryptography", page 475.
+
+
+ Initialise the factor generator
+
+ @param param the necessary RSA key parameters.
+
+
+ Generate a suitable blind factor for the public key the generator was initialised with.
+
+ @return a random blind factor
+
+
+ an RSA key pair generator.
+
+
+ Choose a random prime value for use with RSA
+ the bit-length of the returned prime
+ the RSA public exponent
+ a prime p, with (p-1) relatively prime to e
+
+
+ CMAC - as specified at www.nuee.nagoya-u.ac.jp/labs/tiwata/omac/omac.html
+
+ CMAC is analogous to OMAC1 - see also en.wikipedia.org/wiki/CMAC
+
+ CMAC is a NIST recomendation - see
+ csrc.nist.gov/CryptoToolkit/modes/800-38_Series_Publications/SP800-38B.pdf
+
+ CMAC/OMAC1 is a blockcipher-based message authentication code designed and
+ analyzed by Tetsu Iwata and Kaoru Kurosawa.
+
+ CMAC/OMAC1 is a simple variant of the CBC MAC (Cipher Block Chaining Message
+ Authentication Code). OMAC stands for One-Key CBC MAC.
+
+ It supports 128- or 64-bits block ciphers, with any key size, and returns
+ a MAC with dimension less or equal to the block size of the underlying
+ cipher.
+
+
+
+ create a standard MAC based on a CBC block cipher (64 or 128 bit block).
+ This will produce an authentication code the length of the block size
+ of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8 and @lt;= 128.
+
+
+ Reset the mac generator.
+
+
+ standard CBC Block Cipher MAC - if no padding is specified the default of
+ pad of zeroes is used.
+
+
+ create a standard MAC based on a CBC block cipher. This will produce an
+ authentication code half the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a CBC block cipher. This will produce an
+ authentication code half the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used to complete the last block.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding the padding to be used to complete the last block.
+
+
+ Reset the mac generator.
+
+
+ implements a Cipher-FeedBack (CFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ create a standard MAC based on a CFB block cipher. This will produce an
+ authentication code half the length of the block size of the cipher, with
+ the CFB mode set to 8 bits.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a CFB block cipher. This will produce an
+ authentication code half the length of the block size of the cipher, with
+ the CFB mode set to 8 bits.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CFB mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param cfbBitSize the size of an output block produced by the CFB mode.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CFB mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param cfbBitSize the size of an output block produced by the CFB mode.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding a padding to be used.
+
+
+ Reset the mac generator.
+
+
+
+ The GMAC specialisation of Galois/Counter mode (GCM) detailed in NIST Special Publication
+ 800-38D.
+
+
+ GMac is an invocation of the GCM mode where no data is encrypted (i.e. all input data to the Mac
+ is processed as additional authenticated data with the underlying GCM block cipher).
+
+
+
+
+ Creates a GMAC based on the operation of a block cipher in GCM mode.
+
+
+ This will produce an authentication code the length of the block size of the cipher.
+
+ the cipher to be used in GCM mode to generate the MAC.
+
+
+
+ Creates a GMAC based on the operation of a 128 bit block cipher in GCM mode.
+
+
+ This will produce an authentication code the length of the block size of the cipher.
+
+ the cipher to be used in GCM mode to generate the MAC.
+ the mac size to generate, in bits. Must be a multiple of 8, between 32 and 128 (inclusive).
+ Sizes less than 96 are not recommended, but are supported for specialized applications.
+
+
+
+ Initialises the GMAC - requires a
+ providing a and a nonce.
+
+
+
+ implementation of GOST 28147-89 MAC
+
+
+ HMAC implementation based on RFC2104
+
+ H(K XOR opad, H(K XOR ipad, text))
+
+
+ Reset the mac generator.
+
+
+ DES based CBC Block Cipher MAC according to ISO9797, algorithm 3 (ANSI X9.19 Retail MAC)
+
+ This could as well be derived from CBCBlockCipherMac, but then the property mac in the base
+ class must be changed to protected
+
+
+ create a Retail-MAC based on a CBC block cipher. This will produce an
+ authentication code of the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation. This must
+ be DESEngine.
+
+
+ create a Retail-MAC based on a CBC block cipher. This will produce an
+ authentication code of the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used to complete the last block.
+
+
+ create a Retail-MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses single DES CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses single DES CBC mode as the basis for the
+ MAC generation. The final block is decrypted and then encrypted using the
+ middle and right part of the key.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding the padding to be used to complete the last block.
+
+
+ Reset the mac generator.
+
+
+
+ Poly1305 message authentication code, designed by D. J. Bernstein.
+
+
+ Poly1305 computes a 128-bit (16 bytes) authenticator, using a 128 bit nonce and a 256 bit key
+ consisting of a 128 bit key applied to an underlying cipher, and a 128 bit key (with 106
+ effective key bits) used in the authenticator.
+
+ The polynomial calculation in this implementation is adapted from the public domain poly1305-donna-unrolled C implementation
+ by Andrew M (@floodyberry).
+
+
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Current block of buffered input
+
+
+ Current offset in input buffer
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Constructs a Poly1305 MAC, where the key passed to init() will be used directly.
+
+
+ Constructs a Poly1305 MAC, using a 128 bit block cipher.
+
+
+
+ Initialises the Poly1305 MAC.
+
+ a {@link ParametersWithIV} containing a 128 bit nonce and a {@link KeyParameter} with
+ a 256 bit key complying to the {@link Poly1305KeyGenerator Poly1305 key format}.
+
+
+
+ Implementation of SipHash as specified in "SipHash: a fast short-input PRF", by Jean-Philippe
+ Aumasson and Daniel J. Bernstein (https://131002.net/siphash/siphash.pdf).
+
+
+ "SipHash is a family of PRFs SipHash-c-d where the integer parameters c and d are the number of
+ compression rounds and the number of finalization rounds. A compression round is identical to a
+ finalization round and this round function is called SipRound. Given a 128-bit key k and a
+ (possibly empty) byte string m, SipHash-c-d returns a 64-bit value..."
+
+
+
+ SipHash-2-4
+
+
+ SipHash-c-d
+ the number of compression rounds
+ the number of finalization rounds
+
+
+
+ Implementation of the Skein parameterised MAC function in 256, 512 and 1024 bit block sizes,
+ based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+
+ Constructs a Skein MAC with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/MAC size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Optionally initialises the Skein digest with the provided parameters.
+
+ See for details on the parameterisation of the Skein hash function.
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+ implements Cipher-Block-Chaining (CBC) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of chaining.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CBC".
+
+
+ return the block size of the underlying cipher.
+
+ @return the block size of the underlying cipher.
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ Do the appropriate chaining step for CBC mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate chaining step for CBC mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the decrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Implements the Counter with Cipher Block Chaining mode (CCM) detailed in
+ NIST Special Publication 800-38C.
+
+ Note : this mode is a packet mode - it needs all the data up front.
+
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Returns a byte array containing the mac calculated as part of the
+ last encrypt or decrypt operation.
+
+ @return the last mac calculated.
+
+
+ Process a packet of data for either CCM decryption or encryption.
+
+ @param in data for processing.
+ @param inOff offset at which data starts in the input array.
+ @param inLen length of the data in the input array.
+ @return a byte array containing the processed input..
+ @throws IllegalStateException if the cipher is not appropriately set up.
+ @throws InvalidCipherTextException if the input data is truncated or the mac check fails.
+
+
+ Process a packet of data for either CCM decryption or encryption.
+
+ @param in data for processing.
+ @param inOff offset at which data starts in the input array.
+ @param inLen length of the data in the input array.
+ @param output output array.
+ @param outOff offset into output array to start putting processed bytes.
+ @return the number of bytes added to output.
+ @throws IllegalStateException if the cipher is not appropriately set up.
+ @throws InvalidCipherTextException if the input data is truncated or the mac check fails.
+ @throws DataLengthException if output buffer too short.
+
+
+ implements a Cipher-FeedBack (CFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ A Cipher Text Stealing (CTS) mode cipher. CTS allows block ciphers to
+ be used to produce cipher text which is the same outLength as the plain text.
+
+
+ Create a buffered block cipher that uses Cipher Text Stealing
+
+ @param cipher the underlying block cipher this buffering object wraps.
+
+
+ return the size of the output buffer required for an update of 'length' bytes.
+
+ @param length the outLength of the input.
+ @return the space required to accommodate a call to update
+ with length bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of length bytes.
+
+ @param length the outLength of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with length bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param length the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if cipher text decrypts wrongly (in
+ case the exception will never Get thrown).
+
+
+ A Two-Pass Authenticated-Encryption Scheme Optimized for Simplicity and
+ Efficiency - by M. Bellare, P. Rogaway, D. Wagner.
+
+ http://www.cs.ucdavis.edu/~rogaway/papers/eax.pdf
+
+ EAX is an AEAD scheme based on CTR and OMAC1/CMAC, that uses a single block
+ cipher to encrypt and authenticate data. It's on-line (the length of a
+ message isn't needed to begin processing it), has good performances, it's
+ simple and provably secure (provided the underlying block cipher is secure).
+
+ Of course, this implementations is NOT thread-safe.
+
+
+ Constructor that accepts an instance of a block cipher engine.
+
+ @param cipher the engine to use
+
+
+
+ Implements the Galois/Counter mode (GCM) detailed in
+ NIST Special Publication 800-38D.
+
+
+
+
+ MAC sizes from 32 bits to 128 bits (must be a multiple of 8) are supported. The default is 128 bits.
+ Sizes less than 96 are not recommended, but are supported for specialized applications.
+
+
+
+ implements the GOST 28147 OFB counter mode (GCTR).
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ counter mode (must have a 64 bit block size).
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param encrypting if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param parameters the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/GCTR"
+ and the block size in bits
+
+
+ return the block size we are operating at (in bytes).
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the feedback vector back to the IV and reset the underlying
+ cipher.
+
+
+
+ A block cipher mode that includes authenticated encryption with a streaming mode
+ and optional associated data.
+
+
+
+ The name of the algorithm this cipher implements.
+
+
+ The block cipher underlying this algorithm.
+
+
+ Initialise the cipher.
+ Parameter can either be an AeadParameters or a ParametersWithIV object.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The block size for this cipher, in bytes.
+
+
+ Add a single byte to the associated data check.
+ If the implementation supports it, this will be an online operation and will not retain the associated data.
+ The byte to be processed.
+
+
+ Add a sequence of bytes to the associated data check.
+ If the implementation supports it, this will be an online operation and will not retain the associated data.
+ The input byte array.
+ The offset into the input array where the data to be processed starts.
+ The number of bytes to be processed.
+
+
+ Encrypt/decrypt a single byte.
+
+ @param input the byte to be processed.
+ @param outBytes the output buffer the processed byte goes into.
+ @param outOff the offset into the output byte array the processed data starts at.
+ @return the number of bytes written to out.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ Process a block of bytes from in putting the result into out.
+
+ @param inBytes the input byte array.
+ @param inOff the offset into the in array where the data to be processed starts.
+ @param len the number of bytes to be processed.
+ @param outBytes the output buffer the processed bytes go into.
+ @param outOff the offset into the output byte array the processed data starts at.
+ @return the number of bytes written to out.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ Finish the operation either appending or verifying the MAC at the end of the data.
+
+ @param outBytes space for any resulting output data.
+ @param outOff offset into out to start copying the data at.
+ @return number of bytes written into out.
+ @throws InvalidOperationException if the cipher is in an inappropriate state.
+ @throws InvalidCipherTextException if the MAC fails to match.
+
+
+ Return the value of the MAC associated with the last stream processed.
+
+ @return MAC for plaintext data.
+
+
+ Return the size of the output buffer required for a ProcessBytes
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to ProcessBytes
+ with len bytes of input.
+
+
+ Return the size of the output buffer required for a ProcessBytes plus a
+ DoFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to ProcessBytes and DoFinal
+ with len bytes of input.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+ An implementation of RFC 7253 on The OCB
+ Authenticated-Encryption Algorithm , licensed per:
+
+ License for
+ Open-Source Software Implementations of OCB (Jan 9, 2013) - 'License 1'
+ Under this license, you are authorized to make, use, and distribute open-source software
+ implementations of OCB. This license terminates for you if you sue someone over their open-source
+ software implementation of OCB claiming that you have a patent covering their implementation.
+
+ This is a non-binding summary of a legal document (the link above). The parameters of the license
+ are specified in the license document and that document is controlling.
+
+
+ implements a Output-FeedBack (OFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/OFB"
+ and the block size in bits
+
+
+ return the block size we are operating at (in bytes).
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the feedback vector back to the IV and reset the underlying
+ cipher.
+
+
+ * Implements OpenPGP's rather strange version of Cipher-FeedBack (CFB) mode
+ * on top of a simple cipher. This class assumes the IV has been prepended
+ * to the data stream already, and just accomodates the reset after
+ * (blockSize + 2) bytes have been read.
+ *
+ * For further info see RFC 2440 .
+ *
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/PGPCFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param parameters the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt one byte of data according to CFB mode.
+ @param data the byte to encrypt
+ @param blockOff offset in the current block
+ @returns the encrypted byte
+
+
+ Do the appropriate processing for CFB IV mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB IV mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Implements the Segmented Integer Counter (SIC) mode on top of a simple
+ block cipher.
+
+
+ Basic constructor.
+
+ @param c the block cipher to be used.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Calculator factory class for signature generation in ASN.1 based profiles that use an AlgorithmIdentifier to preserve
+ signature algorithm details.
+
+
+
+
+ Base constructor.
+
+ The name of the signature algorithm to use.
+ The private key to be used in the signing operation.
+
+
+
+ Constructor which also specifies a source of randomness to be used if one is required.
+
+ The name of the signature algorithm to use.
+ The private key to be used in the signing operation.
+ The source of randomness to be used in signature calculation.
+
+
+
+ Allows enumeration of the signature names supported by the verifier provider.
+
+
+
+
+ Verifier class for signature verification in ASN.1 based profiles that use an AlgorithmIdentifier to preserve
+ signature algorithm details.
+
+
+
+
+ Base constructor.
+
+ The name of the signature algorithm to use.
+ The public key to be used in the verification operation.
+
+
+
+ Provider class which supports dynamic creation of signature verifiers.
+
+
+
+
+ Base constructor - specify the public key to be used in verification.
+
+ The public key to be used in creating verifiers provided by this object.
+
+
+
+ Allows enumeration of the signature names supported by the verifier provider.
+
+
+
+ Block cipher padders are expected to conform to this interface
+
+
+ Initialise the padder.
+
+ @param param parameters, if any required.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+ @exception InvalidCipherTextException if the padding is badly formed
+ or invalid.
+
+
+ A padder that adds ISO10126-2 padding to a block.
+
+
+ Initialise the padder.
+
+ @param random a SecureRandom if available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds the padding according to the scheme referenced in
+ ISO 7814-4 - scheme 2 from ISO 9797-1. The first byte is 0x80, rest is 0x00
+
+
+ Initialise the padder.
+
+ @param random - a SecureRandom if available.
+
+
+ Return the name of the algorithm the padder implements.
+
+ @return the name of the algorithm the padder implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A wrapper class that allows block ciphers to be used to process data in
+ a piecemeal fashion with padding. The PaddedBufferedBlockCipher
+ outputs a block only when the buffer is full and more data is being added,
+ or on a doFinal (unless the current block in the buffer is a pad block).
+ The default padding mechanism used is the one outlined in Pkcs5/Pkcs7.
+
+
+ Create a buffered block cipher with the desired padding.
+
+ @param cipher the underlying block cipher this buffering object wraps.
+ @param padding the padding type.
+
+
+ Create a buffered block cipher Pkcs7 padding
+
+ @param cipher the underlying block cipher this buffering object wraps.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the minimum size of the output buffer required for an update
+ plus a doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer. If the buffer is currently
+ full and padding needs to be added a call to doFinal will produce
+ 2 * GetBlockSize() bytes.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output or we are decrypting and the input is not block size aligned.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+
+
+ A padder that adds Pkcs7/Pkcs5 padding to a block.
+
+
+ Initialise the padder.
+
+ @param random - a SecureRandom if available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds Trailing-Bit-Compliment padding to a block.
+
+ This padding pads the block out compliment of the last bit
+ of the plain text.
+
+
+
+
+ Return the name of the algorithm the cipher implements.
+ the name of the algorithm the cipher implements.
+
+
+
+ Initialise the padder.
+ - a SecureRandom if available.
+
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+ Note: this assumes that the last block of plain text is always
+ passed to it inside in. i.e. if inOff is zero, indicating the
+ entire block is to be overwritten with padding the value of in
+ should be the same as the last block of plain text.
+
+
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds X9.23 padding to a block - if a SecureRandom is
+ passed in random padding is assumed, otherwise padding with zeros is used.
+
+
+ Initialise the padder.
+
+ @param random a SecureRandom if one is available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds Null byte padding to a block.
+
+
+ Return the name of the algorithm the cipher implements.
+
+
+ the name of the algorithm the cipher implements.
+
+
+
+ Initialise the padder.
+
+
+ - a SecureRandom if available.
+
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+
+ return the number of pad bytes present in the block.
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+ @param associatedText associated text, if any
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+ @param associatedText associated text, if any
+
+
+ The minimum bitlength of the private value.
+
+
+ The bitlength of the private value.
+
+
+ Construct without a usage index, this will do a random construction of G.
+
+ @param L desired length of prime P in bits (the effective key size).
+ @param N desired length of prime Q in bits.
+ @param certainty certainty level for prime number generation.
+ @param random the source of randomness to use.
+
+
+ Construct for a specific usage index - this has the effect of using verifiable canonical generation of G.
+
+ @param L desired length of prime P in bits (the effective key size).
+ @param N desired length of prime Q in bits.
+ @param certainty certainty level for prime number generation.
+ @param random the source of randomness to use.
+ @param usageIndex a valid usage index.
+
+
+ return true if the passed in key is a DES-EDE weak key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+ @param length number of bytes making up the key
+
+
+ return true if the passed in key is a DES-EDE weak key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 2/3 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 2 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 3 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ DES has 16 weak keys. This method will check
+ if the given DES key material is weak or semi-weak.
+ Key material that is too short is regarded as weak.
+
+ See "Applied
+ Cryptography" by Bruce Schneier for more information.
+
+ @return true if the given DES key material is weak or semi-weak,
+ false otherwise.
+
+
+ DES Keys use the LSB as the odd parity bit. This can
+ be used to check for corrupt keys.
+
+ @param bytes the byte array to set the parity on.
+
+
+ return the generator - g
+
+
+ return private value limit - l
+
+
+ parameters for Key derivation functions for ISO-18033
+
+
+ parameters for using an integrated cipher in stream mode.
+
+
+ @param derivation the derivation parameter for the KDF function.
+ @param encoding the encoding parameter for the KDF function.
+ @param macKeySize the size of the MAC key (in bits).
+
+
+ @param derivation the derivation parameter for the KDF function.
+ @param encoding the encoding parameter for the KDF function.
+ @param macKeySize the size of the MAC key (in bits).
+ @param cipherKeySize the size of the associated Cipher key (in bits).
+
+
+ parameters for Key derivation functions for IEEE P1363a
+
+
+ Parameters for mask derivation functions.
+
+
+ Parameters for NaccacheStern public private key generation. For details on
+ this cipher, please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Parameters for generating a NaccacheStern KeyPair.
+
+ @param random
+ The source of randomness
+ @param strength
+ The desired strength of the Key in Bits
+ @param certainty
+ the probability that the generated primes are not really prime
+ as integer: 2^(-certainty) is then the probability
+ @param countSmallPrimes
+ How many small key factors are desired
+
+
+ * Parameters for a NaccacheStern KeyPair.
+ *
+ * @param random
+ * The source of randomness
+ * @param strength
+ * The desired strength of the Key in Bits
+ * @param certainty
+ * the probability that the generated primes are not really prime
+ * as integer: 2^(-certainty) is then the probability
+ * @param cntSmallPrimes
+ * How many small key factors are desired
+ * @param debug
+ * Ignored
+
+
+ @return Returns the certainty.
+
+
+ @return Returns the countSmallPrimes.
+
+
+ Public key parameters for NaccacheStern cipher. For details on this cipher,
+ please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ @param privateKey
+
+
+ @return Returns the g.
+
+
+ @return Returns the lowerSigmaBound.
+
+
+ @return Returns the n.
+
+
+ Private key parameters for NaccacheStern cipher. For details on this cipher,
+ please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Constructs a NaccacheSternPrivateKey
+
+ @param g
+ the public enryption parameter g
+ @param n
+ the public modulus n = p*q
+ @param lowerSigmaBound
+ the public lower sigma bound up to which data can be encrypted
+ @param smallPrimes
+ the small primes, of which sigma is constructed in the right
+ order
+ @param phi_n
+ the private modulus phi(n) = (p-1)(q-1)
+
+
+ Cipher parameters with a fixed salt value associated with them.
+
+
+
+ Parameters for the Skein hash function - a series of byte[] strings identified by integer tags.
+
+
+ Parameterised Skein can be used for:
+
+ MAC generation, by providing a key .
+ Randomised hashing, by providing a nonce .
+ A hash function for digital signatures, associating a
+ public key with the message digest.
+ A key derivation function, by providing a
+ key identifier .
+ Personalised hashing, by providing a
+ recommended format or
+ arbitrary personalisation string.
+
+
+
+
+
+
+
+
+ The parameter type for a secret key, supporting MAC or KDF functions: 0
+
+
+
+
+ The parameter type for the Skein configuration block: 4
+
+
+
+
+ The parameter type for a personalisation string: 8
+
+
+
+
+ The parameter type for a public key: 12
+
+
+
+
+ The parameter type for a key identifier string: 16
+
+
+
+
+ The parameter type for a nonce: 20
+
+
+
+
+ The parameter type for the message: 48
+
+
+
+
+ The parameter type for the output transformation: 63
+
+
+
+
+ Obtains a map of type (int) to value (byte[]) for the parameters tracked in this object.
+
+
+
+
+ Obtains the value of the key parameter , or null if not
+ set.
+
+ The key.
+
+
+
+ Obtains the value of the personalisation parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the public key parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the key identifier parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the nonce parameter , or null if
+ not set.
+
+
+
+
+ A builder for .
+
+
+
+
+ Sets a parameters to apply to the Skein hash function.
+
+
+ Parameter types must be in the range 0,5..62, and cannot use the value 48
+ (reserved for message body).
+
+ Parameters with type < 48 are processed before
+ the message content, parameters with type > 48
+ are processed after the message and prior to output.
+
+ the type of the parameter, in the range 5..62.
+ the byte sequence of the parameter.
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Implements the recommended personalisation format for Skein defined in Section 4.11 of
+ the Skein 1.3 specification.
+
+
+ The format is YYYYMMDD email@address distinguisher, encoded to a byte
+ sequence using UTF-8 encoding.
+
+ the date the personalised application of the Skein was defined.
+ the email address of the creation of the personalised application.
+ an arbitrary personalisation string distinguishing the application.
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Constructs a new instance with the parameters provided to this
+ builder.
+
+
+
+
+ Parameters for tweakable block ciphers.
+
+
+
+
+ Gets the key.
+
+ the key to use, or null to use the current key.
+
+
+
+ Gets the tweak value.
+
+ The tweak to use, or null to use the current tweak.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ true if the internal state represents the signature described in the passed in array.
+
+
+ Reset the internal state
+
+
+ The Digital Signature Algorithm - as described in "Handbook of Applied
+ Cryptography", pages 452 - 453.
+
+
+ Default configuration, random K values.
+
+
+ Configuration with an alternate, possibly deterministic calculator of K.
+
+ @param kCalculator a K value calculator.
+
+
+ Generate a signature for the given message using the key we were
+ initialised with. For conventional DSA the message should be a SHA-1
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a DSA signature for
+ the passed in message for standard DSA the message should be a
+ SHA-1 hash of the real message to be verified.
+
+
+ EC-DSA as described in X9.62
+
+
+ Default configuration, random K values.
+
+
+ Configuration with an alternate, possibly deterministic calculator of K.
+
+ @param kCalculator a K value calculator.
+
+
+ Generate a signature for the given message using the key we were
+ initialised with. For conventional DSA the message should be a SHA-1
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a DSA signature for
+ the passed in message (for standard DSA the message should be
+ a SHA-1 hash of the real message to be verified).
+
+
+ GOST R 34.10-2001 Signature Algorithm
+
+
+ generate a signature for the given message using the key we were
+ initialised with. For conventional GOST3410 the message should be a GOST3411
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a GOST3410 signature for
+ the passed in message (for standard GOST3410 the message should be
+ a GOST3411 hash of the real message to be verified).
+
+
+ EC-NR as described in IEEE 1363-2000
+
+
+ generate a signature for the given message using the key we were
+ initialised with. Generally, the order of the curve should be at
+ least as long as the hash of the message of interest, and with
+ ECNR it *must* be at least as long.
+
+ @param digest the digest to be signed.
+ @exception DataLengthException if the digest is longer than the key allows
+
+
+ return true if the value r and s represent a signature for the
+ message passed in. Generally, the order of the curve should be at
+ least as long as the hash of the message of interest, and with
+ ECNR, it *must* be at least as long. But just in case the signer
+ applied mod(n) to the longer digest, this implementation will
+ apply mod(n) during verification.
+
+ @param digest the digest to be verified.
+ @param r the r value of the signature.
+ @param s the s value of the signature.
+ @exception DataLengthException if the digest is longer than the key allows
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ true if the internal state represents the signature described in the passed in array.
+
+
+ Reset the internal state
+
+
+ Gost R 34.10-94 Signature Algorithm
+
+
+ generate a signature for the given message using the key we were
+ initialised with. For conventional Gost3410 the message should be a Gost3411
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a Gost3410 signature for
+ the passed in message for standard Gost3410 the message should be a
+ Gost3411 hash of the real message to be verified.
+
+
+ initialise the signer for signing or verification.
+
+ @param forSigning
+ true if for signing, false otherwise
+ @param parameters
+ necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using the key
+ we were initialised with.
+
+
+ return true if the internal state represents the signature described in
+ the passed in array.
+
+
+ A deterministic K calculator based on the algorithm in section 3.2 of RFC 6979.
+
+
+ Base constructor.
+
+ @param digest digest to build the HMAC on.
+
+
+ Interface define calculators of K values for DSA/ECDSA.
+
+
+ Return true if this calculator is deterministic, false otherwise.
+
+ @return true if deterministic, otherwise false.
+
+
+ Non-deterministic initialiser.
+
+ @param n the order of the DSA group.
+ @param random a source of randomness.
+
+
+ Deterministic initialiser.
+
+ @param n the order of the DSA group.
+ @param d the DSA private value.
+ @param message the message being signed.
+
+
+ Return the next valid value of K.
+
+ @return a K value.
+
+
+ ISO9796-2 - mechanism using a hash function with recovery (scheme 2 and 3).
+
+ Note: the usual length for the salt is the length of the hash
+ function used in bytes.
+
+
+
+
+ Return a reference to the recoveredMessage message.
+
+ The full/partial recoveredMessage message.
+
+
+
+
+ Generate a signer with either implicit or explicit trailers for ISO9796-2, scheme 2 or 3.
+
+ base cipher to use for signature creation/verification
+ digest to use.
+ length of salt in bytes.
+ whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+
+ cipher to use.
+
+ digest to sign with.
+
+ length of salt in bytes.
+
+
+
+ Initialise the signer.
+ true if for signing, false if for verification.
+ parameters for signature generation/verification. If the
+ parameters are for generation they should be a ParametersWithRandom,
+ a ParametersWithSalt, or just an RsaKeyParameters object. If RsaKeyParameters
+ are passed in a SecureRandom will be created.
+
+ if wrong parameter type or a fixed
+ salt is passed in which is the wrong length.
+
+
+
+ compare two byte arrays - constant time.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+ Return true if the full message was recoveredMessage.
+
+ true on full message recovery, false otherwise, or if not sure.
+
+
+
+ int to octet string.
+ int to octet string.
+
+
+ long to octet string.
+
+
+ mask generator function, as described in Pkcs1v2.
+
+
+ ISO9796-2 - mechanism using a hash function with recovery (scheme 1)
+
+
+
+ Return a reference to the recoveredMessage message.
+
+ The full/partial recoveredMessage message.
+
+
+
+
+ Generate a signer with either implicit or explicit trailers for ISO9796-2.
+
+ base cipher to use for signature creation/verification
+ digest to use.
+ whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+
+ cipher to use.
+
+ digest to sign with.
+
+
+
+ compare two byte arrays - constant time.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+ Return true if the full message was recoveredMessage.
+
+ true on full message recovery, false otherwise.
+
+
+
+ RSA-PSS as described in Pkcs# 1 v 2.1.
+
+ Note: the usual value for the salt length is the number of
+ bytes in the hash function.
+
+
+
+ Basic constructor
+ the asymmetric cipher to use.
+ the digest to use.
+ the length of the salt to use (in bytes).
+
+
+ Basic constructor
+ the asymmetric cipher to use.
+ the digest to use.
+ the fixed salt to be used.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+
+ int to octet string.
+
+
+ mask generator function, as described in Pkcs1v2.
+
+
+
+ Load oid table.
+
+
+
+ Initialise the signer for signing or verification.
+
+ @param forSigning true if for signing, false otherwise
+ @param param necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+ X9.31-1998 - signing using a hash.
+
+ The message digest hash, H, is encapsulated to form a byte string as follows
+
+
+ EB = 06 || PS || 0xBA || H || TRAILER
+
+ where PS is a string of bytes all of value 0xBB of length such that |EB|=|n|, and TRAILER is the ISO/IEC 10118 part number†for the digest. The byte string, EB, is converted to an integer value, the message representative, f.
+
+
+ Generate a signer with either implicit or explicit trailers for X9.31.
+
+ @param cipher base cipher to use for signature creation/verification
+ @param digest digest to use.
+ @param implicit whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+ @param cipher cipher to use.
+ @param digest digest to sign with.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RFC 5246 7.2
+
+
+
+ This message notifies the recipient that the sender will not send any more messages on this
+ connection. Note that as of TLS 1.1, failure to properly close a connection no longer
+ requires that a session not be resumed. This is a change from TLS 1.0 ("The session becomes
+ unresumable if any connection is terminated without proper close_notify messages with level
+ equal to warning.") to conform with widespread implementation practice.
+
+
+ An inappropriate message was received. This alert is always fatal and should never be
+ observed in communication between proper implementations.
+
+
+ This alert is returned if a record is received with an incorrect MAC. This alert also MUST be
+ returned if an alert is sent because a TLSCiphertext decrypted in an invalid way: either it
+ wasn't an even multiple of the block length, or its padding values, when checked, weren't
+ correct. This message is always fatal and should never be observed in communication between
+ proper implementations (except when messages were corrupted in the network).
+
+
+ This alert was used in some earlier versions of TLS, and may have permitted certain attacks
+ against the CBC mode [CBCATT]. It MUST NOT be sent by compliant implementations.
+
+
+ A TLSCiphertext record was received that had a length more than 2^14+2048 bytes, or a record
+ decrypted to a TLSCompressed record with more than 2^14+1024 bytes. This message is always
+ fatal and should never be observed in communication between proper implementations (except
+ when messages were corrupted in the network).
+
+
+ The decompression function received improper input (e.g., data that would expand to excessive
+ length). This message is always fatal and should never be observed in communication between
+ proper implementations.
+
+
+ Reception of a handshake_failure alert message indicates that the sender was unable to
+ negotiate an acceptable set of security parameters given the options available. This is a
+ fatal error.
+
+
+ This alert was used in SSLv3 but not any version of TLS. It MUST NOT be sent by compliant
+ implementations.
+
+
+ A certificate was corrupt, contained signatures that did not verify correctly, etc.
+
+
+ A certificate was of an unsupported type.
+
+
+ A certificate was revoked by its signer.
+
+
+ A certificate has expired or is not currently valid.
+
+
+ Some other (unspecified) issue arose in processing the certificate, rendering it
+ unacceptable.
+
+
+ A field in the handshake was out of range or inconsistent with other fields. This message is
+ always fatal.
+
+
+ A valid certificate chain or partial chain was received, but the certificate was not accepted
+ because the CA certificate could not be located or couldn't be matched with a known, trusted
+ CA. This message is always fatal.
+
+
+ A valid certificate was received, but when access control was applied, the sender decided not
+ to proceed with negotiation. This message is always fatal.
+
+
+ A message could not be decoded because some field was out of the specified range or the
+ length of the message was incorrect. This message is always fatal and should never be
+ observed in communication between proper implementations (except when messages were corrupted
+ in the network).
+
+
+ A handshake cryptographic operation failed, including being unable to correctly verify a
+ signature or validate a Finished message. This message is always fatal.
+
+
+ This alert was used in some earlier versions of TLS. It MUST NOT be sent by compliant
+ implementations.
+
+
+ The protocol version the client has attempted to negotiate is recognized but not supported.
+ (For example, old protocol versions might be avoided for security reasons.) This message is
+ always fatal.
+
+
+ Returned instead of handshake_failure when a negotiation has failed specifically because the
+ server requires ciphers more secure than those supported by the client. This message is
+ always fatal.
+
+
+ An internal error unrelated to the peer or the correctness of the protocol (such as a memory
+ allocation failure) makes it impossible to continue. This message is always fatal.
+
+
+ This handshake is being canceled for some reason unrelated to a protocol failure. If the user
+ cancels an operation after the handshake is complete, just closing the connection by sending
+ a close_notify is more appropriate. This alert should be followed by a close_notify. This
+ message is generally a warning.
+
+
+ Sent by the client in response to a hello request or by the server in response to a client
+ hello after initial handshaking. Either of these would normally lead to renegotiation; when
+ that is not appropriate, the recipient should respond with this alert. At that point, the
+ original requester can decide whether to proceed with the connection. One case where this
+ would be appropriate is where a server has spawned a process to satisfy a request; the
+ process might receive security parameters (key length, authentication, etc.) at startup, and
+ it might be difficult to communicate changes to these parameters after that point. This
+ message is always a warning.
+
+
+ Sent by clients that receive an extended server hello containing an extension that they did
+ not put in the corresponding client hello. This message is always fatal.
+
+
+ This alert is sent by servers who are unable to retrieve a certificate chain from the URL
+ supplied by the client (see Section 3.3). This message MAY be fatal - for example if client
+ authentication is required by the server for the handshake to continue and the server is
+ unable to retrieve the certificate chain, it may send a fatal alert.
+
+
+ This alert is sent by servers that receive a server_name extension request, but do not
+ recognize the server name. This message MAY be fatal.
+
+
+ This alert is sent by clients that receive an invalid certificate status response (see
+ Section 3.6). This message is always fatal.
+
+
+ This alert is sent by servers when a certificate hash does not match a client provided
+ certificate_hash. This message is always fatal.
+
+
+ If the server does not recognize the PSK identity, it MAY respond with an
+ "unknown_psk_identity" alert message.
+
+
+ If TLS_FALLBACK_SCSV appears in ClientHello.cipher_suites and the highest protocol version
+ supported by the server is higher than the version indicated in ClientHello.client_version,
+ the server MUST respond with an inappropriate_fallback alert.
+
+
+
+ RFC 5246 7.2
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+ A queue for bytes.
+
+ This file could be more optimized.
+
+
+
+
+ The smallest number which can be written as 2^x which is bigger than i.
+
+
+ The initial size for our buffer.
+
+
+ The buffer where we store our data.
+
+
+ How many bytes at the beginning of the buffer are skipped.
+
+
+ How many bytes in the buffer are valid data.
+
+
+ Read data from the buffer.
+ The buffer where the read data will be copied to.
+ How many bytes to skip at the beginning of buf.
+ How many bytes to read at all.
+ How many bytes from our data to skip.
+
+
+ Add some data to our buffer.
+ A byte-array to read data from.
+ How many bytes to skip at the beginning of the array.
+ How many bytes to read from the array.
+
+
+ Remove some bytes from our data from the beginning.
+ How many bytes to remove.
+
+
+ The number of bytes which are available in this buffer.
+
+
+ Parsing and encoding of a Certificate struct from RFC 4346.
+
+
+ opaque ASN.1Cert<2^24-1>;
+
+ struct {
+ ASN.1Cert certificate_list<0..2^24-1>;
+ } Certificate;
+
+
+ @see Org.BouncyCastle.Asn1.X509.X509CertificateStructure
+
+
+ The certificates.
+
+
+ @return an array of {@link org.bouncycastle.asn1.x509.Certificate} representing a certificate
+ chain.
+
+
+ @return true if this certificate chain contains no certificates, or
+ false otherwise.
+
+
+ Encode this {@link Certificate} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link Certificate} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link Certificate} object.
+ @throws IOException
+
+
+ Parsing and encoding of a CertificateRequest struct from RFC 4346.
+
+
+ struct {
+ ClientCertificateType certificate_types<1..2^8-1>;
+ DistinguishedName certificate_authorities<3..2^16-1>
+ } CertificateRequest;
+
+
+ @see ClientCertificateType
+ @see X509Name
+
+
+ @param certificateTypes see {@link ClientCertificateType} for valid constants.
+ @param certificateAuthorities an {@link IList} of {@link X509Name}.
+
+
+ @return an array of certificate types
+ @see {@link ClientCertificateType}
+
+
+ @return an {@link IList} of {@link SignatureAndHashAlgorithm} (or null before TLS 1.2).
+
+
+ @return an {@link IList} of {@link X509Name}
+
+
+ Encode this {@link CertificateRequest} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateRequest} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateRequest} object.
+ @throws IOException
+
+
+ Encode this {@link CertificateStatus} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateStatus} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateStatus} object.
+ @throws IOException
+
+
+ Encode this {@link CertificateStatusRequest} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateStatusRequest} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateStatusRequest} object.
+ @throws IOException
+
+
+ @param type
+ see {@link CertChainType} for valid constants.
+ @param urlAndHashList
+ a {@link IList} of {@link UrlAndHash}.
+
+
+ @return {@link CertChainType}
+
+
+ @return an {@link IList} of {@link UrlAndHash}
+
+
+ Encode this {@link CertificateUrl} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateUrl} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateUrl} object.
+ @throws IOException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RFC 2246 A.5
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ A combined hash, which implements md5(m) || sha1(m).
+
+
+ @see org.bouncycastle.crypto.Digest#update(byte[], int, int)
+
+
+ @see org.bouncycastle.crypto.Digest#doFinal(byte[], int)
+
+
+ @see org.bouncycastle.crypto.Digest#reset()
+
+
+
+ RFC 2246 6.1
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 2246 6.2.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Accept only the group parameters specified in RFC 5054 Appendix A.
+
+
+ Specify a custom set of acceptable group parameters.
+
+ @param groups a {@link Vector} of acceptable {@link SRP6GroupParameters}
+
+
+ Buffers input until the hash algorithm is determined.
+
+
+ @return a {@link SignatureAndHashAlgorithm} (or null before TLS 1.2).
+
+
+ Encode this {@link DigitallySigned} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link DigitallySigned} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link DigitallySigned} object.
+ @throws IOException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Check that there are no "extra" messages left in the current inbound flight
+
+
+ RFC 4347 4.1.2.5 Anti-replay
+
+ Support fast rejection of duplicate records by maintaining a sliding receive window
+
+
+ Check whether a received record with the given sequence number should be rejected as a duplicate.
+
+ @param seq the 48-bit DTLSPlainText.sequence_number field of a received record.
+ @return true if the record should be discarded without further processing.
+
+
+ Report that a received record with the given sequence number passed authentication checks.
+
+ @param seq the 48-bit DTLSPlainText.sequence_number field of an authenticated record.
+
+
+ When a new epoch begins, sequence numbers begin again at 0
+
+
+ RFC 4492 5.4. (Errata ID: 2389)
+
+
+
+ RFC 4492 5.4
+
+
+
+ Indicates the elliptic curve domain parameters are conveyed verbosely, and the
+ underlying finite field is a prime field.
+
+
+ Indicates the elliptic curve domain parameters are conveyed verbosely, and the
+ underlying finite field is a characteristic-2 field.
+
+
+ Indicates that a named curve is used. This option SHOULD be used when applicable.
+
+
+
+ RFC 4492 5.1.2
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 5705
+
+
+ RFC 5246 7.4.1.4.1
+
+
+ Encode this {@link HeartbeatExtension} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link HeartbeatExtension} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link HeartbeatExtension} object.
+ @throws IOException
+
+
+ Encode this {@link HeartbeatMessage} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link HeartbeatMessage} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link HeartbeatMessage} object.
+ @throws IOException
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+ RFC 4492 5.1.1
+ The named curves defined here are those specified in SEC 2 [13]. Note that many of
+ these curves are also recommended in ANSI X9.62 [7] and FIPS 186-2 [11]. Values 0xFE00
+ through 0xFEFF are reserved for private use. Values 0xFF01 and 0xFF02 indicate that the
+ client supports arbitrary prime and characteristic-2 curves, respectively (the curve
+ parameters must be encoded explicitly in ECParameters).
+
+
+
+ Encode this {@link NewSessionTicket} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link NewSessionTicket} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link NewSessionTicket} object.
+ @throws IOException
+
+
+ RFC 3546 3.6
+
+
+ @param responderIDList
+ an {@link IList} of {@link ResponderID}, specifying the list of trusted OCSP
+ responders. An empty list has the special meaning that the responders are
+ implicitly known to the server - e.g., by prior arrangement.
+ @param requestExtensions
+ OCSP request extensions. A null value means that there are no extensions.
+
+
+ @return an {@link IList} of {@link ResponderID}
+
+
+ @return OCSP request extensions
+
+
+ Encode this {@link OcspStatusRequest} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link OcspStatusRequest} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return an {@link OcspStatusRequest} object.
+ @throws IOException
+
+
+ RFC 5246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+
+
+ An implementation of the TLS 1.0/1.1/1.2 record layer, allowing downgrade to SSLv3.
+
+
+ RFC 5246 E.1. "Earlier versions of the TLS specification were not fully clear on what the
+ record layer version number (TLSPlaintext.version) should contain when sending ClientHello
+ (i.e., before it is known which version of the protocol will be employed). Thus, TLS servers
+ compliant with this specification MUST accept any value {03,XX} as the record layer version
+ number for ClientHello."
+
+
+ @return {@link ConnectionEnd}
+
+
+ @return {@link CipherSuite}
+
+
+ @return {@link CompressionMethod}
+
+
+ @return {@link PRFAlgorithm}
+
+
+ Encode this {@link ServerDHParams} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerDHParams} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerDHParams} object.
+ @throws IOException
+
+
+ Encode this {@link ServerName} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerName} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerName} object.
+ @throws IOException
+
+
+ @param serverNameList an {@link IList} of {@link ServerName}.
+
+
+ @return an {@link IList} of {@link ServerName}.
+
+
+ Encode this {@link ServerNameList} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerNameList} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerNameList} object.
+ @throws IOException
+
+
+ Encode this {@link ServerSRPParams} to an {@link OutputStream}.
+
+ @param output
+ the {@link OutputStream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerSRPParams} from an {@link InputStream}.
+
+ @param input
+ the {@link InputStream} to parse from.
+ @return a {@link ServerSRPParams} object.
+ @throws IOException
+
+
+ RFC 5246 7.4.1.4.1 (in RFC 2246, there were no specific values assigned)
+
+
+ RFC 5246 7.4.1.4.1
+
+
+ @param hash {@link HashAlgorithm}
+ @param signature {@link SignatureAlgorithm}
+
+
+ @return {@link HashAlgorithm}
+
+
+ @return {@link SignatureAlgorithm}
+
+
+ Encode this {@link SignatureAndHashAlgorithm} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link SignatureAndHashAlgorithm} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link SignatureAndHashAlgorithm} object.
+ @throws IOException
+
+
+ An implementation of {@link TlsSRPIdentityManager} that simulates the existence of "unknown" identities
+ to obscure the fact that there is no verifier for them.
+
+
+ Create a {@link SimulatedTlsSRPIdentityManager} that implements the algorithm from RFC 5054 2.5.1.3
+
+ @param group the {@link SRP6GroupParameters} defining the group that SRP is operating in
+ @param seedKey the secret "seed key" referred to in RFC 5054 2.5.1.3
+ @return an instance of {@link SimulatedTlsSRPIdentityManager}
+
+
+ HMAC implementation based on original internet draft for HMAC (RFC 2104)
+
+ The difference is that padding is concatentated versus XORed with the key
+
+ H(K + opad, H(K + ipad, text))
+
+
+ Base constructor for one of the standard digest algorithms that the byteLength of
+ the algorithm is know for. Behaviour is undefined for digests other than MD5 or SHA1.
+
+ @param digest the digest.
+
+
+ Reset the mac generator.
+
+
+ RFC 4680
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called by the protocol handler to report the server certificate.
+
+
+ This method is responsible for certificate verification and validation
+
+ The server received
+
+
+
+
+ Return client credentials in response to server's certificate request
+
+
+ A containing server certificate request details
+
+
+ A to be used for client authentication
+ (or null for no client authentication)
+
+
+
+
+
+ A generic TLS 1.0-1.2 / SSLv3 block cipher. This can be used for AES or 3DES for example.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called at the start of a new TLS session, before any other methods.
+
+
+ A
+
+
+
+ Return the session this client wants to resume, if any.
+ Note that the peer's certificate chain for the session (if any) may need to be periodically revalidated.
+
+ A representing the resumable session to be used for this connection,
+ or null to use a new session.
+
+
+
+
+ Return the to use for the TLSPlaintext.version field prior to
+ receiving the server version. NOTE: This method is not called for DTLS.
+
+
+ See RFC 5246 E.1.: "TLS clients that wish to negotiate with older servers MAY send any value
+ {03,XX} as the record layer version number. Typical values would be {03,00}, the lowest
+ version number supported by the client, and the value of ClientHello.client_version. No
+ single value will guarantee interoperability with all old servers, but this is a complex
+ topic beyond the scope of this document."
+
+ The to use.
+
+
+
+ Get the list of cipher suites that this client supports.
+
+
+ An array of values, each specifying a supported cipher suite.
+
+
+
+
+ Get the list of compression methods that this client supports.
+
+
+ An array of values, each specifying a supported compression method.
+
+
+
+
+ Get the (optional) table of client extensions to be included in (extended) client hello.
+
+
+ A (Int32 -> byte[]). May be null.
+
+
+
+
+
+
+
+
+ Notifies the client of the session_id sent in the ServerHello.
+
+ An array of
+
+
+
+ Report the cipher suite that was selected by the server.
+
+
+ The protocol handler validates this value against the offered cipher suites
+
+
+
+ A
+
+
+
+
+ Report the compression method that was selected by the server.
+
+
+ The protocol handler validates this value against the offered compression methods
+
+
+
+ A
+
+
+
+
+ Report the extensions from an extended server hello.
+
+
+ Will only be called if we returned a non-null result from .
+
+
+ A (Int32 -> byte[])
+
+
+
+ A list of
+
+
+
+
+ Return an implementation of to negotiate the key exchange
+ part of the protocol.
+
+
+ A
+
+
+
+
+
+ Return an implementation of to handle authentication
+ part of the protocol.
+
+
+
+
+ A list of
+
+
+
+ RFC 5077 3.3. NewSessionTicket Handshake Message
+
+ This method will be called (only) when a NewSessionTicket handshake message is received. The
+ ticket is opaque to the client and clients MUST NOT examine the ticket under the assumption
+ that it complies with e.g. RFC 5077 4. Recommended Ticket Construction .
+
+ The ticket
+
+
+
+ Constructor for blocking mode.
+ @param stream The bi-directional stream of data to/from the server
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for blocking mode.
+ @param input The stream of data from the server
+ @param output The stream of data to the server
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for non-blocking mode.
+
+ When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to
+ provide the received ciphertext, then use
+ {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+
+ Similarly, when data needs to be sent, use
+ {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use
+ {@link #readOutput(byte[], int, int)} to get the corresponding
+ ciphertext.
+
+ @param secureRandom
+ Random number generator for various cryptographic functions
+
+
+ Initiates a TLS handshake in the role of client.
+
+ In blocking mode, this will not return until the handshake is complete.
+ In non-blocking mode, use {@link TlsPeer#NotifyHandshakeComplete()} to
+ receive a callback when the handshake is complete.
+
+ @param tlsClient The {@link TlsClient} to use for the handshake.
+ @throws IOException If in blocking mode and handshake was not successful.
+
+
+ Used to get the resumable session, if any, used by this connection. Only available after the
+ handshake has successfully completed.
+
+ @return A {@link TlsSession} representing the resumable session used by this connection, or
+ null if no resumable session available.
+ @see TlsPeer#NotifyHandshakeComplete()
+
+
+ Export keying material according to RFC 5705: "Keying Material Exporters for TLS".
+
+ @param asciiLabel indicates which application will use the exported keys.
+ @param context_value allows the application using the exporter to mix its own data with the TLS PRF for
+ the exporter output.
+ @param length the number of bytes to generate
+ @return a pseudorandom bit string of 'length' bytes generated from the master_secret.
+
+
+ (D)TLS DH key exchange.
+
+
+ (D)TLS ECDH key exchange (see RFC 4492).
+
+
+ (D)TLS ECDHE key exchange (see RFC 4492).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A generic interface for key exchange implementations in (D)TLS.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A generic TLS MAC implementation, acting as an HMAC based on some underlying Digest.
+
+
+
+ Generate a new instance of an TlsMac.
+
+ @param context the TLS client context
+ @param digest The digest to use.
+ @param key A byte-array where the key for this MAC is located.
+ @param keyOff The number of bytes to skip, before the key starts in the buffer.
+ @param keyLen The length of the key.
+
+
+ @return the MAC write secret
+
+
+ @return The output length of this MAC.
+
+
+ Calculate the MAC for some given data.
+
+ @param type The message type of the message.
+ @param message A byte-buffer containing the message.
+ @param offset The number of bytes to skip, before the message starts.
+ @param length The length of the message.
+ @return A new byte-buffer containing the MAC value.
+
+
+
+ A NULL CipherSuite, with optional MAC.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ draft-mathewson-no-gmtunixtime-00 2. "If existing users of a TLS implementation may rely on
+ gmt_unix_time containing the current time, we recommend that implementors MAY provide the
+ ability to set gmt_unix_time as an option only, off by default."
+
+
+ true if the current time should be used in the gmt_unix_time field of
+ Random, or false if gmt_unix_time should contain a cryptographically
+ random value.
+
+
+
+
+ Report whether the server supports secure renegotiation
+
+
+ The protocol handler automatically processes the relevant extensions
+
+
+ A , true if the server supports secure renegotiation
+
+
+
+
+
+ Return an implementation of to handle record compression.
+
+ A
+
+
+
+
+ Return an implementation of to use for encryption/decryption.
+
+ A
+
+
+
+ This method will be called when an alert is raised by the protocol.
+
+
+ A human-readable message explaining what caused this alert. May be null.
+ The Exception that caused this alert to be raised. May be null.
+
+
+ This method will be called when an alert is received from the remote peer.
+
+
+
+
+ Notifies the peer that the handshake has been successfully completed.
+
+
+
+ This method is called, when a change cipher spec message is received.
+
+ @throws IOException If the message has an invalid content or the handshake is not in the correct
+ state.
+
+
+ Read data from the network. The method will return immediately, if there is still some data
+ left in the buffer, or block until some application data has been read from the network.
+
+ @param buf The buffer where the data will be copied to.
+ @param offset The position where the data will be placed in the buffer.
+ @param len The maximum number of bytes to read.
+ @return The number of bytes read.
+ @throws IOException If something goes wrong during reading data.
+
+
+ Send some application data to the remote system.
+
+ The method will handle fragmentation internally.
+
+ @param buf The buffer with the data.
+ @param offset The position in the buffer where the data is placed.
+ @param len The length of the data.
+ @throws IOException If something goes wrong during sending.
+
+
+ The secure bidirectional stream for this connection
+ Only allowed in blocking mode.
+
+
+ Offer input from an arbitrary source. Only allowed in non-blocking mode.
+
+ After this method returns, the input buffer is "owned" by this object. Other code
+ must not attempt to do anything with it.
+
+ This method will decrypt and process all records that are fully available.
+ If only part of a record is available, the buffer will be retained until the
+ remainder of the record is offered.
+
+ If any records containing application data were processed, the decrypted data
+ can be obtained using {@link #readInput(byte[], int, int)}. If any records
+ containing protocol data were processed, a response may have been generated.
+ You should always check to see if there is any available output after calling
+ this method by calling {@link #getAvailableOutputBytes()}.
+ @param input The input buffer to offer
+ @throws IOException If an error occurs while decrypting or processing a record
+
+
+ Gets the amount of received application data. A call to {@link #readInput(byte[], int, int)}
+ is guaranteed to be able to return at least this much data.
+
+ Only allowed in non-blocking mode.
+ @return The number of bytes of available application data
+
+
+ Retrieves received application data. Use {@link #getAvailableInputBytes()} to check
+ how much application data is currently available. This method functions similarly to
+ {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data
+ is available, nothing will be copied and zero will be returned.
+
+ Only allowed in non-blocking mode.
+ @param buffer The buffer to hold the application data
+ @param offset The start offset in the buffer at which the data is written
+ @param length The maximum number of bytes to read
+ @return The total number of bytes copied to the buffer. May be less than the
+ length specified if the length was greater than the amount of available data.
+
+
+ Offer output from an arbitrary source. Only allowed in non-blocking mode.
+
+ After this method returns, the specified section of the buffer will have been
+ processed. Use {@link #readOutput(byte[], int, int)} to get the bytes to
+ transmit to the other peer.
+
+ This method must not be called until after the handshake is complete! Attempting
+ to call it before the handshake is complete will result in an exception.
+ @param buffer The buffer containing application data to encrypt
+ @param offset The offset at which to begin reading data
+ @param length The number of bytes of data to read
+ @throws IOException If an error occurs encrypting the data, or the handshake is not complete
+
+
+ Gets the amount of encrypted data available to be sent. A call to
+ {@link #readOutput(byte[], int, int)} is guaranteed to be able to return at
+ least this much data.
+
+ Only allowed in non-blocking mode.
+ @return The number of bytes of available encrypted data
+
+
+ Retrieves encrypted data to be sent. Use {@link #getAvailableOutputBytes()} to check
+ how much encrypted data is currently available. This method functions similarly to
+ {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data
+ is available, nothing will be copied and zero will be returned.
+
+ Only allowed in non-blocking mode.
+ @param buffer The buffer to hold the encrypted data
+ @param offset The start offset in the buffer at which the data is written
+ @param length The maximum number of bytes to read
+ @return The total number of bytes copied to the buffer. May be less than the
+ length specified if the length was greater than the amount of available data.
+
+
+ Terminate this connection with an alert. Can be used for normal closure too.
+
+ @param alertLevel
+ See {@link AlertLevel} for values.
+ @param alertDescription
+ See {@link AlertDescription} for values.
+ @throws IOException
+ If alert was fatal.
+
+
+ Closes this connection.
+
+ @throws IOException If something goes wrong during closing.
+
+
+ Make sure the InputStream 'buf' now empty. Fail otherwise.
+
+ @param buf The InputStream to check.
+ @throws IOException If 'buf' is not empty.
+
+
+ 'sender' only relevant to SSLv3
+
+
+ Both streams can be the same object
+
+
+ (D)TLS PSK key exchange (RFC 4279).
+
+
+ (D)TLS and SSLv3 RSA key exchange.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A (Int32 -> byte[]). Will never be null.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get the (optional) table of server extensions to be included in (extended) server hello.
+
+
+ A (Int32 -> byte[]). May be null.
+
+
+
+
+
+ A ( ). May be null.
+
+
+
+
+
+
+
+
+ This method will be called (only) if the server included an extension of type
+ "status_request" with empty "extension_data" in the extended server hello. See RFC 3546
+ 3.6. Certificate Status Request . If a non-null is returned, it
+ is sent to the client as a handshake message of type "certificate_status".
+
+ A to be sent to the client (or null for none).
+
+
+
+
+
+
+
+
+
+ ( )
+
+
+
+
+ Called by the protocol handler to report the client certificate, only if GetCertificateRequest
+ returned non-null.
+
+ Note: this method is responsible for certificate verification and validation.
+ the effective client certificate (may be an empty chain).
+
+
+
+ RFC 5077 3.3. NewSessionTicket Handshake Message.
+
+ This method will be called (only) if a NewSessionTicket extension was sent by the server. See
+ RFC 5077 4. Recommended Ticket Construction for recommended format and protection.
+
+ The ticket )
+
+
+
+ Constructor for blocking mode.
+ @param stream The bi-directional stream of data to/from the client
+ @param output The stream of data to the client
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for blocking mode.
+ @param input The stream of data from the client
+ @param output The stream of data to the client
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for non-blocking mode.
+
+ When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to
+ provide the received ciphertext, then use
+ {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+
+ Similarly, when data needs to be sent, use
+ {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use
+ {@link #readOutput(byte[], int, int)} to get the corresponding
+ ciphertext.
+
+ @param secureRandom
+ Random number generator for various cryptographic functions
+
+
+ Receives a TLS handshake in the role of server.
+
+ In blocking mode, this will not return until the handshake is complete.
+ In non-blocking mode, use {@link TlsPeer#notifyHandshakeComplete()} to
+ receive a callback when the handshake is complete.
+
+ @param tlsServer
+ @throws IOException If in blocking mode and handshake was not successful.
+
+
+
+
+
+ Check whether the given SRP group parameters are acceptable for use.
+
+ @param group the {@link SRP6GroupParameters} to check
+ @return true if (and only if) the specified group parameters are acceptable
+
+
+ Lookup the {@link TlsSRPLoginParameters} corresponding to the specified identity.
+
+ NOTE: To avoid "identity probing", unknown identities SHOULD be handled as recommended in RFC
+ 5054 2.5.1.3. {@link SimulatedTlsSRPIdentityManager} is provided for this purpose.
+
+ @param identity
+ the SRP identity sent by the connecting client
+ @return the {@link TlsSRPLoginParameters} for the specified identity, or else 'simulated'
+ parameters if the identity is not recognized. A null value is also allowed, but not
+ recommended.
+
+
+ (D)TLS SRP key exchange (RFC 5054).
+
+
+ RFC 5764 DTLS Extension to Establish Keys for SRTP.
+
+
+
+
+
+
+
+
+
+
+
+ Some helper functions for MicroTLS.
+
+
+ Add a 'signature_algorithms' extension to existing extensions.
+
+ @param extensions A {@link Hashtable} to add the extension to.
+ @param supportedSignatureAlgorithms {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @throws IOException
+
+
+ Get a 'signature_algorithms' extension from extensions.
+
+ @param extensions A {@link Hashtable} to get the extension from, if it is present.
+ @return A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}, or null.
+ @throws IOException
+
+
+ Create a 'signature_algorithms' extension value.
+
+ @param supportedSignatureAlgorithms A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @return A byte array suitable for use as an extension value.
+ @throws IOException
+
+
+ Read 'signature_algorithms' extension data.
+
+ @param extensionData The extension data.
+ @return A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @throws IOException
+
+
+ RFC 6066 5.
+
+
+ Encode this {@link UrlAndHash} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link UrlAndHash} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link UrlAndHash} object.
+ @throws IOException
+
+
+ RFC 5764 4.1.1
+
+
+ @param protectionProfiles see {@link SrtpProtectionProfile} for valid constants.
+ @param mki valid lengths from 0 to 255.
+
+
+ @return see {@link SrtpProtectionProfile} for valid constants.
+
+
+ @return valid lengths from 0 to 255.
+
+
+ RFC 4681
+
+
+ return a = a + b - b preserved.
+
+
+ unsigned comparison on two arrays - note the arrays may
+ start with leading zeros.
+
+
+ return z = x / y - done in place (z value preserved, x contains the
+ remainder)
+
+
+ return whether or not a BigInteger is probably prime with a
+ probability of 1 - (1/2)**certainty.
+ From Knuth Vol 2, pg 395.
+
+
+ Calculate the numbers u1, u2, and u3 such that:
+
+ u1 * a + u2 * b = u3
+
+ where u3 is the greatest common divider of a and b.
+ a and b using the extended Euclid algorithm (refer p. 323
+ of The Art of Computer Programming vol 2, 2nd ed).
+ This also seems to have the side effect of calculating
+ some form of multiplicative inverse.
+
+ @param a First number to calculate gcd for
+ @param b Second number to calculate gcd for
+ @param u1Out the return object for the u1 value
+ @return The greatest common divisor of a and b
+
+
+ return w with w = x * x - w is assumed to have enough space.
+
+
+ return x with x = y * z - x is assumed to have enough space.
+
+
+ Calculate mQuote = -m^(-1) mod b with b = 2^32 (32 = word size)
+
+
+ Montgomery multiplication: a = x * y * R^(-1) mod m
+
+ Based algorithm 14.36 of Handbook of Applied Cryptography.
+
+ m, x, y should have length n
+ a should have length (n + 1)
+ b = 2^32, R = b^n
+
+ The result is put in x
+
+ NOTE: the indices of x, y, m, a different in HAC and in Java
+
+
+ return x = x % y - done in place (y value preserved)
+
+
+ do a left shift - this returns a new array.
+
+
+ do a right shift - this does it in place.
+
+
+ do a right shift by one - this does it in place.
+
+
+ returns x = x - y - we assume x is >= y
+
+
+ Utility methods for generating primes and testing for primality.
+
+
+ Used to return the output from the
+ {@linkplain Primes#enhancedMRProbablePrimeTest(BigInteger, SecureRandom, int) Enhanced
+ Miller-Rabin Probabilistic Primality Test}
+
+
+ Used to return the output from the {@linkplain Primes#generateSTRandomPrime(Digest, int, byte[]) Shawe-Taylor Random_Prime Routine}
+
+
+ FIPS 186-4 C.6 Shawe-Taylor Random_Prime Routine
+
+ Construct a provable prime number using a hash function.
+
+ @param hash
+ the {@link Digest} instance to use (as "Hash()"). Cannot be null.
+ @param length
+ the length (in bits) of the prime to be generated. Must be at least 2.
+ @param inputSeed
+ the seed to be used for the generation of the requested prime. Cannot be null or
+ empty.
+ @return an {@link STOutput} instance containing the requested prime.
+
+
+ FIPS 186-4 C.3.2 Enhanced Miller-Rabin Probabilistic Primality Test
+
+ Run several iterations of the Miller-Rabin algorithm with randomly-chosen bases. This is an
+ alternative to {@link #isMRProbablePrime(BigInteger, SecureRandom, int)} that provides more
+ information about a composite candidate, which may be useful when generating or validating
+ RSA moduli.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param random
+ the source of randomness to use to choose bases.
+ @param iterations
+ the number of randomly-chosen bases to perform the test for.
+ @return an {@link MROutput} instance that can be further queried for details.
+
+
+ A fast check for small divisors, up to some implementation-specific limit.
+
+ @param candidate
+ the {@link BigInteger} instance to test for division by small factors.
+
+ @return true if the candidate is found to have any small factors,
+ false otherwise.
+
+
+ FIPS 186-4 C.3.1 Miller-Rabin Probabilistic Primality Test
+
+ Run several iterations of the Miller-Rabin algorithm with randomly-chosen bases.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param random
+ the source of randomness to use to choose bases.
+ @param iterations
+ the number of randomly-chosen bases to perform the test for.
+ @return false if any witness to compositeness is found amongst the chosen bases
+ (so candidate is definitely NOT prime), or else true
+ (indicating primality with some probability dependent on the number of iterations
+ that were performed).
+
+
+ FIPS 186-4 C.3.1 Miller-Rabin Probabilistic Primality Test (to a fixed base).
+
+ Run a single iteration of the Miller-Rabin algorithm against the specified base.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param baseValue
+ the base value to use for this iteration.
+ @return false if the specified base is a witness to compositeness (so
+ candidate is definitely NOT prime), or else true.
+
+
+ Simple shift-and-add multiplication. Serves as reference implementation
+ to verify (possibly faster) implementations, and for very small scalars.
+
+ @param p
+ The point to multiply.
+ @param k
+ The multiplier.
+ @return The result of the point multiplication kP.
+
+
+ Base class for an elliptic curve.
+
+
+ Adds PreCompInfo for a point on this curve, under a given name. Used by
+ ECMultipliers to save the precomputation for this ECPoint for use
+ by subsequent multiplication.
+
+ @param point
+ The ECPoint to store precomputations for.
+ @param name
+ A String used to index precomputations of different types.
+ @param preCompInfo
+ The values precomputed by the ECMultiplier.
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system. Where more
+ than one point is to be normalized, this method will generally be more efficient than
+ normalizing each point separately.
+
+ @param points
+ An array of points that will be updated in place with their normalized versions,
+ where necessary
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system. Where more
+ than one point is to be normalized, this method will generally be more efficient than
+ normalizing each point separately. An (optional) z-scaling factor can be applied; effectively
+ each z coordinate is scaled by this value prior to normalization (but only one
+ actual multiplication is needed).
+
+ @param points
+ An array of points that will be updated in place with their normalized versions,
+ where necessary
+ @param off
+ The start of the range of points to normalize
+ @param len
+ The length of the range of points to normalize
+ @param iso
+ The (optional) z-scaling factor - can be null
+
+
+ Sets the default ECMultiplier, unless already set.
+
+
+ Decode a point on this curve from its ASN.1 encoding. The different
+ encodings are taken account of, including point compression for
+ Fp (X9.62 s 4.2.1 pg 17).
+ @return The decoded point.
+
+
+ Elliptic curve over Fp
+
+
+ The auxiliary values s0 and
+ s1 used for partial modular reduction for
+ Koblitz curves.
+
+
+ Solves a quadratic equation z2 + z = beta(X9.62
+ D.1.6) The other solution is z + 1.
+
+ @param beta
+ The value to solve the qradratic equation for.
+ @return the solution for z2 + z = beta or
+ null if no solution exists.
+
+
+ @return the auxiliary values s0 and
+ s1 used for partial modular reduction for
+ Koblitz curves.
+
+
+ Returns true if this is a Koblitz curve (ABC curve).
+ @return true if this is a Koblitz curve (ABC curve), false otherwise
+
+
+ Elliptic curves over F2m. The Weierstrass equation is given by
+ y2 + xy = x3 + ax2 + b.
+
+
+ The exponent m of F2m .
+
+
+ TPB: The integer k where xm +
+ xk + 1 represents the reduction polynomial
+ f(z).
+ PPB: The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ TPB: Always set to 0
+ PPB: The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ TPB: Always set to 0
+ PPB: The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ The point at infinity on this curve.
+
+
+ Constructor for Trinomial Polynomial Basis (TPB).
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+
+
+ Constructor for Trinomial Polynomial Basis (TPB).
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param order The order of the main subgroup of the elliptic curve.
+ @param cofactor The cofactor of the elliptic curve, i.e.
+ #Ea (F2m ) = h * n.
+
+
+ Constructor for Pentanomial Polynomial Basis (PPB).
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+
+
+ Constructor for Pentanomial Polynomial Basis (PPB).
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param order The order of the main subgroup of the elliptic curve.
+ @param cofactor The cofactor of the elliptic curve, i.e.
+ #Ea (F2m ) = h * n.
+
+
+ Return true if curve uses a Trinomial basis.
+
+ @return true if curve Trinomial, false otherwise.
+
+
+ return the field name for this field.
+
+ @return the string "Fp".
+
+
+ return a sqrt root - the routine verifies that the calculation
+ returns the right value - if none exists it returns null.
+
+
+ Class representing the Elements of the finite field
+ F2m in polynomial basis (PB)
+ representation. Both trinomial (Tpb) and pentanomial (Ppb) polynomial
+ basis representations are supported. Gaussian normal basis (GNB)
+ representation is not supported.
+
+
+ Indicates gaussian normal basis representation (GNB). Number chosen
+ according to X9.62. GNB is not implemented at present.
+
+
+ Indicates trinomial basis representation (Tpb). Number chosen
+ according to X9.62.
+
+
+ Indicates pentanomial basis representation (Ppb). Number chosen
+ according to X9.62.
+
+
+ Tpb or Ppb.
+
+
+ The exponent m of F2m .
+
+
+ The LongArray holding the bits.
+
+
+ Constructor for Ppb.
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param x The BigInteger representing the value of the field element.
+
+
+ Constructor for Tpb.
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param x The BigInteger representing the value of the field element.
+
+
+ Checks, if the ECFieldElements a and b
+ are elements of the same field F2m
+ (having the same representation).
+ @param a field element.
+ @param b field element to be compared.
+ @throws ArgumentException if a and b
+ are not elements of the same field
+ F2m (having the same
+ representation).
+
+
+ @return the representation of the field
+ F2m , either of
+ {@link F2mFieldElement.Tpb} (trinomial
+ basis representation) or
+ {@link F2mFieldElement.Ppb} (pentanomial
+ basis representation).
+
+
+ @return the degree m of the reduction polynomial
+ f(z).
+
+
+ @return Tpb: The integer k where xm +
+ xk + 1 represents the reduction polynomial
+ f(z).
+ Ppb: The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ @return Tpb: Always returns 0
+ Ppb: The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ @return Tpb: Always set to 0
+ Ppb: The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ base class for points on elliptic curves.
+
+
+ Normalizes this point, and then returns the affine x-coordinate.
+
+ Note: normalization can be expensive, this method is deprecated in favour
+ of caller-controlled normalization.
+
+
+ Normalizes this point, and then returns the affine y-coordinate.
+
+ Note: normalization can be expensive, this method is deprecated in favour
+ of caller-controlled normalization.
+
+
+ Returns the affine x-coordinate after checking that this point is normalized.
+
+ @return The affine x-coordinate of this point
+ @throws IllegalStateException if the point is not normalized
+
+
+ Returns the affine y-coordinate after checking that this point is normalized
+
+ @return The affine y-coordinate of this point
+ @throws IllegalStateException if the point is not normalized
+
+
+ Returns the x-coordinate.
+
+ Caution: depending on the curve's coordinate system, this may not be the same value as in an
+ affine coordinate system; use Normalize() to get a point where the coordinates have their
+ affine values, or use AffineXCoord if you expect the point to already have been normalized.
+
+ @return the x-coordinate of this point
+
+
+ Returns the y-coordinate.
+
+ Caution: depending on the curve's coordinate system, this may not be the same value as in an
+ affine coordinate system; use Normalize() to get a point where the coordinates have their
+ affine values, or use AffineYCoord if you expect the point to already have been normalized.
+
+ @return the y-coordinate of this point
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system.
+
+ @return a new ECPoint instance representing the same point, but with normalized coordinates
+
+
+ return the field element encoded with point compression. (S 4.3.6)
+
+
+ Multiplies this ECPoint by the given number.
+ @param k The multiplicator.
+ @return k * this.
+
+
+ Elliptic curve points over Fp
+
+
+ Create a point which encodes without point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+
+
+ Create a point that encodes with or without point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+ @param withCompression if true encode with point compression
+
+
+ Elliptic curve points over F2m
+
+
+ @param curve base curve
+ @param x x point
+ @param y y point
+
+
+ @param curve base curve
+ @param x x point
+ @param y y point
+ @param withCompression true if encode with point compression.
+
+
+ Constructor for point at infinity
+
+
+ Class representing a simple version of a big decimal. A
+ SimpleBigDecimal is basically a
+ {@link java.math.BigInteger BigInteger} with a few digits on the right of
+ the decimal point. The number of (binary) digits on the right of the decimal
+ point is called the scale of the SimpleBigDecimal.
+ Unlike in {@link java.math.BigDecimal BigDecimal}, the scale is not adjusted
+ automatically, but must be set manually. All SimpleBigDecimals
+ taking part in the same arithmetic operation must have equal scale. The
+ result of a multiplication of two SimpleBigDecimals returns a
+ SimpleBigDecimal with double scale.
+
+
+ Returns a SimpleBigDecimal representing the same numerical
+ value as value.
+ @param value The value of the SimpleBigDecimal to be
+ created.
+ @param scale The scale of the SimpleBigDecimal to be
+ created.
+ @return The such created SimpleBigDecimal.
+
+
+ Constructor for SimpleBigDecimal. The value of the
+ constructed SimpleBigDecimal Equals bigInt /
+ 2scale .
+ @param bigInt The bigInt value parameter.
+ @param scale The scale of the constructed SimpleBigDecimal.
+
+
+ Class holding methods for point multiplication based on the window
+ τ-adic nonadjacent form (WTNAF). The algorithms are based on the
+ paper "Improved Algorithms for Arithmetic on Anomalous Binary Curves"
+ by Jerome A. Solinas. The paper first appeared in the Proceedings of
+ Crypto 1997.
+
+
+ The window width of WTNAF. The standard value of 4 is slightly less
+ than optimal for running time, but keeps space requirements for
+ precomputation low. For typical curves, a value of 5 or 6 results in
+ a better running time. When changing this value, the
+ αu 's must be computed differently, see
+ e.g. "Guide to Elliptic Curve Cryptography", Darrel Hankerson,
+ Alfred Menezes, Scott Vanstone, Springer-Verlag New York Inc., 2004,
+ p. 121-122
+
+
+ 24
+
+
+ The αu 's for a=0 as an array
+ of ZTauElements.
+
+
+ The αu 's for a=0 as an array
+ of TNAFs.
+
+
+ The αu 's for a=1 as an array
+ of ZTauElements.
+
+
+ The αu 's for a=1 as an array
+ of TNAFs.
+
+
+ Computes the norm of an element λ of
+ Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ].
+ @return The norm of λ.
+
+
+ Computes the norm of an element λ of
+ R [τ], where λ = u + vτ
+ and u and u are real numbers (elements of
+ R ).
+ @param mu The parameter μ of the elliptic curve.
+ @param u The real part of the element λ of
+ R [τ].
+ @param v The τ-adic part of the element
+ λ of R [τ].
+ @return The norm of λ.
+
+
+ Rounds an element λ of R [τ]
+ to an element of Z [τ], such that their difference
+ has minimal norm. λ is given as
+ λ = λ0 + λ1 τ.
+ @param lambda0 The component λ0 .
+ @param lambda1 The component λ1 .
+ @param mu The parameter μ of the elliptic curve. Must
+ equal 1 or -1.
+ @return The rounded element of Z [τ].
+ @throws ArgumentException if lambda0 and
+ lambda1 do not have same scale.
+
+
+ Approximate division by n. For an integer
+ k, the value λ = s k / n is
+ computed to c bits of accuracy.
+ @param k The parameter k.
+ @param s The curve parameter s0 or
+ s1 .
+ @param vm The Lucas Sequence element Vm .
+ @param a The parameter a of the elliptic curve.
+ @param m The bit length of the finite field
+ F m .
+ @param c The number of bits of accuracy, i.e. the scale of the returned
+ SimpleBigDecimal.
+ @return The value λ = s k / n computed to
+ c bits of accuracy.
+
+
+ Computes the τ-adic NAF (non-adjacent form) of an
+ element λ of Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ].
+ @return The τ-adic NAF of λ.
+
+
+ Applies the operation τ() to an
+ AbstractF2mPoint.
+ @param p The AbstractF2mPoint to which τ() is applied.
+ @return τ(p)
+
+
+ Returns the parameter μ of the elliptic curve.
+ @param curve The elliptic curve from which to obtain μ.
+ The curve must be a Koblitz curve, i.e. a Equals
+ 0 or 1 and b Equals
+ 1.
+ @return μ of the elliptic curve.
+ @throws ArgumentException if the given ECCurve is not a Koblitz
+ curve.
+
+
+ Calculates the Lucas Sequence elements Uk-1 and
+ Uk or Vk-1 and
+ Vk .
+ @param mu The parameter μ of the elliptic curve.
+ @param k The index of the second element of the Lucas Sequence to be
+ returned.
+ @param doV If set to true, computes Vk-1 and
+ Vk , otherwise Uk-1 and
+ Uk .
+ @return An array with 2 elements, containing Uk-1
+ and Uk or Vk-1
+ and Vk .
+
+
+ Computes the auxiliary value tw . If the width is
+ 4, then for mu = 1, tw = 6 and for
+ mu = -1, tw = 10
+ @param mu The parameter μ of the elliptic curve.
+ @param w The window width of the WTNAF.
+ @return the auxiliary value tw
+
+
+ Computes the auxiliary values s0 and
+ s1 used for partial modular reduction.
+ @param curve The elliptic curve for which to compute
+ s0 and s1 .
+ @throws ArgumentException if curve is not a
+ Koblitz curve (Anomalous Binary Curve, ABC).
+
+
+ Partial modular reduction modulo
+ (τm - 1)/(τ - 1).
+ @param k The integer to be reduced.
+ @param m The bitlength of the underlying finite field.
+ @param a The parameter a of the elliptic curve.
+ @param s The auxiliary values s0 and
+ s1 .
+ @param mu The parameter μ of the elliptic curve.
+ @param c The precision (number of bits of accuracy) of the partial
+ modular reduction.
+ @return ρ := k partmod (τm - 1)/(τ - 1)
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by a BigInteger using the reduced τ-adic
+ NAF (RTNAF) method.
+ @param p The AbstractF2mPoint to Multiply.
+ @param k The BigInteger by which to Multiply p.
+ @return k * p
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the τ-adic NAF (TNAF) method.
+ @param p The AbstractF2mPoint to Multiply.
+ @param lambda The element λ of
+ Z [τ].
+ @return λ * p
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the τ-adic NAF (TNAF) method, given the TNAF
+ of λ.
+ @param p The AbstractF2mPoint to Multiply.
+ @param u The the TNAF of λ..
+ @return λ * p
+
+
+ Computes the [τ]-adic window NAF of an element
+ λ of Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ] of which to compute the
+ [τ]-adic NAF.
+ @param width The window width of the resulting WNAF.
+ @param pow2w 2width .
+ @param tw The auxiliary value tw .
+ @param alpha The αu 's for the window width.
+ @return The [τ]-adic window NAF of
+ λ.
+
+
+ Does the precomputation for WTNAF multiplication.
+ @param p The ECPoint for which to do the precomputation.
+ @param a The parameter a of the elliptic curve.
+ @return The precomputation array for p.
+
+
+ Class representing an element of Z [τ]. Let
+ λ be an element of Z [τ]. Then
+ λ is given as λ = u + vτ. The
+ components u and v may be used directly, there
+ are no accessor methods.
+ Immutable class.
+
+
+ The "real" part of λ.
+
+
+ The "τ-adic" part of λ.
+
+
+ Constructor for an element λ of
+ Z [τ].
+ @param u The "real" part of λ.
+ @param v The "τ-adic" part of
+ λ.
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+ @param withCompression if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(boolean)}
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ Joye's double-add algorithm.
+
+
+ Interface for classes encapsulating a point multiplication algorithm
+ for ECPoints.
+
+
+ Multiplies the ECPoint p by k, i.e.
+ p is added k times to itself.
+ @param p The ECPoint to be multiplied.
+ @param k The factor by which p is multiplied.
+ @return p multiplied by k.
+
+
+ Class holding precomputation data for fixed-point multiplications.
+
+
+ Array holding the precomputed ECPoints used for a fixed
+ point multiplication.
+
+
+ The width used for the precomputation. If a larger width precomputation
+ is already available this may be larger than was requested, so calling
+ code should refer to the actual width.
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (right-to-left) using
+ mixed coordinates.
+
+
+ By default, addition will be done in Jacobian coordinates, and doubling will be done in
+ Modified Jacobian coordinates (independent of the original coordinate system of each point).
+
+
+ Montgomery ladder.
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (left-to-right).
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (right-to-left).
+
+
+ Interface for classes storing precomputation data for multiplication
+ algorithms. Used as a Memento (see GOF patterns) for
+ WNafMultiplier.
+
+
+ Class implementing the WNAF (Window Non-Adjacent Form) multiplication
+ algorithm.
+
+
+ Multiplies this by an integer k using the
+ Window NAF method.
+ @param k The integer by which this is multiplied.
+ @return A new ECPoint which equals this
+ multiplied by k.
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @return the window size to use
+
+
+ Class holding precomputation data for the WNAF (Window Non-Adjacent Form)
+ algorithm.
+
+
+ Array holding the precomputed ECPoints used for a Window
+ NAF multiplication.
+
+
+ Array holding the negations of the precomputed ECPoints used
+ for a Window NAF multiplication.
+
+
+ Holds an ECPoint representing Twice(this). Used for the
+ Window NAF multiplication to create or extend the precomputed values.
+
+
+ Computes the Window NAF (non-adjacent Form) of an integer.
+ @param width The width w of the Window NAF. The width is
+ defined as the minimal number w, such that for any
+ w consecutive digits in the resulting representation, at
+ most one is non-zero.
+ @param k The integer of which the Window NAF is computed.
+ @return The Window NAF of the given width, such that the following holds:
+ k = ∑i=0 l-1 ki 2i
+ , where the ki denote the elements of the
+ returned byte[].
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @return the window size to use
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @param windowSizeCutoffs a monotonically increasing list of bit sizes at which to increment the window width
+ @return the window size to use
+
+
+ Class implementing the WTNAF (Window
+ τ-adic Non-Adjacent Form) algorithm.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by k using the reduced τ-adic NAF (RTNAF)
+ method.
+ @param p The AbstractF2mPoint to multiply.
+ @param k The integer by which to multiply k.
+ @return p multiplied by k.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ] using
+ the τ-adic NAF (TNAF) method.
+ @param p The AbstractF2mPoint to multiply.
+ @param lambda The element λ of
+ Z [τ] of which to compute the
+ [τ]-adic NAF.
+ @return p multiplied by λ.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the window τ-adic NAF (TNAF) method, given the
+ WTNAF of λ.
+ @param p The AbstractF2mPoint to multiply.
+ @param u The the WTNAF of λ..
+ @return λ * p
+
+
+ Class holding precomputation data for the WTNAF (Window
+ τ-adic Non-Adjacent Form) algorithm.
+
+
+ Array holding the precomputed AbstractF2mPoints used for the
+ WTNAF multiplication in
+ {@link org.bouncycastle.math.ec.multiplier.WTauNafMultiplier.multiply()
+ WTauNafMultiplier.multiply()}.
+
+
+ 'Zeroless' Signed Digit Left-to-Right.
+
+
+ 'Zeroless' Signed Digit Right-to-Left.
+
+
+
+
+ BasicOcspResponse ::= SEQUENCE {
+ tbsResponseData ResponseData,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL
+ }
+
+
+
+
+ The DER encoding of the tbsResponseData field.
+ In the event of an encoding error.
+
+
+ The certificates, if any, associated with the response.
+ In the event of an encoding error.
+
+
+
+ Verify the signature against the tbsResponseData object we contain.
+
+
+
+ The ASN.1 encoded representation of this object.
+
+
+ Generator for basic OCSP response objects.
+
+
+ basic constructor
+
+
+ construct with the responderID to be the SHA-1 keyHash of the passed in public key.
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param certStatus status of the certificate - null if okay
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param nextUpdate date when next update should be requested
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param thisUpdate date this response was valid on
+ @param nextUpdate date when next update should be requested
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Set the extensions for the response.
+
+ @param responseExtensions the extension object to carry.
+
+
+
+ Generate the signed response using the passed in signature calculator.
+
+ Implementation of signing calculator factory.
+ The certificate chain associated with the response signer.
+ "produced at" date.
+
+
+
+ Return an IEnumerable of the signature names supported by the generator.
+
+ @return an IEnumerable containing recognised names.
+
+
+ create from an issuer certificate and the serial number of the
+ certificate it signed.
+ @exception OcspException if any problems occur creating the id fields.
+
+
+ return the serial number for the certificate associated
+ with this request.
+
+
+ Create a new CertificateID for a new serial number derived from a previous one
+ calculated for the same CA certificate.
+
+ @param original the previously calculated CertificateID for the CA.
+ @param newSerialNumber the serial number for the new certificate of interest.
+
+ @return a new CertificateID for newSerialNumber
+
+
+
+ OcspRequest ::= SEQUENCE {
+ tbsRequest TBSRequest,
+ optionalSignature [0] EXPLICIT Signature OPTIONAL }
+
+ TBSRequest ::= SEQUENCE {
+ version [0] EXPLICIT Version DEFAULT v1,
+ requestorName [1] EXPLICIT GeneralName OPTIONAL,
+ requestList SEQUENCE OF Request,
+ requestExtensions [2] EXPLICIT Extensions OPTIONAL }
+
+ Signature ::= SEQUENCE {
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL}
+
+ Version ::= INTEGER { v1(0) }
+
+ Request ::= SEQUENCE {
+ reqCert CertID,
+ singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL }
+
+ CertID ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ issuerNameHash OCTET STRING, -- Hash of Issuer's DN
+ issuerKeyHash OCTET STRING, -- Hash of Issuers public key
+ serialNumber CertificateSerialNumber }
+
+
+
+ Return the DER encoding of the tbsRequest field.
+ @return DER encoding of tbsRequest
+ @throws OcspException in the event of an encoding error.
+
+
+ return the object identifier representing the signature algorithm
+
+
+ If the request is signed return a possibly empty CertStore containing the certificates in the
+ request. If the request is not signed the method returns null.
+
+ @return null if not signed, a CertStore otherwise
+ @throws OcspException
+
+
+ Return whether or not this request is signed.
+
+ @return true if signed false otherwise.
+
+
+ Verify the signature against the TBSRequest object we contain.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Add a request for the given CertificateID.
+
+ @param certId certificate ID of interest
+
+
+ Add a request with extensions
+
+ @param certId certificate ID of interest
+ @param singleRequestExtensions the extensions to attach to the request
+
+
+ Set the requestor name to the passed in X509Principal
+
+ @param requestorName a X509Principal representing the requestor name.
+
+
+ Generate an unsigned request
+
+ @return the OcspReq
+ @throws OcspException
+
+
+ Return an IEnumerable of the signature names supported by the generator.
+
+ @return an IEnumerable containing recognised names.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ base generator for an OCSP response - at the moment this only supports the
+ generation of responses containing BasicOCSP responses.
+
+
+ note 4 is not used.
+
+
+ Carrier for a ResponderID.
+
+
+ wrapper for the RevokedInfo object
+
+
+ return the revocation reason. Note: this field is optional, test for it
+ with hasRevocationReason() first.
+ @exception InvalidOperationException if a reason is asked for and none is avaliable
+
+
+ Return the status object for the response - null indicates good.
+
+ @return the status object for the response, null if it is good.
+
+
+ return the NextUpdate value - note: this is an optional field so may
+ be returned as null.
+
+ @return nextUpdate, or null if not present.
+
+
+ wrapper for the UnknownInfo object
+
+
+
+ Utility class for creating IBasicAgreement objects from their names/Oids
+
+
+
+
+ Cipher Utility class contains methods that can not be specifically grouped into other classes.
+
+
+
+
+ Returns a ObjectIdentifier for a give encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ Utility class for creating IDigest objects from their names/Oids
+
+
+
+
+ Returns a ObjectIdentifier for a given digest mechanism.
+
+ A string representation of the digest meanism.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ A class containing methods to interface the BouncyCastle world to the .NET Crypto world.
+
+
+
+
+ Create an System.Security.Cryptography.X509Certificate from an X509Certificate Structure.
+
+
+ A System.Security.Cryptography.X509Certificate.
+
+
+
+ Utility class for creating HMac object from their names/Oids
+
+
+
+
+
+
+
+
+
+ Returns a ObjectIdentifier for a give encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ Create and auto-seed an instance based on the given algorithm.
+
+ Equivalent to GetInstance(algorithm, true)
+ e.g. "SHA256PRNG"
+
+
+
+ Create an instance based on the given algorithm, with optional auto-seeding
+
+ e.g. "SHA256PRNG"
+ If true, the instance will be auto-seeded.
+
+
+
+ To replicate existing predictable output, replace with GetInstance("SHA1PRNG", false), followed by SetSeed(seed)
+
+
+
+ Use the specified instance of IRandomGenerator as random source.
+
+ This constructor performs no seeding of either the IRandomGenerator or the
+ constructed SecureRandom . It is the responsibility of the client to provide
+ proper seed material as necessary/appropriate for the given IRandomGenerator
+ implementation.
+
+ The source to generate all random bytes from.
+
+
+ base constructor.
+
+
+ create a SecurityUtilityException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+
+ Signer Utility class contains methods that can not be specifically grouped into other classes.
+
+
+
+
+ Returns an ObjectIdentifier for a given encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the OID is not available.
+
+
+
+ Utility class for creating IWrapper objects from their names/Oids
+
+
+
+ PEM generator for the original set of PEM objects used in Open SSL.
+
+
+ Class for reading OpenSSL PEM encoded streams containing
+ X509 certificates, PKCS8 encoded keys and PKCS7 objects.
+
+ In the case of PKCS7 objects the reader will return a CMS ContentInfo object. Keys and
+ Certificates will be returned using the appropriate java.security type.
+
+
+ Create a new PemReader
+
+ @param reader the Reader
+
+
+ Create a new PemReader with a password finder
+
+ @param reader the Reader
+ @param pFinder the password finder
+
+
+ Reads in a X509Certificate.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a X509CRL.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a PKCS10 certification request.
+
+ @return the certificate request.
+ @throws IOException if an I/O error occured
+
+
+ Reads in a X509 Attribute Certificate.
+
+ @return the X509 Attribute Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a PKCS7 object. This returns a ContentInfo object suitable for use with the CMS
+ API.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Read a Key Pair
+
+
+ General purpose writer for OpenSSL PEM objects.
+
+
+ The TextWriter object to write the output to.
+
+
+ Constructor for an unencrypted private key PEM object.
+
+ @param key private key to be encoded.
+
+
+ Constructor for an encrypted private key PEM object.
+
+ @param key private key to be encoded
+ @param algorithm encryption algorithm to use
+ @param provider provider to use
+ @throws NoSuchAlgorithmException if algorithm/mode cannot be found
+
+
+
+ A class for verifying and creating Pkcs10 Certification requests.
+
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+ see
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ Name of Sig Alg.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+ Matching Private key for nominated (above) public key to be used to sign the request.
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ The factory for signature calculators to sign the PKCS#10 request with.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+ Matching Private key for nominated (above) public key to be used to sign the request.
+
+
+
+ Get the public key.
+
+ The public key.
+
+
+
+ Verify Pkcs10 Cert Request is valid.
+
+ true = valid.
+
+
+
+ A class for creating and verifying Pkcs10 Certification requests (this is an extension on ).
+ The requests are made using delay signing. This is useful for situations where
+ the private key is in another environment and not directly accessible (e.g. HSM)
+ So the first step creates the request, then the signing is done outside this
+ object and the signature is then used to complete the request.
+
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+ see
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ Name of Sig Alg.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+
+ After the object is constructed use the and finally the
+ SignRequest methods to finalize the request.
+
+
+
+ simply return the cert entry for the private key
+
+
+ Utility class for reencoding PKCS#12 files to definite length.
+
+
+ Just re-encode the outer layer of the PKCS#12 file to definite length encoding.
+
+ @param berPKCS12File - original PKCS#12 file
+ @return a byte array representing the DER encoding of the PFX structure
+ @throws IOException
+
+
+ Re-encode the PKCS#12 structure to definite length encoding at the inner layer
+ as well, recomputing the MAC accordingly.
+
+ @param berPKCS12File - original PKCS12 file.
+ @param provider - provider to use for MAC calculation.
+ @return a byte array representing the DER encoding of the PFX structure.
+ @throws IOException on parsing, encoding errors.
+
+
+
+ Returns the revocationDate.
+
+
+
+
+ Returns the certStatus.
+
+
+
+ Returns an immutable Set of X.509 attribute certificate
+ extensions that this PkixAttrCertChecker supports or
+ null if no extensions are supported.
+
+ Each element of the set is a String representing the
+ Object Identifier (OID) of the X.509 extension that is supported.
+
+
+ All X.509 attribute certificate extensions that a
+ PkixAttrCertChecker might possibly be able to process
+ should be included in the set.
+
+
+ @return an immutable Set of X.509 extension OIDs (in
+ String format) supported by this
+ PkixAttrCertChecker, or null if no
+ extensions are supported
+
+
+ Performs checks on the specified attribute certificate. Every handled
+ extension is rmeoved from the unresolvedCritExts
+ collection.
+
+ @param attrCert The attribute certificate to be checked.
+ @param certPath The certificate path which belongs to the attribute
+ certificate issuer public key certificate.
+ @param holderCertPath The certificate path which belongs to the holder
+ certificate.
+ @param unresolvedCritExts a Collection of OID strings
+ representing the current set of unresolved critical extensions
+ @throws CertPathValidatorException if the specified attribute certificate
+ does not pass the check.
+
+
+ Returns a clone of this object.
+
+ @return a copy of this PkixAttrCertChecker
+
+
+ Build and validate a CertPath using the given parameter.
+
+ @param params PKIXBuilderParameters object containing all information to
+ build the CertPath
+
+
+ CertPathValidatorSpi implementation for X.509 Attribute Certificates la RFC 3281.
+
+ @see org.bouncycastle.x509.ExtendedPkixParameters
+
+
+ Validates an attribute certificate with the given certificate path.
+
+
+ params must be an instance of
+ ExtendedPkixParameters.
+
+ The target constraints in the params must be an
+ X509AttrCertStoreSelector with at least the attribute
+ certificate criterion set. Obey that also target informations may be
+ necessary to correctly validate this attribute certificate.
+
+ The attribute certificate issuer must be added to the trusted attribute
+ issuers with {@link ExtendedPkixParameters#setTrustedACIssuers(Set)}.
+
+ @param certPath The certificate path which belongs to the attribute
+ certificate issuer public key certificate.
+ @param params The PKIX parameters.
+ @return A PKIXCertPathValidatorResult of the result of
+ validating the certPath.
+ @throws InvalidAlgorithmParameterException if params is
+ inappropriate for this validator.
+ @throws CertPathValidatorException if the verification fails.
+
+
+
+ Summary description for PkixBuilderParameters.
+
+
+
+ Returns an instance of PkixBuilderParameters.
+
+ This method can be used to get a copy from other
+ PKIXBuilderParameters, PKIXParameters,
+ and ExtendedPKIXParameters instances.
+
+
+ @param pkixParams The PKIX parameters to create a copy of.
+ @return An PkixBuilderParameters instance.
+
+
+
+ Excluded certificates are not used for building a certification path.
+
+ the excluded certificates.
+
+
+
+ Sets the excluded certificates which are not used for building a
+ certification path. If the ISet is null an
+ empty set is assumed.
+
+
+ The given set is cloned to protect it against subsequent modifications.
+
+ The excluded certificates to set.
+
+
+ Can alse handle ExtendedPKIXBuilderParameters and
+ PKIXBuilderParameters.
+
+ @param params Parameters to set.
+ @see org.bouncycastle.x509.ExtendedPKIXParameters#setParams(java.security.cert.PKIXParameters)
+
+
+ Makes a copy of this PKIXParameters object. Changes to the
+ copy will not affect the original and vice versa.
+
+ @return a copy of this PKIXParameters object
+
+
+ An immutable sequence of certificates (a certification path).
+
+ This is an abstract class that defines the methods common to all CertPaths.
+ Subclasses can handle different kinds of certificates (X.509, PGP, etc.).
+
+ All CertPath objects have a type, a list of Certificates, and one or more
+ supported encodings. Because the CertPath class is immutable, a CertPath
+ cannot change in any externally visible way after being constructed. This
+ stipulation applies to all public fields and methods of this class and any
+ added or overridden by subclasses.
+
+ The type is a string that identifies the type of Certificates in the
+ certification path. For each certificate cert in a certification path
+ certPath, cert.getType().equals(certPath.getType()) must be true.
+
+ The list of Certificates is an ordered List of zero or more Certificates.
+ This List and all of the Certificates contained in it must be immutable.
+
+ Each CertPath object must support one or more encodings so that the object
+ can be translated into a byte array for storage or transmission to other
+ parties. Preferably, these encodings should be well-documented standards
+ (such as PKCS#7). One of the encodings supported by a CertPath is considered
+ the default encoding. This encoding is used if no encoding is explicitly
+ requested (for the {@link #getEncoded()} method, for instance).
+
+ All CertPath objects are also Serializable. CertPath objects are resolved
+ into an alternate {@link CertPathRep} object during serialization. This
+ allows a CertPath object to be serialized into an equivalent representation
+ regardless of its underlying implementation.
+
+ CertPath objects can be created with a CertificateFactory or they can be
+ returned by other classes, such as a CertPathBuilder.
+
+ By convention, X.509 CertPaths (consisting of X509Certificates), are ordered
+ starting with the target certificate and ending with a certificate issued by
+ the trust anchor. That is, the issuer of one certificate is the subject of
+ the following one. The certificate representing the
+ {@link TrustAnchor TrustAnchor} should not be included in the certification
+ path. Unvalidated X.509 CertPaths may not follow these conventions. PKIX
+ CertPathValidators will detect any departure from these conventions that
+ cause the certification path to be invalid and throw a
+ CertPathValidatorException.
+
+ Concurrent Access
+
+ All CertPath objects must be thread-safe. That is, multiple threads may
+ concurrently invoke the methods defined in this class on a single CertPath
+ object (or more than one) with no ill effects. This is also true for the List
+ returned by CertPath.getCertificates.
+
+ Requiring CertPath objects to be immutable and thread-safe allows them to be
+ passed around to various pieces of code without worrying about coordinating
+ access. Providing this thread-safety is generally not difficult, since the
+ CertPath and List objects in question are immutable.
+
+ @see CertificateFactory
+ @see CertPathBuilder
+
+ CertPath implementation for X.509 certificates.
+
+
+
+ @param certs
+
+
+ Creates a CertPath of the specified type.
+ This constructor is protected because most users should use
+ a CertificateFactory to create CertPaths.
+ @param type the standard name of the type of Certificatesin this path
+
+
+
+ Creates a CertPath of the specified type.
+ This constructor is protected because most users should use
+ a CertificateFactory to create CertPaths.
+
+ @param type the standard name of the type of Certificatesin this path
+
+
+
+ Returns an iteration of the encodings supported by this
+ certification path, with the default encoding
+ first. Attempts to modify the returned Iterator via its
+ remove method result in an UnsupportedOperationException.
+
+ @return an Iterator over the names of the supported encodings (as Strings)
+
+
+
+ Compares this certification path for equality with the specified object.
+ Two CertPaths are equal if and only if their types are equal and their
+ certificate Lists (and by implication the Certificates in those Lists)
+ are equal. A CertPath is never equal to an object that is not a CertPath.
+
+ This algorithm is implemented by this method. If it is overridden, the
+ behavior specified here must be maintained.
+
+ @param other
+ the object to test for equality with this certification path
+
+ @return true if the specified object is equal to this certification path,
+ false otherwise
+
+ @see Object#hashCode() Object.hashCode()
+
+
+ Returns the encoded form of this certification path, using
+ the default encoding.
+
+ @return the encoded bytes
+ @exception CertificateEncodingException if an encoding error occurs
+
+
+
+ Returns the encoded form of this certification path, using
+ the specified encoding.
+
+ @param encoding the name of the encoding to use
+ @return the encoded bytes
+ @exception CertificateEncodingException if an encoding error
+ occurs or the encoding requested is not supported
+
+
+
+
+ Returns the list of certificates in this certification
+ path.
+
+
+
+ Return a DERObject containing the encoded certificate.
+
+ @param cert the X509Certificate object to be encoded
+
+ @return the DERObject
+
+
+
+ Implements the PKIX CertPathBuilding algorithm for BouncyCastle.
+
+ @see CertPathBuilderSpi
+
+
+ Build and validate a CertPath using the given parameter.
+
+ @param params PKIXBuilderParameters object containing all information to
+ build the CertPath
+
+
+
+ Summary description for PkixCertPathBuilderException.
+
+
+
+
+ Summary description for PkixCertPathBuilderResult.
+
+
+
+ * Initializes the internal state of this PKIXCertPathChecker.
+ *
+ * The forward flag specifies the order that certificates
+ * will be passed to the {@link #check check} method (forward or reverse). A
+ * PKIXCertPathChecker must support reverse checking
+ * and may support forward checking.
+ *
+ *
+ * @param forward
+ * the order that certificates are presented to the
+ * check method. If true,
+ * certificates are presented from target to most-trusted CA
+ * (forward); if false, from most-trusted CA to
+ * target (reverse).
+ * @exception CertPathValidatorException
+ * if this PKIXCertPathChecker is unable to
+ * check certificates in the specified order; it should never
+ * be thrown if the forward flag is false since reverse
+ * checking must be supported
+
+
+ Indicates if forward checking is supported. Forward checking refers to
+ the ability of the PKIXCertPathChecker to perform its
+ checks when certificates are presented to the check method
+ in the forward direction (from target to most-trusted CA).
+
+ @return true if forward checking is supported,
+ false otherwise
+
+
+ * Returns an immutable Set of X.509 certificate extensions
+ * that this PKIXCertPathChecker supports (i.e. recognizes,
+ * is able to process), or null if no extensions are
+ * supported.
+ *
+ * Each element of the set is a String representing the
+ * Object Identifier (OID) of the X.509 extension that is supported. The OID
+ * is represented by a set of nonnegative integers separated by periods.
+ *
+ * All X.509 certificate extensions that a PKIXCertPathChecker
+ * might possibly be able to process should be included in the set.
+ *
+ *
+ * @return an immutable Set of X.509 extension OIDs (in
+ * String format) supported by this
+ * PKIXCertPathChecker, or null if no
+ * extensions are supported
+
+
+ Performs the check(s) on the specified certificate using its internal
+ state and removes any critical extensions that it processes from the
+ specified collection of OID strings that represent the unresolved
+ critical extensions. The certificates are presented in the order
+ specified by the init method.
+
+ @param cert
+ the Certificate to be checked
+ @param unresolvedCritExts
+ a Collection of OID strings representing the
+ current set of unresolved critical extensions
+ @exception CertPathValidatorException
+ if the specified certificate does not pass the check
+
+
+ Returns a clone of this object. Calls the Object.clone()
+ method. All subclasses which maintain state must support and override
+ this method, if necessary.
+
+ @return a copy of this PKIXCertPathChecker
+
+
+ The Service Provider Interface (SPI )
+ for the {@link CertPathValidator CertPathValidator} class. All
+ CertPathValidator implementations must include a class (the
+ SPI class) that extends this class (CertPathValidatorSpi)
+ and implements all of its methods. In general, instances of this class
+ should only be accessed through the CertPathValidator class.
+ For details, see the Java Cryptography Architecture.
+
+ Concurrent Access
+
+ Instances of this class need not be protected against concurrent
+ access from multiple threads. Threads that need to access a single
+ CertPathValidatorSpi instance concurrently should synchronize
+ amongst themselves and provide the necessary locking before calling the
+ wrapping CertPathValidator object.
+
+ However, implementations of CertPathValidatorSpi may still
+ encounter concurrency issues, since multiple threads each
+ manipulating a different CertPathValidatorSpi instance need not
+ synchronize.
+
+ CertPathValidatorSpi implementation for X.509 Certificate validation a la RFC
+ 3280.
+
+
+
+ An exception indicating one of a variety of problems encountered when
+ validating a certification path.
+
+ A CertPathValidatorException provides support for wrapping
+ exceptions. The {@link #getCause getCause} method returns the throwable,
+ if any, that caused this exception to be thrown.
+
+ A CertPathValidatorException may also include the
+ certification path that was being validated when the exception was thrown
+ and the index of the certificate in the certification path that caused the
+ exception to be thrown. Use the {@link #getCertPath getCertPath} and
+ {@link #getIndex getIndex} methods to retrieve this information.
+
+ Concurrent Access
+
+ Unless otherwise specified, the methods defined in this class are not
+ thread-safe. Multiple threads that need to access a single
+ object concurrently should synchronize amongst themselves and
+ provide the necessary locking. Multiple threads each manipulating
+ separate objects need not synchronize.
+
+ @see CertPathValidator
+
+
+
+
+ Creates a PkixCertPathValidatorException with the given detail
+ message. A detail message is a String that describes this
+ particular exception.
+
+ the detail message
+
+
+
+ Creates a PkixCertPathValidatorException with the specified
+ detail message and cause.
+
+ the detail message
+ the cause (which is saved for later retrieval by the
+ {@link #getCause getCause()} method). (A null
+ value is permitted, and indicates that the cause is
+ nonexistent or unknown.)
+
+
+
+ Creates a PkixCertPathValidatorException with the specified
+ detail message, cause, certification path, and index.
+
+ the detail message (or null if none)
+ the cause (or null if none)
+ the certification path that was in the process of being
+ validated when the error was encountered
+ the index of the certificate in the certification path that *
+
+
+
+ Returns the detail message for this CertPathValidatorException.
+
+ the detail message, or null if neither the message nor cause were specified
+
+
+ Returns the certification path that was being validated when the
+ exception was thrown.
+
+ @return the CertPath that was being validated when the
+ exception was thrown (or null if not specified)
+
+
+ Returns the index of the certificate in the certification path that
+ caused the exception to be thrown. Note that the list of certificates in
+ a CertPath is zero based. If no index has been set, -1 is
+ returned.
+
+ @return the index that has been set, or -1 if none has been set
+
+
+
+ Summary description for PkixCertPathValidatorResult.
+
+
+
+
+ Summary description for PkixCertPathValidatorUtilities.
+
+
+
+
+ key usage bits
+
+
+
+
+ Search the given Set of TrustAnchor's for one that is the
+ issuer of the given X509 certificate.
+
+ the X509 certificate
+ a Set of TrustAnchor's
+ the TrustAnchor object if found or
+ null if not.
+
+ @exception
+
+
+
+ Returns the issuer of an attribute certificate or certificate.
+
+ The attribute certificate or certificate.
+ The issuer as X500Principal.
+
+
+ Return the next working key inheriting DSA parameters if necessary.
+
+ This methods inherits DSA parameters from the indexed certificate or
+ previous certificates in the certificate chain to the returned
+ PublicKey. The list is searched upwards, meaning the end
+ certificate is at position 0 and previous certificates are following.
+
+
+ If the indexed certificate does not contain a DSA key this method simply
+ returns the public key. If the DSA key already contains DSA parameters
+ the key is also only returned.
+
+
+ @param certs The certification path.
+ @param index The index of the certificate which contains the public key
+ which should be extended with DSA parameters.
+ @return The public key of the certificate in list position
+ index extended with DSA parameters if applicable.
+ @throws Exception if DSA parameters cannot be inherited.
+
+
+
+ Return a Collection of all certificates or attribute certificates found
+ in the X509Store's that are matching the certSelect criteriums.
+
+ a {@link Selector} object that will be used to select
+ the certificates
+ a List containing only X509Store objects. These
+ are used to search for certificates.
+ a Collection of all found or
+ objects.
+ May be empty but never null.
+
+
+
+ Add the CRL issuers from the cRLIssuer field of the distribution point or
+ from the certificate if not given to the issuer criterion of the
+ selector.
+
+ The issuerPrincipals are a collection with a single
+ X500Principal for X509Certificates. For
+ {@link X509AttributeCertificate}s the issuer may contain more than one
+ X500Principal.
+
+
+ @param dp The distribution point.
+ @param issuerPrincipals The issuers of the certificate or attribute
+ certificate which contains the distribution point.
+ @param selector The CRL selector.
+ @param pkixParams The PKIX parameters containing the cert stores.
+ @throws Exception if an exception occurs while processing.
+ @throws ClassCastException if issuerPrincipals does not
+ contain only X500Principals.
+
+
+ Fetches complete CRLs according to RFC 3280.
+
+ @param dp The distribution point for which the complete CRL
+ @param cert The X509Certificate or
+ {@link org.bouncycastle.x509.X509AttributeCertificate} for
+ which the CRL should be searched.
+ @param currentDate The date for which the delta CRLs must be valid.
+ @param paramsPKIX The extended PKIX parameters.
+ @return A Set of X509CRLs with complete
+ CRLs.
+ @throws Exception if an exception occurs while picking the CRLs
+ or no CRLs are found.
+
+
+ Fetches delta CRLs according to RFC 3280 section 5.2.4.
+
+ @param currentDate The date for which the delta CRLs must be valid.
+ @param paramsPKIX The extended PKIX parameters.
+ @param completeCRL The complete CRL the delta CRL is for.
+ @return A Set of X509CRLs with delta CRLs.
+ @throws Exception if an exception occurs while picking the delta
+ CRLs.
+
+
+ Find the issuer certificates of a given certificate.
+
+ @param cert
+ The certificate for which an issuer should be found.
+ @param pkixParams
+ @return A Collection object containing the issuer
+ X509Certificates. Never null.
+
+ @exception Exception
+ if an error occurs.
+
+
+
+ Extract the value of the given extension, if it exists.
+
+ The extension object.
+ The object identifier to obtain.
+ Asn1Object
+ if the extension cannot be read.
+
+
+
+ crl checking
+ Return a Collection of all CRLs found in the X509Store's that are
+ matching the crlSelect criteriums.
+
+ a {@link X509CRLStoreSelector} object that will be used
+ to select the CRLs
+ a List containing only {@link org.bouncycastle.x509.X509Store
+ X509Store} objects. These are used to search for CRLs
+ a Collection of all found {@link X509CRL X509CRL} objects. May be
+ empty but never null.
+
+
+
+ Returns the intersection of the permitted IP ranges in
+ permitted with ip.
+
+ @param permitted A Set of permitted IP addresses with
+ their subnet mask as byte arrays.
+ @param ips The IP address with its subnet mask.
+ @return The Set of permitted IP ranges intersected with
+ ip.
+
+
+ Returns the union of the excluded IP ranges in excluded
+ with ip.
+
+ @param excluded A Set of excluded IP addresses with their
+ subnet mask as byte arrays.
+ @param ip The IP address with its subnet mask.
+ @return The Set of excluded IP ranges unified with
+ ip as byte arrays.
+
+
+ Calculates the union if two IP ranges.
+
+ @param ipWithSubmask1 The first IP address with its subnet mask.
+ @param ipWithSubmask2 The second IP address with its subnet mask.
+ @return A Set with the union of both addresses.
+
+
+ Calculates the interesction if two IP ranges.
+
+ @param ipWithSubmask1 The first IP address with its subnet mask.
+ @param ipWithSubmask2 The second IP address with its subnet mask.
+ @return A Set with the single IP address with its subnet
+ mask as a byte array or an empty Set.
+
+
+ Concatenates the IP address with its subnet mask.
+
+ @param ip The IP address.
+ @param subnetMask Its subnet mask.
+ @return The concatenated IP address with its subnet mask.
+
+
+ Splits the IP addresses and their subnet mask.
+
+ @param ipWithSubmask1 The first IP address with the subnet mask.
+ @param ipWithSubmask2 The second IP address with the subnet mask.
+ @return An array with two elements. Each element contains the IP address
+ and the subnet mask in this order.
+
+
+ Based on the two IP addresses and their subnet masks the IP range is
+ computed for each IP address - subnet mask pair and returned as the
+ minimum IP address and the maximum address of the range.
+
+ @param ip1 The first IP address.
+ @param subnetmask1 The subnet mask of the first IP address.
+ @param ip2 The second IP address.
+ @param subnetmask2 The subnet mask of the second IP address.
+ @return A array with two elements. The first/second element contains the
+ min and max IP address of the first/second IP address and its
+ subnet mask.
+
+
+ Checks if the IP ip is included in the permitted ISet
+ permitted.
+
+ @param permitted A Set of permitted IP addresses with
+ their subnet mask as byte arrays.
+ @param ip The IP address.
+ @throws PkixNameConstraintValidatorException
+ if the IP is not permitted.
+
+
+ Checks if the IP ip is included in the excluded ISet
+ excluded.
+
+ @param excluded A Set of excluded IP addresses with their
+ subnet mask as byte arrays.
+ @param ip The IP address.
+ @throws PkixNameConstraintValidatorException
+ if the IP is excluded.
+
+
+ Checks if the IP address ip is constrained by
+ constraint.
+
+ @param ip The IP address.
+ @param constraint The constraint. This is an IP address concatenated with
+ its subnetmask.
+ @return true if constrained, false
+ otherwise.
+
+
+ The common part of email1 and email2 is
+ added to the union union. If email1 and
+ email2 have nothing in common they are added both.
+
+ @param email1 Email address constraint 1.
+ @param email2 Email address constraint 2.
+ @param union The union.
+
+
+ The most restricting part from email1 and
+ email2 is added to the intersection intersect.
+
+ @param email1 Email address constraint 1.
+ @param email2 Email address constraint 2.
+ @param intersect The intersection.
+
+
+ Checks if the given GeneralName is in the permitted ISet.
+
+ @param name The GeneralName
+ @throws PkixNameConstraintValidatorException
+ If the name
+
+
+ Check if the given GeneralName is contained in the excluded ISet.
+
+ @param name The GeneralName.
+ @throws PkixNameConstraintValidatorException
+ If the name is
+ excluded.
+
+
+ Updates the permitted ISet of these name constraints with the intersection
+ with the given subtree.
+
+ @param permitted The permitted subtrees
+
+
+ Adds a subtree to the excluded ISet of these name constraints.
+
+ @param subtree A subtree with an excluded GeneralName.
+
+
+ Returns the maximum IP address.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The maximum IP address.
+
+
+ Returns the minimum IP address.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The minimum IP address.
+
+
+ Compares IP address ip1 with ip2. If ip1
+ is equal to ip2 0 is returned. If ip1 is bigger 1 is returned, -1
+ otherwise.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return 0 if ip1 is equal to ip2, 1 if ip1 is bigger, -1 otherwise.
+
+
+ Returns the logical OR of the IP addresses ip1 and
+ ip2.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The OR of ip1 and ip2.
+
+
+ Stringifies an IPv4 or v6 address with subnet mask.
+
+ @param ip The IP with subnet mask.
+ @return The stringified IP address.
+
+
+
+ Summary description for PkixParameters.
+
+
+
+ This is the default PKIX validity model. Actually there are two variants
+ of this: The PKIX model and the modified PKIX model. The PKIX model
+ verifies that all involved certificates must have been valid at the
+ current time. The modified PKIX model verifies that all involved
+ certificates were valid at the signing time. Both are indirectly choosen
+ with the {@link PKIXParameters#setDate(java.util.Date)} method, so this
+ methods sets the Date when all certificates must have been
+ valid.
+
+
+ This model uses the following validity model. Each certificate must have
+ been valid at the moment where is was used. That means the end
+ certificate must have been valid at the time the signature was done. The
+ CA certificate which signed the end certificate must have been valid,
+ when the end certificate was signed. The CA (or Root CA) certificate must
+ have been valid, when the CA certificate was signed and so on. So the
+ {@link PKIXParameters#setDate(java.util.Date)} method sets the time, when
+ the end certificate must have been valid.
It is used e.g.
+ in the German signature law.
+
+
+ Creates an instance of PKIXParameters with the specified Set of
+ most-trusted CAs. Each element of the set is a TrustAnchor.
+
+ Note that the Set is copied to protect against subsequent modifications.
+
+ @param trustAnchors
+ a Set of TrustAnchors
+
+ @exception InvalidAlgorithmParameterException
+ if the specified Set is empty
+ (trustAnchors.isEmpty() == true)
+ @exception NullPointerException
+ if the specified Set is null
+ @exception ClassCastException
+ if any of the elements in the Set are not of type
+ java.security.cert.TrustAnchor
+
+
+ Returns the required constraints on the target certificate. The
+ constraints are returned as an instance of CertSelector. If
+ null, no constraints are defined.
+
+ Note that the CertSelector returned is cloned to protect against
+ subsequent modifications.
+
+ @return a CertSelector specifying the constraints on the target
+ certificate (or null)
+
+ @see #setTargetCertConstraints(CertSelector)
+
+
+ Sets the required constraints on the target certificate. The constraints
+ are specified as an instance of CertSelector. If null, no constraints are
+ defined.
+
+ Note that the CertSelector specified is cloned to protect against
+ subsequent modifications.
+
+ @param selector
+ a CertSelector specifying the constraints on the target
+ certificate (or null)
+
+ @see #getTargetCertConstraints()
+
+
+ Returns an immutable Set of initial policy identifiers (OID strings),
+ indicating that any one of these policies would be acceptable to the
+ certificate user for the purposes of certification path processing. The
+ default return value is an empty Set, which is
+ interpreted as meaning that any policy would be acceptable.
+
+ @return an immutable Set of initial policy OIDs in String
+ format, or an empty Set (implying any policy is
+ acceptable). Never returns null.
+
+ @see #setInitialPolicies(java.util.Set)
+
+
+ Sets the Set of initial policy identifiers (OID strings),
+ indicating that any one of these policies would be acceptable to the
+ certificate user for the purposes of certification path processing. By
+ default, any policy is acceptable (i.e. all policies), so a user that
+ wants to allow any policy as acceptable does not need to call this
+ method, or can call it with an empty Set (or
+ null).
+
+ Note that the Set is copied to protect against subsequent modifications.
+
+
+ @param initialPolicies
+ a Set of initial policy OIDs in String format (or
+ null)
+
+ @exception ClassCastException
+ if any of the elements in the set are not of type String
+
+ @see #getInitialPolicies()
+
+
+ Sets a List of additional certification path checkers. If
+ the specified List contains an object that is not a PKIXCertPathChecker,
+ it is ignored.
+
+ Each PKIXCertPathChecker specified implements additional
+ checks on a certificate. Typically, these are checks to process and
+ verify private extensions contained in certificates. Each
+ PKIXCertPathChecker should be instantiated with any
+ initialization parameters needed to execute the check.
+
+ This method allows sophisticated applications to extend a PKIX
+ CertPathValidator or CertPathBuilder. Each
+ of the specified PKIXCertPathCheckers will be called, in turn, by a PKIX
+ CertPathValidator or CertPathBuilder for
+ each certificate processed or validated.
+
+ Regardless of whether these additional PKIXCertPathCheckers are set, a
+ PKIX CertPathValidator or CertPathBuilder
+ must perform all of the required PKIX checks on each certificate. The one
+ exception to this rule is if the RevocationEnabled flag is set to false
+ (see the {@link #setRevocationEnabled(boolean) setRevocationEnabled}
+ method).
+
+ Note that the List supplied here is copied and each PKIXCertPathChecker
+ in the list is cloned to protect against subsequent modifications.
+
+ @param checkers
+ a List of PKIXCertPathCheckers. May be null, in which case no
+ additional checkers will be used.
+ @exception ClassCastException
+ if any of the elements in the list are not of type
+ java.security.cert.PKIXCertPathChecker
+ @see #getCertPathCheckers()
+
+
+ Returns the List of certification path checkers. Each PKIXCertPathChecker
+ in the returned IList is cloned to protect against subsequent modifications.
+
+ @return an immutable List of PKIXCertPathCheckers (may be empty, but not
+ null)
+
+ @see #setCertPathCheckers(java.util.List)
+
+
+ Adds a PKIXCertPathChecker to the list of certification
+ path checkers. See the {@link #setCertPathCheckers setCertPathCheckers}
+ method for more details.
+
+ Note that the PKIXCertPathChecker is cloned to protect
+ against subsequent modifications.
+
+ @param checker a PKIXCertPathChecker to add to the list of
+ checks. If null, the checker is ignored (not added to list).
+
+
+ Method to support Clone() under J2ME.
+ super.Clone() does not exist and fields are not copied.
+
+ @param params Parameters to set. If this are
+ ExtendedPkixParameters they are copied to.
+
+
+ Whether delta CRLs should be used for checking the revocation status.
+ Defaults to false.
+
+
+ The validity model.
+ @see #CHAIN_VALIDITY_MODEL
+ @see #PKIX_VALIDITY_MODEL
+
+
+ Sets the Bouncy Castle Stores for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ The IList is cloned.
+
+
+ @param stores A list of stores to use.
+ @see #getStores
+ @throws ClassCastException if an element of stores is not
+ a {@link Store}.
+
+
+ Adds a Bouncy Castle {@link Store} to find CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ This method should be used to add local stores, like collection based
+ X.509 stores, if available. Local stores should be considered first,
+ before trying to use additional (remote) locations, because they do not
+ need possible additional network traffic.
+
+ If store is null it is ignored.
+
+
+ @param store The store to add.
+ @see #getStores
+
+
+ Adds an additional Bouncy Castle {@link Store} to find CRLs, certificates,
+ attribute certificates or cross certificates.
+
+ You should not use this method. This method is used for adding additional
+ X.509 stores, which are used to add (remote) locations, e.g. LDAP, found
+ during X.509 object processing, e.g. in certificates or CRLs. This method
+ is used in PKIX certification path processing.
+
+ If store is null it is ignored.
+
+
+ @param store The store to add.
+ @see #getStores()
+
+
+ Returns an IList of additional Bouncy Castle
+ Stores used for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ @return an immutable IList of additional Bouncy Castle
+ Stores. Never null.
+
+ @see #addAddionalStore(Store)
+
+
+ Returns an IList of Bouncy Castle
+ Stores used for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ @return an immutable IList of Bouncy Castle
+ Stores. Never null.
+
+ @see #setStores(IList)
+
+
+ Returns if additional {@link X509Store}s for locations like LDAP found
+ in certificates or CRLs should be used.
+
+ @return Returns true if additional stores are used.
+
+
+ Sets if additional {@link X509Store}s for locations like LDAP found in
+ certificates or CRLs should be used.
+
+ @param enabled true if additional stores are used.
+
+
+ Returns the required constraints on the target certificate or attribute
+ certificate. The constraints are returned as an instance of
+ IX509Selector. If null, no constraints are
+ defined.
+
+
+ The target certificate in a PKIX path may be a certificate or an
+ attribute certificate.
+
+ Note that the IX509Selector returned is cloned to protect
+ against subsequent modifications.
+
+ @return a IX509Selector specifying the constraints on the
+ target certificate or attribute certificate (or null)
+ @see #setTargetConstraints
+ @see X509CertStoreSelector
+ @see X509AttributeCertStoreSelector
+
+
+ Sets the required constraints on the target certificate or attribute
+ certificate. The constraints are specified as an instance of
+ IX509Selector. If null, no constraints are
+ defined.
+
+ The target certificate in a PKIX path may be a certificate or an
+ attribute certificate.
+
+ Note that the IX509Selector specified is cloned to protect
+ against subsequent modifications.
+
+
+ @param selector a IX509Selector specifying the constraints on
+ the target certificate or attribute certificate (or
+ null)
+ @see #getTargetConstraints
+ @see X509CertStoreSelector
+ @see X509AttributeCertStoreSelector
+
+
+ Returns the trusted attribute certificate issuers. If attribute
+ certificates is verified the trusted AC issuers must be set.
+
+ The returned ISet consists of TrustAnchors.
+
+ The returned ISet is immutable. Never null
+
+
+ @return Returns an immutable set of the trusted AC issuers.
+
+
+ Sets the trusted attribute certificate issuers. If attribute certificates
+ is verified the trusted AC issuers must be set.
+
+ The trustedACIssuers must be a ISet of
+ TrustAnchor
+
+ The given set is cloned.
+
+
+ @param trustedACIssuers The trusted AC issuers to set. Is never
+ null.
+ @throws ClassCastException if an element of stores is not
+ a TrustAnchor.
+
+
+ Returns the necessary attributes which must be contained in an attribute
+ certificate.
+
+ The returned ISet is immutable and contains
+ Strings with the OIDs.
+
+
+ @return Returns the necessary AC attributes.
+
+
+ Sets the necessary which must be contained in an attribute certificate.
+
+ The ISet must contain Strings with the
+ OIDs.
+
+ The set is cloned.
+
+
+ @param necessaryACAttributes The necessary AC attributes to set.
+ @throws ClassCastException if an element of
+ necessaryACAttributes is not a
+ String.
+
+
+ Returns the attribute certificates which are not allowed.
+
+ The returned ISet is immutable and contains
+ Strings with the OIDs.
+
+
+ @return Returns the prohibited AC attributes. Is never null.
+
+
+ Sets the attribute certificates which are not allowed.
+
+ The ISet must contain Strings with the
+ OIDs.
+
+ The set is cloned.
+
+
+ @param prohibitedACAttributes The prohibited AC attributes to set.
+ @throws ClassCastException if an element of
+ prohibitedACAttributes is not a
+ String.
+
+
+ Returns the attribute certificate checker. The returned set contains
+ {@link PKIXAttrCertChecker}s and is immutable.
+
+ @return Returns the attribute certificate checker. Is never
+ null.
+
+
+ Sets the attribute certificate checkers.
+
+ All elements in the ISet must a {@link PKIXAttrCertChecker}.
+
+
+ The given set is cloned.
+
+
+ @param attrCertCheckers The attribute certificate checkers to set. Is
+ never null.
+ @throws ClassCastException if an element of attrCertCheckers
+ is not a PKIXAttrCertChecker.
+
+
+
+ Summary description for PkixPolicyNode.
+
+
+
+ Constructors
+
+
+
+ This class helps to handle CRL revocation reasons mask. Each CRL handles a
+ certain set of revocation reasons.
+
+
+
+
+ Constructs are reason mask with the reasons.
+
+ The reasons.
+
+
+
+ A reason mask with no reason.
+
+
+
+
+ A mask with all revocation reasons.
+
+
+
+ Adds all reasons from the reasons mask to this mask.
+
+ @param mask The reasons mask to add.
+
+
+
+ Returns true if this reasons mask contains all possible
+ reasons.
+
+ true if this reasons mask contains all possible reasons.
+
+
+
+
+ Intersects this mask with the given reasons mask.
+
+ mask The mask to intersect with.
+ The intersection of this and teh given mask.
+
+
+
+ Returns true if the passed reasons mask has new reasons.
+
+ The reasons mask which should be tested for new reasons.
+ true if the passed reasons mask has new reasons.
+
+
+
+ Returns the reasons in this mask.
+
+
+
+ If the complete CRL includes an issuing distribution point (IDP) CRL
+ extension check the following:
+
+ (i) If the distribution point name is present in the IDP CRL extension
+ and the distribution field is present in the DP, then verify that one of
+ the names in the IDP matches one of the names in the DP. If the
+ distribution point name is present in the IDP CRL extension and the
+ distribution field is omitted from the DP, then verify that one of the
+ names in the IDP matches one of the names in the cRLIssuer field of the
+ DP.
+
+
+ (ii) If the onlyContainsUserCerts boolean is asserted in the IDP CRL
+ extension, verify that the certificate does not include the basic
+ constraints extension with the cA boolean asserted.
+
+
+ (iii) If the onlyContainsCACerts boolean is asserted in the IDP CRL
+ extension, verify that the certificate includes the basic constraints
+ extension with the cA boolean asserted.
+
+
+ (iv) Verify that the onlyContainsAttributeCerts boolean is not asserted.
+
+
+ @param dp The distribution point.
+ @param cert The certificate.
+ @param crl The CRL.
+ @throws AnnotatedException if one of the conditions is not met or an error occurs.
+
+
+ If the DP includes cRLIssuer, then verify that the issuer field in the
+ complete CRL matches cRLIssuer in the DP and that the complete CRL
+ contains an
+ g distribution point extension with the indirectCRL
+ boolean asserted. Otherwise, verify that the CRL issuer matches the
+ certificate issuer.
+
+ @param dp The distribution point.
+ @param cert The certificate ot attribute certificate.
+ @param crl The CRL for cert.
+ @throws AnnotatedException if one of the above conditions does not apply or an error
+ occurs.
+
+
+ Obtain and validate the certification path for the complete CRL issuer.
+ If a key usage extension is present in the CRL issuer's certificate,
+ verify that the cRLSign bit is set.
+
+ @param crl CRL which contains revocation information for the certificate
+ cert.
+ @param cert The attribute certificate or certificate to check if it is
+ revoked.
+ @param defaultCRLSignCert The issuer certificate of the certificate cert.
+ @param defaultCRLSignKey The public key of the issuer certificate
+ defaultCRLSignCert.
+ @param paramsPKIX paramsPKIX PKIX parameters.
+ @param certPathCerts The certificates on the certification path.
+ @return A Set with all keys of possible CRL issuer
+ certificates.
+ @throws AnnotatedException if the CRL is not valid or the status cannot be checked or
+ some error occurs.
+
+
+ Checks a distribution point for revocation information for the
+ certificate cert.
+
+ @param dp The distribution point to consider.
+ @param paramsPKIX PKIX parameters.
+ @param cert Certificate to check if it is revoked.
+ @param validDate The date when the certificate revocation status should be
+ checked.
+ @param defaultCRLSignCert The issuer certificate of the certificate cert.
+ @param defaultCRLSignKey The public key of the issuer certificate
+ defaultCRLSignCert.
+ @param certStatus The current certificate revocation status.
+ @param reasonMask The reasons mask which is already checked.
+ @param certPathCerts The certificates of the certification path.
+ @throws AnnotatedException if the certificate is revoked or the status cannot be checked
+ or some error occurs.
+
+
+ Checks a certificate if it is revoked.
+
+ @param paramsPKIX PKIX parameters.
+ @param cert Certificate to check if it is revoked.
+ @param validDate The date when the certificate revocation status should be
+ checked.
+ @param sign The issuer certificate of the certificate cert.
+ @param workingPublicKey The public key of the issuer certificate sign.
+ @param certPathCerts The certificates of the certification path.
+ @throws AnnotatedException if the certificate is revoked or the status cannot be checked
+ or some error occurs.
+
+
+ If use-deltas is set, verify the issuer and scope of the delta CRL.
+
+ @param deltaCRL The delta CRL.
+ @param completeCRL The complete CRL.
+ @param pkixParams The PKIX paramaters.
+ @throws AnnotatedException if an exception occurs.
+
+
+ Checks if an attribute certificate is revoked.
+
+ @param attrCert Attribute certificate to check if it is revoked.
+ @param paramsPKIX PKIX parameters.
+ @param issuerCert The issuer certificate of the attribute certificate
+ attrCert.
+ @param validDate The date when the certificate revocation status should
+ be checked.
+ @param certPathCerts The certificates of the certification path to be
+ checked.
+
+ @throws CertPathValidatorException if the certificate is revoked or the
+ status cannot be checked or some error occurs.
+
+
+ Searches for a holder public key certificate and verifies its
+ certification path.
+
+ @param attrCert the attribute certificate.
+ @param pkixParams The PKIX parameters.
+ @return The certificate path of the holder certificate.
+ @throws Exception if
+
+ no public key certificate can be found although holder
+ information is given by an entity name or a base certificate
+ ID
+ support classes cannot be created
+ no certification path for the public key certificate can
+ be built
+
+
+
+
+ Checks a distribution point for revocation information for the
+ certificate attrCert.
+
+ @param dp The distribution point to consider.
+ @param attrCert The attribute certificate which should be checked.
+ @param paramsPKIX PKIX parameters.
+ @param validDate The date when the certificate revocation status should
+ be checked.
+ @param issuerCert Certificate to check if it is revoked.
+ @param reasonMask The reasons mask which is already checked.
+ @param certPathCerts The certificates of the certification path to be
+ checked.
+ @throws Exception if the certificate is revoked or the status
+ cannot be checked or some error occurs.
+
+
+
+ A trust anchor or most-trusted Certification Authority (CA).
+
+ This class represents a "most-trusted CA", which is used as a trust anchor
+ for validating X.509 certification paths. A most-trusted CA includes the
+ public key of the CA, the CA's name, and any constraints upon the set of
+ paths which may be validated using this key. These parameters can be
+ specified in the form of a trusted X509Certificate or as individual
+ parameters.
+
+
+
+
+ Creates an instance of TrustAnchor with the specified X509Certificate and
+ optional name constraints, which are intended to be used as additional
+ constraints when validating an X.509 certification path.
+ The name constraints are specified as a byte array. This byte array
+ should contain the DER encoded form of the name constraints, as they
+ would appear in the NameConstraints structure defined in RFC 2459 and
+ X.509. The ASN.1 definition of this structure appears below.
+
+
+ NameConstraints ::= SEQUENCE {
+ permittedSubtrees [0] GeneralSubtrees OPTIONAL,
+ excludedSubtrees [1] GeneralSubtrees OPTIONAL }
+
+ GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
+
+ GeneralSubtree ::= SEQUENCE {
+ base GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL }
+
+ BaseDistance ::= INTEGER (0..MAX)
+
+ GeneralName ::= CHOICE {
+ otherName [0] OtherName,
+ rfc822Name [1] IA5String,
+ dNSName [2] IA5String,
+ x400Address [3] ORAddress,
+ directoryName [4] Name,
+ ediPartyName [5] EDIPartyName,
+ uniformResourceIdentifier [6] IA5String,
+ iPAddress [7] OCTET STRING,
+ registeredID [8] OBJECT IDENTIFIER}
+
+
+ Note that the name constraints byte array supplied is cloned to protect
+ against subsequent modifications.
+
+ a trusted X509Certificate
+ a byte array containing the ASN.1 DER encoding of a
+ NameConstraints extension to be used for checking name
+ constraints. Only the value of the extension is included, not
+ the OID or criticality flag. Specify null to omit the
+ parameter.
+ if the specified X509Certificate is null
+
+
+
+ Creates an instance of TrustAnchor where the
+ most-trusted CA is specified as an X500Principal and public key.
+
+
+
+ Name constraints are an optional parameter, and are intended to be used
+ as additional constraints when validating an X.509 certification path.
+
+ The name constraints are specified as a byte array. This byte array
+ contains the DER encoded form of the name constraints, as they
+ would appear in the NameConstraints structure defined in RFC 2459
+ and X.509. The ASN.1 notation for this structure is supplied in the
+ documentation for the other constructors.
+
+ Note that the name constraints byte array supplied here is cloned to
+ protect against subsequent modifications.
+
+
+ the name of the most-trusted CA as X509Name
+ the public key of the most-trusted CA
+
+ a byte array containing the ASN.1 DER encoding of a NameConstraints extension to
+ be used for checking name constraints. Only the value of the extension is included,
+ not the OID or criticality flag. Specify null to omit the parameter.
+
+
+ if caPrincipal or pubKey is null
+
+
+
+
+ Creates an instance of TrustAnchor where the most-trusted
+ CA is specified as a distinguished name and public key. Name constraints
+ are an optional parameter, and are intended to be used as additional
+ constraints when validating an X.509 certification path.
+
+ The name constraints are specified as a byte array. This byte array
+ contains the DER encoded form of the name constraints, as they would
+ appear in the NameConstraints structure defined in RFC 2459 and X.509.
+
+ the X.500 distinguished name of the most-trusted CA in RFC
+ 2253 string format
+ the public key of the most-trusted CA
+ a byte array containing the ASN.1 DER encoding of a
+ NameConstraints extension to be used for checking name
+ constraints. Only the value of the extension is included, not
+ the OID or criticality flag. Specify null to omit the
+ parameter.
+ throws NullPointerException, IllegalArgumentException
+
+
+
+ Returns the most-trusted CA certificate.
+
+
+
+
+ Returns the name of the most-trusted CA as an X509Name.
+
+
+
+
+ Returns the name of the most-trusted CA in RFC 2253 string format.
+
+
+
+
+ Returns the public key of the most-trusted CA.
+
+
+
+
+ Decode the name constraints and clone them if not null.
+
+
+
+
+ Returns a formatted string describing the TrustAnchor.
+
+ a formatted string describing the TrustAnchor
+
+
+ Recognised hash algorithms for the time stamp protocol.
+
+
+ Fetches the signature time-stamp attributes from a SignerInformation object.
+ Checks that the MessageImprint for each time-stamp matches the signature field.
+ (see RFC 3161 Appendix A).
+
+ @param signerInfo a SignerInformation to search for time-stamps
+ @return a collection of TimeStampToken objects
+ @throws TSPValidationException
+
+
+ Validate the passed in certificate as being of the correct type to be used
+ for time stamping. To be valid it must have an ExtendedKeyUsage extension
+ which has a key purpose identifier of id-kp-timeStamping.
+
+ @param cert the certificate of interest.
+ @throws TspValidationException if the certicate fails on one of the check points.
+
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Exception thrown if a TSP request or response fails to validate.
+
+ If a failure code is associated with the exception it can be retrieved using
+ the getFailureCode() method.
+
+
+ Return the failure code associated with this exception - if one is set.
+
+ @return the failure code if set, -1 otherwise.
+
+
+ Base class for an RFC 3161 Time Stamp Request.
+
+
+ Create a TimeStampRequest from the past in byte array.
+
+ @param req byte array containing the request.
+ @throws IOException if the request is malformed.
+
+
+ Create a TimeStampRequest from the past in input stream.
+
+ @param in input stream containing the request.
+ @throws IOException if the request is malformed.
+
+
+ Validate the timestamp request, checking the digest to see if it is of an
+ accepted type and whether it is of the correct length for the algorithm specified.
+
+ @param algorithms a set of string OIDS giving accepted algorithms.
+ @param policies if non-null a set of policies we are willing to sign under.
+ @param extensions if non-null a set of extensions we are willing to accept.
+ @throws TspException if the request is invalid, or processing fails.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Generator for RFC 3161 Time Stamp Request objects.
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ @throws IOException
+
+
+ add a given extension field for the standard extensions tag
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ @throws IOException
+
+
+ add a given extension field for the standard extensions tag
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+ Base class for an RFC 3161 Time Stamp Response object.
+
+
+ Create a TimeStampResponse from a byte array containing an ASN.1 encoding.
+
+ @param resp the byte array containing the encoded response.
+ @throws TspException if the response is malformed.
+ @throws IOException if the byte array doesn't represent an ASN.1 encoding.
+
+
+ Create a TimeStampResponse from an input stream containing an ASN.1 encoding.
+
+ @param input the input stream containing the encoded response.
+ @throws TspException if the response is malformed.
+ @throws IOException if the stream doesn't represent an ASN.1 encoding.
+
+
+ Check this response against to see if it a well formed response for
+ the passed in request. Validation will include checking the time stamp
+ token if the response status is GRANTED or GRANTED_WITH_MODS.
+
+ @param request the request to be checked against
+ @throws TspException if the request can not match this response.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Generator for RFC 3161 Time Stamp Responses.
+
+
+ Return an appropriate TimeStampResponse.
+
+ If genTime is null a timeNotAvailable error response will be returned.
+
+ @param request the request this response is for.
+ @param serialNumber serial number for the response token.
+ @param genTime generation time for the response token.
+ @param provider provider to use for signature calculation.
+ @return
+ @throws NoSuchAlgorithmException
+ @throws NoSuchProviderException
+ @throws TSPException
+
+
+
+ Generate a TimeStampResponse with chosen status and FailInfoField.
+
+ @param status the PKIStatus to set.
+ @param failInfoField the FailInfoField to set.
+ @param statusString an optional string describing the failure.
+ @return a TimeStampResponse with a failInfoField and optional statusString
+ @throws TSPException in case the response could not be created
+
+
+ Validate the time stamp token.
+
+ To be valid the token must be signed by the passed in certificate and
+ the certificate must be the one referred to by the SigningCertificate
+ attribute included in the hashed attributes of the token. The
+ certificate must also have the ExtendedKeyUsageExtension with only
+ KeyPurposeID.IdKPTimeStamping and have been valid at the time the
+ timestamp was created.
+
+
+ A successful call to validate means all the above are true.
+
+
+
+ Return the underlying CmsSignedData object.
+
+ @return the underlying CMS structure.
+
+
+ Return a ASN.1 encoded byte stream representing the encoded object.
+
+ @throws IOException if encoding fails.
+
+
+ basic creation - only the default attributes will be included here.
+
+
+ create with a signer with extra signed/unsigned attributes.
+
+
+ @return the nonce value, null if there isn't one.
+
+
+ General array utilities.
+
+
+
+ Are two arrays equal.
+
+ Left side.
+ Right side.
+ True if equal.
+
+
+
+ A constant time equals comparison - does not terminate early if
+ test will fail.
+
+ first array
+ second array
+ true if arrays equal, false otherwise.
+
+
+ Make a copy of a range of bytes from the passed in data array. The range can
+ extend beyond the end of the input array, in which case the return array will
+ be padded with zeroes.
+
+ @param data the array from which the data is to be copied.
+ @param from the start index at which the copying should take place.
+ @param to the final index of the range (exclusive).
+
+ @return a new byte array containing the range given.
+
+
+ BigInteger utilities.
+
+
+ Return the passed in value as an unsigned byte array.
+
+ @param value value to be converted.
+ @return a byte array without a leading zero byte if present in the signed encoding.
+
+
+ Return the passed in value as an unsigned byte array of specified length, zero-extended as necessary.
+
+ @param length desired length of result array.
+ @param n value to be converted.
+ @return a byte array of specified length, with leading zeroes as necessary given the size of n.
+
+
+ Return a random BigInteger not less than 'min' and not greater than 'max'
+
+ @param min the least value that may be generated
+ @param max the greatest value that may be generated
+ @param random the source of randomness
+ @return a random BigInteger value in the range [min,max]
+
+
+
+ Produce a copy of this object with its configuration and in its current state.
+
+
+ The returned object may be used simply to store the state, or may be used as a similar object
+ starting from the copied state.
+
+
+
+
+ Restore a copied object state into this object.
+
+
+ Implementations of this method should try to avoid or minimise memory allocation to perform the reset.
+
+ an object originally {@link #copy() copied} from an object of the same type as this instance.
+ if the provided object is not of the correct type.
+ if the other parameter is in some other way invalid.
+
+
+ Exception to be thrown on a failure to reset an object implementing Memoable.
+
+ The exception extends InvalidCastException to enable users to have a single handling case,
+ only introducing specific handling of this one if required.
+
+
+
+ Basic Constructor.
+
+ @param msg message to be associated with this exception.
+
+
+ General string utilities.
+
+
+
+ Return the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC) for a given DateTime value.
+
+ A UTC DateTime value not before epoch.
+ Number of whole milliseconds after epoch.
+ 'dateTime' is before epoch.
+
+
+
+ Create a DateTime value from the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).
+
+ Number of milliseconds since the epoch.
+ A UTC DateTime value
+
+
+
+ Return the current number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).
+
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+ @return a byte array containing the base 64 encoded data.
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+ @return a byte array containing the base 64 encoded data.
+
+
+ Encode the byte data to base 64 writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Encode the byte data to base 64 writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded input data. It is assumed the input data is valid.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the base 64 encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ encode the input data producing a base 64 output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+
+ A buffering class to allow translation from one format to another to
+ be done in discrete chunks.
+
+
+
+
+ Create a buffered Decoder.
+
+ The translater to use.
+ The size of the buffer.
+
+
+
+ Process one byte of data.
+
+ Data in.
+ Byte array for the output.
+ The offset in the output byte array to start writing from.
+ The amount of output bytes.
+
+
+
+ Process data from a byte array.
+
+ The input data.
+ Start position within input data array.
+ Amount of data to process from input data array.
+ Array to store output.
+ Position in output array to start writing from.
+ The amount of output bytes.
+
+
+
+ A class that allows encoding of data using a specific encoder to be processed in chunks.
+
+
+
+
+ Create.
+
+ The translator to use.
+ Size of the chunks.
+
+
+
+ Process one byte of data.
+
+ The byte.
+ An array to store output in.
+ Offset within output array to start writing from.
+
+
+
+
+ Process data from a byte array.
+
+ Input data Byte array containing data to be processed.
+ Start position within input data array.
+ Amount of input data to be processed.
+ Output data array.
+ Offset within output data array to start writing to.
+ The amount of data written.
+
+
+
+ Class to decode and encode Hex.
+
+
+
+ encode the input data producing a Hex encoded byte array.
+
+ @return a byte array containing the Hex encoded data.
+
+
+ encode the input data producing a Hex encoded byte array.
+
+ @return a byte array containing the Hex encoded data.
+
+
+ Hex encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Hex encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded input data. It is assumed the input data is valid.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the Hex encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the Hex encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ encode the input data producing a Hex output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+
+ A hex translator.
+
+
+
+
+ Return encoded block size.
+
+ 2
+
+
+
+ Encode some data.
+
+ Input data array.
+ Start position within input data array.
+ The amount of data to process.
+ The output data array.
+ The offset within the output data array to start writing from.
+ Amount of data encoded.
+
+
+
+ Returns the decoded block size.
+
+ 1
+
+
+
+ Decode data from a byte array.
+
+ The input data array.
+ Start position within input data array.
+ The amounty of data to process.
+ The output data array.
+ The position within the output data array to start writing from.
+ The amount of data written.
+
+
+ Encode and decode byte arrays (typically from binary to 7-bit ASCII
+ encodings).
+
+
+
+ Translator interface.
+
+
+
+ Convert binary data to and from UrlBase64 encoding. This is identical to
+ Base64 encoding, except that the padding character is "." and the other
+ non-alphanumeric characters are "-" and "_" instead of "+" and "/".
+
+ The purpose of UrlBase64 encoding is to provide a compact encoding of binary
+ data that is safe for use as an URL parameter. Base64 encoding does not
+ produce encoded values that are safe for use in URLs, since "/" can be
+ interpreted as a path delimiter; "+" is the encoded form of a space; and
+ "=" is used to separate a name from the corresponding value in an URL
+ parameter.
+
+
+
+ Encode the input data producing a URL safe base 64 encoded byte array.
+
+ @return a byte array containing the URL safe base 64 encoded data.
+
+
+ Encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Decode the URL safe base 64 encoded input data - white space will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the URL safe base 64 encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the URL safe base 64 encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ Decode the URL safe base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ Convert binary data to and from UrlBase64 encoding. This is identical to
+ Base64 encoding, except that the padding character is "." and the other
+ non-alphanumeric characters are "-" and "_" instead of "+" and "/".
+
+ The purpose of UrlBase64 encoding is to provide a compact encoding of binary
+ data that is safe for use as an URL parameter. Base64 encoding does not
+ produce encoded values that are safe for use in URLs, since "/" can be
+ interpreted as a path delimiter; "+" is the encoded form of a space; and
+ "=" is used to separate a name from the corresponding value in an URL
+ parameter.
+
+
+
+
+ Pipe all bytes from inStr to outStr , throwing StreamFlowException if greater
+ than limit bytes in inStr .
+
+
+ A
+
+
+ A
+
+
+ A
+
+ The number of bytes actually transferred, if not greater than limit
+
+
+
+
+ A
+
+
+
+
+
+ A
+
+
+ A
+
+
+
+
+
+ A
+
+
+
+
+ A generic PEM writer, based on RFC 1421
+
+
+ Base constructor.
+
+ @param out output stream to use.
+
+
+ Return the number of bytes or characters required to contain the
+ passed in object if it is PEM encoded.
+
+ @param obj pem object to be output
+ @return an estimate of the number of bytes
+
+
+ Validate the given IPv4 or IPv6 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid address, false otherwise
+
+
+ Validate the given IPv4 or IPv6 address and netmask.
+
+ @param address the IP address as a string.
+
+ @return true if a valid address with netmask, false otherwise
+
+
+ Validate the given IPv4 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid IPv4 address, false otherwise
+
+
+ Validate the given IPv6 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid IPv4 address, false otherwise
+
+
+
+ Summary description for DeflaterOutputStream.
+
+
+
+
+ Summary description for DeflaterOutputStream.
+
+
+
+
+ The Holder object.
+
+ Holder ::= SEQUENCE {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+
+ Constructs a holder for v2 attribute certificates with a hash value for
+ some type of object.
+
+ digestedObjectType can be one of the following:
+
+ 0 - publicKey - A hash of the public key of the holder must be
+ passed.
+ 1 - publicKeyCert - A hash of the public key certificate of the
+ holder must be passed.
+ 2 - otherObjectDigest - A hash of some other object type must be
+ passed. otherObjectTypeID must not be empty.
+
+
+ This cannot be used if a v1 attribute certificate is used.
+
+ @param digestedObjectType The digest object type.
+ @param digestAlgorithm The algorithm identifier for the hash.
+ @param otherObjectTypeID The object type ID if
+ digestedObjectType is
+ otherObjectDigest.
+ @param objectDigest The hash value.
+
+
+ Returns the digest object type if an object digest info is used.
+
+
+ 0 - publicKey - A hash of the public key of the holder must be
+ passed.
+ 1 - publicKeyCert - A hash of the public key certificate of the
+ holder must be passed.
+ 2 - otherObjectDigest - A hash of some other object type must be
+ passed. otherObjectTypeID must not be empty.
+
+
+
+ @return The digest object type or -1 if no object digest info is set.
+
+
+ Returns the other object type ID if an object digest info is used.
+
+ @return The other object type ID or null if no object
+ digest info is set.
+
+
+ Returns the hash if an object digest info is used.
+
+ @return The hash or null if no object digest info is set.
+
+
+ Returns the digest algorithm ID if an object digest info is used.
+
+ @return The digest algorithm ID or null if no object
+ digest info is set.
+
+
+ Return any principal objects inside the attribute certificate holder entity names field.
+
+ @return an array of IPrincipal objects (usually X509Name), null if no entity names field is set.
+
+
+ Return the principals associated with the issuer attached to this holder
+
+ @return an array of principals, null if no BaseCertificateID is set.
+
+
+ Return the serial number associated with the issuer attached to this holder.
+
+ @return the certificate serial number, null if no BaseCertificateID is set.
+
+
+ Carrying class for an attribute certificate issuer.
+
+
+ Set the issuer directly with the ASN.1 structure.
+
+ @param issuer The issuer
+
+
+ Return any principal objects inside the attribute certificate issuer object.
+ An array of IPrincipal objects (usually X509Principal).
+
+
+ Interface for an X.509 Attribute Certificate.
+
+
+ The version number for the certificate.
+
+
+ The serial number for the certificate.
+
+
+ The UTC DateTime before which the certificate is not valid.
+
+
+ The UTC DateTime after which the certificate is not valid.
+
+
+ The holder of the certificate.
+
+
+ The issuer details for the certificate.
+
+
+ Return the attributes contained in the attribute block in the certificate.
+ An array of attributes.
+
+
+ Return the attributes with the same type as the passed in oid.
+ The object identifier we wish to match.
+ An array of matched attributes, null if there is no match.
+
+
+ Return an ASN.1 encoded byte array representing the attribute certificate.
+ An ASN.1 encoded byte array.
+ If the certificate cannot be encoded.
+
+
+
+ Get all critical extension values, by oid
+
+ IDictionary with string (OID) keys and Asn1OctetString values
+
+
+
+ Get all non-critical extension values, by oid
+
+ IDictionary with string (OID) keys and Asn1OctetString values
+
+
+
+ A utility class that will extract X509Principal objects from X.509 certificates.
+
+ Use this in preference to trying to recreate a principal from a string, not all
+ DNs are what they should be, so it's best to leave them encoded where they
+ can be.
+
+
+
+ Return the issuer of the given cert as an X509Principal.
+
+
+ Return the subject of the given cert as an X509Principal.
+
+
+ Return the issuer of the given CRL as an X509Principal.
+
+
+
+ A factory to produce Public Key Info Objects.
+
+
+
+
+ Create a Subject Public Key Info object for a given public key.
+
+ One of ElGammalPublicKeyParameters, DSAPublicKeyParameter, DHPublicKeyParameters, RsaKeyParameters or ECPublicKeyParameters
+ A subject public key info object.
+ Throw exception if object provided is not one of the above.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate object and initializes it with the data
+ read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the certificates
+ read from the given input stream inStream.
+
+
+ Class for carrying the values in an X.509 Attribute.
+
+
+ @param at an object representing an attribute.
+
+
+ Create an X.509 Attribute with the type given by the passed in oid and
+ the value represented by an ASN.1 Set containing value.
+
+ @param oid type of the attribute
+ @param value value object to go into the atribute's value set.
+
+
+ Create an X.59 Attribute with the type given by the passed in oid and the
+ value represented by an ASN.1 Set containing the objects in value.
+
+ @param oid type of the attribute
+ @param value vector of values to go in the attribute's value set.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ An Object representing an X509 Certificate.
+ Has static methods for loading Certificates encoded in many forms that return X509Certificate Objects.
+
+
+
+
+ Return true if the current time is within the start and end times nominated on the certificate.
+
+ true id certificate is valid for the current time.
+
+
+
+ Return true if the nominated time is within the start and end times nominated on the certificate.
+
+ The time to test validity against.
+ True if certificate is valid for nominated time.
+
+
+
+ Checks if the current date is within certificate's validity period.
+
+
+
+
+ Checks if the given date is within certificate's validity period.
+
+ if the certificate is expired by given date
+ if the certificate is not yet valid on given date
+
+
+
+ Return the certificate's version.
+
+ An integer whose value Equals the version of the cerficate.
+
+
+
+ Return a BigInteger containing the serial number.
+
+ The Serial number.
+
+
+
+ Get the Issuer Distinguished Name. (Who signed the certificate.)
+
+ And X509Object containing name and value pairs.
+
+
+
+ Get the subject of this certificate.
+
+ An X509Name object containing name and value pairs.
+
+
+
+ The time that this certificate is valid from.
+
+ A DateTime object representing that time in the local time zone.
+
+
+
+ The time that this certificate is valid up to.
+
+ A DateTime object representing that time in the local time zone.
+
+
+
+ Return the Der encoded TbsCertificate data.
+ This is the certificate component less the signature.
+ To Get the whole certificate call the GetEncoded() member.
+
+ A byte array containing the Der encoded Certificate component.
+
+
+
+ The signature.
+
+ A byte array containg the signature of the certificate.
+
+
+
+ A meaningful version of the Signature Algorithm. (EG SHA1WITHRSA)
+
+ A sting representing the signature algorithm.
+
+
+
+ Get the Signature Algorithms Object ID.
+
+ A string containg a '.' separated object id.
+
+
+
+ Get the signature algorithms parameters. (EG DSA Parameters)
+
+ A byte array containing the Der encoded version of the parameters or null if there are none.
+
+
+
+ Get the issuers UID.
+
+ A DerBitString.
+
+
+
+ Get the subjects UID.
+
+ A DerBitString.
+
+
+
+ Get a key usage guidlines.
+
+
+
+
+ Get the public key of the subject of the certificate.
+
+ The public key parameters.
+
+
+
+ Return a Der encoded version of this certificate.
+
+ A byte array.
+
+
+
+ Verify the certificate's signature using the nominated public key.
+
+ An appropriate public key parameter object, RsaPublicKeyParameters, DsaPublicKeyParameters or ECDsaPublicKeyParameters
+ True if the signature is valid.
+ If key submitted is not of the above nominated types.
+
+
+
+ Verify the certificate's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the certificate's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the certificate algorithm is invalid.
+
+
+
+ This class contains a cross certificate pair. Cross certificates pairs may
+ contain two cross signed certificates from two CAs. A certificate from the
+ other CA to this CA is contained in the forward certificate, the certificate
+ from this CA to the other CA is contained in the reverse certificate.
+
+
+
+ Constructor
+ Certificate from the other CA to this CA.
+ Certificate from this CA to the other CA.
+
+
+ Constructor from a ASN.1 CertificatePair structure.
+ The CertificatePair ASN.1 object.
+
+
+ Returns the certificate from the other CA to this CA.
+
+
+ Returns the certificate from this CA to the other CA.
+
+
+ class for dealing with X509 certificates.
+
+ At the moment this will deal with "-----BEGIN CERTIFICATE-----" to "-----END CERTIFICATE-----"
+ base 64 encoded certs, as well as the BER binaries of certificates and some classes of PKCS#7
+ objects.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate object and initializes it with the data
+ read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the certificates
+ read from the given input stream inStream.
+
+
+ The following extensions are listed in RFC 2459 as relevant to CRLs
+
+ Authority Key Identifier
+ Issuer Alternative Name
+ CRL Number
+ Delta CRL Indicator (critical)
+ Issuing Distribution Point (critical)
+
+
+
+ Verify the CRL's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the CRL's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the CRL algorithm is invalid.
+
+
+ Returns a string representation of this CRL.
+
+ @return a string representation of this CRL.
+
+
+ Checks whether the given certificate is on this CRL.
+
+ @param cert the certificate to check for.
+ @return true if the given certificate is on this CRL,
+ false otherwise.
+
+
+ The following extensions are listed in RFC 2459 as relevant to CRL Entries
+
+ ReasonCode Hode Instruction Code Invalidity Date Certificate Issuer
+ (critical)
+
+
+ Constructor for CRLEntries of indirect CRLs. If isIndirect
+ is false {@link #getCertificateIssuer()} will always
+ return null, previousCertificateIssuer is
+ ignored. If this isIndirect is specified and this CrlEntry
+ has no certificate issuer CRL entry extension
+ previousCertificateIssuer is returned by
+ {@link #getCertificateIssuer()}.
+
+ @param c
+ TbsCertificateList.CrlEntry object.
+ @param isIndirect
+ true if the corresponding CRL is a indirect
+ CRL.
+ @param previousCertificateIssuer
+ Certificate issuer of the previous CrlEntry.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate revocation list (CRL) object and initializes
+ it with the data read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the CRLs read from
+ the given input stream inStream.
+
+ The inStream may contain a sequence of DER-encoded CRLs, or
+ a PKCS#7 CRL set. This is a PKCS#7 SignedData object, with the
+ only significant field being crls. In particular the signature
+ and the contents are ignored.
+
+
+
+ Get non critical extensions.
+
+ A set of non critical extension oids.
+
+
+
+ Get any critical extensions.
+
+ A sorted list of critical entension.
+
+
+
+ Get the value of a given extension.
+
+ The object ID of the extension.
+ An Asn1OctetString object if that extension is found or null if not.
+
+
+ A holding class for constructing an X509 Key Usage extension.
+
+
+ id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
+
+ KeyUsage ::= BIT STRING {
+ digitalSignature (0),
+ nonRepudiation (1),
+ keyEncipherment (2),
+ dataEncipherment (3),
+ keyAgreement (4),
+ keyCertSign (5),
+ cRLSign (6),
+ encipherOnly (7),
+ decipherOnly (8) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (X509KeyUsage.keyEncipherment | X509KeyUsage.dataEncipherment)
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Class to Generate X509V1 Certificates.
+
+
+
+
+ Default Constructor.
+
+
+
+
+ Reset the generator.
+
+
+
+
+ Set the certificate's serial number.
+
+ Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data.
+ You will be surprised how ugly a serial number collision can get.
+ The serial number.
+
+
+
+ Set the issuer distinguished name.
+ The issuer is the entity whose private key is used to sign the certificate.
+
+ The issuers DN.
+
+
+
+ Set the date that this certificate is to be valid from.
+
+
+
+
+
+ Set the date after which this certificate will no longer be valid.
+
+
+
+
+
+ Set the subject distinguished name.
+ The subject describes the entity associated with the public key.
+
+
+
+
+
+ Set the public key that this certificate identifies.
+
+
+
+
+
+ Set the signature algorithm that will be used to sign this certificate.
+ This can be either a name or an OID, names are treated as case insensitive.
+
+ string representation of the algorithm name
+
+
+
+ Generate a new X509Certificate.
+
+ The private key of the issuer used to sign this certificate.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate specifying a SecureRandom instance that you would like to use.
+
+ The private key of the issuer used to sign this certificate.
+ The Secure Random you want to use.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Certificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ An implementation of a version 2 X.509 Attribute Certificate.
+
+
+
+ Verify the certificate's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the certificate's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the certificate algorithm is invalid.
+
+
+ Class to produce an X.509 Version 2 AttributeCertificate.
+
+
+ Reset the generator
+
+
+ Set the Holder of this Attribute Certificate.
+
+
+ Set the issuer.
+
+
+ Set the serial number for the certificate.
+
+
+
+ Set the signature algorithm. This can be either a name or an OID, names
+ are treated as case insensitive.
+
+ The algorithm name.
+
+
+ Add an attribute.
+
+
+ Add a given extension field for the standard extensions tag.
+
+
+
+ Add a given extension field for the standard extensions tag.
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+
+
+ Generate an X509 certificate, based on the current issuer and subject.
+
+
+
+
+ Generate an X509 certificate, based on the current issuer and subject,
+ using the supplied source of randomness, if required.
+
+
+
+
+ Generate a new X.509 Attribute Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An IX509AttributeCertificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ class to produce an X.509 Version 2 CRL.
+
+
+ reset the generator
+
+
+ Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the
+ certificate.
+
+
+ Reason being as indicated by CrlReason, i.e. CrlReason.KeyCompromise
+ or 0 if CrlReason is not to be used
+
+
+
+ Add a CRL entry with an Invalidity Date extension as well as a CrlReason extension.
+ Reason being as indicated by CrlReason, i.e. CrlReason.KeyCompromise
+ or 0 if CrlReason is not to be used
+
+
+
+ Add a CRL entry with extensions.
+
+
+
+ Add the CRLEntry objects contained in a previous CRL.
+
+ @param other the X509Crl to source the other entries from.
+
+
+
+ Set the signature algorithm that will be used to sign this CRL.
+
+
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+
+ Generate an X.509 CRL, based on the current issuer and subject.
+
+ The private key of the issuer that is signing this certificate.
+ An X509Crl.
+
+
+
+ Generate an X.509 CRL, based on the current issuer and subject using the specified secure random.
+
+ The private key of the issuer that is signing this certificate.
+ Your Secure Random instance.
+ An X509Crl.
+
+
+
+ Generate a new X509Crl using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Crl.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+
+ A class to Generate Version 3 X509Certificates.
+
+
+
+
+ Reset the Generator.
+
+
+
+
+ Set the certificate's serial number.
+
+ Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data.
+ You will be surprised how ugly a serial number collision can Get.
+ The serial number.
+
+
+
+ Set the distinguished name of the issuer.
+ The issuer is the entity which is signing the certificate.
+
+ The issuer's DN.
+
+
+
+ Set the date that this certificate is to be valid from.
+
+
+
+
+
+ Set the date after which this certificate will no longer be valid.
+
+
+
+
+
+ Set the DN of the entity that this certificate is about.
+
+
+
+
+
+ Set the public key that this certificate identifies.
+
+
+
+
+
+ Set the signature algorithm that will be used to sign this certificate.
+
+
+
+
+
+ Set the subject unique ID - note: it is very rare that it is correct to do this.
+
+
+
+
+
+ Set the issuer unique ID - note: it is very rare that it is correct to do this.
+
+
+
+
+
+ Add a given extension field for the standard extensions tag (tag 3).
+
+ string containing a dotted decimal Object Identifier.
+ Is it critical.
+ The value.
+
+
+
+ Add an extension to this certificate.
+
+ Its Object Identifier.
+ Is it critical.
+ The value.
+
+
+
+ Add an extension using a string with a dotted decimal OID.
+
+ string containing a dotted decimal Object Identifier.
+ Is it critical.
+ byte[] containing the value of this extension.
+
+
+
+ Add an extension to this certificate.
+
+ Its Object Identifier.
+ Is it critical.
+ byte[] containing the value of this extension.
+
+
+
+ Add a given extension field for the standard extensions tag (tag 3),
+ copying the extension value from another certificate.
+
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ copying the extension value from another certificate.
+ @throws CertificateParsingException if the extension cannot be extracted.
+
+
+
+ Generate an X509Certificate.
+
+ The private key of the issuer that is signing this certificate.
+ An X509Certificate.
+
+
+
+ Generate an X509Certificate using your own SecureRandom.
+
+ The private key of the issuer that is signing this certificate.
+ You Secure Random instance.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Certificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ A high level authority key identifier.
+
+
+ Constructor which will take the byte[] returned from getExtensionValue()
+
+ @param encodedValue a DER octet encoded string with the extension structure in it.
+ @throws IOException on parsing errors.
+
+
+ Create an AuthorityKeyIdentifier using the passed in certificate's public
+ key, issuer and serial number.
+
+ @param certificate the certificate providing the information.
+ @throws CertificateParsingException if there is a problem processing the certificate
+
+
+ Create an AuthorityKeyIdentifier using just the hash of the
+ public key.
+
+ @param pubKey the key to generate the hash from.
+ @throws InvalidKeyException if there is a problem using the key.
+
+
+ A high level subject key identifier.
+
+
+ Constructor which will take the byte[] returned from getExtensionValue()
+
+ @param encodedValue a DER octet encoded string with the extension structure in it.
+ @throws IOException on parsing errors.
+
+
+ This class is an Selector like implementation to select
+ attribute certificates from a given set of criteria.
+
+ @see org.bouncycastle.x509.X509AttributeCertificate
+ @see org.bouncycastle.x509.X509Store
+
+
+
+ Decides if the given attribute certificate should be selected.
+
+ The attribute certificate to be checked.
+ true if the object matches this selector.
+
+
+ The attribute certificate which must be matched.
+ If null is given, any will do.
+
+
+ The criteria for validity
+ If null is given any will do.
+
+
+ The holder.
+ If null is given any will do.
+
+
+ The issuer.
+ If null is given any will do.
+
+
+ The serial number.
+ If null is given any will do.
+
+
+ Adds a target name criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target names.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name The name as a GeneralName (not null)
+
+
+ Adds a target name criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target names.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name a byte array containing the name in ASN.1 DER encoded form of a GeneralName
+ @throws IOException if a parsing error occurs.
+
+
+ Adds a collection with target names criteria. If null is
+ given any will do.
+
+ The collection consists of either GeneralName objects or byte[] arrays representing
+ DER encoded GeneralName structures.
+
+
+ @param names A collection of target names.
+ @throws IOException if a parsing error occurs.
+ @see #AddTargetName(byte[])
+ @see #AddTargetName(GeneralName)
+
+
+ Gets the target names. The collection consists of Lists
+ made up of an Integer in the first entry and a DER encoded
+ byte array or a String in the second entry.
+ The returned collection is immutable.
+
+ @return The collection of target names
+ @see #setTargetNames(Collection)
+
+
+ Adds a target group criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target groups.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param group The group as GeneralName form (not null)
+
+
+ Adds a target group criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target groups.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name a byte array containing the group in ASN.1 DER encoded form of a GeneralName
+ @throws IOException if a parsing error occurs.
+
+
+ Adds a collection with target groups criteria. If null is
+ given any will do.
+
+ The collection consists of GeneralName objects or byte[]
+ representing DER encoded GeneralNames.
+
+
+ @param names A collection of target groups.
+ @throws IOException if a parsing error occurs.
+ @see #AddTargetGroup(byte[])
+ @see #AddTargetGroup(GeneralName)
+
+
+ Gets the target groups. The collection consists of Lists
+ made up of an Integer in the first entry and a DER encoded
+ byte array or a String in the second entry.
+ The returned collection is immutable.
+
+ @return The collection of target groups.
+ @see #setTargetGroups(Collection)
+
+
+
+ This class is an IX509Selector implementation to select
+ certificate pairs, which are e.g. used for cross certificates. The set of
+ criteria is given from two X509CertStoreSelector objects,
+ each of which, if present, must match the respective component of a pair.
+
+
+
+ The certificate pair which is used for testing on equality.
+
+
+ The certificate selector for the forward part.
+
+
+ The certificate selector for the reverse part.
+
+
+
+ Decides if the given certificate pair should be selected. If
+ obj is not a X509CertificatePair, this method
+ returns false.
+
+ The X509CertificatePair to be tested.
+ true if the object matches this selector.
+
+
+
+ An ISet of DerObjectIdentifier objects.
+
+
+
+ A simple collection backed store.
+
+
+ Basic constructor.
+
+ @param collection - initial contents for the store, this is copied.
+
+
+ Return the matches in the collection for the passed in selector.
+
+ @param selector the selector to match against.
+ @return a possibly empty collection of matching objects.
+
+
+ This class contains a collection for collection based X509Stores.
+
+
+
+ Constructor.
+
+ The collection is copied.
+
+
+ The collection containing X.509 object types.
+ If collection is null.
+
+
+ Returns a copy of the ICollection.
+
+
+ Returns a formatted string describing the parameters.
+
+
+
+ An ICollection of X509Name objects
+
+
+
+ The attribute certificate being checked. This is not a criterion.
+ Rather, it is optional information that may help a {@link X509Store} find
+ CRLs that would be relevant when checking revocation for the specified
+ attribute certificate. If null is specified, then no such
+ optional information is provided.
+
+ @param attrCert the IX509AttributeCertificate being checked (or
+ null)
+ @see #getAttrCertificateChecking()
+
+
+ If true only complete CRLs are returned. Defaults to
+ false.
+
+ @return true if only complete CRLs are returned.
+
+
+ Returns if this selector must match CRLs with the delta CRL indicator
+ extension set. Defaults to false.
+
+ @return Returns true if only CRLs with the delta CRL
+ indicator extension are selected.
+
+
+ The issuing distribution point.
+
+ The issuing distribution point extension is a CRL extension which
+ identifies the scope and the distribution point of a CRL. The scope
+ contains among others information about revocation reasons contained in
+ the CRL. Delta CRLs and complete CRLs must have matching issuing
+ distribution points.
+
+ The byte array is cloned to protect against subsequent modifications.
+
+ You must also enable or disable this criteria with
+ {@link #setIssuingDistributionPointEnabled(bool)}.
+
+ @param issuingDistributionPoint The issuing distribution point to set.
+ This is the DER encoded OCTET STRING extension value.
+ @see #getIssuingDistributionPoint()
+
+
+ Whether the issuing distribution point criteria should be applied.
+ Defaults to false.
+
+ You may also set the issuing distribution point criteria if not a missing
+ issuing distribution point should be assumed.
+
+ @return Returns if the issuing distribution point check is enabled.
+
+
+ The maximum base CRL number. Defaults to null.
+
+ @return Returns the maximum base CRL number.
+ @see #setMaxBaseCRLNumber(BigInteger)
+
+
+
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net45/MimeKit.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net45/MimeKit.dll
new file mode 100644
index 00000000..16d3e7ec
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net45/MimeKit.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net451/BouncyCastle.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net451/BouncyCastle.dll
new file mode 100644
index 00000000..ee732537
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net451/BouncyCastle.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net451/BouncyCastle.xml b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net451/BouncyCastle.xml
new file mode 100644
index 00000000..33e81f46
--- /dev/null
+++ b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net451/BouncyCastle.xml
@@ -0,0 +1,24206 @@
+
+
+
+ BouncyCastle
+
+
+
+ Base class for both the compress and decompress classes.
+ Holds common arrays, and static data.
+
+ @author Keiron Liddle
+
+
+ An input stream that decompresses from the BZip2 format (with the file
+ header chars) to be read as any other stream.
+
+ @author Keiron Liddle
+
+ NB: note this class has been modified to read the leading BZ from the
+ start of the BZIP2 stream to make it compatible with other PGP programs.
+
+
+ An output stream that compresses into the BZip2 format (with the file
+ header chars) into another stream.
+
+ @author Keiron Liddle
+
+ TODO: Update to BZip2 1.0.1
+ NB: note this class has been modified to add a leading BZ to the
+ start of the BZIP2 stream to make it compatible with other PGP programs.
+
+
+
+ modified by Oliver Merkel, 010128
+
+
+
+ A simple class the hold and calculate the CRC for sanity checking
+ of the data.
+
+ @author Keiron Liddle
+
+
+ Return the DER encoding of the object, null if the DER encoding can not be made.
+
+ @return a DER byte array, null otherwise.
+
+
+ a general purpose ASN.1 decoder - note: this class differs from the
+ others in that it returns null after it has read the last object in
+ the stream. If an ASN.1 Null is encountered a Der/BER Null object is
+ returned.
+
+
+ Create an ASN1InputStream where no DER object will be longer than limit.
+
+ @param input stream containing ASN.1 encoded data.
+ @param limit maximum size of a DER encoded object.
+
+
+ Create an ASN1InputStream based on the input byte array. The length of DER objects in
+ the stream is automatically limited to the length of the input array.
+
+ @param input array containing ASN.1 encoded data.
+
+
+ build an object given its tag and the number of bytes to construct it from.
+
+
+ A Null object.
+
+
+ Create a base ASN.1 object from a byte array.
+ The byte array to parse.
+ The base ASN.1 object represented by the byte array.
+ If there is a problem parsing the data.
+
+
+ Read a base ASN.1 object from a stream.
+ The stream to parse.
+ The base ASN.1 object represented by the byte array.
+ If there is a problem parsing the data.
+
+
+ return an Octet string from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return an Octet string from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ @param string the octets making up the octet string.
+
+
+ return an Asn1Sequence from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Return an ASN1 sequence from a tagged object. There is a special
+ case here, if an object appears to have been explicitly tagged on
+ reading but we were expecting it to be implicitly tagged in the
+ normal course of events it indicates that we lost the surrounding
+ sequence - so we need to add it back (this will happen if the tagged
+ object is a sequence that contains other sequences). If you are
+ dealing with implicitly tagged sequences you really should
+ be using this method.
+
+ @param obj the tagged object.
+ @param explicitly true if the object is meant to be explicitly tagged,
+ false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return the object at the sequence position indicated by index.
+
+ @param index the sequence number (starting at zero) of the object
+ @return the object at the sequence position indicated by index.
+
+
+ return an ASN1Set from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Return an ASN1 set from a tagged object. There is a special
+ case here, if an object appears to have been explicitly tagged on
+ reading but we were expecting it to be implicitly tagged in the
+ normal course of events it indicates that we lost the surrounding
+ set - so we need to add it back (this will happen if the tagged
+ object is a sequence that contains other sequences). If you are
+ dealing with implicitly tagged sets you really should
+ be using this method.
+
+ @param obj the tagged object.
+ @param explicitly true if the object is meant to be explicitly tagged
+ false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return the object at the set position indicated by index.
+
+ @param index the set number (starting at zero) of the object
+ @return the object at the set position indicated by index.
+
+
+ ASN.1 TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if the object is explicitly tagged.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ return whether or not the object may be explicitly tagged.
+
+ Note: if the object has been read from an input stream, the only
+ time you can be sure if isExplicit is returning the true state of
+ affairs is if it returns false. An implicitly tagged object may appear
+ to be explicitly tagged, so you need to understand the context under
+ which the reading was done as well, see GetObject below.
+
+
+ return whatever was following the tag.
+
+ Note: tagged objects are generally context dependent if you're
+ trying to extract a tagged object you should be going via the
+ appropriate GetInstance method.
+
+
+ Return the object held in this tagged object as a parser assuming it has
+ the type of the passed in tag. If the object doesn't have a parser
+ associated with it, the base object is returned.
+
+
+ A BER Null object.
+
+
+ convert a vector of octet strings into a single byte string
+
+
+ The octets making up the octet string.
+
+
+ return the DER octets that make up this string.
+
+
+ create an empty sequence
+
+
+ create a sequence containing one object
+
+
+ create a sequence containing a vector of objects.
+
+
+ create an empty sequence
+
+
+ create a set containing one object
+
+
+ create a set containing a vector of objects.
+
+
+ BER TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if an explicitly tagged object.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ create an implicitly tagged object that contains a zero
+ length sequence.
+
+
+ Class representing the DER-type External
+
+
+ Creates a new instance of DerExternal
+ See X.690 for more informations about the meaning of these parameters
+ @param directReference The direct reference or null if not set.
+ @param indirectReference The indirect reference or null if not set.
+ @param dataValueDescriptor The data value descriptor or null if not set.
+ @param externalData The external data in its encoded form.
+
+
+ Creates a new instance of DerExternal.
+ See X.690 for more informations about the meaning of these parameters
+ @param directReference The direct reference or null if not set.
+ @param indirectReference The indirect reference or null if not set.
+ @param dataValueDescriptor The data value descriptor or null if not set.
+ @param encoding The encoding to be used for the external data
+ @param externalData The external data
+
+
+ The encoding of the content. Valid values are
+
+ 0 single-ASN1-type
+ 1 OCTET STRING
+ 2 BIT STRING
+
+
+
+ Base class for an application specific object
+
+
+ Return the enclosed object assuming explicit tagging.
+
+ @return the resulting object
+ @throws IOException if reconstruction fails.
+
+
+ Return the enclosed object assuming implicit tagging.
+
+ @param derTagNo the type tag that should be applied to the object's contents.
+ @return the resulting object
+ @throws IOException if reconstruction fails.
+
+
+ Der BMPString object.
+
+
+ return a BMP string from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a BMP string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ return a Bit string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Bit string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ @param data the octets making up the bit string.
+ @param padBits the number of extra bits at the end of the string.
+
+
+ Return the octets contained in this BIT STRING, checking that this BIT STRING really
+ does represent an octet aligned string. Only use this method when the standard you are
+ following dictates that the BIT STRING will be octet aligned.
+
+ @return a copy of the octet aligned data.
+
+
+ @return the value of the bit string as an int (truncating if necessary)
+
+
+ return a bool from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a DerBoolean from the passed in bool.
+
+
+ return a Boolean from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ return an integer from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Enumerated from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ Generalized time object.
+
+
+ return a generalized time from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Generalized Time object from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ The correct format for this is YYYYMMDDHHMMSS[.f]Z, or without the Z
+ for local time, or Z+-HHMM on the end, for difference between local
+ time and UTC time. The fractional second amount f must consist of at
+ least one number with trailing zeroes removed.
+
+ @param time the time string.
+ @exception ArgumentException if string is an illegal format.
+
+
+ base constructor from a local time object
+
+
+ Return the time.
+ @return The time string as it appeared in the encoded object.
+
+
+ return the time - always in the form of
+ YYYYMMDDhhmmssGMT(+hh:mm|-hh:mm).
+
+ Normally in a certificate we would expect "Z" rather than "GMT",
+ however adding the "GMT" means we can just use:
+
+ dateF = new SimpleDateFormat("yyyyMMddHHmmssz");
+
+ To read in the time and Get a date which is compatible with our local
+ time zone.
+
+
+ return a Graphic String from the passed in object
+
+ @param obj a DerGraphicString or an object that can be converted into one.
+ @exception IllegalArgumentException if the object cannot be converted.
+ @return a DerGraphicString instance, or null.
+
+
+ return a Graphic String from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the tagged object cannot
+ be converted.
+ @return a DerGraphicString instance, or null.
+
+
+ basic constructor - with bytes.
+ @param string the byte encoding of the characters making up the string.
+
+
+ Der IA5String object - this is an ascii string.
+
+
+ return a IA5 string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an IA5 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - without validation.
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in an IA5String.
+
+
+ return true if the passed in String can be represented without
+ loss as an IA5String, false otherwise.
+
+ @return true if in printable set, false otherwise.
+
+
+ return an integer from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Integer from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ in some cases positive values Get crammed into a space,
+ that's not quite big enough...
+
+
+ A Null object.
+
+
+ Der NumericString object - this is an ascii string of characters {0,1,2,3,4,5,6,7,8,9, }.
+
+
+ return a Numeric string from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an Numeric string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - without validation..
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in a NumericString.
+
+
+ Return true if the string can be represented as a NumericString ('0'..'9', ' ')
+
+ @param str string to validate.
+ @return true if numeric, fale otherwise.
+
+
+ return an Oid from the passed in object
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an object Identifier from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ Return true if this oid is an extension of the passed in branch, stem.
+ @param stem the arc or branch that is a possible parent.
+ @return true if the branch is on the passed in stem, false otherwise.
+
+
+ The octets making up the octet string.
+
+
+ Der PrintableString object.
+
+
+ return a printable string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Printable string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor - this does not validate the string
+
+
+ Constructor with optional validation.
+
+ @param string the base string to wrap.
+ @param validate whether or not to check the string.
+ @throws ArgumentException if validate is true and the string
+ contains characters that should not be in a PrintableString.
+
+
+ return true if the passed in String can be represented without
+ loss as a PrintableString, false otherwise.
+
+ @return true if in printable set, false otherwise.
+
+
+ create an empty sequence
+
+
+ create a sequence containing one object
+
+
+ create a sequence containing a vector of objects.
+
+
+ A Der encoded set object
+
+
+ create an empty set
+
+
+ @param obj - a single object that makes up the set.
+
+
+ @param v - a vector of objects making up the set.
+
+
+ Der T61String (also the teletex string) - 8-bit characters
+
+
+ return a T61 string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an T61 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - with bytes.
+
+
+ basic constructor - with string.
+
+
+ DER TaggedObject - in ASN.1 notation this is any object preceded by
+ a [n] where n is some number - these are assumed to follow the construction
+ rules (as with sequences).
+
+
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ @param explicitly true if an explicitly tagged object.
+ @param tagNo the tag number for this object.
+ @param obj the tagged object.
+
+
+ create an implicitly tagged object that contains a zero
+ length sequence.
+
+
+ UTC time object.
+
+
+ return an UTC Time from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an UTC Time from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ The correct format for this is YYMMDDHHMMSSZ (it used to be that seconds were
+ never encoded. When you're creating one of these objects from scratch, that's
+ what you want to use, otherwise we'll try to deal with whatever Gets read from
+ the input stream... (this is why the input format is different from the GetTime()
+ method output).
+
+ @param time the time string.
+
+
+ base constructor from a DateTime object
+
+
+ return the time as a date based on whatever a 2 digit year will return. For
+ standardised processing use ToAdjustedDateTime().
+
+ @return the resulting date
+ @exception ParseException if the date string cannot be parsed.
+
+
+ return the time as an adjusted date
+ in the range of 1950 - 2049.
+
+ @return a date in the range of 1950 to 2049.
+ @exception ParseException if the date string cannot be parsed.
+
+
+ return the time - always in the form of
+ YYMMDDhhmmssGMT(+hh:mm|-hh:mm).
+
+ Normally in a certificate we would expect "Z" rather than "GMT",
+ however adding the "GMT" means we can just use:
+
+ dateF = new SimpleDateFormat("yyMMddHHmmssz");
+
+ To read in the time and Get a date which is compatible with our local
+ time zone.
+
+ Note: In some cases, due to the local date processing, this
+ may lead to unexpected results. If you want to stick the normal
+ convention of 1950 to 2049 use the GetAdjustedTime() method.
+
+
+
+ Return a time string as an adjusted date with a 4 digit year.
+ This goes in the range of 1950 - 2049.
+
+
+
+ Der UTF8String object.
+
+
+ return an UTF8 string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return an UTF8 string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ Der UniversalString object.
+
+
+ return a Universal string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Universal string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ return a Videotex String from the passed in object
+
+ @param obj a DERVideotexString or an object that can be converted into one.
+ @exception IllegalArgumentException if the object cannot be converted.
+ @return a DERVideotexString instance, or null.
+
+
+ return a Videotex String from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the tagged object cannot
+ be converted.
+ @return a DERVideotexString instance, or null.
+
+
+ basic constructor - with bytes.
+ @param string the byte encoding of the characters making up the string.
+
+
+ Der VisibleString object.
+
+
+ return a Visible string from the passed in object.
+
+ @exception ArgumentException if the object cannot be converted.
+
+
+ return a Visible string from a tagged object.
+
+ @param obj the tagged object holding the object we want
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the tagged object cannot
+ be converted.
+
+
+ basic constructor - byte encoded string.
+
+
+ basic constructor
+
+
+ Marker interface for CHOICE objects - if you implement this in a roll-your-own
+ object, any attempt to tag the object implicitly will convert the tag to an
+ explicit one as the encoding rules require.
+
+ If you use this interface your class should also implement the getInstance
+ pattern which takes a tag object and the tagging mode used.
+
+
+
+ basic interface for Der string objects.
+
+
+ class for breaking up an Oid into it's component tokens, ala
+ java.util.StringTokenizer. We need this class as some of the
+ lightweight Java environment don't support classes like
+ StringTokenizer.
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+
+ CAKeyUpdAnnContent ::= SEQUENCE {
+ oldWithNew CmpCertificate, -- old pub signed with new priv
+ newWithOld CmpCertificate, -- new pub signed with old priv
+ newWithNew CmpCertificate -- new pub signed with new priv
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertConfirmContent ::= SEQUENCE OF CertStatus
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertOrEncCert ::= CHOICE {
+ certificate [0] CMPCertificate,
+ encryptedCert [1] EncryptedValue
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertRepMessage ::= SEQUENCE {
+ caPubs [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+ OPTIONAL,
+ response SEQUENCE OF CertResponse
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertResponse ::= SEQUENCE {
+ certReqId INTEGER,
+ -- to match this response with corresponding request (a value
+ -- of -1 is to be used if certReqId is not specified in the
+ -- corresponding request)
+ status PKIStatusInfo,
+ certifiedKeyPair CertifiedKeyPair OPTIONAL,
+ rspInfo OCTET STRING OPTIONAL
+ -- analogous to the id-regInfo-utf8Pairs string defined
+ -- for regInfo in CertReqMsg [CRMF]
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertStatus ::= SEQUENCE {
+ certHash OCTET STRING,
+ -- the hash of the certificate, using the same hash algorithm
+ -- as is used to create and verify the certificate signature
+ certReqId INTEGER,
+ -- to match this confirmation with the corresponding req/rep
+ statusInfo PKIStatusInfo OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertifiedKeyPair ::= SEQUENCE {
+ certOrEncCert CertOrEncCert,
+ privateKey [0] EncryptedValue OPTIONAL,
+ -- see [CRMF] for comment on encoding
+ publicationInfo [1] PKIPublicationInfo OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ Challenge ::= SEQUENCE {
+ owf AlgorithmIdentifier OPTIONAL,
+
+ -- MUST be present in the first Challenge; MAY be omitted in
+ -- any subsequent Challenge in POPODecKeyChallContent (if
+ -- omitted, then the owf used in the immediately preceding
+ -- Challenge is to be used).
+
+ witness OCTET STRING,
+ -- the result of applying the one-way function (owf) to a
+ -- randomly-generated INTEGER, A. [Note that a different
+ -- INTEGER MUST be used for each Challenge.]
+ challenge OCTET STRING
+ -- the encryption (under the public key for which the cert.
+ -- request is being made) of Rand, where Rand is specified as
+ -- Rand ::= SEQUENCE {
+ -- int INTEGER,
+ -- - the randomly-generated INTEGER A (above)
+ -- sender GeneralName
+ -- - the sender's name (as included in PKIHeader)
+ -- }
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Note: the addition of attribute certificates is a BC extension.
+
+
+
+ CMPCertificate ::= CHOICE {
+ x509v3PKCert Certificate
+ x509v2AttrCert [1] AttributeCertificate
+ }
+
+ Note: the addition of attribute certificates is a BC extension.
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CrlAnnContent ::= SEQUENCE OF CertificateList
+
+ @return a basic ASN.1 object representation.
+
+
+
+ ErrorMsgContent ::= SEQUENCE {
+ pKIStatusInfo PKIStatusInfo,
+ errorCode INTEGER OPTIONAL,
+ -- implementation-specific error codes
+ errorDetails PKIFreeText OPTIONAL
+ -- implementation-specific error details
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+
+ GenRepContent ::= SEQUENCE OF InfoTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+ Example InfoTypeAndValue contents include, but are not limited
+ to, the following (un-comment in this ASN.1 module and use as
+ appropriate for a given environment):
+
+ id-it-caProtEncCert OBJECT IDENTIFIER ::= {id-it 1}
+ CAProtEncCertValue ::= CMPCertificate
+ id-it-signKeyPairTypes OBJECT IDENTIFIER ::= {id-it 2}
+ SignKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ id-it-encKeyPairTypes OBJECT IDENTIFIER ::= {id-it 3}
+ EncKeyPairTypesValue ::= SEQUENCE OF AlgorithmIdentifier
+ id-it-preferredSymmAlg OBJECT IDENTIFIER ::= {id-it 4}
+ PreferredSymmAlgValue ::= AlgorithmIdentifier
+ id-it-caKeyUpdateInfo OBJECT IDENTIFIER ::= {id-it 5}
+ CAKeyUpdateInfoValue ::= CAKeyUpdAnnContent
+ id-it-currentCRL OBJECT IDENTIFIER ::= {id-it 6}
+ CurrentCRLValue ::= CertificateList
+ id-it-unsupportedOIDs OBJECT IDENTIFIER ::= {id-it 7}
+ UnsupportedOIDsValue ::= SEQUENCE OF OBJECT IDENTIFIER
+ id-it-keyPairParamReq OBJECT IDENTIFIER ::= {id-it 10}
+ KeyPairParamReqValue ::= OBJECT IDENTIFIER
+ id-it-keyPairParamRep OBJECT IDENTIFIER ::= {id-it 11}
+ KeyPairParamRepValue ::= AlgorithmIdentifer
+ id-it-revPassphrase OBJECT IDENTIFIER ::= {id-it 12}
+ RevPassphraseValue ::= EncryptedValue
+ id-it-implicitConfirm OBJECT IDENTIFIER ::= {id-it 13}
+ ImplicitConfirmValue ::= NULL
+ id-it-confirmWaitTime OBJECT IDENTIFIER ::= {id-it 14}
+ ConfirmWaitTimeValue ::= GeneralizedTime
+ id-it-origPKIMessage OBJECT IDENTIFIER ::= {id-it 15}
+ OrigPKIMessageValue ::= PKIMessages
+ id-it-suppLangTags OBJECT IDENTIFIER ::= {id-it 16}
+ SuppLangTagsValue ::= SEQUENCE OF UTF8String
+
+ where
+
+ id-pkix OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3)
+ dod(6) internet(1) security(5) mechanisms(5) pkix(7)}
+ and
+ id-it OBJECT IDENTIFIER ::= {id-pkix 4}
+
+
+
+
+ InfoTypeAndValue ::= SEQUENCE {
+ infoType OBJECT IDENTIFIER,
+ infoValue ANY DEFINED BY infoType OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ KeyRecRepContent ::= SEQUENCE {
+ status PKIStatusInfo,
+ newSigCert [0] CMPCertificate OPTIONAL,
+ caCerts [1] SEQUENCE SIZE (1..MAX) OF
+ CMPCertificate OPTIONAL,
+ keyPairHist [2] SEQUENCE SIZE (1..MAX) OF
+ CertifiedKeyPair OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ OobCertHash ::= SEQUENCE {
+ hashAlg [0] AlgorithmIdentifier OPTIONAL,
+ certId [1] CertId OPTIONAL,
+ hashVal BIT STRING
+ -- hashVal is calculated over the Der encoding of the
+ -- self-signed certificate with the identifier certID.
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PkiBody.
+ @param type one of the TYPE_* constants
+ @param content message content
+
+
+
+ PkiBody ::= CHOICE { -- message-specific body elements
+ ir [0] CertReqMessages, --Initialization Request
+ ip [1] CertRepMessage, --Initialization Response
+ cr [2] CertReqMessages, --Certification Request
+ cp [3] CertRepMessage, --Certification Response
+ p10cr [4] CertificationRequest, --imported from [PKCS10]
+ popdecc [5] POPODecKeyChallContent, --pop Challenge
+ popdecr [6] POPODecKeyRespContent, --pop Response
+ kur [7] CertReqMessages, --Key Update Request
+ kup [8] CertRepMessage, --Key Update Response
+ krr [9] CertReqMessages, --Key Recovery Request
+ krp [10] KeyRecRepContent, --Key Recovery Response
+ rr [11] RevReqContent, --Revocation Request
+ rp [12] RevRepContent, --Revocation Response
+ ccr [13] CertReqMessages, --Cross-Cert. Request
+ ccp [14] CertRepMessage, --Cross-Cert. Response
+ ckuann [15] CAKeyUpdAnnContent, --CA Key Update Ann.
+ cann [16] CertAnnContent, --Certificate Ann.
+ rann [17] RevAnnContent, --Revocation Ann.
+ crlann [18] CRLAnnContent, --CRL Announcement
+ pkiconf [19] PKIConfirmContent, --Confirmation
+ nested [20] NestedMessageContent, --Nested Message
+ genm [21] GenMsgContent, --General Message
+ genp [22] GenRepContent, --General Response
+ error [23] ErrorMsgContent, --Error Message
+ certConf [24] CertConfirmContent, --Certificate confirm
+ pollReq [25] PollReqContent, --Polling request
+ pollRep [26] PollRepContent --Polling response
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiConfirmContent ::= NULL
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PKIFailureInfo ::= BIT STRING {
+ badAlg (0),
+ -- unrecognized or unsupported Algorithm Identifier
+ badMessageCheck (1), -- integrity check failed (e.g., signature did not verify)
+ badRequest (2),
+ -- transaction not permitted or supported
+ badTime (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+ badCertId (4), -- no certificate could be found matching the provided criteria
+ badDataFormat (5),
+ -- the data submitted has the wrong format
+ wrongAuthority (6), -- the authority indicated in the request is different from the one creating the response token
+ incorrectData (7), -- the requester's data is incorrect (for notary services)
+ missingTimeStamp (8), -- when the timestamp is missing but should be there (by policy)
+ badPOP (9) -- the proof-of-possession failed
+ certRevoked (10),
+ certConfirmed (11),
+ wrongIntegrity (12),
+ badRecipientNonce (13),
+ timeNotAvailable (14),
+ -- the TSA's time source is not available
+ unacceptedPolicy (15),
+ -- the requested TSA policy is not supported by the TSA
+ unacceptedExtension (16),
+ -- the requested extension is not supported by the TSA
+ addInfoNotAvailable (17)
+ -- the additional information requested could not be understood
+ -- or is not available
+ badSenderNonce (18),
+ badCertTemplate (19),
+ signerNotTrusted (20),
+ transactionIdInUse (21),
+ unsupportedVersion (22),
+ notAuthorized (23),
+ systemUnavail (24),
+ systemFailure (25),
+ -- the request cannot be handled due to system failure
+ duplicateCertReq (26)
+
+
+
+ Basic constructor.
+
+
+ Return the number of string elements present.
+
+ @return number of elements present.
+
+
+ Return the UTF8STRING at index.
+
+ @param index index of the string of interest
+ @return the string at index.
+
+
+
+ PkiFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String
+
+
+
+ Value for a "null" recipient or sender.
+
+
+
+ PkiHeader ::= SEQUENCE {
+ pvno INTEGER { cmp1999(1), cmp2000(2) },
+ sender GeneralName,
+ -- identifies the sender
+ recipient GeneralName,
+ -- identifies the intended recipient
+ messageTime [0] GeneralizedTime OPTIONAL,
+ -- time of production of this message (used when sender
+ -- believes that the transport will be "suitable"; i.e.,
+ -- that the time will still be meaningful upon receipt)
+ protectionAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used for calculation of protection bits
+ senderKID [2] KeyIdentifier OPTIONAL,
+ recipKID [3] KeyIdentifier OPTIONAL,
+ -- to identify specific keys used for protection
+ transactionID [4] OCTET STRING OPTIONAL,
+ -- identifies the transaction; i.e., this will be the same in
+ -- corresponding request, response, certConf, and PKIConf
+ -- messages
+ senderNonce [5] OCTET STRING OPTIONAL,
+ recipNonce [6] OCTET STRING OPTIONAL,
+ -- nonces used to provide replay protection, senderNonce
+ -- is inserted by the creator of this message; recipNonce
+ -- is a nonce previously inserted in a related message by
+ -- the intended recipient of this message
+ freeText [7] PKIFreeText OPTIONAL,
+ -- this may be used to indicate context-specific instructions
+ -- (this field is intended for human consumption)
+ generalInfo [8] SEQUENCE SIZE (1..MAX) OF
+ InfoTypeAndValue OPTIONAL
+ -- this may be used to convey context-specific information
+ -- (this field not primarily intended for human consumption)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PKIHeader ::= SEQUENCE {
+ pvno INTEGER { cmp1999(1), cmp2000(2) },
+ sender GeneralName,
+ -- identifies the sender
+ recipient GeneralName,
+ -- identifies the intended recipient
+ messageTime [0] GeneralizedTime OPTIONAL,
+ -- time of production of this message (used when sender
+ -- believes that the transport will be "suitable"; i.e.,
+ -- that the time will still be meaningful upon receipt)
+ protectionAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used for calculation of protection bits
+ senderKID [2] KeyIdentifier OPTIONAL,
+ recipKID [3] KeyIdentifier OPTIONAL,
+ -- to identify specific keys used for protection
+ transactionID [4] OCTET STRING OPTIONAL,
+ -- identifies the transaction; i.e., this will be the same in
+ -- corresponding request, response, certConf, and PKIConf
+ -- messages
+ senderNonce [5] OCTET STRING OPTIONAL,
+ recipNonce [6] OCTET STRING OPTIONAL,
+ -- nonces used to provide replay protection, senderNonce
+ -- is inserted by the creator of this message; recipNonce
+ -- is a nonce previously inserted in a related message by
+ -- the intended recipient of this message
+ freeText [7] PKIFreeText OPTIONAL,
+ -- this may be used to indicate context-specific instructions
+ -- (this field is intended for human consumption)
+ generalInfo [8] SEQUENCE SIZE (1..MAX) OF
+ InfoTypeAndValue OPTIONAL
+ -- this may be used to convey context-specific information
+ -- (this field not primarily intended for human consumption)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PkiMessage.
+
+ @param header message header
+ @param body message body
+ @param protection message protection (may be null)
+ @param extraCerts extra certificates (may be null)
+
+
+
+ PkiMessage ::= SEQUENCE {
+ header PKIHeader,
+ body PKIBody,
+ protection [0] PKIProtection OPTIONAL,
+ extraCerts [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+ OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiMessages ::= SEQUENCE SIZE (1..MAX) OF PkiMessage
+
+ @return a basic ASN.1 object representation.
+
+
+ @param status
+
+
+ @param status
+ @param statusString
+
+
+
+ PkiStatusInfo ::= SEQUENCE {
+ status PKIStatus, (INTEGER)
+ statusString PkiFreeText OPTIONAL,
+ failInfo PkiFailureInfo OPTIONAL (BIT STRING)
+ }
+
+ PKIStatus:
+ granted (0), -- you got exactly what you asked for
+ grantedWithMods (1), -- you got something like what you asked for
+ rejection (2), -- you don't get it, more information elsewhere in the message
+ waiting (3), -- the request body part has not yet been processed, expect to hear more later
+ revocationWarning (4), -- this message contains a warning that a revocation is imminent
+ revocationNotification (5), -- notification that a revocation has occurred
+ keyUpdateWarning (6) -- update already done for the oldCertId specified in CertReqMsg
+
+ PkiFailureInfo:
+ badAlg (0), -- unrecognized or unsupported Algorithm Identifier
+ badMessageCheck (1), -- integrity check failed (e.g., signature did not verify)
+ badRequest (2), -- transaction not permitted or supported
+ badTime (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+ badCertId (4), -- no certificate could be found matching the provided criteria
+ badDataFormat (5), -- the data submitted has the wrong format
+ wrongAuthority (6), -- the authority indicated in the request is different from the one creating the response token
+ incorrectData (7), -- the requester's data is incorrect (for notary services)
+ missingTimeStamp (8), -- when the timestamp is missing but should be there (by policy)
+ badPOP (9) -- the proof-of-possession failed
+
+
+
+
+
+ PbmParameter ::= SEQUENCE {
+ salt OCTET STRING,
+ -- note: implementations MAY wish to limit acceptable sizes
+ -- of this string to values appropriate for their environment
+ -- in order to reduce the risk of denial-of-service attacks
+ owf AlgorithmIdentifier,
+ -- AlgId for a One-Way Function (SHA-1 recommended)
+ iterationCount INTEGER,
+ -- number of times the OWF is applied
+ -- note: implementations MAY wish to limit acceptable sizes
+ -- of this integer to values appropriate for their environment
+ -- in order to reduce the risk of denial-of-service attacks
+ mac AlgorithmIdentifier
+ -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
+ } -- or HMAC [RFC2104, RFC2202])
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PollRepContent ::= SEQUENCE OF SEQUENCE {
+ certReqId INTEGER,
+ checkAfter INTEGER, -- time in seconds
+ reason PKIFreeText OPTIONAL
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PollReqContent ::= SEQUENCE OF SEQUENCE {
+ certReqId INTEGER
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoDecKeyChallContent ::= SEQUENCE OF Challenge
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoDecKeyRespContent ::= SEQUENCE OF INTEGER
+
+ @return a basic ASN.1 object representation.
+
+
+
+ ProtectedPart ::= SEQUENCE {
+ header PKIHeader,
+ body PKIBody
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevAnnContent ::= SEQUENCE {
+ status PKIStatus,
+ certId CertId,
+ willBeRevokedAt GeneralizedTime,
+ badSinceDate GeneralizedTime,
+ crlDetails Extensions OPTIONAL
+ -- extra CRL details (e.g., crl number, reason, location, etc.)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevDetails ::= SEQUENCE {
+ certDetails CertTemplate,
+ -- allows requester to specify as much as they can about
+ -- the cert. for which revocation is requested
+ -- (e.g., for cases in which serialNumber is not available)
+ crlEntryDetails Extensions OPTIONAL
+ -- requested crlEntryExtensions
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevRepContent ::= SEQUENCE {
+ status SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
+ -- in same order as was sent in RevReqContent
+ revCerts [0] SEQUENCE SIZE (1..MAX) OF CertId OPTIONAL,
+ -- IDs for which revocation was requested
+ -- (same order as status)
+ crls [1] SEQUENCE SIZE (1..MAX) OF CertificateList OPTIONAL
+ -- the resulting CRLs (there may be more than one)
+ }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ RevReqContent ::= SEQUENCE OF RevDetails
+
+ @return a basic ASN.1 object representation.
+
+
+ return an Attribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attribute ::= SEQUENCE {
+ attrType OBJECT IDENTIFIER,
+ attrValues SET OF AttributeValue
+ }
+
+
+
+ Return the first attribute matching the given OBJECT IDENTIFIER
+
+
+ Return all the attributes matching the OBJECT IDENTIFIER oid. The vector will be
+ empty if there are no attributes of the required type present.
+
+ @param oid type of attribute required.
+ @return a vector of all the attributes found of type oid.
+
+
+ Return a new table with the passed in attribute added.
+
+ @param attrType
+ @param attrValue
+ @return
+
+
+
+ Attributes ::=
+ SET SIZE(1..MAX) OF Attribute -- according to RFC 5652
+
+ @return
+
+
+ return an AuthEnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthEnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthEnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ authEncryptedContentInfo EncryptedContentInfo,
+ authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+ AuthEnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ authEncryptedContentInfo EncryptedContentInfo,
+ authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+
+
+
+ return an AuthenticatedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthenticatedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthenticatedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ macAlgorithm MessageAuthenticationCodeAlgorithm,
+ digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+ encapContentInfo EncapsulatedContentInfo,
+ authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+
+ AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ MessageAuthenticationCode ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AuthenticatedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ macAlgorithm MessageAuthenticationCodeAlgorithm,
+ digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+ encapContentInfo EncapsulatedContentInfo,
+ authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+ mac MessageAuthenticationCode,
+ unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+
+ AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+
+ MessageAuthenticationCode ::= OCTET STRING
+
+
+
+ The other Revocation Info arc
+ id-ri OBJECT IDENTIFIER ::= { iso(1) identified-organization(3)
+ dod(6) internet(1) security(5) mechanisms(5) pkix(7) ri(16) }
+
+
+ RFC 3274 - CMS Compressed Data.
+
+ CompressedData ::= Sequence {
+ version CMSVersion,
+ compressionAlgorithm CompressionAlgorithmIdentifier,
+ encapContentInfo EncapsulatedContentInfo
+ }
+
+
+
+ return a CompressedData object from a tagged object.
+
+ @param ato the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a CompressedData object from the given object.
+
+ @param _obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ RFC 3274 - CMS Compressed Data.
+
+ CompressedData ::= SEQUENCE {
+ version CMSVersion,
+ compressionAlgorithm CompressionAlgorithmIdentifier,
+ encapContentInfo EncapsulatedContentInfo
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= Sequence {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= SEQUENCE {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ return an EncryptedContentInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EncryptedContentInfo ::= Sequence {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+
+
+
+ EncryptedContentInfo ::= SEQUENCE {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+
+
+
+ EncryptedData ::= SEQUENCE {
+ version CMSVersion,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ return an EnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an EnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EnvelopedData ::= Sequence {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EnvelopedData ::= SEQUENCE {
+ version CMSVersion,
+ originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+ recipientInfos RecipientInfos,
+ encryptedContentInfo EncryptedContentInfo,
+ unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+ }
+
+
+
+ return a KekIdentifier object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KekIdentifier object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KekIdentifier ::= Sequence {
+ keyIdentifier OCTET STRING,
+ date GeneralizedTime OPTIONAL,
+ other OtherKeyAttribute OPTIONAL
+ }
+
+
+
+ return a KekRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KekRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KekRecipientInfo ::= Sequence {
+ version CMSVersion, -- always set to 4
+ kekID KekIdentifier,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+ return an KeyAgreeRecipientIdentifier object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an KeyAgreeRecipientIdentifier object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeyAgreeRecipientIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ rKeyId [0] IMPLICIT RecipientKeyIdentifier
+ }
+
+
+
+ return a KeyAgreeRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a KeyAgreeRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ * Produce an object suitable for an Asn1OutputStream.
+ *
+ * KeyAgreeRecipientInfo ::= Sequence {
+ * version CMSVersion, -- always set to 3
+ * originator [0] EXPLICIT OriginatorIdentifierOrKey,
+ * ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
+ * keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ * recipientEncryptedKeys RecipientEncryptedKeys
+ * }
+ *
+ * UserKeyingMaterial ::= OCTET STRING
+ *
+
+
+ return a KeyTransRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeyTransRecipientInfo ::= Sequence {
+ version CMSVersion, -- always set to 0 or 2
+ rid RecipientIdentifier,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+
+ MetaData ::= SEQUENCE {
+ hashProtected BOOLEAN,
+ fileName UTF8String OPTIONAL,
+ mediaType IA5String OPTIONAL,
+ otherMetaData Attributes OPTIONAL
+ }
+
+ @return
+
+
+ return an OriginatorIdentifierOrKey object from a tagged object.
+
+ @param o the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorIdentifierOrKey object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorIdentifierOrKey ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier,
+ originatorKey [1] OriginatorPublicKey
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ return an OriginatorInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorInfo ::= Sequence {
+ certs [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL
+ }
+
+
+
+ return an OriginatorPublicKey object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an OriginatorPublicKey object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OriginatorPublicKey ::= Sequence {
+ algorithm AlgorithmIdentifier,
+ publicKey BIT STRING
+ }
+
+
+
+ return an OtherKeyAttribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherKeyAttribute ::= Sequence {
+ keyAttrId OBJECT IDENTIFIER,
+ keyAttr ANY DEFINED BY keyAttrId OPTIONAL
+ }
+
+
+
+ return a OtherRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a OtherRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherRecipientInfo ::= Sequence {
+ oriType OBJECT IDENTIFIER,
+ oriValue ANY DEFINED BY oriType }
+
+
+
+ return a OtherRevocationInfoFormat object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception IllegalArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a OtherRevocationInfoFormat object from the given object.
+
+ @param obj the object we want converted.
+ @exception IllegalArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an ASN1OutputStream.
+
+ OtherRevocationInfoFormat ::= SEQUENCE {
+ otherRevInfoFormat OBJECT IDENTIFIER,
+ otherRevInfo ANY DEFINED BY otherRevInfoFormat }
+
+
+
+ return a PasswordRecipientInfo object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param explicitly true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a PasswordRecipientInfo object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ PasswordRecipientInfo ::= Sequence {
+ version CMSVersion, -- Always set to 0
+ keyDerivationAlgorithm [0] KeyDerivationAlgorithmIdentifier
+ OPTIONAL,
+ keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+ encryptedKey EncryptedKey }
+
+
+
+ return an RecipientEncryptedKey object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a RecipientEncryptedKey object from the given object.
+
+ @param obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientEncryptedKey ::= SEQUENCE {
+ rid KeyAgreeRecipientIdentifier,
+ encryptedKey EncryptedKey
+ }
+
+
+
+ return a RecipientIdentifier object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientInfo ::= CHOICE {
+ ktri KeyTransRecipientInfo,
+ kari [1] KeyAgreeRecipientInfo,
+ kekri [2] KekRecipientInfo,
+ pwri [3] PasswordRecipientInfo,
+ ori [4] OtherRecipientInfo }
+
+
+
+ return a RecipientKeyIdentifier object from a tagged object.
+
+ @param _ato the tagged object holding the object we want.
+ @param _explicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @exception ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return a RecipientKeyIdentifier object from the given object.
+
+ @param _obj the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RecipientKeyIdentifier ::= Sequence {
+ subjectKeyIdentifier SubjectKeyIdentifier,
+ date GeneralizedTime OPTIONAL,
+ other OtherKeyAttribute OPTIONAL
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+
+ ScvpReqRes ::= SEQUENCE {
+ request [0] EXPLICIT ContentInfo OPTIONAL,
+ response ContentInfo }
+
+ @return the ASN.1 primitive representation.
+
+
+ a signed data object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignedData ::= Sequence {
+ version CMSVersion,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ encapContentInfo EncapsulatedContentInfo,
+ certificates [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos
+ }
+
+
+
+
+ SignedData ::= SEQUENCE {
+ version CMSVersion,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ encapContentInfo EncapsulatedContentInfo,
+ certificates [0] IMPLICIT CertificateSet OPTIONAL,
+ crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos
+ }
+
+
+
+ return a SignerIdentifier object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerIdentifier ::= CHOICE {
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ subjectKeyIdentifier [0] SubjectKeyIdentifier
+ }
+
+ SubjectKeyIdentifier ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerInfo ::= Sequence {
+ version Version,
+ SignerIdentifier sid,
+ digestAlgorithm DigestAlgorithmIdentifier,
+ authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+ digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+ encryptedDigest EncryptedDigest,
+ unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+ }
+
+ EncryptedDigest ::= OCTET STRING
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+
+ DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+
+
+
+ creates a time object from a given date - if the date is between 1950
+ and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime
+ is used.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Time ::= CHOICE {
+ utcTime UTCTime,
+ generalTime GeneralizedTime }
+
+
+
+
+ TimeStampAndCRL ::= SEQUENCE {
+ timeStamp TimeStampToken, -- according to RFC 3161
+ crl CertificateList OPTIONAL -- according to RFC 5280
+ }
+
+ @return
+
+
+
+ TimeStampTokenEvidence ::=
+ SEQUENCE SIZE(1..MAX) OF TimeStampAndCrl
+
+ @return
+
+
+
+ TimeStampedData ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ dataUri IA5String OPTIONAL,
+ metaData MetaData OPTIONAL,
+ content OCTET STRING OPTIONAL,
+ temporalEvidence Evidence
+ }
+
+ @return
+
+
+ return an AuthEnvelopedData object from a tagged object.
+
+ @param obj the tagged object holding the object we want.
+ @param isExplicit true if the object is meant to be explicitly
+ tagged false otherwise.
+ @throws ArgumentException if the object held by the
+ tagged object cannot be converted.
+
+
+ return an AuthEnvelopedData object from the given object.
+
+ @param obj the object we want converted.
+ @throws ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ MQVuserKeyingMaterial ::= SEQUENCE {
+ ephemeralPublicKey OriginatorPublicKey,
+ addedukm [0] EXPLICIT UserKeyingMaterial OPTIONAL }
+
+
+
+
+ AttributeTypeAndValue ::= SEQUENCE {
+ type OBJECT IDENTIFIER,
+ value ANY DEFINED BY type }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertId ::= SEQUENCE {
+ issuer GeneralName,
+ serialNumber INTEGER }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertReqMessages ::= SEQUENCE SIZE (1..MAX) OF CertReqMsg
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new CertReqMsg.
+ @param certReq CertRequest
+ @param popo may be null
+ @param regInfo may be null
+
+
+
+ CertReqMsg ::= SEQUENCE {
+ certReq CertRequest,
+ pop ProofOfPossession OPTIONAL,
+ -- content depends upon key type
+ regInfo SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertRequest ::= SEQUENCE {
+ certReqId INTEGER, -- ID for matching request and reply
+ certTemplate CertTemplate, -- Selected fields of cert to be issued
+ controls Controls OPTIONAL } -- Attributes affecting issuance
+
+ @return a basic ASN.1 object representation.
+
+
+
+ CertTemplate ::= SEQUENCE {
+ version [0] Version OPTIONAL,
+ serialNumber [1] INTEGER OPTIONAL,
+ signingAlg [2] AlgorithmIdentifier OPTIONAL,
+ issuer [3] Name OPTIONAL,
+ validity [4] OptionalValidity OPTIONAL,
+ subject [5] Name OPTIONAL,
+ publicKey [6] SubjectPublicKeyInfo OPTIONAL,
+ issuerUID [7] UniqueIdentifier OPTIONAL,
+ subjectUID [8] UniqueIdentifier OPTIONAL,
+ extensions [9] Extensions OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ Sets the X.509 version. Note: for X509v3, use 2 here.
+
+
+ Sets the issuer unique ID (deprecated in X.509v3)
+
+
+ Sets the subject unique ID (deprecated in X.509v3)
+
+
+
+ CertTemplate ::= SEQUENCE {
+ version [0] Version OPTIONAL,
+ serialNumber [1] INTEGER OPTIONAL,
+ signingAlg [2] AlgorithmIdentifier OPTIONAL,
+ issuer [3] Name OPTIONAL,
+ validity [4] OptionalValidity OPTIONAL,
+ subject [5] Name OPTIONAL,
+ publicKey [6] SubjectPublicKeyInfo OPTIONAL,
+ issuerUID [7] UniqueIdentifier OPTIONAL,
+ subjectUID [8] UniqueIdentifier OPTIONAL,
+ extensions [9] Extensions OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ Controls ::= SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue
+
+ @return a basic ASN.1 object representation.
+
+
+
+ EncKeyWithID ::= SEQUENCE {
+ privateKey PrivateKeyInfo,
+ identifier CHOICE {
+ string UTF8String,
+ generalName GeneralName
+ } OPTIONAL
+ }
+
+ @return
+
+
+
+ EncryptedKey ::= CHOICE {
+ encryptedValue EncryptedValue, -- deprecated
+ envelopedData [0] EnvelopedData }
+ -- The encrypted private key MUST be placed in the envelopedData
+ -- encryptedContentInfo encryptedContent OCTET STRING.
+
+
+
+
+ EncryptedValue ::= SEQUENCE {
+ intendedAlg [0] AlgorithmIdentifier OPTIONAL,
+ -- the intended algorithm for which the value will be used
+ symmAlg [1] AlgorithmIdentifier OPTIONAL,
+ -- the symmetric algorithm used to encrypt the value
+ encSymmKey [2] BIT STRING OPTIONAL,
+ -- the (encrypted) symmetric key used to encrypt the value
+ keyAlg [3] AlgorithmIdentifier OPTIONAL,
+ -- algorithm used to encrypt the symmetric key
+ valueHint [4] OCTET STRING OPTIONAL,
+ -- a brief description or identifier of the encValue content
+ -- (may be meaningful only to the sending entity, and used only
+ -- if EncryptedValue might be re-examined by the sending entity
+ -- in the future)
+ encValue BIT STRING }
+ -- the encrypted value itself
+
+ @return a basic ASN.1 object representation.
+
+
+
+ OptionalValidity ::= SEQUENCE {
+ notBefore [0] Time OPTIONAL,
+ notAfter [1] Time OPTIONAL } --at least one MUST be present
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PkiArchiveOptions ::= CHOICE {
+ encryptedPrivKey [0] EncryptedKey,
+ -- the actual value of the private key
+ keyGenParameters [1] KeyGenParameters,
+ -- parameters which allow the private key to be re-generated
+ archiveRemGenPrivKey [2] BOOLEAN }
+ -- set to TRUE if sender wishes receiver to archive the private
+ -- key of a key pair that the receiver generates in response to
+ -- this request; set to FALSE if no archival is desired.
+
+
+
+
+ PkiPublicationInfo ::= SEQUENCE {
+ action INTEGER {
+ dontPublish (0),
+ pleasePublish (1) },
+ pubInfos SEQUENCE SIZE (1..MAX) OF SinglePubInfo OPTIONAL }
+ -- pubInfos MUST NOT be present if action is "dontPublish"
+ -- (if action is "pleasePublish" and pubInfos is omitted,
+ -- "dontCare" is assumed)
+
+ @return a basic ASN.1 object representation.
+
+
+ Password-based MAC value for use with POPOSigningKeyInput.
+
+
+ Creates a new PKMACValue.
+ @param params parameters for password-based MAC
+ @param value MAC of the DER-encoded SubjectPublicKeyInfo
+
+
+ Creates a new PKMACValue.
+ @param aid CMPObjectIdentifiers.passwordBasedMAC, with PBMParameter
+ @param value MAC of the DER-encoded SubjectPublicKeyInfo
+
+
+
+ PKMACValue ::= SEQUENCE {
+ algId AlgorithmIdentifier,
+ -- algorithm value shall be PasswordBasedMac 1.2.840.113533.7.66.13
+ -- parameter value is PBMParameter
+ value BIT STRING }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ PopoPrivKey ::= CHOICE {
+ thisMessage [0] BIT STRING, -- Deprecated
+ -- possession is proven in this message (which contains the private
+ -- key itself (encrypted for the CA))
+ subsequentMessage [1] SubsequentMessage,
+ -- possession will be proven in a subsequent message
+ dhMAC [2] BIT STRING, -- Deprecated
+ agreeMAC [3] PKMACValue,
+ encryptedKey [4] EnvelopedData }
+
+
+
+ Creates a new Proof of Possession object for a signing key.
+ @param poposkIn the PopoSigningKeyInput structure, or null if the
+ CertTemplate includes both subject and publicKey values.
+ @param aid the AlgorithmIdentifier used to sign the proof of possession.
+ @param signature a signature over the DER-encoded value of poposkIn,
+ or the DER-encoded value of certReq if poposkIn is null.
+
+
+
+ PopoSigningKey ::= SEQUENCE {
+ poposkInput [0] PopoSigningKeyInput OPTIONAL,
+ algorithmIdentifier AlgorithmIdentifier,
+ signature BIT STRING }
+ -- The signature (using "algorithmIdentifier") is on the
+ -- DER-encoded value of poposkInput. NOTE: If the CertReqMsg
+ -- certReq CertTemplate contains the subject and publicKey values,
+ -- then poposkInput MUST be omitted and the signature MUST be
+ -- computed on the DER-encoded value of CertReqMsg certReq. If
+ -- the CertReqMsg certReq CertTemplate does not contain the public
+ -- key and subject values, then poposkInput MUST be present and
+ -- MUST be signed. This strategy ensures that the public key is
+ -- not present in both the poposkInput and CertReqMsg certReq
+ -- CertTemplate fields.
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a new PopoSigningKeyInput with sender name as authInfo.
+
+
+ Creates a new PopoSigningKeyInput using password-based MAC.
+
+
+ Returns the sender field, or null if authInfo is publicKeyMac
+
+
+ Returns the publicKeyMac field, or null if authInfo is sender
+
+
+
+ PopoSigningKeyInput ::= SEQUENCE {
+ authInfo CHOICE {
+ sender [0] GeneralName,
+ -- used only if an authenticated identity has been
+ -- established for the sender (e.g., a DN from a
+ -- previously-issued and currently-valid certificate
+ publicKeyMac PKMacValue },
+ -- used if no authenticated GeneralName currently exists for
+ -- the sender; publicKeyMac contains a password-based MAC
+ -- on the DER-encoded value of publicKey
+ publicKey SubjectPublicKeyInfo } -- from CertTemplate
+
+ @return a basic ASN.1 object representation.
+
+
+ Creates a ProofOfPossession with type raVerified.
+
+
+ Creates a ProofOfPossession for a signing key.
+
+
+ Creates a ProofOfPossession for key encipherment or agreement.
+ @param type one of TYPE_KEY_ENCIPHERMENT or TYPE_KEY_AGREEMENT
+
+
+
+ ProofOfPossession ::= CHOICE {
+ raVerified [0] NULL,
+ -- used if the RA has already verified that the requester is in
+ -- possession of the private key
+ signature [1] PopoSigningKey,
+ keyEncipherment [2] PopoPrivKey,
+ keyAgreement [3] PopoPrivKey }
+
+ @return a basic ASN.1 object representation.
+
+
+
+ SinglePubInfo ::= SEQUENCE {
+ pubMethod INTEGER {
+ dontCare (0),
+ x500 (1),
+ web (2),
+ ldap (3) },
+ pubLocation GeneralName OPTIONAL }
+
+ @return a basic ASN.1 object representation.
+
+
+ table of the available named parameters for GOST 3410-2001.
+
+
+ return the ECDomainParameters object for the given OID, null if it
+ isn't present.
+
+ @param oid an object identifier representing a named parameters, if present.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+
+ Gost28147-89-Parameters ::=
+ SEQUENCE {
+ iv Gost28147-89-IV,
+ encryptionParamSet OBJECT IDENTIFIER
+ }
+
+ Gost28147-89-IV ::= OCTET STRING (SIZE (8))
+
+
+
+ table of the available named parameters for GOST 3410-94.
+
+
+ return the GOST3410ParamSetParameters object for the given OID, null if it
+ isn't present.
+
+ @param oid an object identifier representing a named parameters, if present.
+
+
+ returns an enumeration containing the name strings for parameters
+ contained in this structure.
+
+
+
+ RFC 3126: 4.3.1 Certificate Values Attribute Definition
+
+ CertificateValues ::= SEQUENCE OF Certificate
+
+
+
+
+
+ CommitmentTypeIndication ::= SEQUENCE {
+ commitmentTypeId CommitmentTypeIdentifier,
+ commitmentTypeQualifier SEQUENCE SIZE (1..MAX) OF
+ CommitmentTypeQualifier OPTIONAL }
+
+
+
+ Commitment type qualifiers, used in the Commitment-Type-Indication attribute (RFC3126).
+
+
+ CommitmentTypeQualifier ::= SEQUENCE {
+ commitmentTypeIdentifier CommitmentTypeIdentifier,
+ qualifier ANY DEFINED BY commitmentTypeIdentifier OPTIONAL }
+
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param commitmentTypeIdentifier a CommitmentTypeIdentifier value
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param commitmentTypeIdentifier a CommitmentTypeIdentifier value
+ @param qualifier the qualifier, defined by the above field.
+
+
+ Creates a new CommitmentTypeQualifier instance.
+
+ @param as CommitmentTypeQualifier structure
+ encoded as an Asn1Sequence.
+
+
+ Returns a DER-encodable representation of this instance.
+
+ @return a Asn1Object value
+
+
+
+ RFC 3126: 4.2.1 Complete Certificate Refs Attribute Definition
+
+ CompleteCertificateRefs ::= SEQUENCE OF OtherCertID
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CompleteRevocationRefs ::= SEQUENCE OF CrlOcspRef
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlIdentifier ::= SEQUENCE
+ {
+ crlissuer Name,
+ crlIssuedTime UTCTime,
+ crlNumber INTEGER OPTIONAL
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CRLListID ::= SEQUENCE
+ {
+ crls SEQUENCE OF CrlValidatedID
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlOcspRef ::= SEQUENCE {
+ crlids [0] CRLListID OPTIONAL,
+ ocspids [1] OcspListID OPTIONAL,
+ otherRev [2] OtherRevRefs OPTIONAL
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ CrlValidatedID ::= SEQUENCE {
+ crlHash OtherHash,
+ crlIdentifier CrlIdentifier OPTIONAL}
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspIdentifier ::= SEQUENCE {
+ ocspResponderID ResponderID,
+ -- As in OCSP response data
+ producedAt GeneralizedTime
+ -- As in OCSP response data
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspListID ::= SEQUENCE {
+ ocspResponses SEQUENCE OF OcspResponsesID
+ }
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OcspResponsesID ::= SEQUENCE {
+ ocspIdentifier OcspIdentifier,
+ ocspRepHash OtherHash OPTIONAL
+ }
+
+
+
+
+
+
+ OtherCertID ::= SEQUENCE {
+ otherCertHash OtherHash,
+ issuerSerial IssuerSerial OPTIONAL
+ }
+
+
+
+
+
+
+ OtherHash ::= CHOICE {
+ sha1Hash OtherHashValue, -- This contains a SHA-1 hash
+ otherHash OtherHashAlgAndValue
+ }
+
+ OtherHashValue ::= OCTET STRING
+
+
+
+
+
+ Summary description for OtherHashAlgAndValue.
+
+
+
+ OtherHashAlgAndValue ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashValue OtherHashValue
+ }
+
+ OtherHashValue ::= OCTET STRING
+
+
+
+
+
+ RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition
+
+ OtherRevRefs ::= SEQUENCE
+ {
+ otherRevRefType OtherRevRefType,
+ otherRevRefs ANY DEFINED BY otherRevRefType
+ }
+
+ OtherRevRefType ::= OBJECT IDENTIFIER
+
+
+
+
+
+ RFC 3126: 4.3.2 Revocation Values Attribute Definition
+
+ OtherRevVals ::= SEQUENCE
+ {
+ otherRevValType OtherRevValType,
+ otherRevVals ANY DEFINED BY otherRevValType
+ }
+
+ OtherRevValType ::= OBJECT IDENTIFIER
+
+
+
+
+
+
+ OtherSigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF OtherCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+
+
+
+
+ RFC 5126: 6.3.4. revocation-values Attribute Definition
+
+ RevocationValues ::= SEQUENCE {
+ crlVals [0] SEQUENCE OF CertificateList OPTIONAL,
+ ocspVals [1] SEQUENCE OF BasicOCSPResponse OPTIONAL,
+ otherRevVals [2] OtherRevVals OPTIONAL
+ }
+
+
+
+
+
+
+ SigPolicyQualifierInfo ::= SEQUENCE {
+ sigPolicyQualifierId SigPolicyQualifierId,
+ sigQualifier ANY DEFINED BY sigPolicyQualifierId
+ }
+
+ SigPolicyQualifierId ::= OBJECT IDENTIFIER
+
+
+
+
+
+
+ SignaturePolicyId ::= SEQUENCE {
+ sigPolicyIdentifier SigPolicyId,
+ sigPolicyHash SigPolicyHash,
+ sigPolicyQualifiers SEQUENCE SIZE (1..MAX) OF SigPolicyQualifierInfo OPTIONAL
+ }
+
+ SigPolicyId ::= OBJECT IDENTIFIER
+
+ SigPolicyHash ::= OtherHashAlgAndValue
+
+
+
+
+
+
+ SignaturePolicyIdentifier ::= CHOICE {
+ SignaturePolicyId SignaturePolicyId,
+ SignaturePolicyImplied SignaturePolicyImplied
+ }
+
+ SignaturePolicyImplied ::= NULL
+
+
+
+
+
+
+ SignerAttribute ::= SEQUENCE OF CHOICE {
+ claimedAttributes [0] ClaimedAttributes,
+ certifiedAttributes [1] CertifiedAttributes }
+
+ ClaimedAttributes ::= SEQUENCE OF Attribute
+ CertifiedAttributes ::= AttributeCertificate -- as defined in RFC 3281: see clause 4.1.
+
+
+
+ Signer-Location attribute (RFC3126).
+
+
+ SignerLocation ::= SEQUENCE {
+ countryName [0] DirectoryString OPTIONAL,
+ localityName [1] DirectoryString OPTIONAL,
+ postalAddress [2] PostalAddress OPTIONAL }
+
+ PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+
+
+
+
+ SignerLocation ::= SEQUENCE {
+ countryName [0] DirectoryString OPTIONAL,
+ localityName [1] DirectoryString OPTIONAL,
+ postalAddress [2] PostalAddress OPTIONAL }
+
+ PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+
+ DirectoryString ::= CHOICE {
+ teletexString TeletexString (SIZE (1..MAX)),
+ printableString PrintableString (SIZE (1..MAX)),
+ universalString UniversalString (SIZE (1..MAX)),
+ utf8String UTF8String (SIZE (1.. MAX)),
+ bmpString BMPString (SIZE (1..MAX)) }
+
+
+
+ constructor
+
+
+
+ ContentHints ::= SEQUENCE {
+ contentDescription UTF8String (SIZE (1..MAX)) OPTIONAL,
+ contentType ContentType }
+
+
+
+ Create from OCTET STRING whose octets represent the identifier.
+
+
+ Create from byte array representing the identifier.
+
+
+ The definition of ContentIdentifier is
+
+ ContentIdentifier ::= OCTET STRING
+
+ id-aa-contentIdentifier OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 7 }
+
+
+ constructor
+
+
+
+ EssCertID ::= SEQUENCE {
+ certHash Hash,
+ issuerSerial IssuerSerial OPTIONAL }
+
+
+
+
+ EssCertIDv2 ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier
+ DEFAULT {algorithm id-sha256},
+ certHash Hash,
+ issuerSerial IssuerSerial OPTIONAL
+ }
+
+ Hash ::= OCTET STRING
+
+ IssuerSerial ::= SEQUENCE {
+ issuer GeneralNames,
+ serialNumber CertificateSerialNumber
+ }
+
+
+
+ constructor
+
+
+
+ OtherCertID ::= SEQUENCE {
+ otherCertHash OtherHash,
+ issuerSerial IssuerSerial OPTIONAL }
+
+ OtherHash ::= CHOICE {
+ sha1Hash OCTET STRING,
+ otherHash OtherHashAlgAndValue }
+
+ OtherHashAlgAndValue ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashValue OCTET STRING }
+
+
+
+
+ constructors
+
+
+ The definition of OtherSigningCertificate is
+
+ OtherSigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF OtherCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-ets-otherSigCert OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 19 }
+
+
+ constructors
+
+
+ The definition of SigningCertificate is
+
+ SigningCertificate ::= SEQUENCE {
+ certs SEQUENCE OF EssCertID,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-signingCertificate OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 12 }
+
+
+ The definition of SigningCertificateV2 is
+
+ SigningCertificateV2 ::= SEQUENCE {
+ certs SEQUENCE OF EssCertIDv2,
+ policies SEQUENCE OF PolicyInformation OPTIONAL
+ }
+
+ id-aa-signingCertificateV2 OBJECT IDENTIFIER ::= { iso(1)
+ member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
+ smime(16) id-aa(2) 47 }
+
+
+ The CscaMasterList object. This object can be wrapped in a
+ CMSSignedData to be published in LDAP.
+
+
+ CscaMasterList ::= SEQUENCE {
+ version CscaMasterListVersion,
+ certList SET OF Certificate }
+
+ CscaMasterListVersion :: INTEGER {v0(0)}
+
+
+
+ The DataGroupHash object.
+
+ DataGroupHash ::= SEQUENCE {
+ dataGroupNumber DataGroupNumber,
+ dataGroupHashValue OCTET STRING }
+
+ DataGroupNumber ::= INTEGER {
+ dataGroup1 (1),
+ dataGroup1 (2),
+ dataGroup1 (3),
+ dataGroup1 (4),
+ dataGroup1 (5),
+ dataGroup1 (6),
+ dataGroup1 (7),
+ dataGroup1 (8),
+ dataGroup1 (9),
+ dataGroup1 (10),
+ dataGroup1 (11),
+ dataGroup1 (12),
+ dataGroup1 (13),
+ dataGroup1 (14),
+ dataGroup1 (15),
+ dataGroup1 (16) }
+
+
+
+
+ The LDSSecurityObject object (V1.8).
+
+ LDSSecurityObject ::= SEQUENCE {
+ version LDSSecurityObjectVersion,
+ hashAlgorithm DigestAlgorithmIdentifier,
+ dataGroupHashValues SEQUENCE SIZE (2..ub-DataGroups) OF DataHashGroup,
+ ldsVersionInfo LDSVersionInfo OPTIONAL
+ -- if present, version MUST be v1 }
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier,
+
+ LDSSecurityObjectVersion :: INTEGER {V0(0)}
+
+
+
+
+ LDSVersionInfo ::= SEQUENCE {
+ ldsVersion PRINTABLE STRING
+ unicodeVersion PRINTABLE STRING
+ }
+
+ @return
+
+
+ The id-isismtt-cp-accredited OID indicates that the certificate is a
+ qualified certificate according to Directive 1999/93/EC of the European
+ Parliament and of the Council of 13 December 1999 on a Community
+ Framework for Electronic Signatures, which additionally conforms the
+ special requirements of the SigG and has been issued by an accredited CA.
+
+
+ Certificate extensionDate of certificate generation
+
+
+ DateOfCertGenSyntax ::= GeneralizedTime
+
+
+
+ Attribute to indicate that the certificate holder may sign in the name of
+ a third person. May also be used as extension in a certificate.
+
+
+ Attribute to indicate admissions to certain professions. May be used as
+ attribute in attribute certificate or as extension in a certificate
+
+
+ Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST
+ be used in new certificates in place of the extension/attribute
+ MonetaryLimit since January 1, 2004. For the sake of backward
+ compatibility with certificates already in use, SigG conforming
+ components MUST support MonetaryLimit (as well as QcEuLimitValue).
+
+
+ A declaration of majority. May be used as attribute in attribute
+ certificate or as extension in a certificate
+
+
+
+ Serial number of the smart card containing the corresponding private key
+
+
+ ICCSNSyntax ::= OCTET STRING (SIZE(8..20))
+
+
+
+
+ Reference for a file of a smartcard that stores the public key of this
+ certificate and that is used as �security anchor�.
+
+
+ PKReferenceSyntax ::= OCTET STRING (SIZE(20))
+
+
+
+ Some other restriction regarding the usage of this certificate. May be
+ used as attribute in attribute certificate or as extension in a
+ certificate.
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.Restriction
+
+
+
+ (Single)Request extension: Clients may include this extension in a
+ (single) Request to request the responder to send the certificate in the
+ response message along with the status information. Besides the LDAP
+ service, this extension provides another mechanism for the distribution
+ of certificates, which MAY optionally be provided by certificate
+ repositories.
+
+
+ RetrieveIfAllowed ::= BOOLEAN
+
+
+
+ SingleOCSPResponse extension: The certificate requested by the client by
+ inserting the RetrieveIfAllowed extension in the request, will be
+ returned in this extension.
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.Ocsp.RequestedCertificate
+
+
+ Base ObjectIdentifier for naming authorities
+
+
+ SingleOCSPResponse extension: Date, when certificate has been published
+ in the directory and status information has become available. Currently,
+ accrediting authorities enforce that SigG-conforming OCSP servers include
+ this extension in the responses.
+
+
+ CertInDirSince ::= GeneralizedTime
+
+
+
+ Hash of a certificate in OCSP.
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.Ocsp.CertHash
+
+
+
+ NameAtBirth ::= DirectoryString(SIZE(1..64)
+
+
+ Used in
+ {@link Org.BouncyCastle.Asn1.X509.SubjectDirectoryAttributes SubjectDirectoryAttributes}
+
+
+ Some other information of non-restrictive nature regarding the usage of
+ this certificate. May be used as attribute in atribute certificate or as
+ extension in a certificate.
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdditionalInformationSyntax
+
+
+ Indicates that an attribute certificate exists, which limits the
+ usability of this public key certificate. Whenever verifying a signature
+ with the help of this certificate, the content of the corresponding
+ attribute certificate should be concerned. This extension MUST be
+ included in a PKC, if a corresponding attribute certificate (having the
+ PKC as base certificate) contains some attribute that restricts the
+ usability of the PKC too. Attribute certificates with restricting content
+ MUST always be included in the signed document.
+
+
+ LiabilityLimitationFlagSyntax ::= BOOLEAN
+
+
+
+ ISIS-MTT PROFILE: The responder may include this extension in a response to
+ send the hash of the requested certificate to the responder. This hash is
+ cryptographically bound to the certificate and serves as evidence that the
+ certificate is known to the responder (i.e. it has been issued and is present
+ in the directory). Hence, this extension is a means to provide a positive
+ statement of availability as described in T8.[8]. As explained in T13.[1],
+ clients may rely on this information to be able to validate signatures after
+ the expiry of the corresponding certificate. Hence, clients MUST support this
+ extension. If a positive statement of availability is to be delivered, this
+ extension syntax and OID MUST be used.
+
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type CertHash:
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param hashAlgorithm The hash algorithm identifier.
+ @param certificateHash The hash of the whole DER encoding of the certificate.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ CertHash ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ certificateHash OCTET STRING
+ }
+
+
+ @return an Asn1Object
+
+
+ ISIS-MTT-Optional: The certificate requested by the client by inserting the
+ RetrieveIfAllowed extension in the request, will be returned in this
+ extension.
+
+ ISIS-MTT-SigG: The signature act allows publishing certificates only then,
+ when the certificate owner gives his isExplicit permission. Accordingly, there
+ may be �nondownloadable� certificates, about which the responder must provide
+ status information, but MUST NOT include them in the response. Clients may
+ get therefore the following three kind of answers on a single request
+ including the RetrieveIfAllowed extension:
+
+ a) the responder supports the extension and is allowed to publish the
+ certificate: RequestedCertificate returned including the requested
+ certificate
+ b) the responder supports the extension but is NOT allowed to publish
+ the certificate: RequestedCertificate returned including an empty OCTET
+ STRING
+ c) the responder does not support the extension: RequestedCertificate is
+ not included in the response
+
+ Clients requesting RetrieveIfAllowed MUST be able to handle these cases. If
+ any of the OCTET STRING options is used, it MUST contain the DER encoding of
+ the requested certificate.
+
+
+ RequestedCertificate ::= CHOICE {
+ Certificate Certificate,
+ publicKeyCertificate [0] EXPLICIT OCTET STRING,
+ attributeCertificate [1] EXPLICIT OCTET STRING
+ }
+
+
+
+ Constructor from a given details.
+
+ Only one parameter can be given. All other must be null.
+
+ @param certificate Given as Certificate
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ RequestedCertificate ::= CHOICE {
+ Certificate Certificate,
+ publicKeyCertificate [0] EXPLICIT OCTET STRING,
+ attributeCertificate [1] EXPLICIT OCTET STRING
+ }
+
+
+ @return an Asn1Object
+
+
+ Some other information of non-restrictive nature regarding the usage of this
+ certificate.
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+
+ Constructor from a given details.
+
+ @param information The describtion of the information.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+
+
+ @return an Asn1Object
+
+
+ Attribute to indicate admissions to certain professions.
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+
+ ISIS-MTT PROFILE: The relatively complex structure of AdmissionSyntax
+ supports the following concepts and requirements:
+
+ External institutions (e.g. professional associations, chambers, unions,
+ administrative bodies, companies, etc.), which are responsible for granting
+ and verifying professional admissions, are indicated by means of the data
+ field admissionAuthority. An admission authority is indicated by a
+ GeneralName object. Here an X.501 directory name (distinguished name) can be
+ indicated in the field directoryName, a URL address can be indicated in the
+ field uniformResourceIdentifier, and an object identifier can be indicated in
+ the field registeredId.
+ The names of authorities which are responsible for the administration of
+ title registers are indicated in the data field namingAuthority. The name of
+ the authority can be identified by an object identifier in the field
+ namingAuthorityId, by means of a text string in the field
+ namingAuthorityText, by means of a URL address in the field
+ namingAuthorityUrl, or by a combination of them. For example, the text string
+ can contain the name of the authority, the country and the name of the title
+ register. The URL-option refers to a web page which contains lists with
+ officially registered professions (text and possibly OID) as well as
+ further information on these professions. Object identifiers for the
+ component namingAuthorityId are grouped under the OID-branch
+ id-isis-at-namingAuthorities and must be applied for.
+ See http://www.teletrust.de/anwend.asp?Id=30200&Sprache=E_&HomePG=0
+ for an application form and http://www.teletrust.de/links.asp?id=30220,11
+ for an overview of registered naming authorities.
+ By means of the data type ProfessionInfo certain professions,
+ specializations, disciplines, fields of activity, etc. are identified. A
+ profession is represented by one or more text strings, resp. profession OIDs
+ in the fields professionItems and professionOIDs and by a registration number
+ in the field registrationNumber. An indication in text form must always be
+ present, whereas the other indications are optional. The component
+ addProfessionInfo may contain additional applicationspecific information in
+ DER-encoded form.
+
+
+ By means of different namingAuthority-OIDs or profession OIDs hierarchies of
+ professions, specializations, disciplines, fields of activity, etc. can be
+ expressed. The issuing admission authority should always be indicated (field
+ admissionAuthority), whenever a registration number is presented. Still,
+ information on admissions can be given without indicating an admission or a
+ naming authority by the exclusive use of the component professionItems. In
+ this case the certification authority is responsible for the verification of
+ the admission information.
+
+
+
+ This attribute is single-valued. Still, several admissions can be captured in
+ the sequence structure of the component contentsOfAdmissions of
+ AdmissionSyntax or in the component professionInfos of Admissions. The
+ component admissionAuthority of AdmissionSyntax serves as default value for
+ the component admissionAuthority of Admissions. Within the latter component
+ the default value can be overwritten, in case that another authority is
+ responsible. The component namingAuthority of Admissions serves as a default
+ value for the component namingAuthority of ProfessionInfo. Within the latter
+ component the default value can be overwritten, in case that another naming
+ authority needs to be recorded.
+
+ The length of the string objects is limited to 128 characters. It is
+ recommended to indicate a namingAuthorityURL in all issued attribute
+ certificates. If a namingAuthorityURL is indicated, the field professionItems
+ of ProfessionInfo should contain only registered titles. If the field
+ professionOIDs exists, it has to contain the OIDs of the professions listed
+ in professionItems in the same order. In general, the field professionInfos
+ should contain only one entry, unless the admissions that are to be listed
+ are logically connected (e.g. they have been issued under the same admission
+ number).
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.Admissions
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from given details.
+
+ @param admissionAuthority The admission authority.
+ @param contentsOfAdmissions The admissions.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ AdmissionSyntax ::= SEQUENCE
+ {
+ admissionAuthority GeneralName OPTIONAL,
+ contentsOfAdmissions SEQUENCE OF Admissions
+ }
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityId OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ @return Returns the admissionAuthority if present, null otherwise.
+
+
+ @return Returns the contentsOfAdmissions.
+
+
+ An Admissions structure.
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ Parameter professionInfos is mandatory.
+
+ @param admissionAuthority The admission authority.
+ @param namingAuthority The naming authority.
+ @param professionInfos The profession infos.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Admissions ::= SEQUENCE
+ {
+ admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+ namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+ professionInfos SEQUENCE OF ProfessionInfo
+ }
+
+
+
+ @return an Asn1Object
+
+
+ A declaration of majority.
+
+
+ DeclarationOfMajoritySyntax ::= CHOICE
+ {
+ notYoungerThan [0] IMPLICIT INTEGER,
+ fullAgeAtCountry [1] IMPLICIT SEQUENCE
+ {
+ fullAge BOOLEAN DEFAULT TRUE,
+ country PrintableString (SIZE(2))
+ }
+ dateOfBirth [2] IMPLICIT GeneralizedTime
+ }
+
+
+ fullAgeAtCountry indicates the majority of the owner with respect to the laws
+ of a specific country.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ DeclarationOfMajoritySyntax ::= CHOICE
+ {
+ notYoungerThan [0] IMPLICIT INTEGER,
+ fullAgeAtCountry [1] IMPLICIT SEQUENCE
+ {
+ fullAge BOOLEAN DEFAULT TRUE,
+ country PrintableString (SIZE(2))
+ }
+ dateOfBirth [2] IMPLICIT GeneralizedTime
+ }
+
+
+ @return an Asn1Object
+
+
+ @return notYoungerThan if that's what we are, -1 otherwise
+
+
+ Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST be
+ used in new certificates in place of the extension/attribute MonetaryLimit
+ since January 1, 2004. For the sake of backward compatibility with
+ certificates already in use, components SHOULD support MonetaryLimit (as well
+ as QcEuLimitValue).
+
+ Indicates a monetary limit within which the certificate holder is authorized
+ to act. (This value DOES NOT express a limit on the liability of the
+ certification authority).
+
+
+ MonetaryLimitSyntax ::= SEQUENCE
+ {
+ currency PrintableString (SIZE(3)),
+ amount INTEGER,
+ exponent INTEGER
+ }
+
+
+ currency must be the ISO code.
+
+ value = amount�10*exponent
+
+
+ Constructor from a given details.
+
+
+ value = amount�10^exponent
+
+ @param currency The currency. Must be the ISO code.
+ @param amount The amount
+ @param exponent The exponent
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ MonetaryLimitSyntax ::= SEQUENCE
+ {
+ currency PrintableString (SIZE(3)),
+ amount INTEGER,
+ exponent INTEGER
+ }
+
+
+ @return an Asn1Object
+
+
+ Names of authorities which are responsible for the administration of title
+ registers.
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+
+
+
+ Profession OIDs should always be defined under the OID branch of the
+ responsible naming authority. At the time of this writing, the work group
+ �Recht, Wirtschaft, Steuern� (�Law, Economy, Taxes�) is registered as the
+ first naming authority under the OID id-isismtt-at-namingAuthorities.
+
+
+ Constructor from Asn1Sequence.
+
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ @return Returns the namingAuthorityID.
+
+
+ @return Returns the namingAuthorityText.
+
+
+ @return Returns the namingAuthorityUrl.
+
+
+ Constructor from given details.
+
+ All parameters can be combined.
+
+ @param namingAuthorityID ObjectIdentifier for naming authority.
+ @param namingAuthorityUrl URL for naming authority.
+ @param namingAuthorityText Textual representation of naming authority.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ NamingAuthority ::= SEQUENCE
+ {
+ namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+ namingAuthorityUrl IA5String OPTIONAL,
+ namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ Attribute to indicate that the certificate holder may sign in the name of a
+ third person.
+
+ ISIS-MTT PROFILE: The corresponding ProcurationSyntax contains either the
+ name of the person who is represented (subcomponent thirdPerson) or a
+ reference to his/her base certificate (in the component signingFor,
+ subcomponent certRef), furthermore the optional components country and
+ typeSubstitution to indicate the country whose laws apply, and respectively
+ the type of procuration (e.g. manager, procuration, custody).
+
+
+ ISIS-MTT PROFILE: The GeneralName MUST be of type directoryName and MAY only
+ contain: - RFC3039 attributes, except pseudonym (countryName, commonName,
+ surname, givenName, serialNumber, organizationName, organizationalUnitName,
+ stateOrProvincename, localityName, postalAddress) and - SubjectDirectoryName
+ attributes (title, dateOfBirth, placeOfBirth, gender, countryOfCitizenship,
+ countryOfResidence and NameAtBirth).
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type ProcurationSyntax:
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+
+ Either generalName or certRef MUST be
+ null.
+
+ @param country The country code whose laws apply.
+ @param typeOfSubstitution The type of procuration.
+ @param certRef Reference to certificate of the person who is represented.
+
+
+ Constructor from a given details.
+
+
+ Either generalName or certRef MUST be
+ null.
+
+ @param country The country code whose laws apply.
+ @param typeOfSubstitution The type of procuration.
+ @param thirdPerson The GeneralName of the person who is represented.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ ProcurationSyntax ::= SEQUENCE {
+ country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+ typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+ signingFor [3] EXPLICIT SigningFor
+ }
+
+ SigningFor ::= CHOICE
+ {
+ thirdPerson GeneralName,
+ certRef IssuerSerial
+ }
+
+
+ @return an Asn1Object
+
+
+ Professions, specializations, disciplines, fields of activity, etc.
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax
+
+
+ Rechtsanw�ltin
+
+
+ Rechtsanwalt
+
+
+ Rechtsbeistand
+
+
+ Steuerberaterin
+
+
+ Steuerberater
+
+
+ Steuerbevollm�chtigte
+
+
+ Steuerbevollm�chtigter
+
+
+ Notarin
+
+
+ Notar
+
+
+ Notarvertreterin
+
+
+ Notarvertreter
+
+
+ Notariatsverwalterin
+
+
+ Notariatsverwalter
+
+
+ Wirtschaftspr�ferin
+
+
+ Wirtschaftspr�fer
+
+
+ Vereidigte Buchpr�ferin
+
+
+ Vereidigter Buchpr�fer
+
+
+ Patentanw�ltin
+
+
+ Patentanwalt
+
+
+ Constructor from Asn1Sequence.
+
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from given details.
+
+ professionItems is mandatory, all other parameters are
+ optional.
+
+ @param namingAuthority The naming authority.
+ @param professionItems Directory strings of the profession.
+ @param professionOids DERObjectIdentfier objects for the
+ profession.
+ @param registrationNumber Registration number.
+ @param addProfessionInfo Additional infos in encoded form.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ ProfessionInfo ::= SEQUENCE
+ {
+ namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+ professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+ professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+ registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+ addProfessionInfo OCTET STRING OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ @return Returns the addProfessionInfo.
+
+
+ @return Returns the namingAuthority.
+
+
+ @return Returns the professionItems.
+
+
+ @return Returns the professionOids.
+
+
+ @return Returns the registrationNumber.
+
+
+ Some other restriction regarding the usage of this certificate.
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+
+ Constructor from DirectoryString.
+
+ The DirectoryString is of type RestrictionSyntax:
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+ @param restriction A IAsn1String.
+
+
+ Constructor from a given details.
+
+ @param restriction The description of the restriction.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+
+
+
+ @return an Asn1Object
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ cast5CBCParameters ::= Sequence {
+ iv OCTET STRING DEFAULT 0,
+ -- Initialization vector
+ keyLength Integer
+ -- Key length, in bits
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ IDEA-CBCPar ::= Sequence {
+ iv OCTET STRING OPTIONAL -- exactly 8 octets
+ }
+
+
+
+ The NetscapeCertType object.
+
+ NetscapeCertType ::= BIT STRING {
+ SSLClient (0),
+ SSLServer (1),
+ S/MIME (2),
+ Object Signing (3),
+ Reserved (4),
+ SSL CA (5),
+ S/MIME CA (6),
+ Object Signing CA (7) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (X509NetscapeCertType.sslCA | X509NetscapeCertType.smimeCA)
+
+
+ This is designed to parse
+ the PublicKeyAndChallenge created by the KEYGEN tag included by
+ Mozilla based browsers.
+
+ PublicKeyAndChallenge ::= SEQUENCE {
+ spki SubjectPublicKeyInfo,
+ challenge IA5STRING
+ }
+
+
+
+
+ Utility class for fetching curves using their NIST names as published in FIPS-PUB 186-3
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ From RFC 3657
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ BasicOcspResponse ::= Sequence {
+ tbsResponseData ResponseData,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT Sequence OF Certificate OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CertID ::= Sequence {
+ hashAlgorithm AlgorithmIdentifier,
+ issuerNameHash OCTET STRING, -- Hash of Issuer's DN
+ issuerKeyHash OCTET STRING, -- Hash of Issuers public key
+ serialNumber CertificateSerialNumber }
+
+
+
+ create a CertStatus object with a tag of zero.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CertStatus ::= CHOICE {
+ good [0] IMPLICIT Null,
+ revoked [1] IMPLICIT RevokedInfo,
+ unknown [2] IMPLICIT UnknownInfo }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CrlID ::= Sequence {
+ crlUrl [0] EXPLICIT IA5String OPTIONAL,
+ crlNum [1] EXPLICIT Integer OPTIONAL,
+ crlTime [2] EXPLICIT GeneralizedTime OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OcspRequest ::= Sequence {
+ tbsRequest TBSRequest,
+ optionalSignature [0] EXPLICIT Signature OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OcspResponse ::= Sequence {
+ responseStatus OcspResponseStatus,
+ responseBytes [0] EXPLICIT ResponseBytes OPTIONAL }
+
+
+
+ The OcspResponseStatus enumeration.
+
+ OcspResponseStatus ::= Enumerated {
+ successful (0), --Response has valid confirmations
+ malformedRequest (1), --Illegal confirmation request
+ internalError (2), --Internal error in issuer
+ tryLater (3), --Try again later
+ --(4) is not used
+ sigRequired (5), --Must sign the request
+ unauthorized (6) --Request unauthorized
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Request ::= Sequence {
+ reqCert CertID,
+ singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponderID ::= CHOICE {
+ byName [1] Name,
+ byKey [2] KeyHash }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponseBytes ::= Sequence {
+ responseType OBJECT IDENTIFIER,
+ response OCTET STRING }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ResponseData ::= Sequence {
+ version [0] EXPLICIT Version DEFAULT v1,
+ responderID ResponderID,
+ producedAt GeneralizedTime,
+ responses Sequence OF SingleResponse,
+ responseExtensions [1] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ RevokedInfo ::= Sequence {
+ revocationTime GeneralizedTime,
+ revocationReason [0] EXPLICIT CRLReason OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ServiceLocator ::= Sequence {
+ issuer Name,
+ locator AuthorityInfoAccessSyntax OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Signature ::= Sequence {
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT Sequence OF Certificate OPTIONAL}
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SingleResponse ::= Sequence {
+ certID CertID,
+ certStatus CertStatus,
+ thisUpdate GeneralizedTime,
+ nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL,
+ singleExtensions [1] EXPLICIT Extensions OPTIONAL }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ TBSRequest ::= Sequence {
+ version [0] EXPLICIT Version DEFAULT v1,
+ requestorName [1] EXPLICIT GeneralName OPTIONAL,
+ requestList Sequence OF Request,
+ requestExtensions [2] EXPLICIT Extensions OPTIONAL }
+
+
+
+ return an Attribute object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attr ::= Sequence {
+ attrType OBJECT IDENTIFIER,
+ attrValues Set OF AttributeValue
+ }
+
+
+
+ Pkcs10 Certfication request object.
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+
+
+ Pkcs10 CertificationRequestInfo object.
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ContentInfo ::= Sequence {
+ contentType ContentType,
+ content
+ [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+
+
+
+ The EncryptedData object.
+
+ EncryptedData ::= Sequence {
+ version Version,
+ encryptedContentInfo EncryptedContentInfo
+ }
+
+
+ EncryptedContentInfo ::= Sequence {
+ contentType ContentType,
+ contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+ encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+ }
+
+ EncryptedContent ::= OCTET STRING
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ EncryptedPrivateKeyInfo ::= Sequence {
+ encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
+ encryptedData EncryptedData
+ }
+
+ EncryptedData ::= OCTET STRING
+
+ KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
+ ... -- For local profiles
+ }
+
+
+
+
+ MacData ::= SEQUENCE {
+ mac DigestInfo,
+ macSalt OCTET STRING,
+ iterations INTEGER DEFAULT 1
+ -- Note: The default is for historic reasons and its use is deprecated. A
+ -- higher value, like 1024 is recommended.
+
+ @return the basic DERObject construction.
+
+
+ the infamous Pfx from Pkcs12
+
+
+ write out an RSA private key with its associated information
+ as described in Pkcs8.
+
+ PrivateKeyInfo ::= Sequence {
+ version Version,
+ privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}},
+ privateKey PrivateKey,
+ attributes [0] IMPLICIT Attributes OPTIONAL
+ }
+ Version ::= Integer {v1(0)} (v1,...)
+
+ PrivateKey ::= OCTET STRING
+
+ Attributes ::= Set OF Attr
+
+
+
+ The default version
+
+
+
+ RSAES-OAEP-params ::= SEQUENCE {
+ hashAlgorithm [0] OAEP-PSSDigestAlgorithms DEFAULT sha1,
+ maskGenAlgorithm [1] PKCS1MGFAlgorithms DEFAULT mgf1SHA1,
+ pSourceAlgorithm [2] PKCS1PSourceAlgorithms DEFAULT pSpecifiedEmpty
+ }
+
+ OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-sha1 PARAMETERS NULL }|
+ { OID id-sha256 PARAMETERS NULL }|
+ { OID id-sha384 PARAMETERS NULL }|
+ { OID id-sha512 PARAMETERS NULL },
+ ... -- Allows for future expansion --
+ }
+ PKCS1MGFAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+ ... -- Allows for future expansion --
+ }
+ PKCS1PSourceAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-pSpecified PARAMETERS OCTET STRING },
+ ... -- Allows for future expansion --
+ }
+
+ @return the asn1 primitive representing the parameters.
+
+
+ This outputs the key in Pkcs1v2 format.
+
+ RsaPrivateKey ::= Sequence {
+ version Version,
+ modulus Integer, -- n
+ publicExponent Integer, -- e
+ privateExponent Integer, -- d
+ prime1 Integer, -- p
+ prime2 Integer, -- q
+ exponent1 Integer, -- d mod (p-1)
+ exponent2 Integer, -- d mod (q-1)
+ coefficient Integer -- (inverse of q) mod p
+ }
+
+ Version ::= Integer
+
+ This routine is written to output Pkcs1 version 0, private keys.
+
+
+ The default version
+
+
+
+ RSASSA-PSS-params ::= SEQUENCE {
+ hashAlgorithm [0] OAEP-PSSDigestAlgorithms DEFAULT sha1,
+ maskGenAlgorithm [1] PKCS1MGFAlgorithms DEFAULT mgf1SHA1,
+ saltLength [2] INTEGER DEFAULT 20,
+ trailerField [3] TrailerField DEFAULT trailerFieldBC
+ }
+
+ OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-sha1 PARAMETERS NULL }|
+ { OID id-sha256 PARAMETERS NULL }|
+ { OID id-sha384 PARAMETERS NULL }|
+ { OID id-sha512 PARAMETERS NULL },
+ ... -- Allows for future expansion --
+ }
+
+ PKCS1MGFAlgorithms ALGORITHM-IDENTIFIER ::= {
+ { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+ ... -- Allows for future expansion --
+ }
+
+ TrailerField ::= INTEGER { trailerFieldBC(1) }
+
+ @return the asn1 primitive representing the parameters.
+
+
+ a Pkcs#7 signed data object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignedData ::= Sequence {
+ version Version,
+ digestAlgorithms DigestAlgorithmIdentifiers,
+ contentInfo ContentInfo,
+ certificates
+ [0] IMPLICIT ExtendedCertificatesAndCertificates
+ OPTIONAL,
+ crls
+ [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+ signerInfos SignerInfos }
+
+
+
+ a Pkcs#7 signer info object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SignerInfo ::= Sequence {
+ version Version,
+ issuerAndSerialNumber IssuerAndSerialNumber,
+ digestAlgorithm DigestAlgorithmIdentifier,
+ authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+ digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+ encryptedDigest EncryptedDigest,
+ unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+ }
+
+ EncryptedDigest ::= OCTET STRING
+
+ DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+
+ DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+
+
+
+ the elliptic curve private key object from SEC 1
+
+
+ ECPrivateKey ::= SEQUENCE {
+ version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1),
+ privateKey OCTET STRING,
+ parameters [0] Parameters OPTIONAL,
+ publicKey [1] BIT STRING OPTIONAL }
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ EllipticCurve OBJECT IDENTIFIER ::= {
+ iso(1) identified-organization(3) certicom(132) curve(0)
+ }
+
+
+ Handler class for dealing with S/MIME Capabilities
+
+
+ general preferences
+
+
+ encryption algorithms preferences
+
+
+ return an Attr object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ returns an ArrayList with 0 or more objects of all the capabilities
+ matching the passed in capability Oid. If the Oid passed is null the
+ entire set is returned.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SMIMECapabilities ::= Sequence OF SMIMECapability
+
+
+
+ general preferences
+
+
+ encryption algorithms preferences
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SMIMECapability ::= Sequence {
+ capabilityID OBJECT IDENTIFIER,
+ parameters ANY DEFINED BY capabilityID OPTIONAL
+ }
+
+
+
+ Handler for creating a vector S/MIME Capabilities
+
+
+ The SmimeEncryptionKeyPreference object.
+
+ SmimeEncryptionKeyPreference ::= CHOICE {
+ issuerAndSerialNumber [0] IssuerAndSerialNumber,
+ receipentKeyId [1] RecipientKeyIdentifier,
+ subjectAltKeyIdentifier [2] SubjectKeyIdentifier
+ }
+
+
+
+ @param sKeyId the subjectKeyIdentifier value (normally the X.509 one)
+
+
+ elliptic curves defined in "ECC Brainpool Standard Curves and Curve Generation"
+ http://www.ecc-brainpool.org/download/draft_pkix_additional_ecc_dp.txt
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+
+ Accuracy ::= SEQUENCE {
+ seconds INTEGER OPTIONAL,
+ millis [0] INTEGER (1..999) OPTIONAL,
+ micros [1] INTEGER (1..999) OPTIONAL
+ }
+
+
+
+ @param o
+ @return a MessageImprint object.
+
+
+
+ MessageImprint ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ hashedMessage OCTET STRING }
+
+
+
+
+
+ TstInfo ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ policy TSAPolicyId,
+ messageImprint MessageImprint,
+ -- MUST have the same value as the similar field in
+ -- TimeStampReq
+ serialNumber INTEGER,
+ -- Time-Stamping users MUST be ready to accommodate integers
+ -- up to 160 bits.
+ genTime GeneralizedTime,
+ accuracy Accuracy OPTIONAL,
+ ordering BOOLEAN DEFAULT FALSE,
+ nonce INTEGER OPTIONAL,
+ -- MUST be present if the similar field was present
+ -- in TimeStampReq. In that case it MUST have the same value.
+ tsa [0] GeneralName OPTIONAL,
+ extensions [1] IMPLICIT Extensions OPTIONAL }
+
+
+
+
+
+ TimeStampReq ::= SEQUENCE {
+ version INTEGER { v1(1) },
+ messageImprint MessageImprint,
+ --a hash algorithm OID and the hash value of the data to be
+ --time-stamped
+ reqPolicy TSAPolicyId OPTIONAL,
+ nonce INTEGER OPTIONAL,
+ certReq BOOLEAN DEFAULT FALSE,
+ extensions [0] IMPLICIT Extensions OPTIONAL
+ }
+
+
+
+
+ TimeStampResp ::= SEQUENCE {
+ status PkiStatusInfo,
+ timeStampToken TimeStampToken OPTIONAL }
+
+
+
+ dump a Der object as a formatted string with indentation
+
+ @param obj the Asn1Object to be dumped out.
+
+
+ dump out a DER object as a formatted string, in non-verbose mode
+
+ @param obj the Asn1Encodable to be dumped out.
+ @return the resulting string.
+
+
+ Dump out the object as a string
+
+ @param obj the Asn1Encodable to be dumped out.
+ @param verbose if true, dump out the contents of octet and bit strings.
+ @return the resulting string.
+
+
+
+ DirectoryString ::= CHOICE {
+ teletexString TeletexString (SIZE (1..MAX)),
+ printableString PrintableString (SIZE (1..MAX)),
+ universalString UniversalString (SIZE (1..MAX)),
+ utf8String UTF8String (SIZE (1..MAX)),
+ bmpString BMPString (SIZE (1..MAX)) }
+
+
+
+ The AccessDescription object.
+
+ AccessDescription ::= SEQUENCE {
+ accessMethod OBJECT IDENTIFIER,
+ accessLocation GeneralName }
+
+
+
+ create an AccessDescription with the oid and location provided.
+
+
+
+ @return the access method.
+
+
+
+ @return the access location
+
+
+
+ Return the OID in the Algorithm entry of this identifier.
+
+
+
+
+ Return the parameters structure in the Parameters entry of this identifier.
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AlgorithmIdentifier ::= Sequence {
+ algorithm OBJECT IDENTIFIER,
+ parameters ANY DEFINED BY algorithm OPTIONAL }
+
+
+
+
+ Don't use this one if you are trying to be RFC 3281 compliant.
+ Use it for v1 attribute certificates only.
+
+ Our GeneralNames structure
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttCertIssuer ::= CHOICE {
+ v1Form GeneralNames, -- MUST NOT be used in this
+ -- profile
+ v2Form [0] V2Form -- v2 only
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttCertValidityPeriod ::= Sequence {
+ notBeforeTime GeneralizedTime,
+ notAfterTime GeneralizedTime
+ }
+
+
+
+ return an Attr object from the given object.
+
+ @param o the object we want converted.
+ @exception ArgumentException if the object cannot be converted.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Attr ::= Sequence {
+ attrType OBJECT IDENTIFIER,
+ attrValues Set OF AttributeValue
+ }
+
+
+
+ @param obj
+ @return
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttributeCertificate ::= Sequence {
+ acinfo AttributeCertificateInfo,
+ signatureAlgorithm AlgorithmIdentifier,
+ signatureValue BIT STRING
+ }
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ AttributeCertificateInfo ::= Sequence {
+ version AttCertVersion -- version is v2,
+ holder Holder,
+ issuer AttCertIssuer,
+ signature AlgorithmIdentifier,
+ serialNumber CertificateSerialNumber,
+ attrCertValidityPeriod AttCertValidityPeriod,
+ attributes Sequence OF Attr,
+ issuerUniqueID UniqueIdentifier OPTIONAL,
+ extensions Extensions OPTIONAL
+ }
+
+ AttCertVersion ::= Integer { v2(1) }
+
+
+
+ The AuthorityInformationAccess object.
+
+ id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 1 }
+
+ AuthorityInfoAccessSyntax ::=
+ Sequence SIZE (1..MAX) OF AccessDescription
+ AccessDescription ::= Sequence {
+ accessMethod OBJECT IDENTIFIER,
+ accessLocation GeneralName }
+
+ id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
+ id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 }
+ id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 }
+
+
+
+ create an AuthorityInformationAccess with the oid and location provided.
+
+
+ The AuthorityKeyIdentifier object.
+
+ id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::= { id-ce 35 }
+
+ AuthorityKeyIdentifier ::= Sequence {
+ keyIdentifier [0] IMPLICIT KeyIdentifier OPTIONAL,
+ authorityCertIssuer [1] IMPLICIT GeneralNames OPTIONAL,
+ authorityCertSerialNumber [2] IMPLICIT CertificateSerialNumber OPTIONAL }
+
+ KeyIdentifier ::= OCTET STRING
+
+
+
+
+ *
+ * Calulates the keyidentifier using a SHA1 hash over the BIT STRING
+ * from SubjectPublicKeyInfo as defined in RFC2459.
+ *
+ * Example of making a AuthorityKeyIdentifier:
+ *
+ * SubjectPublicKeyInfo apki = new SubjectPublicKeyInfo((ASN1Sequence)new ASN1InputStream(
+ * publicKey.getEncoded()).readObject());
+ * AuthorityKeyIdentifier aki = new AuthorityKeyIdentifier(apki);
+ *
+ *
+ *
+
+
+ create an AuthorityKeyIdentifier with the GeneralNames tag and
+ the serial number provided as well.
+
+
+ create an AuthorityKeyIdentifier with the GeneralNames tag and
+ the serial number provided.
+
+
+ create an AuthorityKeyIdentifier with a precomputed key identifier
+
+
+ create an AuthorityKeyIdentifier with a precomupted key identifier
+ and the GeneralNames tag and the serial number provided as well.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+ create a cA=true object for the given path length constraint.
+
+ @param pathLenConstraint
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ BasicConstraints := Sequence {
+ cA Boolean DEFAULT FALSE,
+ pathLenConstraint Integer (0..MAX) OPTIONAL
+ }
+
+
+
+ Return the distribution points making up the sequence.
+
+ @return DistributionPoint[]
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ CrlDistPoint ::= Sequence SIZE {1..MAX} OF DistributionPoint
+
+
+
+ The CRLNumber object.
+
+ CRLNumber::= Integer(0..MAX)
+
+
+
+ The CRLReason enumeration.
+
+ CRLReason ::= Enumerated {
+ unspecified (0),
+ keyCompromise (1),
+ cACompromise (2),
+ affiliationChanged (3),
+ superseded (4),
+ cessationOfOperation (5),
+ certificateHold (6),
+ removeFromCRL (8),
+ privilegeWithdrawn (9),
+ aACompromise (10)
+ }
+
+
+
+ CertPolicyId, used in the CertificatePolicies and PolicyMappings
+ X509V3 Extensions.
+
+
+ CertPolicyId ::= OBJECT IDENTIFIER
+
+
+
+ PKIX RFC-2459
+
+ The X.509 v2 CRL syntax is as follows. For signature calculation,
+ the data that is to be signed is ASN.1 Der encoded.
+
+
+ CertificateList ::= Sequence {
+ tbsCertList TbsCertList,
+ signatureAlgorithm AlgorithmIdentifier,
+ signatureValue BIT STRING }
+
+
+
+ This class helps to support crossCerfificatePairs in a LDAP directory
+ according RFC 2587
+
+
+ crossCertificatePairATTRIBUTE::={
+ WITH SYNTAX CertificatePair
+ EQUALITY MATCHING RULE certificatePairExactMatch
+ ID joint-iso-ccitt(2) ds(5) attributeType(4) crossCertificatePair(40)}
+
+
+ The forward elements of the crossCertificatePair attribute of a
+ CA's directory entry shall be used to store all, except self-issued
+ certificates issued to this CA. Optionally, the reverse elements of the
+ crossCertificatePair attribute, of a CA's directory entry may contain a
+ subset of certificates issued by this CA to other CAs. When both the forward
+ and the reverse elements are present in a single attribute value, issuer name
+ in one certificate shall match the subject name in the other and vice versa,
+ and the subject public key in one certificate shall be capable of verifying
+ the digital signature on the other certificate and vice versa.
+
+ When a reverse element is present, the forward element value and the reverse
+ element value need not be stored in the same attribute value; in other words,
+ they can be stored in either a single attribute value or two attribute
+ values.
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type CertificatePair:
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param forward Certificates issued to this CA.
+ @param reverse Certificates issued by this CA to other CAs.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ CertificatePair ::= SEQUENCE {
+ forward [0] Certificate OPTIONAL,
+ reverse [1] Certificate OPTIONAL,
+ -- at least one of the pair shall be present -- }
+
+
+ @return a DERObject
+
+
+ @return Returns the forward.
+
+
+ @return Returns the reverse.
+
+
+ Construct a CertificatePolicies object containing one PolicyInformation.
+
+ @param name the name to be contained.
+
+
+ Produce an object suitable for an ASN1OutputStream.
+
+ CertificatePolicies ::= SEQUENCE SIZE {1..MAX} OF PolicyInformation
+
+
+
+ The DigestInfo object.
+
+ DigestInfo::=Sequence{
+ digestAlgorithm AlgorithmIdentifier,
+ digest OCTET STRING }
+
+
+
+ DisplayText class, used in
+ CertificatePolicies X509 V3 extensions (in policy qualifiers).
+
+ It stores a string in a chosen encoding.
+
+ DisplayText ::= CHOICE {
+ ia5String IA5String (SIZE (1..200)),
+ visibleString VisibleString (SIZE (1..200)),
+ bmpString BMPString (SIZE (1..200)),
+ utf8String UTF8String (SIZE (1..200)) }
+
+ @see PolicyQualifierInfo
+ @see PolicyInformation
+
+
+ Constant corresponding to ia5String encoding.
+
+
+
+ Constant corresponding to bmpString encoding.
+
+
+
+ Constant corresponding to utf8String encoding.
+
+
+
+ Constant corresponding to visibleString encoding.
+
+
+
+ Describe constant DisplayTextMaximumSize here.
+
+
+
+ Creates a new DisplayText instance.
+
+ @param type the desired encoding type for the text.
+ @param text the text to store. Strings longer than 200
+ characters are truncated.
+
+
+ Creates a new DisplayText instance.
+
+ @param text the text to encapsulate. Strings longer than 200
+ characters are truncated.
+
+
+ Creates a new DisplayText instance.
+ Useful when reading back a DisplayText class
+ from it's Asn1Encodable form.
+
+ @param contents an Asn1Encodable instance.
+
+
+ Returns the stored string object.
+
+ @return the stored text as a string.
+
+
+ The DistributionPoint object.
+
+ DistributionPoint ::= Sequence {
+ distributionPoint [0] DistributionPointName OPTIONAL,
+ reasons [1] ReasonFlags OPTIONAL,
+ cRLIssuer [2] GeneralNames OPTIONAL
+ }
+
+
+
+ The DistributionPointName object.
+
+ DistributionPointName ::= CHOICE {
+ fullName [0] GeneralNames,
+ nameRelativeToCRLIssuer [1] RDN
+ }
+
+
+
+ The extendedKeyUsage object.
+
+ extendedKeyUsage ::= Sequence SIZE (1..MAX) OF KeyPurposeId
+
+
+
+ Returns all extended key usages.
+ The returned ArrayList contains DerObjectIdentifier instances.
+ @return An ArrayList with all key purposes.
+
+
+ The GeneralName object.
+
+ GeneralName ::= CHOICE {
+ otherName [0] OtherName,
+ rfc822Name [1] IA5String,
+ dNSName [2] IA5String,
+ x400Address [3] ORAddress,
+ directoryName [4] Name,
+ ediPartyName [5] EDIPartyName,
+ uniformResourceIdentifier [6] IA5String,
+ iPAddress [7] OCTET STRING,
+ registeredID [8] OBJECT IDENTIFIER}
+
+ OtherName ::= Sequence {
+ type-id OBJECT IDENTIFIER,
+ value [0] EXPLICIT ANY DEFINED BY type-id }
+
+ EDIPartyName ::= Sequence {
+ nameAssigner [0] DirectoryString OPTIONAL,
+ partyName [1] DirectoryString }
+
+
+
+ When the subjectAltName extension contains an Internet mail address,
+ the address MUST be included as an rfc822Name. The format of an
+ rfc822Name is an "addr-spec" as defined in RFC 822 [RFC 822].
+
+ When the subjectAltName extension contains a domain name service
+ label, the domain name MUST be stored in the dNSName (an IA5String).
+ The name MUST be in the "preferred name syntax," as specified by RFC
+ 1034 [RFC 1034].
+
+ When the subjectAltName extension contains a URI, the name MUST be
+ stored in the uniformResourceIdentifier (an IA5String). The name MUST
+ be a non-relative URL, and MUST follow the URL syntax and encoding
+ rules specified in [RFC 1738]. The name must include both a scheme
+ (e.g., "http" or "ftp") and a scheme-specific-part. The scheme-
+ specific-part must include a fully qualified domain name or IP
+ address as the host.
+
+ When the subjectAltName extension contains a iPAddress, the address
+ MUST be stored in the octet string in "network byte order," as
+ specified in RFC 791 [RFC 791]. The least significant bit (LSB) of
+ each octet is the LSB of the corresponding byte in the network
+ address. For IP Version 4, as specified in RFC 791, the octet string
+ MUST contain exactly four octets. For IP Version 6, as specified in
+ RFC 1883, the octet string MUST contain exactly sixteen octets [RFC
+ 1883].
+
+
+ Create a GeneralName for the given tag from the passed in string.
+
+ This constructor can handle:
+
+ rfc822Name
+ iPAddress
+ directoryName
+ dNSName
+ uniformResourceIdentifier
+ registeredID
+
+ For x400Address, otherName and ediPartyName there is no common string
+ format defined.
+
+ Note: A directory name can be encoded in different ways into a byte
+ representation. Be aware of this if the byte representation is used for
+ comparing results.
+
+
+ @param tag tag number
+ @param name string representation of name
+ @throws ArgumentException if the string encoding is not correct or
+ not supported.
+
+
+ Construct a GeneralNames object containing one GeneralName.
+ The name to be contained.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ GeneralNames ::= Sequence SIZE {1..MAX} OF GeneralName
+
+
+
+ Class for containing a restriction object subtrees in NameConstraints. See
+ RFC 3280.
+
+
+
+ GeneralSubtree ::= SEQUENCE
+ {
+ baseName GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.NameConstraints
+
+
+
+ Constructor from a given details.
+
+ According RFC 3280, the minimum and maximum fields are not used with any
+ name forms, thus minimum MUST be zero, and maximum MUST be absent.
+
+ If minimum is null, zero is assumed, if
+ maximum is null, maximum is absent.
+
+ @param baseName
+ A restriction.
+ @param minimum
+ Minimum
+
+ @param maximum
+ Maximum
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ GeneralSubtree ::= SEQUENCE
+ {
+ baseName GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL
+ }
+
+
+ @return a DERObject
+
+
+ The Holder object.
+
+ For an v2 attribute certificate this is:
+
+
+ Holder ::= SEQUENCE {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+ For an v1 attribute certificate this is:
+
+
+ subject CHOICE {
+ baseCertificateID [0] IssuerSerial,
+ -- associated with a Public Key Certificate
+ subjectName [1] GeneralNames },
+ -- associated with a name
+
+
+
+
+ Constructor for a holder for an v1 attribute certificate.
+
+ @param tagObj The ASN.1 tagged holder object.
+
+
+ Constructor for a holder for an v2 attribute certificate. *
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructs a holder from a IssuerSerial.
+ @param baseCertificateID The IssuerSerial.
+ @param version The version of the attribute certificate.
+
+
+ Returns 1 for v2 attribute certificates or 0 for v1 attribute
+ certificates.
+ @return The version of the attribute certificate.
+
+
+ Constructs a holder with an entityName for v2 attribute certificates or
+ with a subjectName for v1 attribute certificates.
+
+ @param entityName The entity or subject name.
+
+
+ Constructs a holder with an entityName for v2 attribute certificates or
+ with a subjectName for v1 attribute certificates.
+
+ @param entityName The entity or subject name.
+ @param version The version of the attribute certificate.
+
+
+ Constructs a holder from an object digest info.
+
+ @param objectDigestInfo The object digest info object.
+
+
+ Returns the entityName for an v2 attribute certificate or the subjectName
+ for an v1 attribute certificate.
+
+ @return The entityname or subjectname.
+
+
+ The Holder object.
+
+ Holder ::= Sequence {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+ Implementation of IetfAttrSyntax as specified by RFC3281.
+
+
+
+
+
+
+
+
+ IetfAttrSyntax ::= Sequence {
+ policyAuthority [0] GeneralNames OPTIONAL,
+ values Sequence OF CHOICE {
+ octets OCTET STRING,
+ oid OBJECT IDENTIFIER,
+ string UTF8String
+ }
+ }
+
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ IssuerSerial ::= Sequence {
+ issuer GeneralNames,
+ serial CertificateSerialNumber,
+ issuerUid UniqueIdentifier OPTIONAL
+ }
+
+
+
+
+ IssuingDistributionPoint ::= SEQUENCE {
+ distributionPoint [0] DistributionPointName OPTIONAL,
+ onlyContainsUserCerts [1] BOOLEAN DEFAULT FALSE,
+ onlyContainsCACerts [2] BOOLEAN DEFAULT FALSE,
+ onlySomeReasons [3] ReasonFlags OPTIONAL,
+ indirectCRL [4] BOOLEAN DEFAULT FALSE,
+ onlyContainsAttributeCerts [5] BOOLEAN DEFAULT FALSE }
+
+
+
+ Constructor from given details.
+
+ @param distributionPoint
+ May contain an URI as pointer to most current CRL.
+ @param onlyContainsUserCerts Covers revocation information for end certificates.
+ @param onlyContainsCACerts Covers revocation information for CA certificates.
+
+ @param onlySomeReasons
+ Which revocation reasons does this point cover.
+ @param indirectCRL
+ If true then the CRL contains revocation
+ information about certificates ssued by other CAs.
+ @param onlyContainsAttributeCerts Covers revocation information for attribute certificates.
+
+
+ Constructor from Asn1Sequence
+
+
+ @return Returns the distributionPoint.
+
+
+ @return Returns the onlySomeReasons.
+
+
+ The KeyPurposeID object.
+
+ KeyPurposeID ::= OBJECT IDENTIFIER
+
+
+
+ The KeyUsage object.
+
+ id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
+
+ KeyUsage ::= BIT STRING {
+ digitalSignature (0),
+ nonRepudiation (1),
+ keyEncipherment (2),
+ dataEncipherment (3),
+ keyAgreement (4),
+ keyCertSign (5),
+ cRLSign (6),
+ encipherOnly (7),
+ decipherOnly (8) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment)
+
+
+ Constructor from a given details.
+
+ permitted and excluded are Vectors of GeneralSubtree objects.
+
+ @param permitted Permitted subtrees
+ @param excluded Excluded subtrees
+
+
+ NoticeReference class, used in
+ CertificatePolicies X509 V3 extensions
+ (in policy qualifiers).
+
+
+ NoticeReference ::= Sequence {
+ organization DisplayText,
+ noticeNumbers Sequence OF Integer }
+
+
+
+ @see PolicyQualifierInfo
+ @see PolicyInformation
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization a String value
+ @param numbers a Vector value
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization a String value
+ @param noticeNumbers an ASN1EncodableVector value
+
+
+ Creates a new NoticeReference instance.
+
+ @param organization displayText
+ @param noticeNumbers an ASN1EncodableVector value
+
+
+ Creates a new NoticeReference instance.
+ Useful for reconstructing a NoticeReference
+ instance from its encodable/encoded form.
+
+ @param as an Asn1Sequence value obtained from either
+ calling @{link ToAsn1Object()} for a NoticeReference
+ instance or from parsing it from a Der-encoded stream.
+
+
+ Describe ToAsn1Object method here.
+
+ @return a Asn1Object value
+
+
+ ObjectDigestInfo ASN.1 structure used in v2 attribute certificates.
+
+
+
+ ObjectDigestInfo ::= SEQUENCE {
+ digestedObjectType ENUMERATED {
+ publicKey (0),
+ publicKeyCert (1),
+ otherObjectTypes (2) },
+ -- otherObjectTypes MUST NOT
+ -- be used in this profile
+ otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
+ digestAlgorithm AlgorithmIdentifier,
+ objectDigest BIT STRING
+ }
+
+
+
+
+
+ The public key is hashed.
+
+
+ The public key certificate is hashed.
+
+
+ An other object is hashed.
+
+
+ Constructor from given details.
+
+ If digestedObjectType is not {@link #publicKeyCert} or
+ {@link #publicKey} otherObjectTypeID must be given,
+ otherwise it is ignored.
+
+ @param digestedObjectType The digest object type.
+ @param otherObjectTypeID The object type ID for
+ otherObjectDigest.
+ @param digestAlgorithm The algorithm identifier for the hash.
+ @param objectDigest The hash value.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+
+
+ ObjectDigestInfo ::= SEQUENCE {
+ digestedObjectType ENUMERATED {
+ publicKey (0),
+ publicKeyCert (1),
+ otherObjectTypes (2) },
+ -- otherObjectTypes MUST NOT
+ -- be used in this profile
+ otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
+ digestAlgorithm AlgorithmIdentifier,
+ objectDigest BIT STRING
+ }
+
+
+
+
+ PolicyMappings V3 extension, described in RFC3280.
+
+ PolicyMappings ::= Sequence SIZE (1..MAX) OF Sequence {
+ issuerDomainPolicy CertPolicyId,
+ subjectDomainPolicy CertPolicyId }
+
+
+ @see RFC 3280, section 4.2.1.6
+
+
+ Creates a new PolicyMappings instance.
+
+ @param seq an Asn1Sequence constructed as specified
+ in RFC 3280
+
+
+ Creates a new PolicyMappings instance.
+
+ @param mappings a HashMap value that maps
+ string oids
+ to other string oids.
+
+
+ PolicyQualifierId, used in the CertificatePolicies
+ X509V3 extension.
+
+
+ id-qt OBJECT IDENTIFIER ::= { id-pkix 2 }
+ id-qt-cps OBJECT IDENTIFIER ::= { id-qt 1 }
+ id-qt-unotice OBJECT IDENTIFIER ::= { id-qt 2 }
+ PolicyQualifierId ::=
+ OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
+
+
+
+ Policy qualifiers, used in the X509V3 CertificatePolicies
+ extension.
+
+
+ PolicyQualifierInfo ::= Sequence {
+ policyQualifierId PolicyQualifierId,
+ qualifier ANY DEFINED BY policyQualifierId }
+
+
+
+ Creates a new PolicyQualifierInfo instance.
+
+ @param policyQualifierId a PolicyQualifierId value
+ @param qualifier the qualifier, defined by the above field.
+
+
+ Creates a new PolicyQualifierInfo containing a
+ cPSuri qualifier.
+
+ @param cps the CPS (certification practice statement) uri as a
+ string.
+
+
+ Creates a new PolicyQualifierInfo instance.
+
+ @param as PolicyQualifierInfo X509 structure
+ encoded as an Asn1Sequence.
+
+
+ Returns a Der-encodable representation of this instance.
+
+ @return a Asn1Object value
+
+
+
+
+ PrivateKeyUsagePeriod ::= SEQUENCE
+ {
+ notBefore [0] GeneralizedTime OPTIONAL,
+ notAfter [1] GeneralizedTime OPTIONAL }
+
+
+
+
+ This outputs the key in Pkcs1v2 format.
+
+ RSAPublicKey ::= Sequence {
+ modulus Integer, -- n
+ publicExponent Integer, -- e
+ }
+
+
+
+ The ReasonFlags object.
+
+ ReasonFlags ::= BIT STRING {
+ unused(0),
+ keyCompromise(1),
+ cACompromise(2),
+ affiliationChanged(3),
+ superseded(4),
+ cessationOfOperation(5),
+ certficateHold(6)
+ }
+
+
+
+ @param reasons - the bitwise OR of the Key Reason flags giving the
+ allowed uses for the key.
+
+
+ Implementation of the RoleSyntax object as specified by the RFC3281.
+
+
+ RoleSyntax ::= SEQUENCE {
+ roleAuthority [0] GeneralNames OPTIONAL,
+ roleName [1] GeneralName
+ }
+
+
+
+ RoleSyntax factory method.
+ @param obj the object used to construct an instance of
+ RoleSyntax. It must be an instance of RoleSyntax
+ or Asn1Sequence.
+ @return the instance of RoleSyntax built from the
+ supplied object.
+ @throws java.lang.ArgumentException if the object passed
+ to the factory is not an instance of RoleSyntax or
+ Asn1Sequence.
+
+
+ Constructor.
+ @param roleAuthority the role authority of this RoleSyntax.
+ @param roleName the role name of this RoleSyntax.
+
+
+ Constructor. Invoking this constructor is the same as invoking
+ new RoleSyntax(null, roleName).
+ @param roleName the role name of this RoleSyntax.
+
+
+ Utility constructor. Takes a string argument representing
+ the role name, builds a GeneralName to hold the role name
+ and calls the constructor that takes a GeneralName.
+ @param roleName
+
+
+ Constructor that builds an instance of RoleSyntax by
+ extracting the encoded elements from the Asn1Sequence
+ object supplied.
+ @param seq an instance of Asn1Sequence that holds
+ the encoded elements used to build this RoleSyntax.
+
+
+ Gets the role authority of this RoleSyntax.
+ @return an instance of GeneralNames holding the
+ role authority of this RoleSyntax.
+
+
+ Gets the role name of this RoleSyntax.
+ @return an instance of GeneralName holding the
+ role name of this RoleSyntax.
+
+
+ Gets the role name as a java.lang.string object.
+ @return the role name of this RoleSyntax represented as a
+ string object.
+
+
+ Gets the role authority as a string[] object.
+ @return the role authority of this RoleSyntax represented as a
+ string[] array.
+
+
+ Implementation of the method ToAsn1Object as
+ required by the superclass ASN1Encodable.
+
+
+ RoleSyntax ::= SEQUENCE {
+ roleAuthority [0] GeneralNames OPTIONAL,
+ roleName [1] GeneralName
+ }
+
+
+
+ This extension may contain further X.500 attributes of the subject. See also
+ RFC 3039.
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @see org.bouncycastle.asn1.x509.X509Name for AttributeType ObjectIdentifiers.
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type SubjectDirectoryAttributes:
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @param seq
+ The ASN.1 sequence.
+
+
+ Constructor from an ArrayList of attributes.
+
+ The ArrayList consists of attributes of type {@link Attribute Attribute}
+
+ @param attributes The attributes.
+
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ SubjectDirectoryAttributes ::= Attributes
+ Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+ Attribute ::= SEQUENCE
+ {
+ type AttributeType
+ values SET OF AttributeValue
+ }
+
+ AttributeType ::= OBJECT IDENTIFIER
+ AttributeValue ::= ANY DEFINED BY AttributeType
+
+
+ @return a DERObject
+
+
+ @return Returns the attributes.
+
+
+ The SubjectKeyIdentifier object.
+
+ SubjectKeyIdentifier::= OCTET STRING
+
+
+
+ Calculates the keyIdentifier using a SHA1 hash over the BIT STRING
+ from SubjectPublicKeyInfo as defined in RFC3280.
+
+ @param spki the subject public key info.
+
+
+ Return a RFC 3280 type 1 key identifier. As in:
+
+ (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the
+ value of the BIT STRING subjectPublicKey (excluding the tag,
+ length, and number of unused bits).
+
+ @param keyInfo the key info object containing the subjectPublicKey field.
+ @return the key identifier.
+
+
+ Return a RFC 3280 type 2 key identifier. As in:
+
+ (2) The keyIdentifier is composed of a four bit type field with
+ the value 0100 followed by the least significant 60 bits of the
+ SHA-1 hash of the value of the BIT STRING subjectPublicKey.
+
+ @param keyInfo the key info object containing the subjectPublicKey field.
+ @return the key identifier.
+
+
+ The object that contains the public key stored in a certficate.
+
+ The GetEncoded() method in the public keys in the JCE produces a DER
+ encoded one of these.
+
+
+ for when the public key is an encoded object - if the bitstring
+ can't be decoded this routine raises an IOException.
+
+ @exception IOException - if the bit string doesn't represent a Der
+ encoded object.
+
+
+ for when the public key is raw bits...
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ SubjectPublicKeyInfo ::= Sequence {
+ algorithm AlgorithmIdentifier,
+ publicKey BIT STRING }
+
+
+
+ PKIX RFC-2459 - TbsCertList object.
+
+ TbsCertList ::= Sequence {
+ version Version OPTIONAL,
+ -- if present, shall be v2
+ signature AlgorithmIdentifier,
+ issuer Name,
+ thisUpdate Time,
+ nextUpdate Time OPTIONAL,
+ revokedCertificates Sequence OF Sequence {
+ userCertificate CertificateSerialNumber,
+ revocationDate Time,
+ crlEntryExtensions Extensions OPTIONAL
+ -- if present, shall be v2
+ } OPTIONAL,
+ crlExtensions [0] EXPLICIT Extensions OPTIONAL
+ -- if present, shall be v2
+ }
+
+
+
+ The TbsCertificate object.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ extensions [ 3 ] Extensions OPTIONAL
+ }
+
+
+ Note: issuerUniqueID and subjectUniqueID are both deprecated by the IETF. This class
+ will parse them, but you really shouldn't be creating new ones.
+
+
+ Target structure used in target information extension for attribute
+ certificates from RFC 3281.
+
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+
+
+ The targetCert field is currently not supported and must not be used
+ according to RFC 3281.
+
+
+ Creates an instance of a Target from the given object.
+
+ obj can be a Target or a {@link Asn1TaggedObject}
+
+ @param obj The object.
+ @return A Target instance.
+ @throws ArgumentException if the given object cannot be
+ interpreted as Target.
+
+
+ Constructor from Asn1TaggedObject.
+
+ @param tagObj The tagged object.
+ @throws ArgumentException if the encoding is wrong.
+
+
+ Constructor from given details.
+
+ Exactly one of the parameters must be not null.
+
+ @param type the choice type to apply to the name.
+ @param name the general name.
+ @throws ArgumentException if type is invalid.
+
+
+ @return Returns the targetGroup.
+
+
+ @return Returns the targetName.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+
+ @return an Asn1Object
+
+
+ Target information extension for attributes certificates according to RFC
+ 3281.
+
+
+ SEQUENCE OF Targets
+
+
+
+
+ Creates an instance of a TargetInformation from the given object.
+
+ obj can be a TargetInformation or a {@link Asn1Sequence}
+
+ @param obj The object.
+ @return A TargetInformation instance.
+ @throws ArgumentException if the given object cannot be interpreted as TargetInformation.
+
+
+ Constructor from a Asn1Sequence.
+
+ @param seq The Asn1Sequence.
+ @throws ArgumentException if the sequence does not contain
+ correctly encoded Targets elements.
+
+
+ Returns the targets in this target information extension.
+
+ The ArrayList is cloned before it is returned.
+
+ @return Returns the targets.
+
+
+ Constructs a target information from a single targets element.
+ According to RFC 3281 only one targets element must be produced.
+
+ @param targets A Targets instance.
+
+
+ According to RFC 3281 only one targets element must be produced. If
+ multiple targets are given they must be merged in
+ into one targets element.
+
+ @param targets An array with {@link Targets}.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ SEQUENCE OF Targets
+
+
+
+ According to RFC 3281 only one targets element must be produced. If
+ multiple targets are given in the constructor they are merged into one
+ targets element. If this was produced from a
+ {@link Org.BouncyCastle.Asn1.Asn1Sequence} the encoding is kept.
+
+ @return an Asn1Object
+
+
+ Targets structure used in target information extension for attribute
+ certificates from RFC 3281.
+
+
+ Targets ::= SEQUENCE OF Target
+
+ Target ::= CHOICE {
+ targetName [0] GeneralName,
+ targetGroup [1] GeneralName,
+ targetCert [2] TargetCert
+ }
+
+ TargetCert ::= SEQUENCE {
+ targetCertificate IssuerSerial,
+ targetName GeneralName OPTIONAL,
+ certDigestInfo ObjectDigestInfo OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.Target
+ @see org.bouncycastle.asn1.x509.TargetInformation
+
+
+ Creates an instance of a Targets from the given object.
+
+ obj can be a Targets or a {@link Asn1Sequence}
+
+ @param obj The object.
+ @return A Targets instance.
+ @throws ArgumentException if the given object cannot be interpreted as Target.
+
+
+ Constructor from Asn1Sequence.
+
+ @param targets The ASN.1 SEQUENCE.
+ @throws ArgumentException if the contents of the sequence are
+ invalid.
+
+
+ Constructor from given targets.
+
+ The ArrayList is copied.
+
+ @param targets An ArrayList of {@link Target}s.
+ @see Target
+ @throws ArgumentException if the ArrayList contains not only Targets.
+
+
+ Returns the targets in an ArrayList.
+
+ The ArrayList is cloned before it is returned.
+
+ @return Returns the targets.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ Targets ::= SEQUENCE OF Target
+
+
+ @return an Asn1Object
+
+
+ creates a time object from a given date - if the date is between 1950
+ and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime
+ is used.
+
+
+
+ Return our time as DateTime.
+
+ A date time.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Time ::= CHOICE {
+ utcTime UTCTime,
+ generalTime GeneralizedTime }
+
+
+
+ UserNotice class, used in
+ CertificatePolicies X509 extensions (in policy
+ qualifiers).
+
+ UserNotice ::= Sequence {
+ noticeRef NoticeReference OPTIONAL,
+ explicitText DisplayText OPTIONAL}
+
+
+
+ @see PolicyQualifierId
+ @see PolicyInformation
+
+
+ Creates a new UserNotice instance.
+
+ @param noticeRef a NoticeReference value
+ @param explicitText a DisplayText value
+
+
+ Creates a new UserNotice instance.
+
+ @param noticeRef a NoticeReference value
+ @param str the explicitText field as a string.
+
+
+ Creates a new UserNotice instance.
+ Useful from reconstructing a UserNotice instance
+ from its encodable/encoded form.
+
+ @param as an ASN1Sequence value obtained from either
+ calling @{link toASN1Object()} for a UserNotice
+ instance or from parsing it from a DER-encoded stream.
+
+
+ Generator for Version 1 TbsCertificateStructures.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ }
+
+
+
+
+ Generator for Version 2 AttributeCertificateInfo
+
+ AttributeCertificateInfo ::= Sequence {
+ version AttCertVersion -- version is v2,
+ holder Holder,
+ issuer AttCertIssuer,
+ signature AlgorithmIdentifier,
+ serialNumber CertificateSerialNumber,
+ attrCertValidityPeriod AttCertValidityPeriod,
+ attributes Sequence OF Attr,
+ issuerUniqueID UniqueIdentifier OPTIONAL,
+ extensions Extensions OPTIONAL
+ }
+
+
+
+
+ @param attribute
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ V2Form ::= Sequence {
+ issuerName GeneralNames OPTIONAL,
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ objectDigestInfo [1] ObjectDigestInfo OPTIONAL
+ -- issuerName MUST be present in this profile
+ -- baseCertificateID and objectDigestInfo MUST NOT
+ -- be present in this profile
+ }
+
+
+
+ Generator for Version 2 TbsCertList structures.
+
+ TbsCertList ::= Sequence {
+ version Version OPTIONAL,
+ -- if present, shall be v2
+ signature AlgorithmIdentifier,
+ issuer Name,
+ thisUpdate Time,
+ nextUpdate Time OPTIONAL,
+ revokedCertificates Sequence OF Sequence {
+ userCertificate CertificateSerialNumber,
+ revocationDate Time,
+ crlEntryExtensions Extensions OPTIONAL
+ -- if present, shall be v2
+ } OPTIONAL,
+ crlExtensions [0] EXPLICIT Extensions OPTIONAL
+ -- if present, shall be v2
+ }
+
+
+ Note: This class may be subject to change
+
+
+ Generator for Version 3 TbsCertificateStructures.
+
+ TbsCertificate ::= Sequence {
+ version [ 0 ] Version DEFAULT v1(0),
+ serialNumber CertificateSerialNumber,
+ signature AlgorithmIdentifier,
+ issuer Name,
+ validity Validity,
+ subject Name,
+ subjectPublicKeyInfo SubjectPublicKeyInfo,
+ issuerUniqueID [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ subjectUniqueID [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+ extensions [ 3 ] Extensions OPTIONAL
+ }
+
+
+
+
+ an X509Certificate structure.
+
+ Certificate ::= Sequence {
+ tbsCertificate TbsCertificate,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING
+ }
+
+
+
+ The default converter for X509 DN entries when going from their
+ string value to ASN.1 strings.
+
+
+ Apply default conversion for the given value depending on the oid
+ and the character range of the value.
+
+ @param oid the object identifier for the DN entry
+ @param value the value associated with it
+ @return the ASN.1 equivalent for the string value.
+
+
+ an object for the elements in the X.509 V3 extension block.
+
+
+ Convert the value of the passed in extension to an object.
+ The extension to parse.
+ The object the value string contains.
+ If conversion is not possible.
+
+
+ Subject Directory Attributes
+
+
+ Subject Key Identifier
+
+
+ Key Usage
+
+
+ Private Key Usage Period
+
+
+ Subject Alternative Name
+
+
+ Issuer Alternative Name
+
+
+ Basic Constraints
+
+
+ CRL Number
+
+
+ Reason code
+
+
+ Hold Instruction Code
+
+
+ Invalidity Date
+
+
+ Delta CRL indicator
+
+
+ Issuing Distribution Point
+
+
+ Certificate Issuer
+
+
+ Name Constraints
+
+
+ CRL Distribution Points
+
+
+ Certificate Policies
+
+
+ Policy Mappings
+
+
+ Authority Key Identifier
+
+
+ Policy Constraints
+
+
+ Extended Key Usage
+
+
+ Freshest CRL
+
+
+ Inhibit Any Policy
+
+
+ Authority Info Access
+
+
+ Subject Info Access
+
+
+ Logo Type
+
+
+ BiometricInfo
+
+
+ QCStatements
+
+
+ Audit identity extension in attribute certificates.
+
+
+ NoRevAvail extension in attribute certificates.
+
+
+ TargetInformation extension in attribute certificates.
+
+
+ Constructor from Asn1Sequence.
+
+ the extensions are a list of constructed sequences, either with (Oid, OctetString) or (Oid, Boolean, OctetString)
+
+
+ constructor from a table of extensions.
+
+ it's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from a table of extensions with ordering.
+
+ It's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from two vectors
+
+ @param objectIDs an ArrayList of the object identifiers.
+ @param values an ArrayList of the extension values.
+
+
+ constructor from a table of extensions.
+
+ it's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from a table of extensions with ordering.
+
+ It's is assumed the table contains Oid/string pairs.
+
+
+ Constructor from two vectors
+
+ @param objectIDs an ArrayList of the object identifiers.
+ @param values an ArrayList of the extension values.
+
+
+ return an Enumeration of the extension field's object ids.
+
+
+ return the extension represented by the object identifier
+ passed in.
+
+ @return the extension if it's present, null otherwise.
+
+
+
+ Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
+
+ Extension ::= SEQUENCE {
+ extnId EXTENSION.&id ({ExtensionSet}),
+ critical BOOLEAN DEFAULT FALSE,
+ extnValue OCTET STRING }
+
+
+
+ Generator for X.509 extensions
+
+
+ Reset the generator
+
+
+
+ Add an extension with the given oid and the passed in value to be included
+ in the OCTET STRING associated with the extension.
+
+ OID for the extension.
+ True if critical, false otherwise.
+ The ASN.1 object to be included in the extension.
+
+
+
+ Add an extension with the given oid and the passed in byte array to be wrapped
+ in the OCTET STRING associated with the extension.
+
+ OID for the extension.
+ True if critical, false otherwise.
+ The byte array to be wrapped.
+
+
+ Return true if there are no extension present in this generator.
+ True if empty, false otherwise
+
+
+ Generate an X509Extensions object based on the current state of the generator.
+ An X509Extensions object
+
+
+
+ RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
+
+ RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
+
+ AttributeTypeAndValue ::= SEQUENCE {
+ type OBJECT IDENTIFIER,
+ value ANY }
+
+
+
+ country code - StringType(SIZE(2))
+
+
+ organization - StringType(SIZE(1..64))
+
+
+ organizational unit name - StringType(SIZE(1..64))
+
+
+ Title
+
+
+ common name - StringType(SIZE(1..64))
+
+
+ street - StringType(SIZE(1..64))
+
+
+ device serial number name - StringType(SIZE(1..64))
+
+
+ locality name - StringType(SIZE(1..64))
+
+
+ state, or province name - StringType(SIZE(1..64))
+
+
+ Naming attributes of type X520name
+
+
+ businessCategory - DirectoryString(SIZE(1..128)
+
+
+ postalCode - DirectoryString(SIZE(1..40)
+
+
+ dnQualifier - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 Pseudonym - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z
+
+
+ RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128)
+
+
+ RFC 3039 DateOfBirth - PrintableString (SIZE(1)) -- "M", "F", "m" or "f"
+
+
+ RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166
+ codes only
+
+
+ RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166
+ codes only
+
+
+ ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64)
+
+
+ RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF
+ DirectoryString(SIZE(1..30))
+
+
+ RFC 2256 dmdName
+
+
+ id-at-telephoneNumber
+
+
+ id-at-name
+
+
+ Email address (RSA PKCS#9 extension) - IA5String.
+ Note: if you're trying to be ultra orthodox, don't use this! It shouldn't be in here.
+
+
+ more from PKCS#9
+
+
+ email address in Verisign certificates
+
+
+ LDAP User id.
+
+
+ determines whether or not strings should be processed and printed
+ from back to front.
+
+
+ default look up table translating OID values into their common symbols following
+ the convention in RFC 2253 with a few extras
+
+
+ look up table translating OID values into their common symbols following the convention in RFC 2253
+
+
+ look up table translating OID values into their common symbols following the convention in RFC 1779
+
+
+
+ look up table translating common symbols into their OIDS.
+
+
+ Return a X509Name based on the passed in tagged object.
+
+ @param obj tag object holding name.
+ @param explicitly true if explicitly tagged false otherwise.
+ @return the X509Name
+
+
+ Constructor from Asn1Sequence
+
+ the principal will be a list of constructed sets, each containing an (OID, string) pair.
+
+
+ Constructor from a table of attributes with ordering.
+
+ it's is assumed the table contains OID/string pairs, and the contents
+ of the table are copied into an internal table as part of the
+ construction process. The ordering ArrayList should contain the OIDs
+ in the order they are meant to be encoded or printed in ToString.
+
+
+ Constructor from a table of attributes with ordering.
+
+ it's is assumed the table contains OID/string pairs, and the contents
+ of the table are copied into an internal table as part of the
+ construction process. The ordering ArrayList should contain the OIDs
+ in the order they are meant to be encoded or printed in ToString.
+
+ The passed in converter will be used to convert the strings into their
+ ASN.1 counterparts.
+
+
+ Takes two vectors one of the oids and the other of the values.
+
+
+ Takes two vectors one of the oids and the other of the values.
+
+ The passed in converter will be used to convert the strings into their
+ ASN.1 counterparts.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes with each
+ string value being converted to its associated ASN.1 type using the passed
+ in converter.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. If reverse
+ is true, create the encoded version of the sequence starting from the
+ last element in the string.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes with each
+ string value being converted to its associated ASN.1 type using the passed
+ in converter. If reverse is true the ASN.1 sequence representing the DN will
+ be built by starting at the end of the string, rather than the start.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. lookUp
+ should provide a table of lookups, indexed by lowercase only strings and
+ yielding a DerObjectIdentifier, other than that OID. and numeric oids
+ will be processed automatically.
+
+ If reverse is true, create the encoded version of the sequence
+ starting from the last element in the string.
+ @param reverse true if we should start scanning from the end (RFC 2553).
+ @param lookUp table of names and their oids.
+ @param dirName the X.500 string to be parsed.
+
+
+ Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or
+ some such, converting it into an ordered set of name attributes. lookUp
+ should provide a table of lookups, indexed by lowercase only strings and
+ yielding a DerObjectIdentifier, other than that OID. and numeric oids
+ will be processed automatically. The passed in converter is used to convert the
+ string values to the right of each equals sign to their ASN.1 counterparts.
+
+ @param reverse true if we should start scanning from the end, false otherwise.
+ @param lookUp table of names and oids.
+ @param dirName the string dirName
+ @param converter the converter to convert string values into their ASN.1 equivalents
+
+
+ return an IList of the oids in the name, in the order they were found.
+
+
+ return an IList of the values found in the name, in the order they
+ were found.
+
+
+ return an IList of the values found in the name, in the order they
+ were found, with the DN label corresponding to passed in oid.
+
+
+ The X509Name object to test equivalency against.
+ If true, the order of elements must be the same,
+ as well as the values associated with each element.
+
+
+ test for equivalence - note: case is ignored.
+
+
+ convert the structure to a string - if reverse is true the
+ oids and values are listed out starting with the last element
+ in the sequence (ala RFC 2253), otherwise the string will begin
+ with the first element of the structure. If no string definition
+ for the oid is found in oidSymbols the string value of the oid is
+ added. Two standard symbol tables are provided DefaultSymbols, and
+ RFC2253Symbols as part of this class.
+
+ @param reverse if true start at the end of the sequence and work back.
+ @param oidSymbols look up table strings for oids.
+
+
+ * It turns out that the number of standard ways the fields in a DN should be
+ * encoded into their ASN.1 counterparts is rapidly approaching the
+ * number of machines on the internet. By default the X509Name class
+ * will produce UTF8Strings in line with the current recommendations (RFC 3280).
+ *
+ * An example of an encoder look like below:
+ *
+ * public class X509DirEntryConverter
+ * : X509NameEntryConverter
+ * {
+ * public Asn1Object GetConvertedValue(
+ * DerObjectIdentifier oid,
+ * string value)
+ * {
+ * if (str.Length() != 0 && str.charAt(0) == '#')
+ * {
+ * return ConvertHexEncoded(str, 1);
+ * }
+ * if (oid.Equals(EmailAddress))
+ * {
+ * return new DerIA5String(str);
+ * }
+ * else if (CanBePrintable(str))
+ * {
+ * return new DerPrintableString(str);
+ * }
+ * else if (CanBeUTF8(str))
+ * {
+ * return new DerUtf8String(str);
+ * }
+ * else
+ * {
+ * return new DerBmpString(str);
+ * }
+ * }
+ * }
+ *
+ *
+
+
+ Convert an inline encoded hex string rendition of an ASN.1
+ object back into its corresponding ASN.1 object.
+
+ @param str the hex encoded object
+ @param off the index at which the encoding starts
+ @return the decoded object
+
+
+ return true if the passed in string can be represented without
+ loss as a PrintableString, false otherwise.
+
+
+ Convert the passed in string value into the appropriate ASN.1
+ encoded object.
+
+ @param oid the oid associated with the value in the DN.
+ @param value the value of the particular DN component.
+ @return the ASN.1 equivalent for the value.
+
+
+ class for breaking up an X500 Name into it's component tokens, ala
+ java.util.StringTokenizer. We need this class as some of the
+ lightweight Java environment don't support classes like
+ StringTokenizer.
+
+
+ The BiometricData object.
+
+ BiometricData ::= SEQUENCE {
+ typeOfBiometricData TypeOfBiometricData,
+ hashAlgorithm AlgorithmIdentifier,
+ biometricDataHash OCTET STRING,
+ sourceDataUri IA5String OPTIONAL }
+
+
+
+ The Iso4217CurrencyCode object.
+
+ Iso4217CurrencyCode ::= CHOICE {
+ alphabetic PrintableString (SIZE 3), --Recommended
+ numeric INTEGER (1..999) }
+ -- Alphabetic or numeric currency code as defined in ISO 4217
+ -- It is recommended that the Alphabetic form is used
+
+
+
+ The MonetaryValue object.
+
+ MonetaryValue ::= SEQUENCE {
+ currency Iso4217CurrencyCode,
+ amount INTEGER,
+ exponent INTEGER }
+ -- value = amount * 10^exponent
+
+
+
+ The QCStatement object.
+
+ QCStatement ::= SEQUENCE {
+ statementId OBJECT IDENTIFIER,
+ statementInfo ANY DEFINED BY statementId OPTIONAL}
+
+
+
+ The SemanticsInformation object.
+
+ SemanticsInformation ::= SEQUENCE {
+ semanticsIdentifier OBJECT IDENTIFIER OPTIONAL,
+ nameRegistrationAuthorities NameRegistrationAuthorities
+ OPTIONAL }
+ (WITH COMPONENTS {..., semanticsIdentifier PRESENT}|
+ WITH COMPONENTS {..., nameRegistrationAuthorities PRESENT})
+
+ NameRegistrationAuthorities ::= SEQUENCE SIZE (1..MAX) OF
+ GeneralName
+
+
+
+ The TypeOfBiometricData object.
+
+ TypeOfBiometricData ::= CHOICE {
+ predefinedBiometricType PredefinedBiometricType,
+ biometricDataOid OBJECT IDENTIFIER }
+
+ PredefinedBiometricType ::= INTEGER {
+ picture(0),handwritten-signature(1)}
+ (picture|handwritten-signature)
+
+
+
+ Structure for a name or pseudonym.
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @see org.bouncycastle.asn1.x509.sigi.PersonalData
+
+
+
+ Constructor from DERString.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+ @param pseudonym pseudonym value to use.
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param pseudonym The pseudonym.
+
+
+ Constructor from a given details.
+
+ @param surname The surname.
+ @param givenName A sequence of directory strings making up the givenName
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ NameOrPseudonym ::= CHOICE {
+ surAndGivenName SEQUENCE {
+ surName DirectoryString,
+ givenName SEQUENCE OF DirectoryString
+ },
+ pseudonym DirectoryString
+ }
+
+
+ @return an Asn1Object
+
+
+ Contains personal data for the otherName field in the subjectAltNames
+ extension.
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @see org.bouncycastle.asn1.x509.sigi.NameOrPseudonym
+ @see org.bouncycastle.asn1.x509.sigi.SigIObjectIdentifiers
+
+
+ Constructor from Asn1Sequence.
+
+ The sequence is of type NameOrPseudonym:
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @param seq The ASN.1 sequence.
+
+
+ Constructor from a given details.
+
+ @param nameOrPseudonym Name or pseudonym.
+ @param nameDistinguisher Name distinguisher.
+ @param dateOfBirth Date of birth.
+ @param placeOfBirth Place of birth.
+ @param gender Gender.
+ @param postalAddress Postal Address.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Returns:
+
+
+ PersonalData ::= SEQUENCE {
+ nameOrPseudonym NameOrPseudonym,
+ nameDistinguisher [0] INTEGER OPTIONAL,
+ dateOfBirth [1] GeneralizedTime OPTIONAL,
+ placeOfBirth [2] DirectoryString OPTIONAL,
+ gender [3] PrintableString OPTIONAL,
+ postalAddress [4] DirectoryString OPTIONAL
+ }
+
+
+ @return an Asn1Object
+
+
+ Object Identifiers of SigI specifciation (German Signature Law
+ Interoperability specification).
+
+
+ Key purpose IDs for German SigI (Signature Interoperability
+ Specification)
+
+
+ Certificate policy IDs for German SigI (Signature Interoperability
+ Specification)
+
+
+ Other Name IDs for German SigI (Signature Interoperability Specification)
+
+
+ To be used for for the generation of directory service certificates.
+
+
+ ID for PersonalData
+
+
+ Certificate is conform to german signature law.
+
+
+ A general class that reads all X9.62 style EC curve tables.
+
+
+ return a X9ECParameters object representing the passed in named
+ curve. The routine returns null if the curve is not present.
+
+ @param name the name of the curve requested
+ @return an X9ECParameters object or null if the curve is not available.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return a X9ECParameters object representing the passed in named
+ curve.
+
+ @param oid the object id of the curve requested
+ @return an X9ECParameters object or null if the curve is not available.
+
+
+ return an enumeration of the names of the available curves.
+
+ @return an enumeration of the names of the available curves.
+
+
+ ASN.1 def for Diffie-Hellman key exchange KeySpecificInfo structure. See
+ RFC 2631, or X9.42, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ KeySpecificInfo ::= Sequence {
+ algorithm OBJECT IDENTIFIER,
+ counter OCTET STRING SIZE (4..4)
+ }
+
+
+
+ ANS.1 def for Diffie-Hellman key exchange OtherInfo structure. See
+ RFC 2631, or X9.42, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ OtherInfo ::= Sequence {
+ keyInfo KeySpecificInfo,
+ partyAInfo [0] OCTET STRING OPTIONAL,
+ suppPubInfo [2] OCTET STRING
+ }
+
+
+
+ table of the current named curves defined in X.962 EC-DSA.
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Parameters ::= CHOICE {
+ ecParameters ECParameters,
+ namedCurve CURVES.&id({CurveNames}),
+ implicitlyCA Null
+ }
+
+
+
+ ASN.1 def for Elliptic-Curve Curve structure. See
+ X9.62, for further details.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ Curve ::= Sequence {
+ a FieldElement,
+ b FieldElement,
+ seed BIT STRING OPTIONAL
+ }
+
+
+
+ ASN.1 def for Elliptic-Curve ECParameters structure. See
+ X9.62, for further details.
+
+
+ Return the ASN.1 entry representing the Curve.
+
+ @return the X9Curve for the curve in these parameters.
+
+
+ Return the ASN.1 entry representing the FieldID.
+
+ @return the X9FieldID for the FieldID in these parameters.
+
+
+ Return the ASN.1 entry representing the base point G.
+
+ @return the X9ECPoint for the base point in these parameters.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ECParameters ::= Sequence {
+ version Integer { ecpVer1(1) } (ecpVer1),
+ fieldID FieldID {{FieldTypes}},
+ curve X9Curve,
+ base X9ECPoint,
+ order Integer,
+ cofactor Integer OPTIONAL
+ }
+
+
+
+ class for describing an ECPoint as a Der object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ ECPoint ::= OCTET STRING
+
+
+ Octet string produced using ECPoint.GetEncoded().
+
+
+ Class for processing an ECFieldElement as a DER object.
+
+
+ Produce an object suitable for an Asn1OutputStream.
+
+ FieldElement ::= OCTET STRING
+
+
+
+ if q is an odd prime then the field element is
+ processed as an Integer and converted to an octet string
+ according to x 9.62 4.3.1.
+ if q is 2m then the bit string
+ contained in the field element is converted into an octet
+ string with the same ordering padded at the front if necessary.
+
+
+
+
+
+ ASN.1 def for Elliptic-Curve Field ID structure. See
+ X9.62, for further details.
+
+
+ Constructor for elliptic curves over prime fields
+ F2 .
+ @param primeP The prime p defining the prime field.
+
+
+ Constructor for elliptic curves over binary fields
+ F2m .
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ Constructor for elliptic curves over binary fields
+ F2m .
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z)..
+
+
+ Produce a Der encoding of the following structure.
+
+ FieldID ::= Sequence {
+ fieldType FIELD-ID.&id({IOSet}),
+ parameters FIELD-ID.&Type({IOSet}{@fieldType})
+ }
+
+
+
+ id-dsa-with-sha1 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
+ us(840) x9-57 (10040) x9cm(4) 3 }
+
+
+ X9.63
+
+
+ X9.42
+
+
+ reader for Base64 armored objects - read the headers and then start returning
+ bytes when the data is reached. An IOException is thrown if the CRC check
+ fails.
+
+
+ decode the base 64 encoded input data.
+
+ @return the offset the data starts in out.
+
+
+ Create a stream for reading a PGP armoured message, parsing up to a header
+ and then reading the data that follows.
+
+ @param input
+
+
+ Create an armoured input stream which will assume the data starts
+ straight away, or parse for headers first depending on the value of
+ hasHeaders.
+
+ @param input
+ @param hasHeaders true if headers are to be looked for, false otherwise.
+
+
+ @return true if we are inside the clear text section of a PGP
+ signed message.
+
+
+ @return true if the stream is actually at end of file.
+
+
+ Return the armor header line (if there is one)
+ @return the armor header line, null if none present.
+
+
+ Return the armor headers (the lines after the armor header line),
+ @return an array of armor headers, null if there aren't any.
+
+
+ Basic output stream.
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+
+ Set an additional header entry.
+
+ @param name the name of the header entry.
+ @param v the value of the header entry.
+
+
+ Reset the headers to only contain a Version string.
+
+
+ Start a clear text signed message.
+ @param hashAlgorithm
+
+
+ Note : Close() does not close the underlying stream. So it is possible to write
+ multiple objects using armoring to a single stream.
+
+
+ Reader for PGP objects.
+
+
+ Returns the next packet tag in the stream.
+
+
+
+ A stream that overlays our input stream, allowing the user to only read a segment of it.
+ NB: dataLength will be negative if the segment length is in the upper range above 2**31.
+
+
+
+ Base class for a PGP object.
+
+
+ Basic output stream.
+
+
+ Create a stream representing a general packet.
+ Output stream to write to.
+
+
+ Create a stream representing an old style partial object.
+ Output stream to write to.
+ The packet tag for the object.
+
+
+ Create a stream representing a general packet.
+ Output stream to write to.
+ Packet tag.
+ Size of chunks making up the packet.
+ If true, the header is written out in old format.
+
+
+ Create a new style partial input stream buffered into chunks.
+ Output stream to write to.
+ Packet tag.
+ Size of chunks making up the packet.
+
+
+ Create a new style partial input stream buffered into chunks.
+ Output stream to write to.
+ Packet tag.
+ Buffer to use for collecting chunks.
+
+
+ Flush the underlying stream.
+
+
+ Finish writing out the current packet without closing the underlying stream.
+
+
+ Generic compressed data object.
+
+
+ The algorithm tag value.
+
+
+ Basic tags for compression algorithms.
+
+
+ Basic type for a PGP packet.
+
+
+ Base class for a DSA public key.
+
+
+ The stream to read the packet from.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for a DSA secret key.
+
+
+ @param in
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ @return x
+
+
+ Base class for an ECDH Public Key.
+
+
+ The stream to read the packet from.
+
+
+ Base class for an ECDSA Public Key.
+
+
+ The stream to read the packet from.
+
+
+ Base class for an EC Public Key.
+
+
+ The stream to read the packet from.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an EC Secret Key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an ElGamal public key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an ElGamal secret key.
+
+
+ @param in
+
+
+ @param x
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Basic packet for an experimental packet.
+
+
+ Basic tags for hash algorithms.
+
+
+ Base interface for a PGP key.
+
+
+
+ The base format for this key - in the case of the symmetric keys it will generally
+ be raw indicating that the key is just a straight byte representation, for an asymmetric
+ key the format will be PGP, indicating the key is a string of MPIs encoded in PGP format.
+
+ "RAW" or "PGP".
+
+
+ Note: you can only read from this once...
+
+
+ Generic literal data packet.
+
+
+ The format tag value.
+
+
+ The modification time of the file in milli-seconds (since Jan 1, 1970 UTC)
+
+
+ A multiple precision integer
+
+
+ Basic type for a marker packet.
+
+
+ Basic packet for a modification detection code packet.
+
+
+ Generic signature object
+
+
+ The encryption algorithm tag.
+
+
+ The hash algorithm tag.
+
+
+ Basic PGP packet tag types.
+
+
+ Public Key Algorithm tag numbers.
+
+
+ Basic packet for a PGP public key.
+
+
+ Basic packet for a PGP public key.
+
+
+ Construct a version 4 public key packet.
+
+
+ Basic packet for a PGP public subkey
+
+
+ Construct a version 4 public subkey packet.
+
+
+ Base class for an RSA public key.
+
+
+ Construct an RSA public key from the passed in stream.
+
+
+ The modulus.
+ The public exponent.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ Base class for an RSA secret (or priate) key.
+
+
+ The format, as a string, always "PGP".
+
+
+ Return the standard PGP encoding of the key.
+
+
+ The string to key specifier class.
+
+
+ The hash algorithm.
+
+
+ The IV for the key generation algorithm.
+
+
+ The iteration count
+
+
+ The protection mode - only if GnuDummyS2K
+
+
+ Basic packet for a PGP secret key.
+
+
+ Basic packet for a PGP secret key.
+
+
+ Generic signature packet.
+
+
+ Generate a version 4 signature packet.
+
+ @param signatureType
+ @param keyAlgorithm
+ @param hashAlgorithm
+ @param hashedData
+ @param unhashedData
+ @param fingerprint
+ @param signature
+
+
+ Generate a version 2/3 signature packet.
+
+ @param signatureType
+ @param keyAlgorithm
+ @param hashAlgorithm
+ @param fingerprint
+ @param signature
+
+
+ return the keyId
+ @return the keyId that created the signature.
+
+
+ return the signature trailer that must be included with the data
+ to reconstruct the signature
+
+ @return byte[]
+
+
+ * return the signature as a set of integers - note this is normalised to be the
+ * ASN.1 encoding of what appears in the signature packet.
+
+
+ Return the byte encoding of the signature section.
+ @return uninterpreted signature bytes.
+
+
+ Return the creation time in milliseconds since 1 Jan., 1970 UTC.
+
+
+ Basic type for a PGP Signature sub-packet.
+
+
+ Return the generic data making up the packet.
+
+
+ Basic PGP signature sub-packet tag types.
+
+
+ reader for signature sub-packets
+
+
+ Basic type for a symmetric key encrypted packet.
+
+
+ Basic tags for symmetric key algorithms
+
+
+ Basic type for a symmetric encrypted session key packet
+
+
+ @return int
+
+
+ @return S2k
+
+
+ @return byte[]
+
+
+ @return int
+
+
+ Basic type for a trust packet.
+
+
+ Basic type for a user attribute packet.
+
+
+ Basic type for a user attribute sub-packet.
+
+
+ return the generic data making up the packet.
+
+
+ Basic PGP user attribute sub-packet tag types.
+
+
+ reader for user attribute sub-packets
+
+
+ Basic type for a user ID packet.
+
+
+ Basic type for a image attribute packet.
+
+
+ Packet embedded signature
+
+
+ packet giving signature creation time.
+
+
+ packet giving signature expiration time.
+
+
+ Identifier for the modification detection feature
+
+
+ Returns if modification detection is supported.
+
+
+ Returns if a particular feature is supported.
+
+
+ Sets support for a particular feature.
+
+
+ packet giving signature creation time.
+
+
+ packet giving time after creation at which the key expires.
+
+
+ Return the number of seconds after creation time a key is valid for.
+
+ @return second count for key validity.
+
+
+ Packet holding the key flag values.
+
+
+
+ Return the flag values contained in the first 4 octets (note: at the moment
+ the standard only uses the first one).
+
+
+
+ Class provided a NotationData object according to
+ RFC2440, Chapter 5.2.3.15. Notation Data
+
+
+ packet giving signature creation time.
+
+
+ packet giving whether or not the signature is signed using the primary user ID for the key.
+
+
+ packet giving whether or not is revocable.
+
+
+ packet giving signature creation time.
+
+
+ packet giving signature expiration time.
+
+
+ return time in seconds before signature expires after creation time.
+
+
+ packet giving the User ID of the signer.
+
+
+ packet giving trust.
+
+
+
+ Represents revocation key OpenPGP signature sub packet.
+
+
+
+
+ Represents revocation reason OpenPGP signature sub packet.
+
+
+
+ Compressed data objects
+
+
+ The algorithm used for compression
+
+
+ Get the raw input stream contained in the object.
+
+
+ Return an uncompressed input stream which allows reading of the compressed data.
+
+
+ Class for producing compressed data packets.
+
+
+
+
+ Return an output stream which will save the data being written to
+ the compressed object.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Stream to be used for output.
+ A Stream for output of the compressed data.
+
+
+
+
+
+
+
+ Return an output stream which will compress the data as it is written to it.
+ The stream will be written out in chunks according to the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+
+ Note : using this may break compatibility with RFC 1991 compliant tools.
+ Only recent OpenPGP implementations are capable of accepting these streams.
+
+
+ Stream to be used for output.
+ The buffer to use.
+ A Stream for output of the compressed data.
+
+
+
+
+
+
+ Close the compressed object. summary>
+
+
+
+ Thrown if the IV at the start of a data stream indicates the wrong key is being used.
+
+
+
+ Return the raw input stream for the data stream.
+
+
+ Return true if the message is integrity protected.
+ True, if there is a modification detection code namespace associated
+ with this stream.
+
+
+ Note: This can only be called after the message has been read.
+ True, if the message verifies, false otherwise
+
+
+ Generator for encrypted objects.
+
+
+ Existing SecureRandom constructor.
+ The symmetric algorithm to use.
+ Source of randomness.
+
+
+ Creates a cipher stream which will have an integrity packet associated with it.
+
+
+ Base constructor.
+ The symmetric algorithm to use.
+ Source of randomness.
+ PGP 2.6.x compatibility required.
+
+
+
+ Add a PBE encryption method to the encrypted object using the default algorithm (S2K_SHA1).
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Add a PBE encryption method to the encrypted object.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ Add a public key encrypted session key to the encrypted object.
+
+
+
+
+ If buffer is non null stream assumed to be partial, otherwise the length will be used
+ to output a fixed length packet.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+
+
+
+
+ Return an output stream which will encrypt the data as it is written to it.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+
+
+
+
+ Return an output stream which will encrypt the data as it is written to it.
+ The stream will be written out in chunks according to the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+
+
+
+
+
+ Close off the encrypted object - this is equivalent to calling Close() on the stream
+ returned by the Open() method.
+
+
+ Note : This does not close the underlying output stream, only the stream on top of
+ it created by the Open() method.
+
+
+
+
+ A holder for a list of PGP encryption method packets.
+
+
+ Generic exception class for PGP encoding/decoding problems.
+
+
+ Key flag values for the KeyFlags subpacket.
+
+
+
+ General class to handle JCA key pairs and convert them into OpenPGP ones.
+
+ A word for the unwary, the KeyId for an OpenPGP public key is calculated from
+ a hash that includes the time of creation, if you pass a different date to the
+ constructor below with the same public private key pair the KeyIs will not be the
+ same as for previous generations of the key, so ideally you only want to do
+ this once.
+
+
+
+
+ Create a key pair from a PgpPrivateKey and a PgpPublicKey.
+ The public key.
+ The private key.
+
+
+ The keyId associated with this key pair.
+
+
+
+ Generator for a PGP master and subkey ring.
+ This class will generate both the secret and public key rings
+
+
+
+
+ Create a new key ring generator using old style checksumming. It is recommended to use
+ SHA1 checksumming where possible.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+
+ If true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+
+ If true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+
+ Create a new key ring generator.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+ The certification level for keys on this ring.
+ The master key pair.
+ The id to be associated with the ring.
+ The algorithm to be used to protect secret keys.
+ The hash algorithm.
+ The passPhrase to be used to protect secret keys.
+ Checksum the secret keys with SHA1 rather than the older 16 bit checksum.
+ Packets to be included in the certification hash.
+ Packets to be attached unhashed to the certification.
+ input secured random.
+
+
+ Add a subkey to the key ring to be generated with default certification.
+
+
+
+ Add a subkey to the key ring to be generated with default certification.
+
+ The key pair.
+ The hash algorithm.
+
+
+
+ Add a subkey with specific hashed and unhashed packets associated with it and
+ default certification.
+
+ Public/private key pair.
+ Hashed packet values to be included in certification.
+ Unhashed packets values to be included in certification.
+
+
+
+
+ Add a subkey with specific hashed and unhashed packets associated with it and
+ default certification.
+
+ Public/private key pair.
+ Hashed packet values to be included in certification.
+ Unhashed packets values to be included in certification.
+ The hash algorithm.
+ exception adding subkey:
+
+
+
+ Return the secret key ring.
+
+
+ Return the public key ring that corresponds to the secret key ring.
+
+
+
+ Thrown if the key checksum is invalid.
+
+
+
+ Class for processing literal data objects.
+
+
+ The special name indicating a "for your eyes only" packet.
+
+
+ The format of the data stream - Binary or Text
+
+
+ The file name that's associated with the data stream.
+
+
+ Return the file name as an unintrepreted byte array.
+
+
+ The modification time for the file.
+
+
+ The raw input stream for the data stream.
+
+
+ The input stream representing the data stream.
+
+
+ Class for producing literal data packets.
+
+
+ The special name indicating a "for your eyes only" packet.
+
+
+
+ Generates literal data objects in the old format.
+ This is important if you need compatibility with PGP 2.6.x.
+
+ If true, uses old format.
+
+
+
+
+ Open a literal data packet, returning a stream to store the data inside the packet.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ The stream we want the packet in.
+ The format we are using.
+ The name of the 'file'.
+ The length of the data we will write.
+ The time of last modification we want stored.
+
+
+
+
+ Open a literal data packet, returning a stream to store the data inside the packet,
+ as an indefinite length stream. The stream is written out as a series of partial
+ packets with a chunk size determined by the size of the passed in buffer.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ Note : if the buffer is not a power of 2 in length only the largest power of 2
+ bytes worth of the buffer will be used.
+
+ The stream we want the packet in.
+ The format we are using.
+ The name of the 'file'.
+ The time of last modification we want stored.
+ The buffer to use for collecting data to put into chunks.
+
+
+
+
+ Open a literal data packet for the passed in FileInfo object, returning
+ an output stream for saving the file contents.
+
+
+ The stream created can be closed off by either calling Close()
+ on the stream or Close() on the generator. Closing the returned
+ stream does not close off the Stream parameter outStr .
+
+
+ The stream we want the packet in.
+ The format we are using.
+ The FileInfo object containg the packet details.
+
+
+
+ Close the literal data packet - this is equivalent to calling Close()
+ on the stream returned by the Open() method.
+
+
+
+
+ A PGP marker packet - in general these should be ignored other than where
+ the idea is to preserve the original input stream.
+
+
+
+
+ General class for reading a PGP object stream.
+
+ Note: if this class finds a PgpPublicKey or a PgpSecretKey it
+ will create a PgpPublicKeyRing, or a PgpSecretKeyRing for each
+ key found. If all you are trying to do is read a key ring file use
+ either PgpPublicKeyRingBundle or PgpSecretKeyRingBundle.
+
+
+
+ Return the next object in the stream, or null if the end is reached.
+ On a parse error
+
+
+
+ Return all available objects in a list.
+
+ An IList containing all objects from this factory, in order.
+
+
+ A one pass signature object.
+
+
+ Initialise the signature object for verification.
+
+
+ Verify the calculated signature against the passed in PgpSignature.
+
+
+ Holder for a list of PgpOnePassSignature objects.
+
+
+ Padding functions.
+
+
+ A password based encryption object.
+
+
+ Return the raw input stream for the data stream.
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Return the decrypted input stream, using the passed in passphrase.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ General class to contain a private key for use with other OpenPGP objects.
+
+
+
+ Create a PgpPrivateKey from a keyID, the associated public data packet, and a regular private key.
+
+ ID of the corresponding public key.
+ the public key data packet to be associated with this private key.
+ the private key data packet to be associated with this private key.
+
+
+ The keyId associated with the contained private key.
+
+
+ The public key packet associated with this private key, if available.
+
+
+ The contained private key.
+
+
+ General class to handle a PGP public key object.
+
+
+
+ Create a PgpPublicKey from the passed in lightweight one.
+
+
+ Note: the time passed in affects the value of the key's keyId, so you probably only want
+ to do this once for a lightweight key, or make sure you keep track of the time you used.
+
+ Asymmetric algorithm type representing the public key.
+ Actual public key to associate.
+ Date of creation.
+ If pubKey is not public.
+ On key creation problem.
+
+
+ Constructor for a sub-key.
+
+
+ Copy constructor.
+ The public key to copy.
+
+
+ The version of this key.
+
+
+ The creation time of this key.
+
+
+ The number of valid days from creation time - zero means no expiry.
+ WARNING: This method will return 1 for keys with version > 3 that expire in less than 1 day
+
+
+ Return the trust data associated with the public key, if present.
+ A byte array with trust data, null otherwise.
+
+
+ The number of valid seconds from creation time - zero means no expiry.
+
+
+ The keyId associated with the public key.
+
+
+ The fingerprint of the key
+
+
+
+ Check if this key has an algorithm type that makes it suitable to use for encryption.
+
+
+ Note: with version 4 keys KeyFlags subpackets should also be considered when present for
+ determining the preferred use of the key.
+
+
+ true if this key algorithm is suitable for encryption.
+
+
+
+ True, if this is a master key.
+
+
+ The algorithm code associated with the public key.
+
+
+ The strength of the key in bits.
+
+
+ The public key contained in the object.
+ A lightweight public key.
+ If the key algorithm is not recognised.
+
+
+ Allows enumeration of any user IDs associated with the key.
+ An IEnumerable of string objects.
+
+
+ Allows enumeration of any user attribute vectors associated with the key.
+ An IEnumerable of PgpUserAttributeSubpacketVector objects.
+
+
+ Allows enumeration of any signatures associated with the passed in id.
+ The ID to be matched.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of signatures associated with the passed in user attributes.
+ The vector of user attributes to be matched.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of signatures of the passed in type that are on this key.
+ The type of the signature to be returned.
+ An IEnumerable of PgpSignature objects.
+
+
+ Allows enumeration of all signatures/certifications associated with this key.
+ An IEnumerable with all signatures/certifications.
+
+
+ Return all signatures/certifications directly associated with this key (ie, not to a user id).
+
+ @return an iterator (possibly empty) with all signatures/certifications.
+
+
+ Check whether this (sub)key has a revocation signature on it.
+ True, if this (sub)key has been revoked.
+
+
+ Add a certification for an id to the given public key.
+ The key the certification is to be added to.
+ The ID the certification is associated with.
+ The new certification.
+ The re-certified key.
+
+
+ Add a certification for the given UserAttributeSubpackets to the given public key.
+ The key the certification is to be added to.
+ The attributes the certification is associated with.
+ The new certification.
+ The re-certified key.
+
+
+
+ Remove any certifications associated with a user attribute subpacket on a key.
+
+ The key the certifications are to be removed from.
+ The attributes to be removed.
+
+ The re-certified key, or null if the user attribute subpacket was not found on the key.
+
+
+
+ Remove any certifications associated with a given ID on a key.
+ The key the certifications are to be removed from.
+ The ID that is to be removed.
+ The re-certified key, or null if the ID was not found on the key.
+
+
+ Remove a certification associated with a given ID on a key.
+ The key the certifications are to be removed from.
+ The ID that the certfication is to be removed from.
+ The certfication to be removed.
+ The re-certified key, or null if the certification was not found.
+
+
+ Remove a certification associated with a given user attributes on a key.
+ The key the certifications are to be removed from.
+ The user attributes that the certfication is to be removed from.
+ The certification to be removed.
+ The re-certified key, or null if the certification was not found.
+
+
+ Add a revocation or some other key certification to a key.
+ The key the revocation is to be added to.
+ The key signature to be added.
+ The new changed public key object.
+
+
+ Remove a certification from the key.
+ The key the certifications are to be removed from.
+ The certfication to be removed.
+ The modified key, null if the certification was not found.
+
+
+ A public key encrypted data object.
+
+
+ The key ID for the key used to encrypt the data.
+
+
+
+ Return the algorithm code for the symmetric algorithm used to encrypt the data.
+
+
+
+ Return the decrypted data stream for the packet.
+
+
+
+ Class to hold a single master public key and its subkeys.
+
+ Often PGP keyring files consist of multiple master keys, if you are trying to process
+ or construct one of these you should use the PgpPublicKeyRingBundle class.
+
+
+
+
+ Return the first public key in the ring.
+
+
+ Return the public key referred to by the passed in key ID if it is present.
+
+
+ Allows enumeration of all the public keys.
+ An IEnumerable of PgpPublicKey objects.
+
+
+
+ Returns a new key ring with the public key passed in either added or
+ replacing an existing one.
+
+ The public key ring to be modified.
+ The public key to be inserted.
+ A new PgpPublicKeyRing
+
+
+ Returns a new key ring with the public key passed in removed from the key ring.
+ The public key ring to be modified.
+ The public key to be removed.
+ A new PgpPublicKeyRing , or null if pubKey is not found.
+
+
+
+ Often a PGP key ring file is made up of a succession of master/sub-key key rings.
+ If you want to read an entire public key file in one hit this is the class for you.
+
+
+
+ Build a PgpPublicKeyRingBundle from the passed in input stream.
+ Input stream containing data.
+ If a problem parsing the stream occurs.
+ If an object is encountered which isn't a PgpPublicKeyRing.
+
+
+ Return the number of key rings in this collection.
+
+
+ Allow enumeration of the public key rings making up this collection.
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ If true, case is ignored in user ID comparisons.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Return the PGP public key associated with the given key id.
+ The ID of the public key to return.
+
+
+ Return the public key ring which contains the key referred to by keyId
+ key ID to match against
+
+
+
+ Return true if a key matching the passed in key ID is present, false otherwise.
+
+ key ID to look for.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle and
+ the passed in public key ring.
+
+ The PgpPublicKeyRingBundle the key ring is to be added to.
+ The key ring to be added.
+ A new PgpPublicKeyRingBundle merging the current one with the passed in key ring.
+ If the keyId for the passed in key ring is already present.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle with
+ the passed in public key ring removed.
+
+ The PgpPublicKeyRingBundle the key ring is to be removed from.
+ The key ring to be removed.
+ A new PgpPublicKeyRingBundle not containing the passed in key ring.
+ If the keyId for the passed in key ring is not present.
+
+
+ General class to handle a PGP secret key object.
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ If utf8PassPhrase is true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ If utf8PassPhrase is true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion
+ is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Check if this key has an algorithm type that makes it suitable to use for signing.
+
+
+ Note: with version 4 keys KeyFlags subpackets should also be considered when present for
+ determining the preferred use of the key.
+
+
+ true if this key algorithm is suitable for use with signing.
+
+
+
+ True, if this is a master key.
+
+
+ Detect if the Secret Key's Private Key is empty or not
+
+
+ The algorithm the key is encrypted with.
+
+
+ The key ID of the public key associated with this key.
+
+
+ Return the S2K usage associated with this key.
+
+
+ Return the S2K used to process this key.
+
+
+ The public key associated with this key.
+
+
+ Allows enumeration of any user IDs associated with the key.
+ An IEnumerable of string objects.
+
+
+ Allows enumeration of any user attribute vectors associated with the key.
+ An IEnumerable of string objects.
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+ Extract a PgpPrivateKey from this secret key's encrypted contents.
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Return a copy of the passed in secret key, encrypted using a new password
+ and the passed in algorithm.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+ The PgpSecretKey to be copied.
+ The current password for the key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+ Replace the passed the public key on the passed in secret key.
+ Secret key to change.
+ New public key.
+ A new secret key.
+ If KeyId's do not match.
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+
+ Parse a secret key from one of the GPG S expression keys.
+
+
+
+
+ Class to hold a single master secret key and its subkeys.
+
+ Often PGP keyring files consist of multiple master keys, if you are trying to process
+ or construct one of these you should use the PgpSecretKeyRingBundle class.
+
+
+
+
+ Return the public key for the master key.
+
+
+ Return the master private key.
+
+
+ Allows enumeration of the secret keys.
+ An IEnumerable of PgpSecretKey objects.
+
+
+
+ Return an iterator of the public keys in the secret key ring that
+ have no matching private key. At the moment only personal certificate data
+ appears in this fashion.
+
+ An IEnumerable of unattached, or extra, public keys.
+
+
+
+ Replace the public key set on the secret ring with the corresponding key off the public ring.
+
+ Secret ring to be changed.
+ Public ring containing the new public key set.
+
+
+
+ Return a copy of the passed in secret key ring, with the master key and sub keys encrypted
+ using a new password and the passed in algorithm.
+
+ The PgpSecretKeyRing to be copied.
+ The current password for key.
+ The new password for the key.
+ The algorithm to be used for the encryption.
+ Source of randomness.
+
+
+
+ Returns a new key ring with the secret key passed in either added or
+ replacing an existing one with the same key ID.
+
+ The secret key ring to be modified.
+ The secret key to be inserted.
+ A new PgpSecretKeyRing
+
+
+ Returns a new key ring with the secret key passed in removed from the key ring.
+ The secret key ring to be modified.
+ The secret key to be removed.
+ A new PgpSecretKeyRing , or null if secKey is not found.
+
+
+
+ Often a PGP key ring file is made up of a succession of master/sub-key key rings.
+ If you want to read an entire secret key file in one hit this is the class for you.
+
+
+
+ Build a PgpSecretKeyRingBundle from the passed in input stream.
+ Input stream containing data.
+ If a problem parsing the stream occurs.
+ If an object is encountered which isn't a PgpSecretKeyRing.
+
+
+ Return the number of rings in this collection.
+
+
+ Allow enumeration of the secret key rings making up this collection.
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Allow enumeration of the key rings associated with the passed in userId.
+ The user ID to be matched.
+ If true, userId need only be a substring of an actual ID string to match.
+ If true, case is ignored in user ID comparisons.
+ An IEnumerable of key rings which matched (possibly none).
+
+
+ Return the PGP secret key associated with the given key id.
+ The ID of the secret key to return.
+
+
+ Return the secret key ring which contains the key referred to by keyId
+ The ID of the secret key
+
+
+
+ Return true if a key matching the passed in key ID is present, false otherwise.
+
+ key ID to look for.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle and
+ the passed in secret key ring.
+
+ The PgpSecretKeyRingBundle the key ring is to be added to.
+ The key ring to be added.
+ A new PgpSecretKeyRingBundle merging the current one with the passed in key ring.
+ If the keyId for the passed in key ring is already present.
+
+
+
+ Return a new bundle containing the contents of the passed in bundle with
+ the passed in secret key ring removed.
+
+ The PgpSecretKeyRingBundle the key ring is to be removed from.
+ The key ring to be removed.
+ A new PgpSecretKeyRingBundle not containing the passed in key ring.
+ If the keyId for the passed in key ring is not present.
+
+
+ A PGP signature object.
+
+
+ The OpenPGP version number for this signature.
+
+
+ The key algorithm associated with this signature.
+
+
+ The hash algorithm associated with this signature.
+
+
+
+ Verify the signature as certifying the passed in public key as associated
+ with the passed in user attributes.
+
+ User attributes the key was stored under.
+ The key to be verified.
+ True, if the signature matches, false otherwise.
+
+
+
+ Verify the signature as certifying the passed in public key as associated
+ with the passed in ID.
+
+ ID the key was stored under.
+ The key to be verified.
+ True, if the signature matches, false otherwise.
+
+
+ Verify a certification for the passed in key against the passed in master key.
+ The key we are verifying against.
+ The key we are verifying.
+ True, if the certification is valid, false otherwise.
+
+
+ Verify a key certification, such as revocation, for the passed in key.
+ The key we are checking.
+ True, if the certification is valid, false otherwise.
+
+
+ The ID of the key that created the signature.
+
+
+ The creation time of this signature.
+
+
+
+ Return true if the signature has either hashed or unhashed subpackets.
+
+
+
+ Generator for PGP signatures.
+
+
+ Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
+
+
+ Initialise the generator for signing.
+
+
+ Initialise the generator for signing.
+
+
+ Return the one pass header associated with the current signature.
+
+
+ Return a signature object containing the current signature state.
+
+
+ Generate a certification for the passed in ID and key.
+ The ID we are certifying against the public key.
+ The key we are certifying against the ID.
+ The certification.
+
+
+ Generate a certification for the passed in userAttributes.
+ The ID we are certifying against the public key.
+ The key we are certifying against the ID.
+ The certification.
+
+
+ Generate a certification for the passed in key against the passed in master key.
+ The key we are certifying against.
+ The key we are certifying.
+ The certification.
+
+
+ Generate a certification, such as a revocation, for the passed in key.
+ The key we are certifying.
+ The certification.
+
+
+ A list of PGP signatures - normally in the signature block after literal data.
+
+
+ Generator for signature subpackets.
+
+
+
+ Add a TrustSignature packet to the signature. The values for depth and trust are largely
+ installation dependent but there are some guidelines in RFC 4880 - 5.2.3.13.
+
+ true if the packet is critical.
+ depth level.
+ trust amount.
+
+
+
+ Set the number of seconds a key is valid for after the time of its creation.
+ A value of zero means the key never expires.
+
+ True, if should be treated as critical, false otherwise.
+ The number of seconds the key is valid, or zero if no expiry.
+
+
+
+ Set the number of seconds a signature is valid for after the time of its creation.
+ A value of zero means the signature never expires.
+
+ True, if should be treated as critical, false otherwise.
+ The number of seconds the signature is valid, or zero if no expiry.
+
+
+
+ Set the creation time for the signature.
+
+ Note: this overrides the generation of a creation time when the signature
+ is generated.
+
+
+
+
+ Sets revocation reason sub packet
+
+
+
+
+ Sets revocation key sub packet
+
+
+
+
+ Sets issuer key sub packet
+
+
+
+ Container for a list of signature subpackets.
+
+
+ Return true if a particular subpacket type exists.
+
+ @param type type to look for.
+ @return true if present, false otherwise.
+
+
+ Return all signature subpackets of the passed in type.
+ @param type subpacket type code
+ @return an array of zero or more matching subpackets.
+
+
+
+ Return the number of seconds a signature is valid for after its creation date.
+ A value of zero means the signature never expires.
+
+ Seconds a signature is valid for.
+
+
+
+ Return the number of seconds a key is valid for after its creation date.
+ A value of zero means the key never expires.
+
+ Seconds a signature is valid for.
+
+
+ Return the number of packets this vector contains.
+
+
+ Container for a list of user attribute subpackets.
+
+
+ Basic utility class.
+
+
+
+ Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is
+ the historical behaviour of the library (1.7 and earlier).
+
+
+
+
+ The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes).
+
+
+
+
+ Allows the caller to handle the encoding of the passphrase to bytes.
+
+
+
+ Write out the passed in file as a literal data packet.
+
+
+ Write out the passed in file as a literal data packet in partial packet format.
+
+
+
+ Return either an ArmoredInputStream or a BcpgInputStream based on whether
+ the initial characters of the stream are binary PGP encodings or not.
+
+
+
+ Generator for old style PGP V3 Signatures.
+
+
+ Create a generator for the passed in keyAlgorithm and hashAlgorithm codes.
+
+
+ Initialise the generator for signing.
+
+
+ Initialise the generator for signing.
+
+
+ Return the one pass header associated with the current signature.
+
+
+ Return a V3 signature object containing the current signature state.
+
+
+ Utility functions for looking a S-expression keys. This class will move when it finds a better home!
+
+ Format documented here:
+ http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=agent/keyformat.txt;h=42c4b1f06faf1bbe71ffadc2fee0fad6bec91a97;hb=refs/heads/master
+
+
+
+
+ The 'Signature' parameter is only available when generating unsigned attributes.
+
+
+
+ containing class for an CMS AuthEnveloped Data object
+
+
+ containing class for an CMS Authenticated Data object
+
+
+ return the object identifier for the content MAC algorithm.
+
+
+ return a store of the intended recipients for this message
+
+
+ return the ContentInfo
+
+
+ return a table of the digested attributes indexed by
+ the OID of the attribute.
+
+
+ return a table of the undigested attributes indexed by
+ the OID of the attribute.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ General class for generating a CMS authenticated-data message.
+
+ A simple example of usage.
+
+
+ CMSAuthenticatedDataGenerator fact = new CMSAuthenticatedDataGenerator();
+
+ fact.addKeyTransRecipient(cert);
+
+ CMSAuthenticatedData data = fact.generate(content, algorithm, "BC");
+
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+ @param rand instance of SecureRandom to use
+
+
+ generate an enveloped object that contains an CMS Enveloped Data
+ object using the given provider and the passed in key generator.
+
+
+ generate an authenticated object that contains an CMS Authenticated Data object
+
+
+ Parsing class for an CMS Authenticated Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one recipient can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ Example of use - assuming the first recipient matches the private key we have.
+
+ CMSAuthenticatedDataParser ad = new CMSAuthenticatedDataParser(inputStream);
+
+ RecipientInformationStore recipients = ad.getRecipientInfos();
+
+ Collection c = recipients.getRecipients();
+ Iterator it = c.iterator();
+
+ if (it.hasNext())
+ {
+ RecipientInformation recipient = (RecipientInformation)it.next();
+
+ CMSTypedStream recData = recipient.getContentStream(privateKey, "BC");
+
+ processDataStream(recData.getContentStream());
+
+ if (!Arrays.equals(ad.getMac(), recipient.getMac())
+ {
+ System.err.println("Data corrupted!!!!");
+ }
+ }
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CMSAuthenticatedDataParser ep = new CMSAuthenticatedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+
+ return the object identifier for the mac algorithm.
+
+
+ return the ASN.1 encoded encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a store of the intended recipients for this message
+
+
+ return a table of the unauthenticated attributes indexed by
+ the OID of the attribute.
+ @exception java.io.IOException
+
+
+ return a table of the unauthenticated attributes indexed by
+ the OID of the attribute.
+ @exception java.io.IOException
+
+
+ General class for generating a CMS authenticated-data message stream.
+
+ A simple example of usage.
+
+ CMSAuthenticatedDataStreamGenerator edGen = new CMSAuthenticatedDataStreamGenerator();
+
+ edGen.addKeyTransRecipient(cert);
+
+ ByteArrayOutputStream bOut = new ByteArrayOutputStream();
+
+ OutputStream out = edGen.open(
+ bOut, CMSAuthenticatedDataGenerator.AES128_CBC, "BC");*
+ out.write(data);
+
+ out.close();
+
+
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+ @param rand instance of SecureRandom to use
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ Use a BER Set to store the recipient information
+
+
+ generate an enveloped object that contains an CMS Enveloped Data
+ object using the given provider and the passed in key generator.
+ @throws java.io.IOException
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+
+
+ base constructor
+
+
+ constructor allowing specific source of randomness
+
+ @param rand instance of SecureRandom to use
+
+
+ containing class for an CMS Compressed Data object
+
+
+ Return the uncompressed content.
+
+ @return the uncompressed content
+ @throws CmsException if there is an exception uncompressing the data.
+
+
+ Return the uncompressed content, throwing an exception if the data size
+ is greater than the passed in limit. If the content is exceeded getCause()
+ on the CMSException will contain a StreamOverflowException
+
+ @param limit maximum number of bytes to read
+ @return the content read
+ @throws CMSException if there is an exception uncompressing the data.
+
+
+ return the ContentInfo
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ * General class for generating a compressed CMS message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * CMSCompressedDataGenerator fact = new CMSCompressedDataGenerator();
+ * CMSCompressedData data = fact.Generate(content, algorithm);
+ *
+ *
+
+
+ Generate an object that contains an CMS Compressed Data
+
+
+ Class for reading a CMS Compressed Data stream.
+
+ CMSCompressedDataParser cp = new CMSCompressedDataParser(inputStream);
+
+ process(cp.GetContent().GetContentStream());
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CMSCompressedDataParser ep = new CMSCompressedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+ General class for generating a compressed CMS message stream.
+
+ A simple example of usage.
+
+
+ CMSCompressedDataStreamGenerator gen = new CMSCompressedDataStreamGenerator();
+
+ Stream cOut = gen.Open(outputStream, CMSCompressedDataStreamGenerator.ZLIB);
+
+ cOut.Write(data);
+
+ cOut.Close();
+
+
+
+ base constructor
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ Close the underlying data stream.
+ @throws IOException if the close fails.
+
+
+ containing class for an CMS Enveloped Data object
+
+
+ return the object identifier for the content encryption algorithm.
+
+
+ return a store of the intended recipients for this message
+
+
+ return the ContentInfo
+
+
+ return a table of the unprotected attributes indexed by
+ the OID of the attribute.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+
+ General class for generating a CMS enveloped-data message.
+
+ A simple example of usage.
+
+
+ CmsEnvelopedDataGenerator fact = new CmsEnvelopedDataGenerator();
+
+ fact.AddKeyTransRecipient(cert);
+
+ CmsEnvelopedData data = fact.Generate(content, algorithm);
+
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+
+ Generate an enveloped object that contains a CMS Enveloped Data
+ object using the passed in key generator.
+
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data object.
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data object.
+
+
+ Parsing class for an CMS Enveloped Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one recipient can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ Example of use - assuming the first recipient matches the private key we have.
+
+ CmsEnvelopedDataParser ep = new CmsEnvelopedDataParser(inputStream);
+
+ RecipientInformationStore recipients = ep.GetRecipientInfos();
+
+ Collection c = recipients.getRecipients();
+ Iterator it = c.iterator();
+
+ if (it.hasNext())
+ {
+ RecipientInformation recipient = (RecipientInformation)it.next();
+
+ CMSTypedStream recData = recipient.getContentStream(privateKey);
+
+ processDataStream(recData.getContentStream());
+ }
+
+ Note: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CmsEnvelopedDataParser ep = new CmsEnvelopedDataParser(new BufferedInputStream(inputStream, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+
+ return the object identifier for the content encryption algorithm.
+
+
+ return the ASN.1 encoded encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a store of the intended recipients for this message
+
+
+ return a table of the unprotected attributes indexed by
+ the OID of the attribute.
+ @throws IOException
+
+
+ General class for generating a CMS enveloped-data message stream.
+
+ A simple example of usage.
+
+ CmsEnvelopedDataStreamGenerator edGen = new CmsEnvelopedDataStreamGenerator();
+
+ edGen.AddKeyTransRecipient(cert);
+
+ MemoryStream bOut = new MemoryStream();
+
+ Stream out = edGen.Open(
+ bOut, CMSEnvelopedDataGenerator.AES128_CBC);*
+ out.Write(data);
+
+ out.Close();
+
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Set the underlying string size for encapsulated data.
+ Length of octet strings to buffer the data.
+
+
+ Use a BER Set to store the recipient information.
+
+
+
+ Generate an enveloped object that contains an CMS Enveloped Data
+ object using the passed in key generator.
+
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+ @throws IOException
+
+
+ generate an enveloped object that contains an CMS Enveloped Data object
+ @throws IOException
+
+
+ General class for generating a CMS enveloped-data message.
+
+ A simple example of usage.
+
+
+ CMSEnvelopedDataGenerator fact = new CMSEnvelopedDataGenerator();
+
+ fact.addKeyTransRecipient(cert);
+
+ CMSEnvelopedData data = fact.generate(content, algorithm, "BC");
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ add a recipient.
+
+ @param cert recipient's public key certificate
+ @exception ArgumentException if there is a problem with the certificate
+
+
+ add a recipient
+
+ @param key the public key used by the recipient
+ @param subKeyId the identifier for the recipient's public key
+ @exception ArgumentException if there is a problem with the key
+
+
+ add a KEK recipient.
+ @param key the secret key to use for wrapping
+ @param keyIdentifier the byte string that identifies the key
+
+
+ add a KEK recipient.
+ @param key the secret key to use for wrapping
+ @param keyIdentifier the byte string that identifies the key
+
+
+ Add a key agreement based recipient.
+
+ @param agreementAlgorithm key agreement algorithm to use.
+ @param senderPrivateKey private key to initialise sender side of agreement with.
+ @param senderPublicKey sender public key to include with message.
+ @param recipientCert recipient's public key certificate.
+ @param cekWrapAlgorithm OID for key wrapping algorithm to use.
+ @exception SecurityUtilityException if the algorithm requested cannot be found
+ @exception InvalidKeyException if the keys are inappropriate for the algorithm specified
+
+
+ Add multiple key agreement based recipients (sharing a single KeyAgreeRecipientInfo structure).
+
+ @param agreementAlgorithm key agreement algorithm to use.
+ @param senderPrivateKey private key to initialise sender side of agreement with.
+ @param senderPublicKey sender public key to include with message.
+ @param recipientCerts recipients' public key certificates.
+ @param cekWrapAlgorithm OID for key wrapping algorithm to use.
+ @exception SecurityUtilityException if the algorithm requested cannot be found
+ @exception InvalidKeyException if the keys are inappropriate for the algorithm specified
+
+
+
+ Generic routine to copy out the data we want processed.
+
+
+ This routine may be called multiple times.
+
+
+
+ a holding class for a byte array of data to be processed.
+
+
+ A clone of the byte array
+
+
+ a holding class for a file of data to be processed.
+
+
+ The file handle
+
+
+ general class for handling a pkcs7-signature message.
+
+ A simple example of usage - note, in the example below the validity of
+ the certificate isn't verified, just the fact that one of the certs
+ matches the given signer...
+
+
+ IX509Store certs = s.GetCertificates();
+ SignerInformationStore signers = s.GetSignerInfos();
+
+ foreach (SignerInformation signer in signers.GetSigners())
+ {
+ ArrayList certList = new ArrayList(certs.GetMatches(signer.SignerID));
+ X509Certificate cert = (X509Certificate) certList[0];
+
+ if (signer.Verify(cert.GetPublicKey()))
+ {
+ verified++;
+ }
+ }
+
+
+
+ Content with detached signature, digests precomputed
+
+ @param hashes a map of precomputed digests for content indexed by name of hash.
+ @param sigBlock the signature object.
+
+
+ base constructor - content with detached signature.
+
+ @param signedContent the content that was signed.
+ @param sigData the signature object.
+
+
+ base constructor - with encapsulated content
+
+
+ Return the version number for this object.
+
+
+ return the collection of signers that are associated with the
+ signatures for the message.
+
+
+ return a X509Store containing the attribute certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of attribute certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing the public key certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of public key certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing CRLs, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of CRLs
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+
+ Return the DerObjectIdentifier associated with the encapsulated
+ content info structure carried in the signed data.
+
+
+
+ return the ContentInfo
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Replace the signerinformation store associated with this
+ CmsSignedData object with the new one passed in. You would
+ probably only want to do this if you wanted to change the unsigned
+ attributes associated with a signer, or perhaps delete one.
+
+ @param signedData the signed data object to be used as a base.
+ @param signerInformationStore the new signer information store to use.
+ @return a new signed data object.
+
+
+ Replace the certificate and CRL information associated with this
+ CmsSignedData object with the new one passed in.
+
+ @param signedData the signed data object to be used as a base.
+ @param x509Certs the new certificates to be used.
+ @param x509Crls the new CRLs to be used.
+ @return a new signed data object.
+ @exception CmsException if there is an error processing the stores
+
+
+ * general class for generating a pkcs7-signature message.
+ *
+ * A simple example of usage.
+ *
+ *
+ * IX509Store certs...
+ * IX509Store crls...
+ * CmsSignedDataGenerator gen = new CmsSignedDataGenerator();
+ *
+ * gen.AddSigner(privKey, cert, CmsSignedGenerator.DigestSha1);
+ * gen.AddCertificates(certs);
+ * gen.AddCrls(crls);
+ *
+ * CmsSignedData data = gen.Generate(content);
+ *
+ *
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ * add a signer - no attributes other than the default ones will be
+ * provided here.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param digestOID digest algorithm OID
+
+
+ add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be
+ provided here.
+
+ @param key signing key to use
+ @param cert certificate containing corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+
+
+ add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be
+ provided here.
+
+
+ * add a signer with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param cert certificate containing corresponding public key
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes.
+
+ @param key signing key to use
+ @param cert certificate containing corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+ @param signedAttr table of attributes to be included in signature
+ @param unsignedAttr table of attributes to be included as unsigned
+
+
+ * add a signer with extra signed/unsigned attributes.
+ *
+ * @param key signing key to use
+ * @param subjectKeyID subjectKeyID of corresponding public key
+ * @param digestOID digest algorithm OID
+ * @param signedAttr table of attributes to be included in signature
+ * @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes.
+
+ @param key signing key to use
+ @param subjectKeyID subjectKeyID of corresponding public key
+ @param encryptionOID digest encryption algorithm OID
+ @param digestOID digest algorithm OID
+ @param signedAttr table of attributes to be included in signature
+ @param unsignedAttr table of attributes to be included as unsigned
+
+
+ add a signer with extra signed/unsigned attributes based on generators.
+
+
+ add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes based on generators.
+
+
+ add a signer with extra signed/unsigned attributes based on generators.
+
+
+ add a signer, including digest encryption algorithm, with extra signed/unsigned attributes based on generators.
+
+
+ generate a signed object that for a CMS Signed Data object
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data".
+
+
+ generate a set of one or more SignerInformation objects representing counter signatures on
+ the passed in SignerInformation object.
+
+ @param signer the signer to be countersigned
+ @param sigProvider the provider to be used for counter signing.
+ @return a store containing the signers.
+
+
+ Parsing class for an CMS Signed Data object from an input stream.
+
+ Note: that because we are in a streaming mode only one signer can be tried and it is important
+ that the methods on the parser are called in the appropriate order.
+
+
+ A simple example of usage for an encapsulated signature.
+
+
+ Two notes: first, in the example below the validity of
+ the certificate isn't verified, just the fact that one of the certs
+ matches the given signer, and, second, because we are in a streaming
+ mode the order of the operations is important.
+
+
+ CmsSignedDataParser sp = new CmsSignedDataParser(encapSigData);
+
+ sp.GetSignedContent().Drain();
+
+ IX509Store certs = sp.GetCertificates();
+ SignerInformationStore signers = sp.GetSignerInfos();
+
+ foreach (SignerInformation signer in signers.GetSigners())
+ {
+ ArrayList certList = new ArrayList(certs.GetMatches(signer.SignerID));
+ X509Certificate cert = (X509Certificate) certList[0];
+
+ Console.WriteLine("verify returns: " + signer.Verify(cert));
+ }
+
+ Note also: this class does not introduce buffering - if you are processing large files you should create
+ the parser with:
+
+ CmsSignedDataParser ep = new CmsSignedDataParser(new BufferedInputStream(encapSigData, bufSize));
+
+ where bufSize is a suitably large buffer size.
+
+
+ base constructor - with encapsulated content
+
+
+ base constructor
+
+ @param signedContent the content that was signed.
+ @param sigData the signature object.
+
+
+ Return the version number for the SignedData object
+
+ @return the version number
+
+
+ return the collection of signers that are associated with the
+ signatures for the message.
+ @throws CmsException
+
+
+ return a X509Store containing the attribute certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of attribute certificates
+ @exception org.bouncycastle.x509.NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing the public key certificates, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of public key certificates
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+ return a X509Store containing CRLs, if any, contained
+ in this message.
+
+ @param type type of store to create
+ @return a store of CRLs
+ @exception NoSuchStoreException if the store type isn't available.
+ @exception CmsException if a general exception prevents creation of the X509Store
+
+
+
+ Return the DerObjectIdentifier associated with the encapsulated
+ content info structure carried in the signed data.
+
+
+
+ Replace the signerinformation store associated with the passed
+ in message contained in the stream original with the new one passed in.
+ You would probably only want to do this if you wanted to change the unsigned
+ attributes associated with a signer, or perhaps delete one.
+
+ The output stream is returned unclosed.
+
+ @param original the signed data stream to be used as a base.
+ @param signerInformationStore the new signer information store to use.
+ @param out the stream to Write the new signed data object to.
+ @return out.
+
+
+ Replace the certificate and CRL information associated with this
+ CMSSignedData object with the new one passed in.
+
+ The output stream is returned unclosed.
+
+ @param original the signed data stream to be used as a base.
+ @param certsAndCrls the new certificates and CRLs to be used.
+ @param out the stream to Write the new signed data object to.
+ @return out.
+ @exception CmsException if there is an error processing the CertStore
+
+
+ General class for generating a pkcs7-signature message stream.
+
+ A simple example of usage.
+
+
+ IX509Store certs...
+ CmsSignedDataStreamGenerator gen = new CmsSignedDataStreamGenerator();
+
+ gen.AddSigner(privateKey, cert, CmsSignedDataStreamGenerator.DIGEST_SHA1);
+
+ gen.AddCertificates(certs);
+
+ Stream sigOut = gen.Open(bOut);
+
+ sigOut.Write(Encoding.UTF8.GetBytes("Hello World!"));
+
+ sigOut.Close();
+
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Set the underlying string size for encapsulated data
+
+ @param bufferSize length of octet strings to buffer the data.
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer, specifying the digest encryption algorithm - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes - specifying digest
+ encryption algorithm.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer - no attributes other than the default ones will be
+ provided here.
+ @throws NoSuchProviderException
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ add a signer with extra signed/unsigned attributes.
+ @throws NoSuchAlgorithmException
+ @throws InvalidKeyException
+
+
+ generate a signed object that for a CMS Signed Data object
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data".
+
+
+ generate a signed object that for a CMS Signed Data
+ object using the given provider - if encapsulate is true a copy
+ of the message will be included in the signature with the
+ default content type "data". If dataOutputStream is non null the data
+ being signed will be written to the stream as it is processed.
+ @param out stream the CMS object is to be written to.
+ @param encapsulate true if data should be encapsulated.
+ @param dataOutputStream output stream to copy the data being signed to.
+
+
+ generate a signed object that for a CMS Signed Data
+ object - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+
+
+ generate a signed object that for a CMS Signed Data
+ object using the given provider - if encapsulate is true a copy
+ of the message will be included in the signature. The content type
+ is set according to the OID represented by the string signedContentType.
+ @param out stream the CMS object is to be written to.
+ @param signedContentType OID for data to be signed.
+ @param encapsulate true if data should be encapsulated.
+ @param dataOutputStream output stream to copy the data being signed to.
+
+
+ Default type for the signed data.
+
+
+ Constructor allowing specific source of randomness
+ Instance of SecureRandom to use.
+
+
+ Add the attribute certificates contained in the passed in store to the
+ generator.
+
+ @param store a store of Version 2 attribute certificates
+ @throws CmsException if an error occurse processing the store.
+
+
+ Add a store of precalculated signers to the generator.
+
+ @param signerStore store of signers
+
+
+ Return a map of oids and byte arrays representing the digests calculated on the content during
+ the last generate.
+
+ @return a map of oids (as String objects) and byte[] representing digests.
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+ Return the digest encryption algorithm using one of the standard
+ JCA string representations rather than the algorithm identifier (if
+ possible).
+
+
+ Default authenticated attributes generator.
+
+
+ Initialise to use all defaults
+
+
+ Initialise with some extra attributes or overrides.
+
+ @param attributeTable initial attribute table to use.
+
+
+ Create a standard attribute table from the passed in parameters - this will
+ normally include contentType and messageDigest. If the constructor
+ using an AttributeTable was used, entries in it for contentType and
+ messageDigest will override the generated ones.
+
+ @param parameters source parameters for table generation.
+
+ @return a filled in IDictionary of attributes.
+
+
+ @param parameters source parameters
+ @return the populated attribute table
+
+
+ Default signed attributes generator.
+
+
+ Initialise to use all defaults
+
+
+ Initialise with some extra attributes or overrides.
+
+ @param attributeTable initial attribute table to use.
+
+
+ Create a standard attribute table from the passed in parameters - this will
+ normally include contentType, signingTime, and messageDigest. If the constructor
+ using an AttributeTable was used, entries in it for contentType, signingTime, and
+ messageDigest will override the generated ones.
+
+ @param parameters source parameters for table generation.
+
+ @return a filled in Hashtable of attributes.
+
+
+ @param parameters source parameters
+ @return the populated attribute table
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using a secret key known to the other side.
+
+
+ decrypt the content and return an input stream.
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using key agreement.
+
+
+ decrypt the content and return an input stream.
+
+
+ the KeyTransRecipientInformation class for a recipient who has been sent a secret
+ key encrypted using their public key that needs to be used to
+ extract the message.
+
+
+ decrypt the content and return it as a byte array.
+
+
+ a basic index for an originator.
+
+
+ Return the certificates stored in the underlying OriginatorInfo object.
+
+ @return a Store of X509CertificateHolder objects.
+
+
+ Return the CRLs stored in the underlying OriginatorInfo object.
+
+ @return a Store of X509CRLHolder objects.
+
+
+ Return the underlying ASN.1 object defining this SignerInformation object.
+
+ @return a OriginatorInfo.
+
+
+
+ PKCS5 scheme-2 - password converted to bytes assuming ASCII.
+
+
+
+ PKCS5 scheme-2 - password converted to bytes using UTF-8.
+
+
+ the RecipientInfo class for a recipient who has been sent a message
+ encrypted using a password.
+
+
+ return the object identifier for the key derivation algorithm, or null
+ if there is none present.
+
+ @return OID for key derivation algorithm, if present.
+
+
+ decrypt the content and return an input stream.
+
+
+
+ Generate a RecipientInfo object for the given key.
+
+
+ A
+
+
+ A
+
+
+ A
+
+
+
+
+ * return the object identifier for the key encryption algorithm.
+ *
+ * @return OID for key encryption algorithm.
+
+
+ * return the ASN.1 encoded key encryption algorithm parameters, or null if
+ * there aren't any.
+ *
+ * @return ASN.1 encoding of key encryption algorithm parameters.
+
+
+ Return the MAC calculated for the content stream. Note: this call is only meaningful once all
+ the content has been read.
+
+ @return byte array containing the mac.
+
+
+ Return the first RecipientInformation object that matches the
+ passed in selector. Null if there are no matches.
+
+ @param selector to identify a recipient
+ @return a single RecipientInformation object. Null if none matches.
+
+
+ Return the number of recipients in the collection.
+
+ @return number of recipients identified.
+
+
+ Return all recipients in the collection
+
+ @return a collection of recipients.
+
+
+ Return possible empty collection with recipients matching the passed in RecipientID
+
+ @param selector a recipient id to select against.
+ @return a collection of RecipientInformation objects.
+
+
+ a basic index for a signer.
+
+
+ If the passed in flag is true, the signer signature will be based on the data, not
+ a collection of signed attributes, and no signed attributes will be included.
+
+ @return the builder object
+
+
+ Provide a custom signed attribute generator.
+
+ @param signedGen a generator of signed attributes.
+ @return the builder object
+
+
+ Provide a generator of unsigned attributes.
+
+ @param unsignedGen a generator for signed attributes.
+ @return the builder object
+
+
+ Build a generator with the passed in certHolder issuer and serial number as the signerIdentifier.
+
+ @param contentSigner operator for generating the final signature in the SignerInfo with.
+ @param certHolder carrier for the X.509 certificate related to the contentSigner.
+ @return a SignerInfoGenerator
+ @throws OperatorCreationException if the generator cannot be built.
+
+
+ Build a generator with the passed in subjectKeyIdentifier as the signerIdentifier. If used you should
+ try to follow the calculation described in RFC 5280 section 4.2.1.2.
+
+ @param signerFactory operator factory for generating the final signature in the SignerInfo with.
+ @param subjectKeyIdentifier key identifier to identify the public key for verifying the signature.
+ @return a SignerInfoGenerator
+
+
+ an expanded SignerInfo block from a CMS Signed message
+
+
+ return the version number for this objects underlying SignerInfo structure.
+
+
+ return the object identifier for the signature.
+
+
+ return the signature parameters, or null if there aren't any.
+
+
+ return the content digest that was calculated during verification.
+
+
+ return the object identifier for the signature.
+
+
+ return the signature/encryption algorithm parameters, or null if
+ there aren't any.
+
+
+ return a table of the signed attributes - indexed by
+ the OID of the attribute.
+
+
+ return a table of the unsigned attributes indexed by
+ the OID of the attribute.
+
+
+ return the encoded signature
+
+
+ Return a SignerInformationStore containing the counter signatures attached to this
+ signer. If no counter signatures are present an empty store is returned.
+
+
+ return the DER encoding of the signed attributes.
+ @throws IOException if an encoding error occurs.
+
+
+ verify that the given public key successfully handles and confirms the
+ signature associated with this signer.
+
+
+ verify that the given certificate successfully handles and confirms
+ the signature associated with this signer and, if a signingTime
+ attribute is available, that the certificate was valid at the time the
+ signature was generated.
+
+
+ Return the base ASN.1 CMS structure that this object contains.
+
+ @return an object containing a CMS SignerInfo structure.
+
+
+ Return a signer information object with the passed in unsigned
+ attributes replacing the ones that are current associated with
+ the object passed in.
+
+ @param signerInformation the signerInfo to be used as the basis.
+ @param unsignedAttributes the unsigned attributes to add.
+ @return a copy of the original SignerInformationObject with the changed attributes.
+
+
+ Return a signer information object with passed in SignerInformationStore representing counter
+ signatures attached as an unsigned attribute.
+
+ @param signerInformation the signerInfo to be used as the basis.
+ @param counterSigners signer info objects carrying counter signature.
+ @return a copy of the original SignerInformationObject with the changed attributes.
+
+
+ Create a store containing a single SignerInformation object.
+
+ @param signerInfo the signer information to contain.
+
+
+ Create a store containing a collection of SignerInformation objects.
+
+ @param signerInfos a collection signer information objects to contain.
+
+
+ Return the first SignerInformation object that matches the
+ passed in selector. Null if there are no matches.
+
+ @param selector to identify a signer
+ @return a single SignerInformation object. Null if none matches.
+
+
+ The number of signers in the collection.
+
+
+ An ICollection of all signers in the collection
+
+
+ Return possible empty collection with signers matching the passed in SignerID
+
+ @param selector a signer id to select against.
+ @return a collection of SignerInformation objects.
+
+
+ Basic generator that just returns a preconstructed attribute table
+
+
+ a holding class for public/private parameter pairs.
+
+
+ basic constructor.
+
+ @param publicParam a public key parameters object.
+ @param privateParam the corresponding private key parameters.
+
+
+ return the public key parameters.
+
+ @return the public key parameters.
+
+
+ return the private key parameters.
+
+ @return the private key parameters.
+
+
+ The AEAD block ciphers already handle buffering internally, so this class
+ just takes care of implementing IBufferedCipher methods.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the blocksize for the underlying cipher.
+
+ @return the blocksize for the underlying cipher.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output, or the input is not block size aligned and should be.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+ @exception DataLengthException if the input is not block size
+ aligned.
+
+
+ Reset the buffer and cipher. After resetting the object is in the same
+ state as it was after the last init (if there was one).
+
+
+ a buffer wrapper for an asymmetric block cipher, allowing input
+ to be accumulated in a piecemeal fashion until final processing.
+
+
+ base constructor.
+
+ @param cipher the cipher this buffering object wraps.
+
+
+ return the amount of data sitting in the buffer.
+
+ @return the amount of data sitting in the buffer.
+
+
+ initialise the buffer and the underlying cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+
+
+ process the contents of the buffer using the underlying
+ cipher.
+
+ @return the result of the encryption/decryption process on the
+ buffer.
+ @exception InvalidCipherTextException if we are given a garbage block.
+
+
+ Reset the buffer
+
+
+ A wrapper class that allows block ciphers to be used to process data in
+ a piecemeal fashion. The BufferedBlockCipher outputs a block only when the
+ buffer is full and more data is being added, or on a doFinal.
+
+ Note: in the case where the underlying cipher is either a CFB cipher or an
+ OFB one the last block may not be a multiple of the block size.
+
+
+
+ constructor for subclasses
+
+
+ Create a buffered block cipher without padding.
+
+ @param cipher the underlying block cipher this buffering object wraps.
+ false otherwise.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the blocksize for the underlying cipher.
+
+ @return the blocksize for the underlying cipher.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output, or the input is not block size aligned and should be.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+ @exception DataLengthException if the input is not block size
+ aligned.
+
+
+ Reset the buffer and cipher. After resetting the object is in the same
+ state as it was after the last init (if there was one).
+
+
+ The base class for symmetric, or secret, cipher key generators.
+
+
+ initialise the key generator.
+
+ @param param the parameters to be used for key generation
+
+
+ Generate a secret key.
+
+ @return a byte array containing the key value.
+
+
+ this exception is thrown if a buffer that is meant to have output
+ copied into it turns out to be too short, or if we've been given
+ insufficient input. In general this exception will Get thrown rather
+ than an ArrayOutOfBounds exception.
+
+
+ base constructor.
+
+
+ create a DataLengthException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+ Wrapper removes exposure to the IMemoable interface on an IDigest implementation.
+
+
+ Base constructor.
+
+ @param baseDigest underlying digest to use.
+ @exception IllegalArgumentException if baseDigest is null
+
+
+ implementation of GOST R 34.11-94
+
+
+ Standard constructor
+
+
+ Constructor to allow use of a particular sbox with GOST28147
+ @see GOST28147Engine#getSBox(String)
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ base implementation of MD4 family style digest as outlined in
+ "Handbook of Applied Cryptography", pages 344 - 347.
+
+
+
+ Implementation of Keccak based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+ Return the size of block that the compression function is applied to in bytes.
+
+ @return internal byte length of a block.
+
+
+ Base class for SHA-384 and SHA-512.
+
+
+ Constructor for variable length word
+
+
+ Copy constructor. We are using copy constructors in place
+ of the object.Clone() interface as this interface is not
+ supported by J2ME.
+
+
+ adjust the byte counts so that byteCount2 represents the
+ upper long (less 3 bits) word of the byte count.
+
+
+ implementation of MD2
+ as outlined in RFC1319 by B.Kaliski from RSA Laboratories April 1992
+
+
+ return the algorithm name
+
+ @return the algorithm name
+
+
+ Close the digest, producing the final digest value. The doFinal
+ call leaves the digest reset.
+
+ @param out the array the digest is to be copied into.
+ @param outOff the offset into the out array the digest is to start at.
+
+
+ reset the digest back to it's initial state.
+
+
+ update the message digest with a single byte.
+
+ @param in the input byte to be entered.
+
+
+ update the message digest with a block of bytes.
+
+ @param in the byte array containing the data.
+ @param inOff the offset into the byte array where the data starts.
+ @param len the length of the data.
+
+
+ implementation of MD4 as RFC 1320 by R. Rivest, MIT Laboratory for
+ Computer Science and RSA Data Security, Inc.
+
+ NOTE : This algorithm is only included for backwards compatibility
+ with legacy applications, it's not secure, don't use it for anything new!
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of MD5 as outlined in "Handbook of Applied Cryptography", pages 346 - 347.
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of RipeMD128
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+ implementation of RipeMD see,
+ http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of RipeMD256.
+ Note: this algorithm offers the same level of security as RipeMD128.
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of RipeMD 320.
+ Note: this algorithm offers the same level of security as RipeMD160.
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+ reset the chaining variables to the IV values.
+
+
+
+ Implementation of SHA-3 based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+
+ Implementation of Chinese SM3 digest as described at
+ http://tools.ietf.org/html/draft-shen-sm3-hash-00
+ and at .... ( Chinese PDF )
+
+
+ The specification says "process a bit stream",
+ but this is written to process bytes in blocks of 4,
+ meaning this will process 32-bit word groups.
+ But so do also most other digest specifications,
+ including the SHA-256 which was a origin for
+ this specification.
+
+
+
+
+ Standard constructor
+
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+
+
+ reset the chaining variables
+
+
+
+ implementation of SHA-1 as outlined in "Handbook of Applied Cryptography", pages 346 - 349.
+
+ It is interesting to ponder why the, apart from the extra IV, the other difference here from MD5
+ is the "endianness" of the word processing!
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ SHA-224 as described in RFC 3874
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-224 512 32 224
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-256. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-384. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Draft FIPS 180-2 implementation of SHA-512. Note: As this is
+ based on a draft this implementation is subject to change.
+
+
+ block word digest
+ SHA-1 512 32 160
+ SHA-256 512 32 256
+ SHA-384 1024 64 384
+ SHA-512 1024 64 512
+
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ FIPS 180-4 implementation of SHA-512/t
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+
+ Implementation of SHAKE based on following KeccakNISTInterface.c from http://keccak.noekeon.org/
+
+
+ Following the naming conventions used in the C source code to enable easy review of the implementation.
+
+
+
+ Wrapper class that reduces the output length of a particular digest to
+ only the first n bytes of the digest function.
+
+
+ Base constructor.
+
+ @param baseDigest underlying digest to use.
+ @param length length in bytes of the output of doFinal.
+ @exception ArgumentException if baseDigest is null, or length is greater than baseDigest.GetDigestSize().
+
+
+
+ Implementation of the Skein parameterised hash function in 256, 512 and 1024 bit block sizes,
+ based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+
+ Constructs a Skein digest with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/digest size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Optionally initialises the Skein digest with the provided parameters.
+
+ See for details on the parameterisation of the Skein hash function.
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+
+ Implementation of the Skein family of parameterised hash functions in 256, 512 and 1024 bit block
+ sizes, based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+ This implementation is the basis for and , implementing the
+ parameter based configuration system that allows Skein to be adapted to multiple applications.
+ Initialising the engine with allows standard and arbitrary parameters to
+ be applied during the Skein hash function.
+
+ Implemented:
+
+ 256, 512 and 1024 bit internal states.
+ Full 96 bit input length.
+ Parameters defined in the Skein specification, and arbitrary other pre and post message
+ parameters.
+ Arbitrary output size in 1 byte intervals.
+
+
+ Not implemented:
+
+ Sub-byte length input (bit padding).
+ Tree hashing.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+ The parameter type for the Skein key.
+
+
+ The parameter type for the Skein configuration block.
+
+
+ The parameter type for the message.
+
+
+ The parameter type for the output transformation.
+
+
+ Precalculated UBI(CFG) states for common state/output combinations without key or other
+ pre-message params.
+
+
+ Point at which position might overflow long, so switch to add with carry logic
+
+
+ Bit 127 = final
+
+
+ Bit 126 = first
+
+
+ UBI uses a 128 bit tweak
+
+
+ Whether 64 bit position exceeded
+
+
+ Advances the position in the tweak by the specified value.
+
+
+ The Unique Block Iteration chaining mode.
+
+
+ Buffer for the current block of message data
+
+
+ Offset into the current message block
+
+
+ Buffer for message words for feedback into encrypted block
+
+
+ Underlying Threefish tweakable block cipher
+
+
+ Size of the digest output, in bytes
+
+
+ The current chaining/state value
+
+
+ The initial state value
+
+
+ The (optional) key parameter
+
+
+ Parameters to apply prior to the message
+
+
+ Parameters to apply after the message, but prior to output
+
+
+ The current UBI operation
+
+
+ Buffer for single byte update method
+
+
+
+ Constructs a Skein digest with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/digest size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Creates a SkeinEngine as an exact copy of an existing instance.
+
+
+
+
+ Initialises the Skein engine with the provided parameters. See for
+ details on the parameterisation of the Skein hash function.
+
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+ Calculate the initial (pre message block) chaining state.
+
+
+
+ Reset the engine to the initial state (with the key and any pre-message parameters , ready to
+ accept message input.
+
+
+
+ implementation of Tiger based on:
+
+ http://www.cs.technion.ac.il/~biham/Reports/Tiger
+
+
+ Standard constructor
+
+
+ Copy constructor. This will copy the state of the provided
+ message digest.
+
+
+ reset the chaining variables
+
+
+ Implementation of WhirlpoolDigest, based on Java source published by Barreto
+ and Rijmen.
+
+
+
+ Copy constructor. This will copy the state of the provided message
+ digest.
+
+
+ Reset the chaining variables
+
+
+ initialise a Serpent cipher.
+
+ @param encrypting whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @throws IllegalArgumentException if the params argument is
+ inappropriate.
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @return the number of bytes processed and produced.
+ @throws DataLengthException if there isn't enough data in in, or
+ space in out.
+ @throws IllegalStateException if the cipher isn't initialised.
+
+
+ InvSO - {13, 3,11, 0,10, 6, 5,12, 1,14, 4, 7,15, 9, 8, 2 } - 15 terms.
+
+
+ S1 - {15,12, 2, 7, 9, 0, 5,10, 1,11,14, 8, 6,13, 3, 4 } - 14 terms.
+
+
+ InvS1 - { 5, 8, 2,14,15, 6,12, 3,11, 4, 7, 9, 1,13,10, 0 } - 14 steps.
+
+
+ S2 - { 8, 6, 7, 9, 3,12,10,15,13, 1,14, 4, 0,11, 5, 2 } - 16 terms.
+
+
+ InvS2 - {12, 9,15, 4,11,14, 1, 2, 0, 3, 6,13, 5, 8,10, 7 } - 16 steps.
+
+
+ S3 - { 0,15,11, 8,12, 9, 6, 3,13, 1, 2, 4,10, 7, 5,14 } - 16 terms.
+
+
+ InvS3 - { 0, 9,10, 7,11,14, 6,13, 3, 5,12, 2, 4, 8,15, 1 } - 15 terms
+
+
+ S4 - { 1,15, 8, 3,12, 0,11, 6, 2, 5, 4,10, 9,14, 7,13 } - 15 terms.
+
+
+ InvS4 - { 5, 0, 8, 3,10, 9, 7,14, 2,12,11, 6, 4,15,13, 1 } - 15 terms.
+
+
+ S5 - {15, 5, 2,11, 4,10, 9,12, 0, 3,14, 8,13, 6, 7, 1 } - 16 terms.
+
+
+ InvS5 - { 8,15, 2, 9, 4, 1,13,14,11, 6, 5, 3, 7,12,10, 0 } - 16 terms.
+
+
+ S6 - { 7, 2,12, 5, 8, 4, 6,11,14, 9, 1,15,13, 3,10, 0 } - 15 terms.
+
+
+ InvS6 - {15,10, 1,13, 5, 3, 6, 0, 4, 9,14, 7, 2,12, 8,11 } - 15 terms.
+
+
+ S7 - { 1,13,15, 0,14, 8, 2,11, 7, 4,12,10, 9, 3, 5, 6 } - 16 terms.
+
+
+ InvS7 - { 3, 0, 6,13, 9,14,15, 8, 5,12,11, 7,10, 1, 4, 2 } - 17 terms.
+
+
+ Apply the linear transformation to the register set.
+
+
+ Apply the inverse of the linear transformation to the register set.
+
+
+ Tnepres is a 128-bit 32-round block cipher with variable key lengths,
+ including 128, 192 and 256 bit keys conjectured to be at least as
+ secure as three-key triple-DES.
+
+ Tnepres is based on Serpent which was designed by Ross Anderson, Eli Biham and Lars Knudsen as a
+ candidate algorithm for the NIST AES Quest. Unfortunately there was an endianness issue
+ with test vectors in the AES submission and the resulting confusion lead to the Tnepres cipher
+ as well, which is a byte swapped version of Serpent.
+
+
+ For full details see The Serpent home page
+
+
+
+ Expand a user-supplied key material into a session key.
+
+ @param key The user-key bytes (multiples of 4) to use.
+ @exception ArgumentException
+
+
+ Encrypt one block of plaintext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ Decrypt one block of ciphertext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ an implementation of the AES (Rijndael), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor, they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations, 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each, for a total of 2Kbytes,
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first.
+
+ The slowest version uses no static tables at all and computes the values in each round.
+
+
+ This file contains the middle performance version with 2Kbytes of static tables for round precomputation.
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ an implementation of the AES (Rijndael)), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor), they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations), 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each), for a total of 2Kbytes),
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first
+
+ The slowest version uses no static tables at all and computes the values in each round
+
+
+ This file contains the fast version with 8Kbytes of static tables for round precomputation
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ an implementation of the AES (Rijndael), from FIPS-197.
+
+ For further details see: http://csrc.nist.gov/encryption/aes/ .
+
+ This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at
+ http://fp.gladman.plus.com/cryptography_technology/rijndael/
+
+ There are three levels of tradeoff of speed vs memory
+ Because java has no preprocessor, they are written as three separate classes from which to choose
+
+ The fastest uses 8Kbytes of static tables to precompute round calculations, 4 256 word tables for encryption
+ and 4 for decryption.
+
+ The middle performance version uses only one 256 word table for each, for a total of 2Kbytes,
+ adding 12 rotate operations per round to compute the values contained in the other tables from
+ the contents of the first
+
+ The slowest version uses no static tables at all and computes the values
+ in each round.
+
+
+ This file contains the slowest performance version with no static tables
+ for round precomputation, but it has the smallest foot print.
+
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on key size and block size
+ AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits
+ This code is written assuming those are the only possible values
+
+
+ default constructor - 128 bit block size.
+
+
+ initialise an AES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+
+ An implementation of the AES Key Wrapper from the NIST Key Wrap Specification.
+
+ For further details see: http://csrc.nist.gov/encryption/kms/key-wrap.pdf .
+
+
+
+ A class that provides Blowfish key encryption operations,
+ such as encoding data and generating keys.
+ All the algorithms herein are from Applied Cryptography
+ and implement a simplified cryptography interface.
+
+
+ initialise a Blowfish cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ apply the encryption cycle to each value pair in the table.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Camellia - based on RFC 3713.
+
+
+ Camellia - based on RFC 3713, smaller implementation, about half the size of CamelliaEngine.
+
+
+
+ An implementation of the Camellia key wrapper based on RFC 3657/RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc3657.txt .
+
+
+
+ A class that provides CAST key encryption operations,
+ such as encoding data and generating keys.
+
+ All the algorithms herein are from the Internet RFC's
+
+ RFC2144 - Cast5 (64bit block, 40-128bit key)
+ RFC2612 - CAST6 (128bit block, 128-256bit key)
+
+ and implement a simplified cryptography interface.
+
+
+ initialise a CAST cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ The first of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ The second of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ The third of the three processing functions for the
+ encryption and decryption.
+
+ @param D the input to be processed
+ @param Kmi the mask to be used from Km[n]
+ @param Kri the rotation value to be used
+
+
+
+ Does the 16 rounds to encrypt the block.
+
+ @param L0 the LH-32bits of the plaintext block
+ @param R0 the RH-32bits of the plaintext block
+
+
+ A class that provides CAST6 key encryption operations,
+ such as encoding data and generating keys.
+
+ All the algorithms herein are from the Internet RFC
+
+ RFC2612 - CAST6 (128bit block, 128-256bit key)
+
+ and implement a simplified cryptography interface.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param src The plaintext buffer
+ @param srcIndex An offset into src
+ @param dst The ciphertext buffer
+ @param dstIndex An offset into dst
+
+
+ Does the 12 quad rounds rounds to encrypt the block.
+
+ @param A the 00-31 bits of the plaintext block
+ @param B the 32-63 bits of the plaintext block
+ @param C the 64-95 bits of the plaintext block
+ @param D the 96-127 bits of the plaintext block
+ @param result the resulting ciphertext
+
+
+ Does the 12 quad rounds rounds to decrypt the block.
+
+ @param A the 00-31 bits of the ciphertext block
+ @param B the 32-63 bits of the ciphertext block
+ @param C the 64-95 bits of the ciphertext block
+ @param D the 96-127 bits of the ciphertext block
+ @param result the resulting plaintext
+
+
+
+ Implementation of Daniel J. Bernstein's ChaCha stream cipher.
+
+
+
+
+ Creates a 20 rounds ChaCha engine.
+
+
+
+
+ Creates a ChaCha engine with a specific number of rounds.
+
+ the number of rounds (must be an even number).
+
+
+
+ ChacCha function.
+
+ The number of ChaCha rounds to execute
+ The input words.
+ The ChaCha state to modify.
+
+
+ A class that provides a basic DESede (or Triple DES) engine.
+
+
+ initialise a DESede cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ * Wrap keys according to
+ *
+ * draft-ietf-smime-key-wrap-01.txt .
+ *
+ * Note:
+ *
+ * this is based on a draft, and as such is subject to change - don't use this class for anything requiring long term storage.
+ * if you are using this to wrap triple-des keys you need to set the
+ * parity bits on the key and, if it's a two-key triple-des key, pad it
+ * yourself.
+ *
+ *
+
+
+ Field engine
+
+
+ Field param
+
+
+ Field paramPlusIV
+
+
+ Field iv
+
+
+ Field forWrapping
+
+
+ Field IV2
+
+
+ Method init
+
+ @param forWrapping
+ @param param
+
+
+ Method GetAlgorithmName
+
+ @return
+
+
+ Method wrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+
+
+ Method unwrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+ @throws InvalidCipherTextException
+
+
+ Some key wrap algorithms make use of the Key Checksum defined
+ in CMS [CMS-Algorithms]. This is used to provide an integrity
+ check value for the key being wrapped. The algorithm is
+
+ - Compute the 20 octet SHA-1 hash on the key being wrapped.
+ - Use the first 8 octets of this hash as the checksum value.
+
+ @param key
+ @return
+ @throws Exception
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ @param key
+ @param checksum
+ @return
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ A class that provides a basic DES engine.
+
+
+ initialise a DES cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ what follows is mainly taken from "Applied Cryptography", by
+ Bruce Schneier, however it also bears great resemblance to Richard
+ Outerbridge's D3DES...
+
+
+ Generate an integer based working key based on our secret key
+ and what we processing we are planning to do.
+
+ Acknowledgements for this routine go to James Gillogly and Phil Karn.
+ (whoever, and wherever they are!).
+
+
+ the DES engine.
+
+
+ this does your basic ElGamal algorithm.
+
+
+ initialise the ElGamal engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary ElGamal key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For ElGamal this is always one byte less than the size of P on
+ encryption, and twice the length as the size of P on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For ElGamal this is always one byte less than the size of P on
+ decryption, and twice the length as the size of P on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic ElGamal algorithm.
+
+ @param in the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param length the length of the data to be processed.
+ @return the result of the ElGamal process.
+ @exception DataLengthException the input block is too large.
+
+
+ implementation of GOST 28147-89
+
+
+ standard constructor.
+
+
+ initialise an Gost28147 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is inappropriate.
+
+
+ Return the S-Box associated with SBoxName
+ @param sBoxName name of the S-Box
+ @return byte array representing the S-Box
+
+
+ HC-128 is a software-efficient stream cipher created by Hongjun Wu. It
+ generates keystream from a 128-bit secret key and a 128-bit initialization
+ vector.
+
+ http://www.ecrypt.eu.org/stream/p3ciphers/hc/hc128_p3.pdf
+
+ It is a third phase candidate in the eStream contest, and is patent-free.
+ No attacks are known as of today (April 2007). See
+
+ http://www.ecrypt.eu.org/stream/hcp3.html
+
+
+
+ Initialise a HC-128 cipher.
+
+ @param forEncryption whether or not we are for encryption. Irrelevant, as
+ encryption and decryption are the same.
+ @param params the parameters required to set up the cipher.
+ @throws ArgumentException if the params argument is
+ inappropriate (ie. the key is not 128 bit long).
+
+
+ HC-256 is a software-efficient stream cipher created by Hongjun Wu. It
+ generates keystream from a 256-bit secret key and a 256-bit initialization
+ vector.
+
+ http://www.ecrypt.eu.org/stream/p3ciphers/hc/hc256_p3.pdf
+
+ Its brother, HC-128, is a third phase candidate in the eStream contest.
+ The algorithm is patent-free. No attacks are known as of today (April 2007).
+ See
+
+ http://www.ecrypt.eu.org/stream/hcp3.html
+
+
+
+ Initialise a HC-256 cipher.
+
+ @param forEncryption whether or not we are for encryption. Irrelevant, as
+ encryption and decryption are the same.
+ @param params the parameters required to set up the cipher.
+ @throws ArgumentException if the params argument is
+ inappropriate (ie. the key is not 256 bit long).
+
+
+ Implementation of Bob Jenkin's ISAAC (Indirection Shift Accumulate Add and Count).
+ see: http://www.burtleburtle.net/bob/rand/isaacafa.html
+
+
+ initialise an ISAAC cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ A class that provides a basic International Data Encryption Algorithm (IDEA) engine.
+
+ This implementation is based on the "HOWTO: INTERNATIONAL DATA ENCRYPTION ALGORITHM"
+ implementation summary by Fauzan Mirza (F.U.Mirza@sheffield.ac.uk). (baring 1 typo at the
+ end of the mulinv function!).
+
+
+ It can be found at ftp://ftp.funet.fi/pub/crypt/cryptography/symmetric/idea/
+
+
+ Note 1: This algorithm is patented in the USA, Japan, and Europe including
+ at least Austria, France, Germany, Italy, Netherlands, Spain, Sweden, Switzerland
+ and the United Kingdom. Non-commercial use is free, however any commercial
+ products are liable for royalties. Please see
+ www.mediacrypt.com for
+ further details. This announcement has been included at the request of
+ the patent holders.
+
+
+ Note 2: Due to the requests concerning the above, this algorithm is now only
+ included in the extended assembly. It is not included in the default distributions.
+
+
+
+ standard constructor.
+
+
+ initialise an IDEA cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return x = x * y where the multiplication is done modulo
+ 65537 (0x10001) (as defined in the IDEA specification) and
+ a zero input is taken to be 65536 (0x10000).
+
+ @param x the x value
+ @param y the y value
+ @return x = x * y
+
+
+ The following function is used to expand the user key to the encryption
+ subkey. The first 16 bytes are the user key, and the rest of the subkey
+ is calculated by rotating the previous 16 bytes by 25 bits to the left,
+ and so on until the subkey is completed.
+
+
+ This function computes multiplicative inverse using Euclid's Greatest
+ Common Divisor algorithm. Zero and one are self inverse.
+
+ i.e. x * MulInv(x) == 1 (modulo BASE)
+
+
+
+ Return the additive inverse of x.
+
+ i.e. x + AddInv(x) == 0
+
+
+
+ The function to invert the encryption subkey to the decryption subkey.
+ It also involves the multiplicative inverse and the additive inverse functions.
+
+
+ support class for constructing intergrated encryption ciphers
+ for doing basic message exchanges on top of key agreement ciphers
+
+
+ set up for use with stream mode, where the key derivation function
+ is used to provide a stream of bytes to xor with the message.
+
+ @param agree the key agreement used as the basis for the encryption
+ @param kdf the key derivation function used for byte generation
+ @param mac the message authentication code generator for the message
+
+
+ set up for use in conjunction with a block cipher to handle the
+ message.
+
+ @param agree the key agreement used as the basis for the encryption
+ @param kdf the key derivation function used for byte generation
+ @param mac the message authentication code generator for the message
+ @param cipher the cipher to used for encrypting the message
+
+
+ Initialise the encryptor.
+
+ @param forEncryption whether or not this is encryption/decryption.
+ @param privParam our private key parameters
+ @param pubParam the recipient's/sender's public key parameters
+ @param param encoding and derivation parameters.
+
+
+ NaccacheStern Engine. For details on this cipher, please see
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Initializes this algorithm. Must be called before all other Functions.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#init(bool,
+ org.bouncycastle.crypto.CipherParameters)
+
+
+ Returns the input block size of this algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#GetInputBlockSize()
+
+
+ Returns the output block size of this algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#GetOutputBlockSize()
+
+
+ Process a single Block using the Naccache-Stern algorithm.
+
+ @see org.bouncycastle.crypto.AsymmetricBlockCipher#ProcessBlock(byte[],
+ int, int)
+
+
+ Encrypts a BigInteger aka Plaintext with the public key.
+
+ @param plain
+ The BigInteger to encrypt
+ @return The byte[] representation of the encrypted BigInteger (i.e.
+ crypted.toByteArray())
+
+
+ Adds the contents of two encrypted blocks mod sigma
+
+ @param block1
+ the first encrypted block
+ @param block2
+ the second encrypted block
+ @return encrypt((block1 + block2) mod sigma)
+ @throws InvalidCipherTextException
+
+
+ Convenience Method for data exchange with the cipher.
+
+ Determines blocksize and splits data to blocksize.
+
+ @param data the data to be processed
+ @return the data after it went through the NaccacheSternEngine.
+ @throws InvalidCipherTextException
+
+
+ Computes the integer x that is expressed through the given primes and the
+ congruences with the chinese remainder theorem (CRT).
+
+ @param congruences
+ the congruences c_i
+ @param primes
+ the primes p_i
+ @return an integer x for that x % p_i == c_i
+
+
+ A Noekeon engine, using direct-key mode.
+
+
+ Create an instance of the Noekeon encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ The no-op engine that just copies bytes through, irrespective of whether encrypting and decrypting.
+ Provided for the sake of completeness.
+
+
+ an implementation of RC2 as described in RFC 2268
+ "A Description of the RC2(r) Encryption Algorithm" R. Rivest.
+
+
+ initialise a RC2 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the result rotating the 16 bit number in x left by y
+
+
+ Wrap keys according to RFC 3217 - RC2 mechanism
+
+
+ Field engine
+
+
+ Field param
+
+
+ Field paramPlusIV
+
+
+ Field iv
+
+
+ Field forWrapping
+
+
+ Field IV2
+
+
+ Method init
+
+ @param forWrapping
+ @param param
+
+
+ Method GetAlgorithmName
+
+ @return
+
+
+ Method wrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+
+
+ Method unwrap
+
+ @param in
+ @param inOff
+ @param inLen
+ @return
+ @throws InvalidCipherTextException
+
+
+ Some key wrap algorithms make use of the Key Checksum defined
+ in CMS [CMS-Algorithms]. This is used to provide an integrity
+ check value for the key being wrapped. The algorithm is
+
+ - Compute the 20 octet SHA-1 hash on the key being wrapped.
+ - Use the first 8 octets of this hash as the checksum value.
+
+ @param key
+ @return
+ @throws Exception
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ @param key
+ @param checksum
+ @return
+ @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
+
+
+ initialise a RC4 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ The specification for RC5 came from the RC5 Encryption Algorithm
+ publication in RSA CryptoBytes, Spring of 1995.
+ http://www.rsasecurity.com/rsalabs/cryptobytes .
+
+ This implementation has a word size of 32 bits.
+
+
+ Create an instance of the RC5 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-32 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Encrypt the given block starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param in in byte buffer containing data to encrypt
+ @param inOff offset into src buffer
+ @param out out buffer where encrypted data is written
+ @param outOff offset into out buffer
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(32) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % 32
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(32) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % 32
+
+
+ The specification for RC5 came from the RC5 Encryption Algorithm
+ publication in RSA CryptoBytes, Spring of 1995.
+ http://www.rsasecurity.com/rsalabs/cryptobytes .
+
+ This implementation is set to work with a 64 bit word size.
+
+
+ Create an instance of the RC5 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-64 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Encrypt the given block starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+
+ @param in in byte buffer containing data to encrypt
+ @param inOff offset into src buffer
+ @param out out buffer where encrypted data is written
+ @param outOff offset into out buffer
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ An RC6 engine.
+
+
+ Create an instance of the RC6 encryption algorithm
+ and set some defaults
+
+
+ initialise a RC5-32 cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param inKey the key to be used
+
+
+ Perform a left "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ Perform a right "spin" of the word. The rotation of the given
+ word x is rotated left by y bits.
+ Only the lg(wordSize) low-order bits of y
+ are used to determine the rotation amount. Here it is
+ assumed that the wordsize used is a power of 2.
+
+ @param x word to rotate
+ @param y number of bits to rotate % wordSize
+
+
+ an implementation of the RFC 3211 Key Wrap
+ Specification.
+
+
+
+ An implementation of the AES Key Wrapper from the NIST Key Wrap
+ Specification as described in RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc3394.txt
+ and http://csrc.nist.gov/encryption/kms/key-wrap.pdf .
+
+
+
+ this does your basic RSA algorithm with blinding
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic RSA algorithm.
+
+ @param inBuf the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @exception DataLengthException the input block is too large.
+
+
+ This does your basic RSA Chaum's blinding and unblinding as outlined in
+ "Handbook of Applied Cryptography", page 475. You need to use this if you are
+ trying to get another party to generate signatures without them being aware
+ of the message they are signing.
+
+
+ Initialise the blinding engine.
+
+ @param forEncryption true if we are encrypting (blinding), false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the RSA blinding algorithm.
+
+ @param in the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @throws DataLengthException the input block is too large.
+
+
+ this does your basic RSA algorithm.
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ an implementation of Rijndael, based on the documentation and reference implementation
+ by Paulo Barreto, Vincent Rijmen, for v2.0 August '99.
+
+ Note: this implementation is based on information prior to readonly NIST publication.
+
+
+
+ multiply two elements of GF(2^m)
+ needed for MixColumn and InvMixColumn
+
+
+ xor corresponding text input and round key input bytes
+
+
+ Row 0 remains unchanged
+ The other three rows are shifted a variable amount
+
+
+ Replace every byte of the input by the byte at that place
+ in the nonlinear S-box
+
+
+ Mix the bytes of every column in a linear way
+
+
+ Mix the bytes of every column in a linear way
+ This is the opposite operation of Mixcolumn
+
+
+ Calculate the necessary round keys
+ The number of calculations depends on keyBits and blockBits
+
+
+ default constructor - 128 bit block size.
+
+
+ basic constructor - set the cipher up for a given blocksize
+
+ @param blocksize the blocksize in bits, must be 128, 192, or 256.
+
+
+ initialise a Rijndael cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ this does your basic RSA algorithm.
+
+
+ initialise the RSA engine.
+
+ @param forEncryption true if we are encrypting, false otherwise.
+ @param param the necessary RSA key parameters.
+
+
+ Return the maximum size for an input block to this engine.
+ For RSA this is always one byte less than the key size on
+ encryption, and the same length as the key size on decryption.
+
+ @return maximum size for an input block.
+
+
+ Return the maximum size for an output block to this engine.
+ For RSA this is always one byte less than the key size on
+ decryption, and the same length as the key size on encryption.
+
+ @return maximum size for an output block.
+
+
+ Process a single block using the basic RSA algorithm.
+
+ @param inBuf the input array.
+ @param inOff the offset into the input buffer where the data starts.
+ @param inLen the length of the data to be processed.
+ @return the result of the RSA process.
+ @exception DataLengthException the input block is too large.
+
+
+ Implementation of the SEED algorithm as described in RFC 4009
+
+
+
+ An implementation of the SEED key wrapper based on RFC 4010/RFC 3394.
+
+ For further details see: http://www.ietf.org/rfc/rfc4010.txt .
+
+
+
+
+ Implementation of Daniel J. Bernstein's Salsa20 stream cipher, Snuffle 2005
+
+
+
+ Constants
+
+
+
+ Creates a 20 round Salsa20 engine.
+
+
+
+
+ Creates a Salsa20 engine with a specific number of rounds.
+
+ the number of rounds (must be an even number).
+
+
+ Rotate left
+
+ @param x value to rotate
+ @param y amount to rotate x
+
+ @return rotated x
+
+
+ * Serpent is a 128-bit 32-round block cipher with variable key lengths,
+ * including 128, 192 and 256 bit keys conjectured to be at least as
+ * secure as three-key triple-DES.
+ *
+ * Serpent was designed by Ross Anderson, Eli Biham and Lars Knudsen as a
+ * candidate algorithm for the NIST AES Quest.
+ *
+ *
+ * For full details see The Serpent home page
+ *
+
+
+ Expand a user-supplied key material into a session key.
+
+ @param key The user-key bytes (multiples of 4) to use.
+ @exception ArgumentException
+
+
+ Encrypt one block of plaintext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ Decrypt one block of ciphertext.
+
+ @param input the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param output the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+
+
+ a class that provides a basic SKIPJACK engine.
+
+
+ initialise a SKIPJACK cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ The G permutation
+
+
+ the inverse of the G permutation.
+
+
+ An TEA engine.
+
+
+ Create an instance of the TEA encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+
+ Implementation of the Threefish tweakable large block cipher in 256, 512 and 1024 bit block
+ sizes.
+
+
+ This is the 1.3 version of Threefish defined in the Skein hash function submission to the NIST
+ SHA-3 competition in October 2010.
+
+ Threefish was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+ This implementation inlines all round functions, unrolls 8 rounds, and uses 1.2k of static tables
+ to speed up key schedule injection.
+ 2 x block size state is retained by each cipher instance.
+
+
+
+
+ 256 bit block size - Threefish-256
+
+
+
+
+ 512 bit block size - Threefish-512
+
+
+
+
+ 1024 bit block size - Threefish-1024
+
+
+
+ Size of the tweak in bytes (always 128 bit/16 bytes)
+
+
+ Rounds in Threefish-256
+
+
+ Rounds in Threefish-512
+
+
+ Rounds in Threefish-1024
+
+
+ Max rounds of any of the variants
+
+
+ Key schedule parity constant
+
+
+ Block size in bytes
+
+
+ Block size in 64 bit words
+
+
+ Buffer for byte oriented processBytes to call internal word API
+
+
+ Tweak bytes (2 byte t1,t2, calculated t3 and repeat of t1,t2 for modulo free lookup
+
+
+ Key schedule words
+
+
+ The internal cipher implementation (varies by blocksize)
+
+
+
+ Constructs a new Threefish cipher, with a specified block size.
+
+ the block size in bits, one of , ,
+ .
+
+
+
+ Initialise the engine.
+
+ Initialise for encryption if true, for decryption if false.
+ an instance of or (to
+ use a 0 tweak)
+
+
+
+ Initialise the engine, specifying the key and tweak directly.
+
+ the cipher mode.
+ the words of the key, or null to use the current key.
+ the 2 word (128 bit) tweak, or null to use the current tweak.
+
+
+
+ Process a block of data represented as 64 bit words.
+
+ the number of 8 byte words processed (which will be the same as the block size).
+ a block sized buffer of words to process.
+ a block sized buffer of words to receive the output of the operation.
+ if either the input or output is not block sized
+ if this engine is not initialised
+
+
+
+ Read a single 64 bit word from input in LSB first order.
+
+
+
+
+ Write a 64 bit word to output in LSB first order.
+
+
+
+ Rotate left + xor part of the mix operation.
+
+
+ Rotate xor + rotate right part of the unmix operation.
+
+
+ The extended + repeated tweak words
+
+
+ The extended + repeated key words
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ Mix rotation constants defined in Skein 1.3 specification
+
+
+ A class that provides Twofish encryption operations.
+
+ This Java implementation is based on the Java reference
+ implementation provided by Bruce Schneier and developed
+ by Raif S. Naffah.
+
+
+ Define the fixed p0/p1 permutations used in keyed S-box lookup.
+ By changing the following constant definitions, the S-boxes will
+ automatically Get changed in the Twofish engine.
+
+
+ gSubKeys[] and gSBox[] are eventually used in the
+ encryption and decryption methods.
+
+
+ initialise a Twofish cipher.
+
+ @param forEncryption whether or not we are for encryption.
+ @param parameters the parameters required to set up the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+ encryptBlock uses the pre-calculated gSBox[] and subKey[]
+ arrays.
+
+
+ Decrypt the given input starting at the given offset and place
+ the result in the provided buffer starting at the given offset.
+ The input will be an exact multiple of our blocksize.
+
+
+ Use (12, 8) Reed-Solomon code over GF(256) to produce
+ a key S-box 32-bit entity from 2 key material 32-bit
+ entities.
+
+ @param k0 first 32-bit entity
+ @param k1 second 32-bit entity
+ @return Remainder polynomial Generated using RS code
+
+
+ * Reed-Solomon code parameters: (12,8) reversible code:
+ *
+ *
+ * G(x) = x^4 + (a+1/a)x^3 + ax^2 + (a+1/a)x + 1
+ *
+ * where a = primitive root of field generator 0x14D
+ *
+
+
+ initialise a VMPC cipher.
+
+ @param forEncryption
+ whether or not we are for encryption.
+ @param params
+ the parameters required to set up the cipher.
+ @exception ArgumentException
+ if the params argument is inappropriate.
+
+
+
+ Implementation of Daniel J. Bernstein's XSalsa20 stream cipher - Salsa20 with an extended nonce.
+
+
+ XSalsa20 requires a 256 bit key, and a 192 bit nonce.
+
+
+
+
+ XSalsa20 key generation: process 256 bit input key and 128 bits of the input nonce
+ using a core Salsa20 function without input addition to produce 256 bit working key
+ and use that with the remaining 64 bits of nonce to initialize a standard Salsa20 engine state.
+
+
+
+ An XTEA engine.
+
+
+ Create an instance of the TEA encryption algorithm
+ and set some defaults
+
+
+ initialise
+
+ @param forEncryption whether or not we are for encryption.
+ @param params the parameters required to set up the cipher.
+ @exception ArgumentException if the params argument is
+ inappropriate.
+
+
+ Re-key the cipher.
+
+ @param key the key to be used
+
+
+ Base interface for a public/private key block cipher.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The maximum size, in bytes, an input block may be.
+
+
+ The maximum size, in bytes, an output block will be.
+
+
+ Process a block.
+ The input buffer.
+ The offset into inBuf that the input block begins.
+ The length of the input block.
+ Input decrypts improperly.
+ Input is too large for the cipher.
+
+
+ interface that a public/private key pair generator should conform to.
+
+
+ intialise the key pair generator.
+
+ @param the parameters the key pair is to be initialised with.
+
+
+ return an AsymmetricCipherKeyPair containing the Generated keys.
+
+ @return an AsymmetricCipherKeyPair containing the Generated keys.
+
+
+ The basic interface that basic Diffie-Hellman implementations
+ conforms to.
+
+
+ initialise the agreement engine.
+
+
+ return the field size for the agreement algorithm in bytes.
+
+
+ given a public key from a given party calculate the next
+ message in the agreement sequence.
+
+
+ Base interface for a symmetric key block cipher.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The block size for this cipher, in bytes.
+
+
+ Indicates whether this cipher can handle partial blocks.
+
+
+ Process a block.
+ The input buffer.
+ The offset into inBuf that the input block begins.
+ The output buffer.
+ The offset into outBuf to write the output block.
+ If input block is wrong size, or outBuf too small.
+ The number of bytes processed and produced.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+
+ Operators that reduce their input to a single block return an object
+ of this type.
+
+
+
+
+ Return the final result of the operation.
+
+ A block of bytes, representing the result of an operation.
+
+
+
+ Store the final result of the operation by copying it into the destination array.
+
+ The number of bytes copied into destination.
+ The byte array to copy the result into.
+ The offset into destination to start copying the result at.
+
+
+ Block cipher engines are expected to conform to this interface.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ If true the cipher is initialised for encryption,
+ if false for decryption.
+ The key and other data required by the cipher.
+
+
+
+ Reset the cipher. After resetting the cipher is in the same state
+ as it was after the last init (if there was one).
+
+
+
+ all parameter classes implement this.
+
+
+ interface for classes implementing the Digital Signature Algorithm
+
+
+ initialise the signer for signature generation or signature
+ verification.
+
+ @param forSigning true if we are generating a signature, false
+ otherwise.
+ @param param key parameters for signature generation.
+
+
+ sign the passed in message (usually the output of a hash function).
+
+ @param message the message to be signed.
+ @return two big integers representing the r and s values respectively.
+
+
+ verify the message message against the signature values r and s.
+
+ @param message the message that was supposed to have been signed.
+ @param r the r signature value.
+ @param s the s signature value.
+
+
+ base interface for general purpose byte derivation functions.
+
+
+ return the message digest used as the basis for the function
+
+
+ Parameters for key/byte stream derivation classes
+
+
+ interface that a message digest conforms to.
+
+
+ return the algorithm name
+
+ @return the algorithm name
+
+
+ return the size, in bytes, of the digest produced by this message digest.
+
+ @return the size, in bytes, of the digest produced by this message digest.
+
+
+ return the size, in bytes, of the internal buffer used by this digest.
+
+ @return the size, in bytes, of the internal buffer used by this digest.
+
+
+ update the message digest with a single byte.
+
+ @param inByte the input byte to be entered.
+
+
+ update the message digest with a block of bytes.
+
+ @param input the byte array containing the data.
+ @param inOff the offset into the byte array where the data starts.
+ @param len the length of the data.
+
+
+ Close the digest, producing the final digest value. The doFinal
+ call leaves the digest reset.
+
+ @param output the array the digest is to be copied into.
+ @param outOff the offset into the out array the digest is to start at.
+
+
+ reset the digest back to it's initial state.
+
+
+
+ Base interface describing an entropy source for a DRBG.
+
+
+
+
+ Return whether or not this entropy source is regarded as prediction resistant.
+
+ true if this instance is prediction resistant; otherwise, false .
+
+
+
+ Return a byte array of entropy.
+
+ The entropy bytes.
+
+
+
+ Return the number of bits of entropy this source can produce.
+
+ The size, in bits, of the return value of getEntropy.
+
+
+
+ Base interface describing a provider of entropy sources.
+
+
+
+
+ Return an entropy source providing a block of entropy.
+
+ The size of the block of entropy required.
+ An entropy source providing bitsRequired blocks of entropy.
+
+
+ The base interface for implementations of message authentication codes (MACs).
+
+
+ Initialise the MAC.
+
+ @param param the key and other data required by the MAC.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Return the name of the algorithm the MAC implements.
+
+ @return the name of the algorithm the MAC implements.
+
+
+ Return the block size for this MAC (in bytes).
+
+ @return the block size for this MAC in bytes.
+
+
+ add a single byte to the mac for processing.
+
+ @param in the byte to be processed.
+ @exception InvalidOperationException if the MAC is not initialised.
+
+
+ @param in the array containing the input.
+ @param inOff the index in the array the data begins at.
+ @param len the length of the input starting at inOff.
+ @exception InvalidOperationException if the MAC is not initialised.
+ @exception DataLengthException if there isn't enough data in in.
+
+
+ Compute the final stage of the MAC writing the output to the out
+ parameter.
+
+ doFinal leaves the MAC in the same state it was after the last init.
+
+ @param out the array the MAC is to be output to.
+ @param outOff the offset into the out buffer the output is to start at.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the MAC is not initialised.
+
+
+ Reset the MAC. At the end of resetting the MAC should be in the
+ in the same state it was after the last init (if there was one).
+
+
+
+ Base interface for operators that serve as stream-based signature calculators.
+
+
+
+ The algorithm details object for this calculator.
+
+
+
+ Create a stream calculator for this signature calculator. The stream
+ calculator is used for the actual operation of entering the data to be signed
+ and producing the signature block.
+
+ A calculator producing an IBlockResult with a signature in it.
+
+
+
+ Base interface for cryptographic operations such as Hashes, MACs, and Signatures which reduce a stream of data
+ to a single value.
+
+
+
+ Return a "sink" stream which only exists to update the implementing object.
+ A stream to write to in order to update the implementing object.
+
+
+
+ Return the result of processing the stream. This value is only available once the stream
+ has been closed.
+
+ The result of processing the stream.
+
+
+ Return the name of the algorithm the signer implements.
+
+ @return the name of the algorithm the signer implements.
+
+
+ Initialise the signer for signing or verification.
+
+ @param forSigning true if for signing, false otherwise
+ @param param necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+ reset the internal state
+
+
+ Signer with message recovery.
+
+
+ Returns true if the signer has recovered the full message as
+ part of signature verification.
+
+ @return true if full message recovered.
+
+
+ Returns a reference to what message was recovered (if any).
+
+ @return full/partial message, null if nothing.
+
+
+ Perform an update with the recovered message before adding any other data. This must
+ be the first update method called, and calling it will result in the signer assuming
+ that further calls to update will include message content past what is recoverable.
+
+ @param signature the signature that we are in the process of verifying.
+ @throws IllegalStateException
+
+
+ The interface stream ciphers conform to.
+
+
+ The name of the algorithm this cipher implements.
+
+
+ Initialise the cipher.
+ If true the cipher is initialised for encryption,
+ if false for decryption.
+ The key and other data required by the cipher.
+
+ If the parameters argument is inappropriate.
+
+
+
+ encrypt/decrypt a single byte returning the result.
+ the byte to be processed.
+ the result of processing the input byte.
+
+
+
+ Process a block of bytes from input putting the result into output .
+
+ The input byte array.
+
+ The offset into input where the data to be processed starts.
+
+ The number of bytes to be processed.
+ The output buffer the processed bytes go into.
+
+ The offset into output the processed data starts at.
+
+ If the output buffer is too small.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+
+ Operators that reduce their input to the validation of a signature produce this type.
+
+
+
+
+ Return true if the passed in data matches what is expected by the verification result.
+
+ The bytes representing the signature.
+ true if the signature verifies, false otherwise.
+
+
+
+ Return true if the length bytes from off in the source array match the signature
+ expected by the verification result.
+
+ Byte array containing the signature.
+ The offset into the source array where the signature starts.
+ The number of bytes in source making up the signature.
+ true if the signature verifies, false otherwise.
+
+
+
+ Base interface for operators that serve as stream-based signature verifiers.
+
+
+
+ The algorithm details object for this verifier.
+
+
+
+ Create a stream calculator for this verifier. The stream
+ calculator is used for the actual operation of entering the data to be verified
+ and producing a result which can be used to verify the original signature.
+
+ A calculator producing an IVerifier which can verify the signature.
+
+
+
+ Base interface for a provider to support the dynamic creation of signature verifiers.
+
+
+
+
+ Return a signature verfier for signature algorithm described in the passed in algorithm details object.
+
+ The details of the signature algorithm verification is required for.
+ A new signature verifier.
+
+
+ The name of the algorithm this cipher implements.
+
+
+
+ With FIPS PUB 202 a new kind of message digest was announced which supported extendable output, or variable digest sizes.
+ This interface provides the extra method required to support variable output on a digest implementation.
+
+
+
+ Output the results of the final calculation for this digest to outLen number of bytes.
+
+ @param out output array to write the output bytes to.
+ @param outOff offset to start writing the bytes at.
+ @param outLen the number of output bytes requested.
+ @return the number of bytes written
+
+
+ this exception is thrown whenever we find something we don't expect in a
+ message.
+
+
+ base constructor.
+
+
+ create a InvalidCipherTextException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+ The base class for parameters to key generators.
+
+
+ initialise the generator with a source of randomness
+ and a strength (in bits).
+
+ @param random the random byte source.
+ @param strength the size, in bits, of the keys we want to produce.
+
+
+ return the random source associated with this
+ generator.
+
+ @return the generators random source.
+
+
+ return the bit strength for keys produced by this generator,
+
+ @return the strength of the keys this generator produces (in bits).
+
+
+
+ This exception is thrown whenever a cipher requires a change of key, iv
+ or similar after x amount of bytes enciphered
+
+
+
+ super class for all Password Based Encyrption (Pbe) parameter generator classes.
+
+
+ base constructor.
+
+
+ initialise the Pbe generator.
+
+ @param password the password converted into bytes (see below).
+ @param salt the salt to be mixed with the password.
+ @param iterationCount the number of iterations the "mixing" function
+ is to be applied for.
+
+
+ return the password byte array.
+
+ @return the password byte array.
+
+
+ return the salt byte array.
+
+ @return the salt byte array.
+
+
+ return the iteration count.
+
+ @return the iteration count.
+
+
+ Generate derived parameters for a key of length keySize.
+
+ @param keySize the length, in bits, of the key required.
+ @return a parameters object representing a key.
+
+
+ Generate derived parameters for a key of length keySize, and
+ an initialisation vector (IV) of length ivSize.
+
+ @param keySize the length, in bits, of the key required.
+ @param ivSize the length, in bits, of the iv required.
+ @return a parameters object representing a key and an IV.
+
+
+ Generate derived parameters for a key of length keySize, specifically
+ for use with a MAC.
+
+ @param keySize the length, in bits, of the key required.
+ @return a parameters object representing a key.
+
+
+ converts a password to a byte array according to the scheme in
+ Pkcs5 (ascii, no padding)
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ converts a password to a byte array according to the scheme in
+ PKCS5 (UTF-8, no padding)
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ converts a password to a byte array according to the scheme in
+ Pkcs12 (unicode, big endian, 2 zero pad bytes at the end).
+
+ @param password a character array representing the password.
+ @return a byte array representing the password.
+
+
+ An EntropySourceProvider where entropy generation is based on a SecureRandom output using SecureRandom.generateSeed().
+
+
+ Create a entropy source provider based on the passed in SecureRandom.
+
+ @param secureRandom the SecureRandom to base EntropySource construction on.
+ @param isPredictionResistant boolean indicating if the SecureRandom is based on prediction resistant entropy or not (true if it is).
+
+
+ Return an entropy source that will create bitsRequired bits of entropy on
+ each invocation of getEntropy().
+
+ @param bitsRequired size (in bits) of entropy to be created by the provided source.
+ @return an EntropySource that generates bitsRequired bits of entropy on each call to its getEntropy() method.
+
+
+ A SP800-90A CTR DRBG.
+
+
+ Construct a SP800-90A CTR DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param engine underlying block cipher to use to support DRBG
+ @param keySizeInBits size of the key to use with the block cipher.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each internal round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Pad out a key for TDEA, setting odd parity for each byte.
+
+ @param keyMaster
+ @param keyOff
+ @param tmp
+ @param tmpOff
+
+
+ Used by both Dual EC and Hash.
+
+
+ A SP800-90A Hash DRBG.
+
+
+ Construct a SP800-90A Hash DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param digest source digest to use for DRB stream.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each internal round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ A SP800-90A HMAC DRBG.
+
+
+ Construct a SP800-90A Hash DRBG.
+
+ Minimum entropy requirement is the security strength requested.
+
+ @param hMac Hash MAC to base the DRBG on.
+ @param securityStrength security strength required (in bits)
+ @param entropySource source of entropy to use for seeding/reseeding.
+ @param personalizationString personalization string to distinguish this DRBG (may be null).
+ @param nonce nonce to further distinguish this DRBG (may be null).
+
+
+ Return the block size (in bits) of the DRBG.
+
+ @return the number of bits produced on each round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Interface to SP800-90A deterministic random bit generators.
+
+
+ Return the block size of the DRBG.
+
+ @return the block size (in bits) produced by each round of the DRBG.
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param additionalInput additional input to be added to the DRBG in this step.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the DRBG.
+
+ @param additionalInput additional input to be added to the DRBG in this step.
+
+
+ Generate numBytes worth of entropy from the passed in entropy source.
+
+ @param entropySource the entropy source to request the data from.
+ @param numBytes the number of bytes of entropy requested.
+ @return a byte array populated with the random data.
+
+
+ Builder class for making SecureRandom objects based on SP 800-90A Deterministic Random Bit Generators (DRBG).
+
+
+ Basic constructor, creates a builder using an EntropySourceProvider based on the default SecureRandom with
+ predictionResistant set to false.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the default SecureRandom does for its generateSeed() call.
+
+
+
+ Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value
+ for prediction resistance.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the passed in SecureRandom does for its generateSeed() call.
+
+ @param entropySource
+ @param predictionResistant
+
+
+ Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.
+
+ Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored.
+
+ @param entropySourceProvider a provider of EntropySource objects.
+
+
+ Set the personalization string for DRBG SecureRandoms created by this builder
+ @param personalizationString the personalisation string for the underlying DRBG.
+ @return the current builder.
+
+
+ Set the security strength required for DRBGs used in building SecureRandom objects.
+
+ @param securityStrength the security strength (in bits)
+ @return the current builder.
+
+
+ Set the amount of entropy bits required for seeding and reseeding DRBGs used in building SecureRandom objects.
+
+ @param entropyBitsRequired the number of bits of entropy to be requested from the entropy source on each seed/reseed.
+ @return the current builder.
+
+
+ Build a SecureRandom based on a SP 800-90A Hash DRBG.
+
+ @param digest digest algorithm to use in the DRBG underneath the SecureRandom.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a Hash DRBG.
+
+
+ Build a SecureRandom based on a SP 800-90A CTR DRBG.
+
+ @param cipher the block cipher to base the DRBG on.
+ @param keySizeInBits key size in bits to be used with the block cipher.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a CTR DRBG.
+
+
+ Build a SecureRandom based on a SP 800-90A HMAC DRBG.
+
+ @param hMac HMAC algorithm to use in the DRBG underneath the SecureRandom.
+ @param nonce nonce value to use in DRBG construction.
+ @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes.
+ @return a SecureRandom supported by a HMAC DRBG.
+
+
+
+ @param engine
+ @param entropySource
+
+
+ Populate a passed in array with random data.
+
+ @param output output array for generated bits.
+ @param predictionResistant true if a reseed should be forced, false otherwise.
+
+ @return number of bits generated, -1 if a reseed required.
+
+
+ Reseed the RNG.
+
+
+ Basic constructor, creates a builder using an EntropySourceProvider based on the default SecureRandom with
+ predictionResistant set to false.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the default SecureRandom does for its generateSeed() call.
+
+
+
+ Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value
+ for prediction resistance.
+
+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if
+ the passed in SecureRandom does for its generateSeed() call.
+
+ @param entropySource
+ @param predictionResistant
+
+
+ Create a builder which makes creates the SecureRandom objects from a specified entropy source provider.
+
+ Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored.
+
+ @param entropySourceProvider a provider of EntropySource objects.
+
+
+ Construct a X9.31 secure random generator using the passed in engine and key. If predictionResistant is true the
+ generator will be reseeded on each request.
+
+ @param engine a block cipher to use as the operator.
+ @param key the block cipher key to initialise engine with.
+ @param predictionResistant true if engine to be reseeded on each use, false otherwise.
+ @return a SecureRandom.
+
+
+
+ Uses Microsoft's RNGCryptoServiceProvider
+
+
+
+ Random generation based on the digest with counter. Calling AddSeedMaterial will
+ always increase the entropy of the hash.
+
+ Internal access to the digest is synchronized so a single one of these can be shared.
+
+
+
+ Generic interface for objects generating random bytes.
+
+
+ Add more seed material to the generator.
+ A byte array to be mixed into the generator's state.
+
+
+ Add more seed material to the generator.
+ A long value to be mixed into the generator's state.
+
+
+ Fill byte array with random values.
+ Array to be filled.
+
+
+ Fill byte array with random values.
+ Array to receive bytes.
+ Index to start filling at.
+ Length of segment to fill.
+
+
+
+ Takes bytes generated by an underling RandomGenerator and reverses the order in
+ each small window (of configurable size).
+
+ Access to internals is synchronized so a single one of these can be shared.
+
+
+
+
+ Add more seed material to the generator.
+ A byte array to be mixed into the generator's state.
+
+
+ Add more seed material to the generator.
+ A long value to be mixed into the generator's state.
+
+
+ Fill byte array with random values.
+ Array to be filled.
+
+
+ Fill byte array with random values.
+ Array to receive bytes.
+ Index to start filling at.
+ Length of segment to fill.
+
+
+ A thread based seed generator - one source of randomness.
+
+ Based on an idea from Marcus Lippert.
+
+
+
+ Generate seed bytes. Set fast to false for best quality.
+
+ If fast is set to true, the code should be round about 8 times faster when
+ generating a long sequence of random bytes. 20 bytes of random values using
+ the fast mode take less than half a second on a Nokia e70. If fast is set to false,
+ it takes round about 2500 ms.
+
+ @param numBytes the number of bytes to generate
+ @param fast true if fast mode should be used
+
+
+
+ Permutation generated by code:
+
+ // First 1850 fractional digit of Pi number.
+ byte[] key = new BigInteger("14159265358979323846...5068006422512520511").ToByteArray();
+ s = 0;
+ P = new byte[256];
+ for (int i = 0; i < 256; i++)
+ {
+ P[i] = (byte) i;
+ }
+ for (int m = 0; m < 768; m++)
+ {
+ s = P[(s + P[m & 0xff] + key[m % key.length]) & 0xff];
+ byte temp = P[m & 0xff];
+ P[m & 0xff] = P[s & 0xff];
+ P[s & 0xff] = temp;
+ }
+
+
+
+ Value generated in the same way as P .
+
+
+ a wrapper for block ciphers with a single byte block size, so that they
+ can be treated like stream ciphers.
+
+
+ basic constructor.
+
+ @param cipher the block cipher to be wrapped.
+ @exception ArgumentException if the cipher has a block size other than
+ one.
+
+
+ initialise the underlying cipher.
+
+ @param forEncryption true if we are setting up for encryption, false otherwise.
+ @param param the necessary parameters for the underlying cipher to be initialised.
+
+
+ return the name of the algorithm we are wrapping.
+
+ @return the name of the algorithm we are wrapping.
+
+
+ encrypt/decrypt a single byte returning the result.
+
+ @param in the byte to be processed.
+ @return the result of processing the input byte.
+
+
+ process a block of bytes from in putting the result into out.
+
+ @param in the input byte array.
+ @param inOff the offset into the in array where the data to be processed starts.
+ @param len the number of bytes to be processed.
+ @param out the output buffer the processed bytes go into.
+ @param outOff the offset into the output byte array the processed data stars at.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ reset the underlying cipher. This leaves it in the same state
+ it was at after the last init (if there was one).
+
+
+ a Diffie-Hellman key exchange engine.
+
+ note: This uses MTI/A0 key agreement in order to make the key agreement
+ secure against passive attacks. If you're doing Diffie-Hellman and both
+ parties have long term public keys you should look at using this. For
+ further information have a look at RFC 2631.
+
+ It's possible to extend this to more than two parties as well, for the moment
+ that is left as an exercise for the reader.
+
+
+ calculate our initial message.
+
+
+ given a message from a given party and the corresponding public key
+ calculate the next message in the agreement sequence. In this case
+ this will represent the shared secret.
+
+
+ a Diffie-Hellman key agreement class.
+
+ note: This is only the basic algorithm, it doesn't take advantage of
+ long term public keys if they are available. See the DHAgreement class
+ for a "better" implementation.
+
+
+ given a short term public key from a given party calculate the next
+ message in the agreement sequence.
+
+
+ Standard Diffie-Hellman groups from various IETF specifications.
+
+
+ P1363 7.2.1 ECSVDP-DH
+
+ ECSVDP-DH is Elliptic Curve Secret Value Derivation Primitive,
+ Diffie-Hellman version. It is based on the work of [DH76], [Mil86],
+ and [Kob87]. This primitive derives a shared secret value from one
+ party's private key and another party's public key, where both have
+ the same set of EC domain parameters. If two parties correctly
+ execute this primitive, they will produce the same output. This
+ primitive can be invoked by a scheme to derive a shared secret key;
+ specifically, it may be used with the schemes ECKAS-DH1 and
+ DL/ECKAS-DH2. It assumes that the input keys are valid (see also
+ Section 7.2.2).
+
+
+ P1363 7.2.2 ECSVDP-DHC
+
+ ECSVDP-DHC is Elliptic Curve Secret Value Derivation Primitive,
+ Diffie-Hellman version with cofactor multiplication. It is based on
+ the work of [DH76], [Mil86], [Kob87], [LMQ98] and [Kal98a]. This
+ primitive derives a shared secret value from one party's private key
+ and another party's public key, where both have the same set of EC
+ domain parameters. If two parties correctly execute this primitive,
+ they will produce the same output. This primitive can be invoked by a
+ scheme to derive a shared secret key; specifically, it may be used
+ with the schemes ECKAS-DH1 and DL/ECKAS-DH2. It does not assume the
+ validity of the input public key (see also Section 7.2.1).
+
+ Note: As stated P1363 compatibility mode with ECDH can be preset, and
+ in this case the implementation doesn't have a ECDH compatibility mode
+ (if you want that just use ECDHBasicAgreement and note they both implement
+ BasicAgreement!).
+
+
+
+ A participant in a Password Authenticated Key Exchange by Juggling (J-PAKE) exchange.
+
+ The J-PAKE exchange is defined by Feng Hao and Peter Ryan in the paper
+
+ "Password Authenticated Key Exchange by Juggling, 2008."
+
+ The J-PAKE protocol is symmetric.
+ There is no notion of a client or server , but rather just two participants .
+ An instance of JPakeParticipant represents one participant, and
+ is the primary interface for executing the exchange.
+
+ To execute an exchange, construct a JPakeParticipant on each end,
+ and call the following 7 methods
+ (once and only once, in the given order, for each participant, sending messages between them as described):
+
+ CreateRound1PayloadToSend() - and send the payload to the other participant
+ ValidateRound1PayloadReceived(JPakeRound1Payload) - use the payload received from the other participant
+ CreateRound2PayloadToSend() - and send the payload to the other participant
+ ValidateRound2PayloadReceived(JPakeRound2Payload) - use the payload received from the other participant
+ CalculateKeyingMaterial()
+ CreateRound3PayloadToSend(BigInteger) - and send the payload to the other participant
+ ValidateRound3PayloadReceived(JPakeRound3Payload, BigInteger) - use the payload received from the other participant
+
+ Each side should derive a session key from the keying material returned by CalculateKeyingMaterial().
+ The caller is responsible for deriving the session key using a secure key derivation function (KDF).
+
+ Round 3 is an optional key confirmation process.
+ If you do not execute round 3, then there is no assurance that both participants are using the same key.
+ (i.e. if the participants used different passwords, then their session keys will differ.)
+
+ If the round 3 validation succeeds, then the keys are guaranteed to be the same on both sides.
+
+ The symmetric design can easily support the asymmetric cases when one party initiates the communication.
+ e.g. Sometimes the round1 payload and round2 payload may be sent in one pass.
+ Also, in some cases, the key confirmation payload can be sent together with the round2 payload.
+ These are the trivial techniques to optimize the communication.
+
+ The key confirmation process is implemented as specified in
+ NIST SP 800-56A Revision 1 ,
+ Section 8.2 Unilateral Key Confirmation for Key Agreement Schemes.
+
+ This class is stateful and NOT threadsafe.
+ Each instance should only be used for ONE complete J-PAKE exchange
+ (i.e. a new JPakeParticipant should be constructed for each new J-PAKE exchange).
+
+
+
+
+ Convenience constructor for a new JPakeParticipant that uses
+ the JPakePrimeOrderGroups#NIST_3072 prime order group,
+ a SHA-256 digest, and a default SecureRandom implementation.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+
+
+
+ Convenience constructor for a new JPakeParticipant that uses
+ a SHA-256 digest, and a default SecureRandom implementation.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+ Prime order group. See JPakePrimeOrderGroups for standard groups.
+
+
+
+ Constructor for a new JPakeParticipant.
+
+ After construction, the State state will be STATE_INITIALIZED.
+
+ Throws NullReferenceException if any argument is null. Throws
+ ArgumentException if password is empty.
+
+ Unique identifier of this participant.
+ The two participants in the exchange must NOT share the same id.
+ Shared secret.
+ A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called).
+ Caller should clear the input password as soon as possible.
+ Prime order group. See JPakePrimeOrderGroups for standard groups.
+ Digest to use during zero knowledge proofs and key confirmation
+ (SHA-256 or stronger preferred).
+ Source of secure random data for x1 and x2, and for the zero knowledge proofs.
+
+
+
+ Gets the current state of this participant.
+ See the STATE_* constants for possible values.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 1.
+
+ After execution, the State state} will be STATE_ROUND_1_CREATED}.
+
+
+
+
+ Validates the payload received from the other participant during round 1.
+
+ Must be called prior to CreateRound2PayloadToSend().
+
+ After execution, the State state will be STATE_ROUND_1_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws InvalidOperationException
+ if called multiple times.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 2.
+
+ ValidateRound1PayloadReceived(JPakeRound1Payload) must be called prior to this method.
+
+ After execution, the State state will be STATE_ROUND_2_CREATED.
+
+ Throws InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times
+
+
+
+
+ Validates the payload received from the other participant during round 2.
+ Note that this DOES NOT detect a non-common password.
+ The only indication of a non-common password is through derivation
+ of different keys (which can be detected explicitly by executing round 3 and round 4)
+
+ Must be called prior to CalculateKeyingMaterial().
+
+ After execution, the State state will be STATE_ROUND_2_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws
+ InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times
+
+
+
+
+ Calculates and returns the key material.
+ A session key must be derived from this key material using a secure key derivation function (KDF).
+ The KDF used to derive the key is handled externally (i.e. not by JPakeParticipant).
+
+ The keying material will be identical for each participant if and only if
+ each participant's password is the same. i.e. If the participants do not
+ share the same password, then each participant will derive a different key.
+ Therefore, if you immediately start using a key derived from
+ the keying material, then you must handle detection of incorrect keys.
+ If you want to handle this detection explicitly, you can optionally perform
+ rounds 3 and 4. See JPakeParticipant for details on how to execute
+ rounds 3 and 4.
+
+ The keying material will be in the range [0, p-1] .
+
+ ValidateRound2PayloadReceived(JPakeRound2Payload) must be called prior to this method.
+
+ As a side effect, the internal password array is cleared, since it is no longer needed.
+
+ After execution, the State state will be STATE_KEY_CALCULATED.
+
+ Throws InvalidOperationException if called prior to ValidateRound2PayloadReceived(JPakeRound2Payload),
+ or if called multiple times.
+
+
+
+
+ Creates and returns the payload to send to the other participant during round 3.
+
+ See JPakeParticipant for more details on round 3.
+
+ After execution, the State state} will be STATE_ROUND_3_CREATED.
+ Throws InvalidOperationException if called prior to CalculateKeyingMaterial, or multiple
+ times.
+
+ The keying material as returned from CalculateKeyingMaterial().
+
+
+
+ Validates the payload received from the other participant during round 3.
+
+ See JPakeParticipant for more details on round 3.
+
+ After execution, the State state will be STATE_ROUND_3_VALIDATED.
+
+ Throws CryptoException if validation fails. Throws InvalidOperationException if called prior to
+ CalculateKeyingMaterial or multiple times
+
+ The round 3 payload received from the other participant.
+ The keying material as returned from CalculateKeyingMaterial().
+
+
+
+ A pre-computed prime order group for use during a J-PAKE exchange.
+
+ Typically a Schnorr group is used. In general, J-PAKE can use any prime order group
+ that is suitable for public key cryptography, including elliptic curve cryptography.
+
+ See JPakePrimeOrderGroups for convenient standard groups.
+
+ NIST publishes
+ many groups that can be used for the desired level of security.
+
+
+
+
+ Constructs a new JPakePrimeOrderGroup.
+
+ In general, you should use one of the pre-approved groups from
+ JPakePrimeOrderGroups, rather than manually constructing one.
+
+ The following basic checks are performed:
+
+ p-1 must be evenly divisible by q
+ g must be in [2, p-1]
+ g^q mod p must equal 1
+ p must be prime (within reasonably certainty)
+ q must be prime (within reasonably certainty)
+
+ The prime checks are performed using BigInteger#isProbablePrime(int),
+ and are therefore subject to the same probability guarantees.
+
+ These checks prevent trivial mistakes.
+ However, due to the small uncertainties if p and q are not prime,
+ advanced attacks are not prevented.
+ Use it at your own risk.
+
+ Throws NullReferenceException if any argument is null. Throws
+ InvalidOperationException is any of the above validations fail.
+
+
+
+
+ Constructor used by the pre-approved groups in JPakePrimeOrderGroups.
+ These pre-approved groups can avoid the expensive checks.
+ User-specified groups should not use this constructor.
+
+
+
+
+ Standard pre-computed prime order groups for use by J-PAKE.
+ (J-PAKE can use pre-computed prime order groups, same as DSA and Diffie-Hellman.)
+
+ This class contains some convenient constants for use as input for
+ constructing {@link JPAKEParticipant}s.
+
+ The prime order groups below are taken from Sun's JDK JavaDoc (docs/guide/security/CryptoSpec.html#AppB),
+ and from the prime order groups
+ published by NIST .
+
+
+
+
+ From Sun's JDK JavaDoc (docs/guide/security/CryptoSpec.html#AppB)
+ 1024-bit p, 160-bit q and 1024-bit g for 80-bit security.
+
+
+
+
+ From NIST.
+ 2048-bit p, 224-bit q and 2048-bit g for 112-bit security.
+
+
+
+
+ From NIST.
+ 3072-bit p, 256-bit q and 3072-bit g for 128-bit security.
+
+
+
+
+ The payload sent/received during the first round of a J-PAKE exchange.
+
+ Each JPAKEParticipant creates and sends an instance of this payload to
+ the other. The payload to send should be created via
+ JPAKEParticipant.CreateRound1PayloadToSend().
+
+ Each participant must also validate the payload received from the other.
+ The received payload should be validated via
+ JPAKEParticipant.ValidateRound1PayloadReceived(JPakeRound1Payload).
+
+
+
+
+ The id of the JPAKEParticipant who created/sent this payload.
+
+
+
+
+ The value of g^x1
+
+
+
+
+ The value of g^x2
+
+
+
+
+ The zero knowledge proof for x1.
+
+ This is a two element array, containing {g^v, r} for x1.
+
+
+
+
+ The zero knowledge proof for x2.
+
+ This is a two element array, containing {g^v, r} for x2.
+
+
+
+
+ The payload sent/received during the second round of a J-PAKE exchange.
+
+ Each JPAKEParticipant creates and sends an instance
+ of this payload to the other JPAKEParticipant.
+ The payload to send should be created via
+ JPAKEParticipant#createRound2PayloadToSend()
+
+ Each JPAKEParticipant must also validate the payload
+ received from the other JPAKEParticipant.
+ The received payload should be validated via
+ JPAKEParticipant#validateRound2PayloadReceived(JPakeRound2Payload)
+
+
+
+
+ The id of the JPAKEParticipant who created/sent this payload.
+
+
+
+
+ The value of A, as computed during round 2.
+
+
+
+
+ The zero knowledge proof for x2 * s.
+
+ This is a two element array, containing {g^v, r} for x2 * s.
+
+
+
+
+ The payload sent/received during the optional third round of a J-PAKE exchange,
+ which is for explicit key confirmation.
+
+ Each JPAKEParticipant creates and sends an instance
+ of this payload to the other JPAKEParticipant.
+ The payload to send should be created via
+ JPAKEParticipant#createRound3PayloadToSend(BigInteger)
+
+ Eeach JPAKEParticipant must also validate the payload
+ received from the other JPAKEParticipant.
+ The received payload should be validated via
+ JPAKEParticipant#validateRound3PayloadReceived(JPakeRound3Payload, BigInteger)
+
+
+
+
+ The id of the {@link JPAKEParticipant} who created/sent this payload.
+
+
+
+
+ The value of MacTag, as computed by round 3.
+
+ See JPAKEUtil#calculateMacTag(string, string, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, org.bouncycastle.crypto.Digest)
+
+
+
+
+ Primitives needed for a J-PAKE exchange.
+
+ The recommended way to perform a J-PAKE exchange is by using
+ two JPAKEParticipants. Internally, those participants
+ call these primitive operations in JPakeUtilities.
+
+ The primitives, however, can be used without a JPAKEParticipant if needed.
+
+
+
+
+ Return a value that can be used as x1 or x3 during round 1.
+ The returned value is a random value in the range [0, q-1].
+
+
+
+
+ Return a value that can be used as x2 or x4 during round 1.
+ The returned value is a random value in the range [1, q-1].
+
+
+
+
+ Converts the given password to a BigInteger
+ for use in arithmetic calculations.
+
+
+
+
+ Calculate g^x mod p as done in round 1.
+
+
+
+
+ Calculate ga as done in round 2.
+
+
+
+
+ Calculate x2 * s as done in round 2.
+
+
+
+
+ Calculate A as done in round 2.
+
+
+
+
+ Calculate a zero knowledge proof of x using Schnorr's signature.
+ The returned array has two elements {g^v, r = v-x*h} for x.
+
+
+
+
+ Validates that g^x4 is not 1.
+ throws CryptoException if g^x4 is 1
+
+
+
+
+ Validates that ga is not 1.
+
+ As described by Feng Hao...
+ Alice could simply check ga != 1 to ensure it is a generator.
+ In fact, as we will explain in Section 3, (x1 + x3 + x4 ) is random over Zq even in the face of active attacks.
+ Hence, the probability for ga = 1 is extremely small - on the order of 2^160 for 160-bit q.
+
+ throws CryptoException if ga is 1
+
+
+
+
+ Validates the zero knowledge proof (generated by
+ calculateZeroKnowledgeProof(BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, string, Digest, SecureRandom)
+ is correct.
+
+ throws CryptoException if the zero knowledge proof is not correct
+
+
+
+
+ Calculates the keying material, which can be done after round 2 has completed.
+ A session key must be derived from this key material using a secure key derivation function (KDF).
+ The KDF used to derive the key is handled externally (i.e. not by JPAKEParticipant).
+
+ KeyingMaterial = (B/g^{x2*x4*s})^x2
+
+
+
+
+ Validates that the given participant ids are not equal.
+ (For the J-PAKE exchange, each participant must use a unique id.)
+
+ Throws CryptoException if the participantId strings are equal.
+
+
+
+
+ Validates that the given participant ids are equal.
+ This is used to ensure that the payloads received from
+ each round all come from the same participant.
+
+
+
+
+ Validates that the given object is not null.
+ throws NullReferenceException if the object is null.
+
+ object in question
+ name of the object (to be used in exception message)
+
+
+
+ Calculates the MacTag (to be used for key confirmation), as defined by
+ NIST SP 800-56A Revision 1 ,
+ Section 8.2 Unilateral Key Confirmation for Key Agreement Schemes.
+
+ MacTag = HMAC(MacKey, MacLen, MacData)
+ MacKey = H(K || "JPAKE_KC")
+ MacData = "KC_1_U" || participantId || partnerParticipantId || gx1 || gx2 || gx3 || gx4
+
+ Note that both participants use "KC_1_U" because the sender of the round 3 message
+ is always the initiator for key confirmation.
+
+ HMAC = {@link HMac} used with the given {@link Digest}
+ H = The given {@link Digest}
+ MacLen = length of MacTag
+
+
+
+
+ Calculates the MacKey (i.e. the key to use when calculating the MagTag for key confirmation).
+
+ MacKey = H(K || "JPAKE_KC")
+
+
+
+
+ Validates the MacTag received from the partner participant.
+
+ throws CryptoException if the participantId strings are equal.
+
+
+
+ RFC 2631 Diffie-hellman KEK derivation function.
+
+
+ X9.63 based key derivation function for ECDH CMS.
+
+
+ Implements the client side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe.
+ This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper
+ "SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002"
+
+
+ Initialises the client to begin new authentication attempt
+ @param N The safe prime associated with the client's verifier
+ @param g The group parameter associated with the client's verifier
+ @param digest The digest algorithm associated with the client's verifier
+ @param random For key generation
+
+
+ Generates client's credentials given the client's salt, identity and password
+ @param salt The salt used in the client's verifier.
+ @param identity The user's identity (eg. username)
+ @param password The user's password
+ @return Client's public value to send to server
+
+
+ Generates client's verification message given the server's credentials
+ @param serverB The server's credentials
+ @return Client's verification message for the server
+ @throws CryptoException If server's credentials are invalid
+
+
+ Computes the client evidence message M1 using the previously received values.
+ To be called after calculating the secret S.
+ @return M1: the client side generated evidence message
+ @throws CryptoException
+
+
+ Authenticates the server evidence message M2 received and saves it only if correct.
+ @param M2: the server side generated evidence message
+ @return A boolean indicating if the server message M2 was the expected one.
+ @throws CryptoException
+
+
+ Computes the final session key as a result of the SRP successful mutual authentication
+ To be called after verifying the server evidence message M2.
+ @return Key: the mutually authenticated symmetric session key
+ @throws CryptoException
+
+
+ Implements the server side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe.
+ This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper
+ "SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002"
+
+
+ Initialises the server to accept a new client authentication attempt
+ @param N The safe prime associated with the client's verifier
+ @param g The group parameter associated with the client's verifier
+ @param v The client's verifier
+ @param digest The digest algorithm associated with the client's verifier
+ @param random For key generation
+
+
+ Generates the server's credentials that are to be sent to the client.
+ @return The server's public value to the client
+
+
+ Processes the client's credentials. If valid the shared secret is generated and returned.
+ @param clientA The client's credentials
+ @return A shared secret BigInteger
+ @throws CryptoException If client's credentials are invalid
+
+
+ Authenticates the received client evidence message M1 and saves it only if correct.
+ To be called after calculating the secret S.
+ @param M1: the client side generated evidence message
+ @return A boolean indicating if the client message M1 was the expected one.
+ @throws CryptoException
+
+
+ Computes the server evidence message M2 using the previously verified values.
+ To be called after successfully verifying the client evidence message M1.
+ @return M2: the server side generated evidence message
+ @throws CryptoException
+
+
+ Computes the final session key as a result of the SRP successful mutual authentication
+ To be called after calculating the server evidence message M2.
+ @return Key: the mutual authenticated symmetric session key
+ @throws CryptoException
+
+
+ Computes the client evidence message (M1) according to the standard routine:
+ M1 = H( A | B | S )
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param A The public client value
+ @param B The public server value
+ @param S The secret calculated by both sides
+ @return M1 The calculated client evidence message
+
+
+ Computes the server evidence message (M2) according to the standard routine:
+ M2 = H( A | M1 | S )
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param A The public client value
+ @param M1 The client evidence message
+ @param S The secret calculated by both sides
+ @return M2 The calculated server evidence message
+
+
+ Computes the final Key according to the standard routine: Key = H(S)
+ @param digest The Digest used as the hashing function H
+ @param N Modulus used to get the pad length
+ @param S The secret calculated by both sides
+ @return
+
+
+ Generates new SRP verifier for user
+
+
+ Initialises generator to create new verifiers
+ @param N The safe prime to use (see DHParametersGenerator)
+ @param g The group parameter to use (see DHParametersGenerator)
+ @param digest The digest to use. The same digest type will need to be used later for the actual authentication
+ attempt. Also note that the final session key size is dependent on the chosen digest.
+
+
+ Creates a new SRP verifier
+ @param salt The salt to use, generally should be large and random
+ @param identity The user's identifying information (eg. username)
+ @param password The user's password
+ @return A new verifier for use in future SRP authentication
+
+
+ return the X9ECParameters object for the named curve represented by
+ the passed in object identifier. Null if the curve isn't present.
+
+ @param oid an object identifier representing a named curve, if present.
+
+
+ return the object identifier signified by the passed in name. Null
+ if there is no object identifier associated with name.
+
+ @return the object identifier associated with name, if present.
+
+
+ return the named curve name represented by the given object identifier.
+
+
+ returns an enumeration containing the name strings for curves
+ contained in this structure.
+
+
+ ISO 9796-1 padding. Note in the light of recent results you should
+ only use this with RSA (rather than the "simpler" Rabin keys) and you
+ should never use it with anything other than a hash (ie. even if the
+ message is small don't sign the message, sign it's hash) or some "random"
+ value. See your favorite search engine for details.
+
+
+ return the input block size. The largest message we can process
+ is (key_size_in_bits + 3)/16, which in our world comes to
+ key_size_in_bytes / 2.
+
+
+ return the maximum possible size for the output.
+
+
+ set the number of bits in the next message to be treated as
+ pad bits.
+
+
+ retrieve the number of pad bits in the last decoded message.
+
+
+ @exception InvalidCipherTextException if the decrypted block is not a valid ISO 9796 bit string
+
+
+ Optimal Asymmetric Encryption Padding (OAEP) - see PKCS 1 V 2.
+
+
+ @exception InvalidCipherTextException if the decrypted block turns out to
+ be badly formatted.
+
+
+ int to octet string.
+
+
+ mask generator function, as described in PKCS1v2.
+
+
+ this does your basic Pkcs 1 v1.5 padding - whether or not you should be using this
+ depends on your application - see Pkcs1 Version 2 for details.
+
+
+ some providers fail to include the leading zero in PKCS1 encoded blocks. If you need to
+ work with one of these set the system property Org.BouncyCastle.Pkcs1.Strict to false.
+
+
+ The same effect can be achieved by setting the static property directly
+
+ The static property is checked during construction of the encoding object, it is set to
+ true by default.
+
+
+
+ Basic constructor.
+ @param cipher
+
+
+ Constructor for decryption with a fixed plaintext length.
+
+ @param cipher The cipher to use for cryptographic operation.
+ @param pLen Length of the expected plaintext.
+
+
+ Constructor for decryption with a fixed plaintext length and a fallback
+ value that is returned, if the padding is incorrect.
+
+ @param cipher
+ The cipher to use for cryptographic operation.
+ @param fallback
+ The fallback value, we don't to a arraycopy here.
+
+
+ Checks if the argument is a correctly PKCS#1.5 encoded Plaintext
+ for encryption.
+
+ @param encoded The Plaintext.
+ @param pLen Expected length of the plaintext.
+ @return Either 0, if the encoding is correct, or -1, if it is incorrect.
+
+
+ Decode PKCS#1.5 encoding, and return a random value if the padding is not correct.
+
+ @param in The encrypted block.
+ @param inOff Offset in the encrypted block.
+ @param inLen Length of the encrypted block.
+ @param pLen Length of the desired output.
+ @return The plaintext without padding, or a random value if the padding was incorrect.
+
+ @throws InvalidCipherTextException
+
+
+ @exception InvalidCipherTextException if the decrypted block is not in Pkcs1 format.
+
+
+ Basic KDF generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on ISO 18033/P1363a.
+
+
+ Construct a KDF Parameters generator.
+
+ @param counterStart value of counter.
+ @param digest the digest to be used as the source of derived keys.
+
+
+ return the underlying digest.
+
+
+ fill len bytes of the output buffer with bytes generated from
+ the derivation function.
+
+ @throws ArgumentException if the size of the request will cause an overflow.
+ @throws DataLengthException if the out buffer is too small.
+
+
+ a basic Diffie-Hellman key pair generator.
+
+ This generates keys consistent for use with the basic algorithm for
+ Diffie-Hellman.
+
+
+ a Diffie-Hellman key pair generator.
+
+ This generates keys consistent for use in the MTI/A0 key agreement protocol
+ as described in "Handbook of Applied Cryptography", Pages 516-519.
+
+
+ which Generates the p and g values from the given parameters,
+ returning the DHParameters object.
+
+ Note: can take a while...
+
+
+ initialise the key generator - if strength is set to zero
+ the key Generated will be 192 bits in size, otherwise
+ strength can be 128 or 192 (or 112 or 168 if you don't count
+ parity bits), depending on whether you wish to do 2-key or 3-key
+ triple DES.
+
+ @param param the parameters to be used for key generation
+
+
+ initialise the key generator - if strength is set to zero
+ the key generated will be 64 bits in size, otherwise
+ strength can be 64 or 56 bits (if you don't count the parity bits).
+
+ @param param the parameters to be used for key generation
+
+
+ a DSA key pair generator.
+
+ This Generates DSA keys in line with the method described
+ in FIPS 186-3 B.1 FFC Key Pair Generation .
+
+
+ Generate suitable parameters for DSA, in line with FIPS 186-2, or FIPS 186-3.
+
+
+ Initialise the generator
+ This form can only be used for older DSA (pre-DSA2) parameters
+ the size of keys in bits (from 512 up to 1024, and a multiple of 64)
+ measure of robustness of primes (at least 80 for FIPS 186-2 compliance)
+ the source of randomness to use
+
+
+ Initialise the generator for DSA 2
+ You must use this Init method if you need to generate parameters for DSA 2 keys
+ An instance of DsaParameterGenerationParameters used to configure this generator
+
+
+ Generates a set of DsaParameters
+ Can take a while...
+
+
+ generate suitable parameters for DSA, in line with
+ FIPS 186-3 A.1 Generation of the FFC Primes p and q .
+
+
+ Given the domain parameters this routine generates an EC key
+ pair in accordance with X9.62 section 5.2.1 pages 26, 27.
+
+
+ a ElGamal key pair generator.
+
+ This Generates keys consistent for use with ElGamal as described in
+ page 164 of "Handbook of Applied Cryptography".
+
+
+ * which Generates the p and g values from the given parameters,
+ * returning the ElGamalParameters object.
+ *
+ * Note: can take a while...
+ *
+
+
+ a GOST3410 key pair generator.
+ This generates GOST3410 keys in line with the method described
+ in GOST R 34.10-94.
+
+
+ generate suitable parameters for GOST3410.
+
+
+ initialise the key generator.
+
+ @param size size of the key
+ @param typeProcedure type procedure A,B = 1; A',B' - else
+ @param random random byte source.
+
+
+ Procedure C
+ procedure generates the a value from the given p,q,
+ returning the a value.
+
+
+ which generates the p , q and a values from the given parameters,
+ returning the Gost3410Parameters object.
+
+
+ KFD2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on IEEE P1363/ISO 18033.
+
+
+ Construct a KDF1 byte generator.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ KDF2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033
+
+ This implementation is based on IEEE P1363/ISO 18033.
+
+
+ Construct a KDF2 bytes generator. Generates key material
+ according to IEEE P1363 or ISO 18033 depending on the initialisation.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ Generator for MGF1 as defined in Pkcs 1v2
+
+
+ @param digest the digest to be used as the source of Generated bytes
+
+
+ return the underlying digest.
+
+
+ int to octet string.
+
+
+ fill len bytes of the output buffer with bytes Generated from
+ the derivation function.
+
+ @throws DataLengthException if the out buffer is too small.
+
+
+ Key generation parameters for NaccacheStern cipher. For details on this cipher, please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Generates a permuted ArrayList from the original one. The original List
+ is not modified
+
+ @param arr
+ the ArrayList to be permuted
+ @param rand
+ the source of Randomness for permutation
+ @return a new IList with the permuted elements.
+
+
+ Finds the first 'count' primes starting with 3
+
+ @param count
+ the number of primes to find
+ @return a vector containing the found primes as Integer
+
+
+ Generator for PBE derived keys and ivs as usd by OpenSSL.
+
+ The scheme is a simple extension of PKCS 5 V2.0 Scheme 1 using MD5 with an
+ iteration count of 1.
+
+
+
+ Construct a OpenSSL Parameters generator.
+
+
+ Initialise - note the iteration count for this algorithm is fixed at 1.
+
+ @param password password to use.
+ @param salt salt to use.
+
+
+ the derived key function, the ith hash of the password and the salt.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+ @exception ArgumentException if keySize + ivSize is larger than the base hash size.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 12 V1.0.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs12 Page
+
+
+
+ Construct a Pkcs 12 Parameters generator.
+
+ @param digest the digest to be used as the source of derived keys.
+ @exception ArgumentException if an unknown digest is passed in.
+
+
+ add a + b + 1, returning the result in a. The a value is treated
+ as a BigInteger of length (b.Length * 8) bits. The result is
+ modulo 2^b.Length in case of overflow.
+
+
+ generation of a derived key ala Pkcs12 V1.0.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 5 V2.0 Scheme 1.
+ Note this generator is limited to the size of the hash produced by the
+ digest used to drive it.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs5 Page
+
+
+
+ Construct a Pkcs 5 Scheme 1 Parameters generator.
+
+ @param digest the digest to be used as the source of derived keys.
+
+
+ the derived key function, the ith hash of the mPassword and the mSalt.
+
+
+ Generate a key parameter derived from the mPassword, mSalt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the mPassword, mSalt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+ @exception ArgumentException if keySize + ivSize is larger than the base hash size.
+
+
+ Generate a key parameter for use with a MAC derived from the mPassword,
+ mSalt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+ @exception ArgumentException if the key length larger than the base hash size.
+
+
+ Generator for Pbe derived keys and ivs as defined by Pkcs 5 V2.0 Scheme 2.
+ This generator uses a SHA-1 HMac as the calculation function.
+
+ The document this implementation is based on can be found at
+
+ RSA's Pkcs5 Page
+
+
+ construct a Pkcs5 Scheme 2 Parameters generator.
+
+
+ Generate a key parameter derived from the password, salt, and iteration
+ count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+ Generate a key with initialisation vector parameter derived from
+ the password, salt, and iteration count we are currently initialised
+ with.
+
+ @param keySize the size of the key we want (in bits)
+ @param ivSize the size of the iv we want (in bits)
+ @return a ParametersWithIV object.
+
+
+ Generate a key parameter for use with a MAC derived from the password,
+ salt, and iteration count we are currently initialised with.
+
+ @param keySize the size of the key we want (in bits)
+ @return a KeyParameter object.
+
+
+
+ Generates keys for the Poly1305 MAC.
+
+
+ Poly1305 keys are 256 bit keys consisting of a 128 bit secret key used for the underlying block
+ cipher followed by a 128 bit {@code r} value used for the polynomial portion of the Mac.
+ The {@code r} value has a specific format with some bits required to be cleared, resulting in an
+ effective 106 bit key.
+ A separately generated 256 bit key can be modified to fit the Poly1305 key format by using the
+ {@link #clamp(byte[])} method to clear the required bits.
+
+
+
+
+
+ Initialises the key generator.
+
+
+ Poly1305 keys are always 256 bits, so the key length in the provided parameters is ignored.
+
+
+
+
+ Generates a 256 bit key in the format required for Poly1305 - e.g.
+ k[0] ... k[15], r[0] ... r[15] with the required bits in r cleared
+ as per .
+
+
+
+
+ Modifies an existing 32 byte key value to comply with the requirements of the Poly1305 key by
+ clearing required bits in the r (second 16 bytes) portion of the key.
+ Specifically:
+
+ r[3], r[7], r[11], r[15] have top four bits clear (i.e., are {0, 1, . . . , 15})
+ r[4], r[8], r[12] have bottom two bits clear (i.e., are in {0, 4, 8, . . . , 252})
+
+
+ a 32 byte key value k[0] ... k[15], r[0] ... r[15]
+
+
+
+ Checks a 32 byte key for compliance with the Poly1305 key requirements, e.g.
+ k[0] ... k[15], r[0] ... r[15] with the required bits in r cleared
+ as per .
+
+ Key.
+ if the key is of the wrong length, or has invalid bits set
+ in the r portion of the key.
+
+
+ Generate a random factor suitable for use with RSA blind signatures
+ as outlined in Chaum's blinding and unblinding as outlined in
+ "Handbook of Applied Cryptography", page 475.
+
+
+ Initialise the factor generator
+
+ @param param the necessary RSA key parameters.
+
+
+ Generate a suitable blind factor for the public key the generator was initialised with.
+
+ @return a random blind factor
+
+
+ an RSA key pair generator.
+
+
+ Choose a random prime value for use with RSA
+ the bit-length of the returned prime
+ the RSA public exponent
+ a prime p, with (p-1) relatively prime to e
+
+
+ CMAC - as specified at www.nuee.nagoya-u.ac.jp/labs/tiwata/omac/omac.html
+
+ CMAC is analogous to OMAC1 - see also en.wikipedia.org/wiki/CMAC
+
+ CMAC is a NIST recomendation - see
+ csrc.nist.gov/CryptoToolkit/modes/800-38_Series_Publications/SP800-38B.pdf
+
+ CMAC/OMAC1 is a blockcipher-based message authentication code designed and
+ analyzed by Tetsu Iwata and Kaoru Kurosawa.
+
+ CMAC/OMAC1 is a simple variant of the CBC MAC (Cipher Block Chaining Message
+ Authentication Code). OMAC stands for One-Key CBC MAC.
+
+ It supports 128- or 64-bits block ciphers, with any key size, and returns
+ a MAC with dimension less or equal to the block size of the underlying
+ cipher.
+
+
+
+ create a standard MAC based on a CBC block cipher (64 or 128 bit block).
+ This will produce an authentication code the length of the block size
+ of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8 and @lt;= 128.
+
+
+ Reset the mac generator.
+
+
+ standard CBC Block Cipher MAC - if no padding is specified the default of
+ pad of zeroes is used.
+
+
+ create a standard MAC based on a CBC block cipher. This will produce an
+ authentication code half the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a CBC block cipher. This will produce an
+ authentication code half the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used to complete the last block.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding the padding to be used to complete the last block.
+
+
+ Reset the mac generator.
+
+
+ implements a Cipher-FeedBack (CFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ create a standard MAC based on a CFB block cipher. This will produce an
+ authentication code half the length of the block size of the cipher, with
+ the CFB mode set to 8 bits.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+
+
+ create a standard MAC based on a CFB block cipher. This will produce an
+ authentication code half the length of the block size of the cipher, with
+ the CFB mode set to 8 bits.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CFB mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param cfbBitSize the size of an output block produced by the CFB mode.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses CFB mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param cfbBitSize the size of an output block produced by the CFB mode.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding a padding to be used.
+
+
+ Reset the mac generator.
+
+
+
+ The GMAC specialisation of Galois/Counter mode (GCM) detailed in NIST Special Publication
+ 800-38D.
+
+
+ GMac is an invocation of the GCM mode where no data is encrypted (i.e. all input data to the Mac
+ is processed as additional authenticated data with the underlying GCM block cipher).
+
+
+
+
+ Creates a GMAC based on the operation of a block cipher in GCM mode.
+
+
+ This will produce an authentication code the length of the block size of the cipher.
+
+ the cipher to be used in GCM mode to generate the MAC.
+
+
+
+ Creates a GMAC based on the operation of a 128 bit block cipher in GCM mode.
+
+
+ This will produce an authentication code the length of the block size of the cipher.
+
+ the cipher to be used in GCM mode to generate the MAC.
+ the mac size to generate, in bits. Must be a multiple of 8, between 32 and 128 (inclusive).
+ Sizes less than 96 are not recommended, but are supported for specialized applications.
+
+
+
+ Initialises the GMAC - requires a
+ providing a and a nonce.
+
+
+
+ implementation of GOST 28147-89 MAC
+
+
+ HMAC implementation based on RFC2104
+
+ H(K XOR opad, H(K XOR ipad, text))
+
+
+ Reset the mac generator.
+
+
+ DES based CBC Block Cipher MAC according to ISO9797, algorithm 3 (ANSI X9.19 Retail MAC)
+
+ This could as well be derived from CBCBlockCipherMac, but then the property mac in the base
+ class must be changed to protected
+
+
+ create a Retail-MAC based on a CBC block cipher. This will produce an
+ authentication code of the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation. This must
+ be DESEngine.
+
+
+ create a Retail-MAC based on a CBC block cipher. This will produce an
+ authentication code of the length of the block size of the cipher.
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param padding the padding to be used to complete the last block.
+
+
+ create a Retail-MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses single DES CBC mode as the basis for the
+ MAC generation.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+
+
+ create a standard MAC based on a block cipher with the size of the
+ MAC been given in bits. This class uses single DES CBC mode as the basis for the
+ MAC generation. The final block is decrypted and then encrypted using the
+ middle and right part of the key.
+
+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81),
+ or 16 bits if being used as a data authenticator (FIPS Publication 113),
+ and in general should be less than the size of the block cipher as it reduces
+ the chance of an exhaustive attack (see Handbook of Applied Cryptography).
+
+ @param cipher the cipher to be used as the basis of the MAC generation.
+ @param macSizeInBits the size of the MAC in bits, must be a multiple of 8.
+ @param padding the padding to be used to complete the last block.
+
+
+ Reset the mac generator.
+
+
+
+ Poly1305 message authentication code, designed by D. J. Bernstein.
+
+
+ Poly1305 computes a 128-bit (16 bytes) authenticator, using a 128 bit nonce and a 256 bit key
+ consisting of a 128 bit key applied to an underlying cipher, and a 128 bit key (with 106
+ effective key bits) used in the authenticator.
+
+ The polynomial calculation in this implementation is adapted from the public domain poly1305-donna-unrolled C implementation
+ by Andrew M (@floodyberry).
+
+
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Polynomial key
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Precomputed 5 * r[1..4]
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Encrypted nonce
+
+
+ Current block of buffered input
+
+
+ Current offset in input buffer
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Polynomial accumulator
+
+
+ Constructs a Poly1305 MAC, where the key passed to init() will be used directly.
+
+
+ Constructs a Poly1305 MAC, using a 128 bit block cipher.
+
+
+
+ Initialises the Poly1305 MAC.
+
+ a {@link ParametersWithIV} containing a 128 bit nonce and a {@link KeyParameter} with
+ a 256 bit key complying to the {@link Poly1305KeyGenerator Poly1305 key format}.
+
+
+
+ Implementation of SipHash as specified in "SipHash: a fast short-input PRF", by Jean-Philippe
+ Aumasson and Daniel J. Bernstein (https://131002.net/siphash/siphash.pdf).
+
+
+ "SipHash is a family of PRFs SipHash-c-d where the integer parameters c and d are the number of
+ compression rounds and the number of finalization rounds. A compression round is identical to a
+ finalization round and this round function is called SipRound. Given a 128-bit key k and a
+ (possibly empty) byte string m, SipHash-c-d returns a 64-bit value..."
+
+
+
+ SipHash-2-4
+
+
+ SipHash-c-d
+ the number of compression rounds
+ the number of finalization rounds
+
+
+
+ Implementation of the Skein parameterised MAC function in 256, 512 and 1024 bit block sizes,
+ based on the Threefish tweakable block cipher.
+
+
+ This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3
+ competition in October 2010.
+
+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir
+ Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker.
+
+
+
+
+
+
+ 256 bit block size - Skein-256
+
+
+
+
+ 512 bit block size - Skein-512
+
+
+
+
+ 1024 bit block size - Skein-1024
+
+
+
+
+ Constructs a Skein MAC with an internal state size and output size.
+
+ the internal state size in bits - one of or
+ .
+ the output/MAC size to produce in bits, which must be an integral number of
+ bytes.
+
+
+
+ Optionally initialises the Skein digest with the provided parameters.
+
+ See for details on the parameterisation of the Skein hash function.
+ the parameters to apply to this engine, or null to use no parameters.
+
+
+ implements Cipher-Block-Chaining (CBC) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of chaining.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CBC".
+
+
+ return the block size of the underlying cipher.
+
+ @return the block size of the underlying cipher.
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ Do the appropriate chaining step for CBC mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate chaining step for CBC mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the decrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Implements the Counter with Cipher Block Chaining mode (CCM) detailed in
+ NIST Special Publication 800-38C.
+
+ Note : this mode is a packet mode - it needs all the data up front.
+
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Returns a byte array containing the mac calculated as part of the
+ last encrypt or decrypt operation.
+
+ @return the last mac calculated.
+
+
+ Process a packet of data for either CCM decryption or encryption.
+
+ @param in data for processing.
+ @param inOff offset at which data starts in the input array.
+ @param inLen length of the data in the input array.
+ @return a byte array containing the processed input..
+ @throws IllegalStateException if the cipher is not appropriately set up.
+ @throws InvalidCipherTextException if the input data is truncated or the mac check fails.
+
+
+ Process a packet of data for either CCM decryption or encryption.
+
+ @param in data for processing.
+ @param inOff offset at which data starts in the input array.
+ @param inLen length of the data in the input array.
+ @param output output array.
+ @param outOff offset into output array to start putting processed bytes.
+ @return the number of bytes added to output.
+ @throws IllegalStateException if the cipher is not appropriately set up.
+ @throws InvalidCipherTextException if the input data is truncated or the mac check fails.
+ @throws DataLengthException if output buffer too short.
+
+
+ implements a Cipher-FeedBack (CFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/CFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ A Cipher Text Stealing (CTS) mode cipher. CTS allows block ciphers to
+ be used to produce cipher text which is the same outLength as the plain text.
+
+
+ Create a buffered block cipher that uses Cipher Text Stealing
+
+ @param cipher the underlying block cipher this buffering object wraps.
+
+
+ return the size of the output buffer required for an update of 'length' bytes.
+
+ @param length the outLength of the input.
+ @return the space required to accommodate a call to update
+ with length bytes of input.
+
+
+ return the size of the output buffer required for an update plus a
+ doFinal with an input of length bytes.
+
+ @param length the outLength of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with length bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param length the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if cipher text decrypts wrongly (in
+ case the exception will never Get thrown).
+
+
+ A Two-Pass Authenticated-Encryption Scheme Optimized for Simplicity and
+ Efficiency - by M. Bellare, P. Rogaway, D. Wagner.
+
+ http://www.cs.ucdavis.edu/~rogaway/papers/eax.pdf
+
+ EAX is an AEAD scheme based on CTR and OMAC1/CMAC, that uses a single block
+ cipher to encrypt and authenticate data. It's on-line (the length of a
+ message isn't needed to begin processing it), has good performances, it's
+ simple and provably secure (provided the underlying block cipher is secure).
+
+ Of course, this implementations is NOT thread-safe.
+
+
+ Constructor that accepts an instance of a block cipher engine.
+
+ @param cipher the engine to use
+
+
+
+ Implements the Galois/Counter mode (GCM) detailed in
+ NIST Special Publication 800-38D.
+
+
+
+
+ MAC sizes from 32 bits to 128 bits (must be a multiple of 8) are supported. The default is 128 bits.
+ Sizes less than 96 are not recommended, but are supported for specialized applications.
+
+
+
+ implements the GOST 28147 OFB counter mode (GCTR).
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ counter mode (must have a 64 bit block size).
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param encrypting if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param parameters the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/GCTR"
+ and the block size in bits
+
+
+ return the block size we are operating at (in bytes).
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the feedback vector back to the IV and reset the underlying
+ cipher.
+
+
+
+ A block cipher mode that includes authenticated encryption with a streaming mode
+ and optional associated data.
+
+
+
+ The name of the algorithm this cipher implements.
+
+
+ The block cipher underlying this algorithm.
+
+
+ Initialise the cipher.
+ Parameter can either be an AeadParameters or a ParametersWithIV object.
+ Initialise for encryption if true, for decryption if false.
+ The key or other data required by the cipher.
+
+
+ The block size for this cipher, in bytes.
+
+
+ Add a single byte to the associated data check.
+ If the implementation supports it, this will be an online operation and will not retain the associated data.
+ The byte to be processed.
+
+
+ Add a sequence of bytes to the associated data check.
+ If the implementation supports it, this will be an online operation and will not retain the associated data.
+ The input byte array.
+ The offset into the input array where the data to be processed starts.
+ The number of bytes to be processed.
+
+
+ Encrypt/decrypt a single byte.
+
+ @param input the byte to be processed.
+ @param outBytes the output buffer the processed byte goes into.
+ @param outOff the offset into the output byte array the processed data starts at.
+ @return the number of bytes written to out.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ Process a block of bytes from in putting the result into out.
+
+ @param inBytes the input byte array.
+ @param inOff the offset into the in array where the data to be processed starts.
+ @param len the number of bytes to be processed.
+ @param outBytes the output buffer the processed bytes go into.
+ @param outOff the offset into the output byte array the processed data starts at.
+ @return the number of bytes written to out.
+ @exception DataLengthException if the output buffer is too small.
+
+
+ Finish the operation either appending or verifying the MAC at the end of the data.
+
+ @param outBytes space for any resulting output data.
+ @param outOff offset into out to start copying the data at.
+ @return number of bytes written into out.
+ @throws InvalidOperationException if the cipher is in an inappropriate state.
+ @throws InvalidCipherTextException if the MAC fails to match.
+
+
+ Return the value of the MAC associated with the last stream processed.
+
+ @return MAC for plaintext data.
+
+
+ Return the size of the output buffer required for a ProcessBytes
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to ProcessBytes
+ with len bytes of input.
+
+
+ Return the size of the output buffer required for a ProcessBytes plus a
+ DoFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to ProcessBytes and DoFinal
+ with len bytes of input.
+
+
+
+ Reset the cipher to the same state as it was after the last init (if there was one).
+
+
+
+ An implementation of RFC 7253 on The OCB
+ Authenticated-Encryption Algorithm , licensed per:
+
+ License for
+ Open-Source Software Implementations of OCB (Jan 9, 2013) - 'License 1'
+ Under this license, you are authorized to make, use, and distribute open-source software
+ implementations of OCB. This license terminates for you if you sue someone over their open-source
+ software implementation of OCB claiming that you have a patent covering their implementation.
+
+ This is a non-binding summary of a legal document (the link above). The parameters of the license
+ are specified in the license document and that document is controlling.
+
+
+ implements a Output-FeedBack (OFB) mode on top of a simple cipher.
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+ @param blockSize the block size in bits (note: a multiple of 8)
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/OFB"
+ and the block size in bits
+
+
+ return the block size we are operating at (in bytes).
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the feedback vector back to the IV and reset the underlying
+ cipher.
+
+
+ * Implements OpenPGP's rather strange version of Cipher-FeedBack (CFB) mode
+ * on top of a simple cipher. This class assumes the IV has been prepended
+ * to the data stream already, and just accomodates the reset after
+ * (blockSize + 2) bytes have been read.
+ *
+ * For further info see RFC 2440 .
+ *
+
+
+ Basic constructor.
+
+ @param cipher the block cipher to be used as the basis of the
+ feedback mode.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ return the algorithm name and mode.
+
+ @return the name of the underlying algorithm followed by "/PGPCFB"
+ and the block size in bits.
+
+
+ return the block size we are operating at.
+
+ @return the block size we are operating at (in bytes).
+
+
+ Process one block of input from the array in and write it to
+ the out array.
+
+ @param in the array containing the input data.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the output data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ reset the chaining vector back to the IV and reset the underlying
+ cipher.
+
+
+ Initialise the cipher and, possibly, the initialisation vector (IV).
+ If an IV isn't passed as part of the parameter, the IV will be all zeros.
+ An IV which is too short is handled in FIPS compliant fashion.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param parameters the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ Encrypt one byte of data according to CFB mode.
+ @param data the byte to encrypt
+ @param blockOff offset in the current block
+ @returns the encrypted byte
+
+
+ Do the appropriate processing for CFB IV mode encryption.
+
+ @param in the array containing the data to be encrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Do the appropriate processing for CFB IV mode decryption.
+
+ @param in the array containing the data to be decrypted.
+ @param inOff offset into the in array the data starts at.
+ @param out the array the encrypted data will be copied into.
+ @param outOff the offset into the out array the output will start at.
+ @exception DataLengthException if there isn't enough data in in, or
+ space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+ @return the number of bytes processed and produced.
+
+
+ Implements the Segmented Integer Counter (SIC) mode on top of a simple
+ block cipher.
+
+
+ Basic constructor.
+
+ @param c the block cipher to be used.
+
+
+ return the underlying block cipher that we are wrapping.
+
+ @return the underlying block cipher that we are wrapping.
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Calculator factory class for signature generation in ASN.1 based profiles that use an AlgorithmIdentifier to preserve
+ signature algorithm details.
+
+
+
+
+ Base constructor.
+
+ The name of the signature algorithm to use.
+ The private key to be used in the signing operation.
+
+
+
+ Constructor which also specifies a source of randomness to be used if one is required.
+
+ The name of the signature algorithm to use.
+ The private key to be used in the signing operation.
+ The source of randomness to be used in signature calculation.
+
+
+
+ Allows enumeration of the signature names supported by the verifier provider.
+
+
+
+
+ Verifier class for signature verification in ASN.1 based profiles that use an AlgorithmIdentifier to preserve
+ signature algorithm details.
+
+
+
+
+ Base constructor.
+
+ The name of the signature algorithm to use.
+ The public key to be used in the verification operation.
+
+
+
+ Provider class which supports dynamic creation of signature verifiers.
+
+
+
+
+ Base constructor - specify the public key to be used in verification.
+
+ The public key to be used in creating verifiers provided by this object.
+
+
+
+ Allows enumeration of the signature names supported by the verifier provider.
+
+
+
+ Block cipher padders are expected to conform to this interface
+
+
+ Initialise the padder.
+
+ @param param parameters, if any required.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+ @exception InvalidCipherTextException if the padding is badly formed
+ or invalid.
+
+
+ A padder that adds ISO10126-2 padding to a block.
+
+
+ Initialise the padder.
+
+ @param random a SecureRandom if available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds the padding according to the scheme referenced in
+ ISO 7814-4 - scheme 2 from ISO 9797-1. The first byte is 0x80, rest is 0x00
+
+
+ Initialise the padder.
+
+ @param random - a SecureRandom if available.
+
+
+ Return the name of the algorithm the padder implements.
+
+ @return the name of the algorithm the padder implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A wrapper class that allows block ciphers to be used to process data in
+ a piecemeal fashion with padding. The PaddedBufferedBlockCipher
+ outputs a block only when the buffer is full and more data is being added,
+ or on a doFinal (unless the current block in the buffer is a pad block).
+ The default padding mechanism used is the one outlined in Pkcs5/Pkcs7.
+
+
+ Create a buffered block cipher with the desired padding.
+
+ @param cipher the underlying block cipher this buffering object wraps.
+ @param padding the padding type.
+
+
+ Create a buffered block cipher Pkcs7 padding
+
+ @param cipher the underlying block cipher this buffering object wraps.
+
+
+ initialise the cipher.
+
+ @param forEncryption if true the cipher is initialised for
+ encryption, if false for decryption.
+ @param param the key and other data required by the cipher.
+ @exception ArgumentException if the parameters argument is
+ inappropriate.
+
+
+ return the minimum size of the output buffer required for an update
+ plus a doFinal with an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update and doFinal
+ with len bytes of input.
+
+
+ return the size of the output buffer required for an update
+ an input of len bytes.
+
+ @param len the length of the input.
+ @return the space required to accommodate a call to update
+ with len bytes of input.
+
+
+ process a single byte, producing an output block if necessary.
+
+ @param in the input byte.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ process an array of bytes, producing output if necessary.
+
+ @param in the input byte array.
+ @param inOff the offset at which the input data starts.
+ @param len the number of bytes to be copied out of the input array.
+ @param out the space for any output that might be produced.
+ @param outOff the offset from which the output will be copied.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there isn't enough space in out.
+ @exception InvalidOperationException if the cipher isn't initialised.
+
+
+ Process the last block in the buffer. If the buffer is currently
+ full and padding needs to be added a call to doFinal will produce
+ 2 * GetBlockSize() bytes.
+
+ @param out the array the block currently being held is copied into.
+ @param outOff the offset at which the copying starts.
+ @return the number of output bytes copied to out.
+ @exception DataLengthException if there is insufficient space in out for
+ the output or we are decrypting and the input is not block size aligned.
+ @exception InvalidOperationException if the underlying cipher is not
+ initialised.
+ @exception InvalidCipherTextException if padding is expected and not found.
+
+
+ A padder that adds Pkcs7/Pkcs5 padding to a block.
+
+
+ Initialise the padder.
+
+ @param random - a SecureRandom if available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds Trailing-Bit-Compliment padding to a block.
+
+ This padding pads the block out compliment of the last bit
+ of the plain text.
+
+
+
+
+ Return the name of the algorithm the cipher implements.
+ the name of the algorithm the cipher implements.
+
+
+
+ Initialise the padder.
+ - a SecureRandom if available.
+
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+ Note: this assumes that the last block of plain text is always
+ passed to it inside in. i.e. if inOff is zero, indicating the
+ entire block is to be overwritten with padding the value of in
+ should be the same as the last block of plain text.
+
+
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds X9.23 padding to a block - if a SecureRandom is
+ passed in random padding is assumed, otherwise padding with zeros is used.
+
+
+ Initialise the padder.
+
+ @param random a SecureRandom if one is available.
+
+
+ Return the name of the algorithm the cipher implements.
+
+ @return the name of the algorithm the cipher implements.
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+ return the number of pad bytes present in the block.
+
+
+ A padder that adds Null byte padding to a block.
+
+
+ Return the name of the algorithm the cipher implements.
+
+
+ the name of the algorithm the cipher implements.
+
+
+
+ Initialise the padder.
+
+
+ - a SecureRandom if available.
+
+
+
+ add the pad bytes to the passed in block, returning the
+ number of bytes added.
+
+
+
+ return the number of pad bytes present in the block.
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+ @param associatedText associated text, if any
+
+
+ Base constructor.
+
+ @param key key to be used by underlying cipher
+ @param macSize macSize in bits
+ @param nonce nonce to be used
+ @param associatedText associated text, if any
+
+
+ The minimum bitlength of the private value.
+
+
+ The bitlength of the private value.
+
+
+ Construct without a usage index, this will do a random construction of G.
+
+ @param L desired length of prime P in bits (the effective key size).
+ @param N desired length of prime Q in bits.
+ @param certainty certainty level for prime number generation.
+ @param random the source of randomness to use.
+
+
+ Construct for a specific usage index - this has the effect of using verifiable canonical generation of G.
+
+ @param L desired length of prime P in bits (the effective key size).
+ @param N desired length of prime Q in bits.
+ @param certainty certainty level for prime number generation.
+ @param random the source of randomness to use.
+ @param usageIndex a valid usage index.
+
+
+ return true if the passed in key is a DES-EDE weak key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+ @param length number of bytes making up the key
+
+
+ return true if the passed in key is a DES-EDE weak key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 2/3 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 2 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ return true if the passed in key is a real 3 part DES-EDE key.
+
+ @param key bytes making up the key
+ @param offset offset into the byte array the key starts at
+
+
+ DES has 16 weak keys. This method will check
+ if the given DES key material is weak or semi-weak.
+ Key material that is too short is regarded as weak.
+
+ See "Applied
+ Cryptography" by Bruce Schneier for more information.
+
+ @return true if the given DES key material is weak or semi-weak,
+ false otherwise.
+
+
+ DES Keys use the LSB as the odd parity bit. This can
+ be used to check for corrupt keys.
+
+ @param bytes the byte array to set the parity on.
+
+
+ return the generator - g
+
+
+ return private value limit - l
+
+
+ parameters for Key derivation functions for ISO-18033
+
+
+ parameters for using an integrated cipher in stream mode.
+
+
+ @param derivation the derivation parameter for the KDF function.
+ @param encoding the encoding parameter for the KDF function.
+ @param macKeySize the size of the MAC key (in bits).
+
+
+ @param derivation the derivation parameter for the KDF function.
+ @param encoding the encoding parameter for the KDF function.
+ @param macKeySize the size of the MAC key (in bits).
+ @param cipherKeySize the size of the associated Cipher key (in bits).
+
+
+ parameters for Key derivation functions for IEEE P1363a
+
+
+ Parameters for mask derivation functions.
+
+
+ Parameters for NaccacheStern public private key generation. For details on
+ this cipher, please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Parameters for generating a NaccacheStern KeyPair.
+
+ @param random
+ The source of randomness
+ @param strength
+ The desired strength of the Key in Bits
+ @param certainty
+ the probability that the generated primes are not really prime
+ as integer: 2^(-certainty) is then the probability
+ @param countSmallPrimes
+ How many small key factors are desired
+
+
+ * Parameters for a NaccacheStern KeyPair.
+ *
+ * @param random
+ * The source of randomness
+ * @param strength
+ * The desired strength of the Key in Bits
+ * @param certainty
+ * the probability that the generated primes are not really prime
+ * as integer: 2^(-certainty) is then the probability
+ * @param cntSmallPrimes
+ * How many small key factors are desired
+ * @param debug
+ * Ignored
+
+
+ @return Returns the certainty.
+
+
+ @return Returns the countSmallPrimes.
+
+
+ Public key parameters for NaccacheStern cipher. For details on this cipher,
+ please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ @param privateKey
+
+
+ @return Returns the g.
+
+
+ @return Returns the lowerSigmaBound.
+
+
+ @return Returns the n.
+
+
+ Private key parameters for NaccacheStern cipher. For details on this cipher,
+ please see
+
+ http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf
+
+
+ Constructs a NaccacheSternPrivateKey
+
+ @param g
+ the public enryption parameter g
+ @param n
+ the public modulus n = p*q
+ @param lowerSigmaBound
+ the public lower sigma bound up to which data can be encrypted
+ @param smallPrimes
+ the small primes, of which sigma is constructed in the right
+ order
+ @param phi_n
+ the private modulus phi(n) = (p-1)(q-1)
+
+
+ Cipher parameters with a fixed salt value associated with them.
+
+
+
+ Parameters for the Skein hash function - a series of byte[] strings identified by integer tags.
+
+
+ Parameterised Skein can be used for:
+
+ MAC generation, by providing a key .
+ Randomised hashing, by providing a nonce .
+ A hash function for digital signatures, associating a
+ public key with the message digest.
+ A key derivation function, by providing a
+ key identifier .
+ Personalised hashing, by providing a
+ recommended format or
+ arbitrary personalisation string.
+
+
+
+
+
+
+
+
+ The parameter type for a secret key, supporting MAC or KDF functions: 0
+
+
+
+
+ The parameter type for the Skein configuration block: 4
+
+
+
+
+ The parameter type for a personalisation string: 8
+
+
+
+
+ The parameter type for a public key: 12
+
+
+
+
+ The parameter type for a key identifier string: 16
+
+
+
+
+ The parameter type for a nonce: 20
+
+
+
+
+ The parameter type for the message: 48
+
+
+
+
+ The parameter type for the output transformation: 63
+
+
+
+
+ Obtains a map of type (int) to value (byte[]) for the parameters tracked in this object.
+
+
+
+
+ Obtains the value of the key parameter , or null if not
+ set.
+
+ The key.
+
+
+
+ Obtains the value of the personalisation parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the public key parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the key identifier parameter , or
+ null if not set.
+
+
+
+
+ Obtains the value of the nonce parameter , or null if
+ not set.
+
+
+
+
+ A builder for .
+
+
+
+
+ Sets a parameters to apply to the Skein hash function.
+
+
+ Parameter types must be in the range 0,5..62, and cannot use the value 48
+ (reserved for message body).
+
+ Parameters with type < 48 are processed before
+ the message content, parameters with type > 48
+ are processed after the message and prior to output.
+
+ the type of the parameter, in the range 5..62.
+ the byte sequence of the parameter.
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Implements the recommended personalisation format for Skein defined in Section 4.11 of
+ the Skein 1.3 specification.
+
+
+ The format is YYYYMMDD email@address distinguisher, encoded to a byte
+ sequence using UTF-8 encoding.
+
+ the date the personalised application of the Skein was defined.
+ the email address of the creation of the personalised application.
+ an arbitrary personalisation string distinguishing the application.
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Sets the parameter.
+
+
+
+
+ Constructs a new instance with the parameters provided to this
+ builder.
+
+
+
+
+ Parameters for tweakable block ciphers.
+
+
+
+
+ Gets the key.
+
+ the key to use, or null to use the current key.
+
+
+
+ Gets the tweak value.
+
+ The tweak to use, or null to use the current tweak.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ true if the internal state represents the signature described in the passed in array.
+
+
+ Reset the internal state
+
+
+ The Digital Signature Algorithm - as described in "Handbook of Applied
+ Cryptography", pages 452 - 453.
+
+
+ Default configuration, random K values.
+
+
+ Configuration with an alternate, possibly deterministic calculator of K.
+
+ @param kCalculator a K value calculator.
+
+
+ Generate a signature for the given message using the key we were
+ initialised with. For conventional DSA the message should be a SHA-1
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a DSA signature for
+ the passed in message for standard DSA the message should be a
+ SHA-1 hash of the real message to be verified.
+
+
+ EC-DSA as described in X9.62
+
+
+ Default configuration, random K values.
+
+
+ Configuration with an alternate, possibly deterministic calculator of K.
+
+ @param kCalculator a K value calculator.
+
+
+ Generate a signature for the given message using the key we were
+ initialised with. For conventional DSA the message should be a SHA-1
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a DSA signature for
+ the passed in message (for standard DSA the message should be
+ a SHA-1 hash of the real message to be verified).
+
+
+ GOST R 34.10-2001 Signature Algorithm
+
+
+ generate a signature for the given message using the key we were
+ initialised with. For conventional GOST3410 the message should be a GOST3411
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a GOST3410 signature for
+ the passed in message (for standard GOST3410 the message should be
+ a GOST3411 hash of the real message to be verified).
+
+
+ EC-NR as described in IEEE 1363-2000
+
+
+ generate a signature for the given message using the key we were
+ initialised with. Generally, the order of the curve should be at
+ least as long as the hash of the message of interest, and with
+ ECNR it *must* be at least as long.
+
+ @param digest the digest to be signed.
+ @exception DataLengthException if the digest is longer than the key allows
+
+
+ return true if the value r and s represent a signature for the
+ message passed in. Generally, the order of the curve should be at
+ least as long as the hash of the message of interest, and with
+ ECNR, it *must* be at least as long. But just in case the signer
+ applied mod(n) to the longer digest, this implementation will
+ apply mod(n) during verification.
+
+ @param digest the digest to be verified.
+ @param r the r value of the signature.
+ @param s the s value of the signature.
+ @exception DataLengthException if the digest is longer than the key allows
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ true if the internal state represents the signature described in the passed in array.
+
+
+ Reset the internal state
+
+
+ Gost R 34.10-94 Signature Algorithm
+
+
+ generate a signature for the given message using the key we were
+ initialised with. For conventional Gost3410 the message should be a Gost3411
+ hash of the message of interest.
+
+ @param message the message that will be verified later.
+
+
+ return true if the value r and s represent a Gost3410 signature for
+ the passed in message for standard Gost3410 the message should be a
+ Gost3411 hash of the real message to be verified.
+
+
+ initialise the signer for signing or verification.
+
+ @param forSigning
+ true if for signing, false otherwise
+ @param parameters
+ necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using the key
+ we were initialised with.
+
+
+ return true if the internal state represents the signature described in
+ the passed in array.
+
+
+ A deterministic K calculator based on the algorithm in section 3.2 of RFC 6979.
+
+
+ Base constructor.
+
+ @param digest digest to build the HMAC on.
+
+
+ Interface define calculators of K values for DSA/ECDSA.
+
+
+ Return true if this calculator is deterministic, false otherwise.
+
+ @return true if deterministic, otherwise false.
+
+
+ Non-deterministic initialiser.
+
+ @param n the order of the DSA group.
+ @param random a source of randomness.
+
+
+ Deterministic initialiser.
+
+ @param n the order of the DSA group.
+ @param d the DSA private value.
+ @param message the message being signed.
+
+
+ Return the next valid value of K.
+
+ @return a K value.
+
+
+ ISO9796-2 - mechanism using a hash function with recovery (scheme 2 and 3).
+
+ Note: the usual length for the salt is the length of the hash
+ function used in bytes.
+
+
+
+
+ Return a reference to the recoveredMessage message.
+
+ The full/partial recoveredMessage message.
+
+
+
+
+ Generate a signer with either implicit or explicit trailers for ISO9796-2, scheme 2 or 3.
+
+ base cipher to use for signature creation/verification
+ digest to use.
+ length of salt in bytes.
+ whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+
+ cipher to use.
+
+ digest to sign with.
+
+ length of salt in bytes.
+
+
+
+ Initialise the signer.
+ true if for signing, false if for verification.
+ parameters for signature generation/verification. If the
+ parameters are for generation they should be a ParametersWithRandom,
+ a ParametersWithSalt, or just an RsaKeyParameters object. If RsaKeyParameters
+ are passed in a SecureRandom will be created.
+
+ if wrong parameter type or a fixed
+ salt is passed in which is the wrong length.
+
+
+
+ compare two byte arrays - constant time.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+ Return true if the full message was recoveredMessage.
+
+ true on full message recovery, false otherwise, or if not sure.
+
+
+
+ int to octet string.
+ int to octet string.
+
+
+ long to octet string.
+
+
+ mask generator function, as described in Pkcs1v2.
+
+
+ ISO9796-2 - mechanism using a hash function with recovery (scheme 1)
+
+
+
+ Return a reference to the recoveredMessage message.
+
+ The full/partial recoveredMessage message.
+
+
+
+
+ Generate a signer with either implicit or explicit trailers for ISO9796-2.
+
+ base cipher to use for signature creation/verification
+ digest to use.
+ whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+
+ cipher to use.
+
+ digest to sign with.
+
+
+
+ compare two byte arrays - constant time.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+ Return true if the full message was recoveredMessage.
+
+ true on full message recovery, false otherwise.
+
+
+
+ RSA-PSS as described in Pkcs# 1 v 2.1.
+
+ Note: the usual value for the salt length is the number of
+ bytes in the hash function.
+
+
+
+ Basic constructor
+ the asymmetric cipher to use.
+ the digest to use.
+ the length of the salt to use (in bytes).
+
+
+ Basic constructor
+ the asymmetric cipher to use.
+ the digest to use.
+ the fixed salt to be used.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+
+ int to octet string.
+
+
+ mask generator function, as described in Pkcs1v2.
+
+
+
+ Load oid table.
+
+
+
+ Initialise the signer for signing or verification.
+
+ @param forSigning true if for signing, false otherwise
+ @param param necessary parameters.
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ Generate a signature for the message we've been loaded with using
+ the key we were initialised with.
+
+
+ return true if the internal state represents the signature described
+ in the passed in array.
+
+
+ X9.31-1998 - signing using a hash.
+
+ The message digest hash, H, is encapsulated to form a byte string as follows
+
+
+ EB = 06 || PS || 0xBA || H || TRAILER
+
+ where PS is a string of bytes all of value 0xBB of length such that |EB|=|n|, and TRAILER is the ISO/IEC 10118 part number†for the digest. The byte string, EB, is converted to an integer value, the message representative, f.
+
+
+ Generate a signer with either implicit or explicit trailers for X9.31.
+
+ @param cipher base cipher to use for signature creation/verification
+ @param digest digest to use.
+ @param implicit whether or not the trailer is implicit or gives the hash.
+
+
+ Constructor for a signer with an explicit digest trailer.
+
+ @param cipher cipher to use.
+ @param digest digest to sign with.
+
+
+ clear possible sensitive data
+
+
+ update the internal digest with the byte b
+
+
+ update the internal digest with the byte array in
+
+
+ reset the internal state
+
+
+ generate a signature for the loaded message using the key we were
+ initialised with.
+
+
+ return true if the signature represents a ISO9796-2 signature
+ for the passed in message.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RFC 5246 7.2
+
+
+
+ This message notifies the recipient that the sender will not send any more messages on this
+ connection. Note that as of TLS 1.1, failure to properly close a connection no longer
+ requires that a session not be resumed. This is a change from TLS 1.0 ("The session becomes
+ unresumable if any connection is terminated without proper close_notify messages with level
+ equal to warning.") to conform with widespread implementation practice.
+
+
+ An inappropriate message was received. This alert is always fatal and should never be
+ observed in communication between proper implementations.
+
+
+ This alert is returned if a record is received with an incorrect MAC. This alert also MUST be
+ returned if an alert is sent because a TLSCiphertext decrypted in an invalid way: either it
+ wasn't an even multiple of the block length, or its padding values, when checked, weren't
+ correct. This message is always fatal and should never be observed in communication between
+ proper implementations (except when messages were corrupted in the network).
+
+
+ This alert was used in some earlier versions of TLS, and may have permitted certain attacks
+ against the CBC mode [CBCATT]. It MUST NOT be sent by compliant implementations.
+
+
+ A TLSCiphertext record was received that had a length more than 2^14+2048 bytes, or a record
+ decrypted to a TLSCompressed record with more than 2^14+1024 bytes. This message is always
+ fatal and should never be observed in communication between proper implementations (except
+ when messages were corrupted in the network).
+
+
+ The decompression function received improper input (e.g., data that would expand to excessive
+ length). This message is always fatal and should never be observed in communication between
+ proper implementations.
+
+
+ Reception of a handshake_failure alert message indicates that the sender was unable to
+ negotiate an acceptable set of security parameters given the options available. This is a
+ fatal error.
+
+
+ This alert was used in SSLv3 but not any version of TLS. It MUST NOT be sent by compliant
+ implementations.
+
+
+ A certificate was corrupt, contained signatures that did not verify correctly, etc.
+
+
+ A certificate was of an unsupported type.
+
+
+ A certificate was revoked by its signer.
+
+
+ A certificate has expired or is not currently valid.
+
+
+ Some other (unspecified) issue arose in processing the certificate, rendering it
+ unacceptable.
+
+
+ A field in the handshake was out of range or inconsistent with other fields. This message is
+ always fatal.
+
+
+ A valid certificate chain or partial chain was received, but the certificate was not accepted
+ because the CA certificate could not be located or couldn't be matched with a known, trusted
+ CA. This message is always fatal.
+
+
+ A valid certificate was received, but when access control was applied, the sender decided not
+ to proceed with negotiation. This message is always fatal.
+
+
+ A message could not be decoded because some field was out of the specified range or the
+ length of the message was incorrect. This message is always fatal and should never be
+ observed in communication between proper implementations (except when messages were corrupted
+ in the network).
+
+
+ A handshake cryptographic operation failed, including being unable to correctly verify a
+ signature or validate a Finished message. This message is always fatal.
+
+
+ This alert was used in some earlier versions of TLS. It MUST NOT be sent by compliant
+ implementations.
+
+
+ The protocol version the client has attempted to negotiate is recognized but not supported.
+ (For example, old protocol versions might be avoided for security reasons.) This message is
+ always fatal.
+
+
+ Returned instead of handshake_failure when a negotiation has failed specifically because the
+ server requires ciphers more secure than those supported by the client. This message is
+ always fatal.
+
+
+ An internal error unrelated to the peer or the correctness of the protocol (such as a memory
+ allocation failure) makes it impossible to continue. This message is always fatal.
+
+
+ This handshake is being canceled for some reason unrelated to a protocol failure. If the user
+ cancels an operation after the handshake is complete, just closing the connection by sending
+ a close_notify is more appropriate. This alert should be followed by a close_notify. This
+ message is generally a warning.
+
+
+ Sent by the client in response to a hello request or by the server in response to a client
+ hello after initial handshaking. Either of these would normally lead to renegotiation; when
+ that is not appropriate, the recipient should respond with this alert. At that point, the
+ original requester can decide whether to proceed with the connection. One case where this
+ would be appropriate is where a server has spawned a process to satisfy a request; the
+ process might receive security parameters (key length, authentication, etc.) at startup, and
+ it might be difficult to communicate changes to these parameters after that point. This
+ message is always a warning.
+
+
+ Sent by clients that receive an extended server hello containing an extension that they did
+ not put in the corresponding client hello. This message is always fatal.
+
+
+ This alert is sent by servers who are unable to retrieve a certificate chain from the URL
+ supplied by the client (see Section 3.3). This message MAY be fatal - for example if client
+ authentication is required by the server for the handshake to continue and the server is
+ unable to retrieve the certificate chain, it may send a fatal alert.
+
+
+ This alert is sent by servers that receive a server_name extension request, but do not
+ recognize the server name. This message MAY be fatal.
+
+
+ This alert is sent by clients that receive an invalid certificate status response (see
+ Section 3.6). This message is always fatal.
+
+
+ This alert is sent by servers when a certificate hash does not match a client provided
+ certificate_hash. This message is always fatal.
+
+
+ If the server does not recognize the PSK identity, it MAY respond with an
+ "unknown_psk_identity" alert message.
+
+
+ If TLS_FALLBACK_SCSV appears in ClientHello.cipher_suites and the highest protocol version
+ supported by the server is higher than the version indicated in ClientHello.client_version,
+ the server MUST respond with an inappropriate_fallback alert.
+
+
+
+ RFC 5246 7.2
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+ A queue for bytes.
+
+ This file could be more optimized.
+
+
+
+
+ The smallest number which can be written as 2^x which is bigger than i.
+
+
+ The initial size for our buffer.
+
+
+ The buffer where we store our data.
+
+
+ How many bytes at the beginning of the buffer are skipped.
+
+
+ How many bytes in the buffer are valid data.
+
+
+ Read data from the buffer.
+ The buffer where the read data will be copied to.
+ How many bytes to skip at the beginning of buf.
+ How many bytes to read at all.
+ How many bytes from our data to skip.
+
+
+ Add some data to our buffer.
+ A byte-array to read data from.
+ How many bytes to skip at the beginning of the array.
+ How many bytes to read from the array.
+
+
+ Remove some bytes from our data from the beginning.
+ How many bytes to remove.
+
+
+ The number of bytes which are available in this buffer.
+
+
+ Parsing and encoding of a Certificate struct from RFC 4346.
+
+
+ opaque ASN.1Cert<2^24-1>;
+
+ struct {
+ ASN.1Cert certificate_list<0..2^24-1>;
+ } Certificate;
+
+
+ @see Org.BouncyCastle.Asn1.X509.X509CertificateStructure
+
+
+ The certificates.
+
+
+ @return an array of {@link org.bouncycastle.asn1.x509.Certificate} representing a certificate
+ chain.
+
+
+ @return true if this certificate chain contains no certificates, or
+ false otherwise.
+
+
+ Encode this {@link Certificate} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link Certificate} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link Certificate} object.
+ @throws IOException
+
+
+ Parsing and encoding of a CertificateRequest struct from RFC 4346.
+
+
+ struct {
+ ClientCertificateType certificate_types<1..2^8-1>;
+ DistinguishedName certificate_authorities<3..2^16-1>
+ } CertificateRequest;
+
+
+ @see ClientCertificateType
+ @see X509Name
+
+
+ @param certificateTypes see {@link ClientCertificateType} for valid constants.
+ @param certificateAuthorities an {@link IList} of {@link X509Name}.
+
+
+ @return an array of certificate types
+ @see {@link ClientCertificateType}
+
+
+ @return an {@link IList} of {@link SignatureAndHashAlgorithm} (or null before TLS 1.2).
+
+
+ @return an {@link IList} of {@link X509Name}
+
+
+ Encode this {@link CertificateRequest} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateRequest} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateRequest} object.
+ @throws IOException
+
+
+ Encode this {@link CertificateStatus} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateStatus} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateStatus} object.
+ @throws IOException
+
+
+ Encode this {@link CertificateStatusRequest} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateStatusRequest} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateStatusRequest} object.
+ @throws IOException
+
+
+ @param type
+ see {@link CertChainType} for valid constants.
+ @param urlAndHashList
+ a {@link IList} of {@link UrlAndHash}.
+
+
+ @return {@link CertChainType}
+
+
+ @return an {@link IList} of {@link UrlAndHash}
+
+
+ Encode this {@link CertificateUrl} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link CertificateUrl} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link CertificateUrl} object.
+ @throws IOException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RFC 2246 A.5
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ A combined hash, which implements md5(m) || sha1(m).
+
+
+ @see org.bouncycastle.crypto.Digest#update(byte[], int, int)
+
+
+ @see org.bouncycastle.crypto.Digest#doFinal(byte[], int)
+
+
+ @see org.bouncycastle.crypto.Digest#reset()
+
+
+
+ RFC 2246 6.1
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 2246 6.2.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Accept only the group parameters specified in RFC 5054 Appendix A.
+
+
+ Specify a custom set of acceptable group parameters.
+
+ @param groups a {@link Vector} of acceptable {@link SRP6GroupParameters}
+
+
+ Buffers input until the hash algorithm is determined.
+
+
+ @return a {@link SignatureAndHashAlgorithm} (or null before TLS 1.2).
+
+
+ Encode this {@link DigitallySigned} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link DigitallySigned} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link DigitallySigned} object.
+ @throws IOException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Check that there are no "extra" messages left in the current inbound flight
+
+
+ RFC 4347 4.1.2.5 Anti-replay
+
+ Support fast rejection of duplicate records by maintaining a sliding receive window
+
+
+ Check whether a received record with the given sequence number should be rejected as a duplicate.
+
+ @param seq the 48-bit DTLSPlainText.sequence_number field of a received record.
+ @return true if the record should be discarded without further processing.
+
+
+ Report that a received record with the given sequence number passed authentication checks.
+
+ @param seq the 48-bit DTLSPlainText.sequence_number field of an authenticated record.
+
+
+ When a new epoch begins, sequence numbers begin again at 0
+
+
+ RFC 4492 5.4. (Errata ID: 2389)
+
+
+
+ RFC 4492 5.4
+
+
+
+ Indicates the elliptic curve domain parameters are conveyed verbosely, and the
+ underlying finite field is a prime field.
+
+
+ Indicates the elliptic curve domain parameters are conveyed verbosely, and the
+ underlying finite field is a characteristic-2 field.
+
+
+ Indicates that a named curve is used. This option SHOULD be used when applicable.
+
+
+
+ RFC 4492 5.1.2
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 5705
+
+
+ RFC 5246 7.4.1.4.1
+
+
+ Encode this {@link HeartbeatExtension} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link HeartbeatExtension} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link HeartbeatExtension} object.
+ @throws IOException
+
+
+ Encode this {@link HeartbeatMessage} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link HeartbeatMessage} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link HeartbeatMessage} object.
+ @throws IOException
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+ RFC 2246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+ RFC 4492 5.1.1
+ The named curves defined here are those specified in SEC 2 [13]. Note that many of
+ these curves are also recommended in ANSI X9.62 [7] and FIPS 186-2 [11]. Values 0xFE00
+ through 0xFEFF are reserved for private use. Values 0xFF01 and 0xFF02 indicate that the
+ client supports arbitrary prime and characteristic-2 curves, respectively (the curve
+ parameters must be encoded explicitly in ECParameters).
+
+
+
+ Encode this {@link NewSessionTicket} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link NewSessionTicket} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link NewSessionTicket} object.
+ @throws IOException
+
+
+ RFC 3546 3.6
+
+
+ @param responderIDList
+ an {@link IList} of {@link ResponderID}, specifying the list of trusted OCSP
+ responders. An empty list has the special meaning that the responders are
+ implicitly known to the server - e.g., by prior arrangement.
+ @param requestExtensions
+ OCSP request extensions. A null value means that there are no extensions.
+
+
+ @return an {@link IList} of {@link ResponderID}
+
+
+ @return OCSP request extensions
+
+
+ Encode this {@link OcspStatusRequest} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link OcspStatusRequest} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return an {@link OcspStatusRequest} object.
+ @throws IOException
+
+
+ RFC 5246
+
+ Note that the values here are implementation-specific and arbitrary. It is recommended not to
+ depend on the particular values (e.g. serialization).
+
+
+
+
+
+
+ An implementation of the TLS 1.0/1.1/1.2 record layer, allowing downgrade to SSLv3.
+
+
+ RFC 5246 E.1. "Earlier versions of the TLS specification were not fully clear on what the
+ record layer version number (TLSPlaintext.version) should contain when sending ClientHello
+ (i.e., before it is known which version of the protocol will be employed). Thus, TLS servers
+ compliant with this specification MUST accept any value {03,XX} as the record layer version
+ number for ClientHello."
+
+
+ @return {@link ConnectionEnd}
+
+
+ @return {@link CipherSuite}
+
+
+ @return {@link CompressionMethod}
+
+
+ @return {@link PRFAlgorithm}
+
+
+ Encode this {@link ServerDHParams} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerDHParams} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerDHParams} object.
+ @throws IOException
+
+
+ Encode this {@link ServerName} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerName} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerName} object.
+ @throws IOException
+
+
+ @param serverNameList an {@link IList} of {@link ServerName}.
+
+
+ @return an {@link IList} of {@link ServerName}.
+
+
+ Encode this {@link ServerNameList} to a {@link Stream}.
+
+ @param output
+ the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerNameList} from a {@link Stream}.
+
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link ServerNameList} object.
+ @throws IOException
+
+
+ Encode this {@link ServerSRPParams} to an {@link OutputStream}.
+
+ @param output
+ the {@link OutputStream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link ServerSRPParams} from an {@link InputStream}.
+
+ @param input
+ the {@link InputStream} to parse from.
+ @return a {@link ServerSRPParams} object.
+ @throws IOException
+
+
+ RFC 5246 7.4.1.4.1 (in RFC 2246, there were no specific values assigned)
+
+
+ RFC 5246 7.4.1.4.1
+
+
+ @param hash {@link HashAlgorithm}
+ @param signature {@link SignatureAlgorithm}
+
+
+ @return {@link HashAlgorithm}
+
+
+ @return {@link SignatureAlgorithm}
+
+
+ Encode this {@link SignatureAndHashAlgorithm} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link SignatureAndHashAlgorithm} from a {@link Stream}.
+
+ @param input the {@link Stream} to parse from.
+ @return a {@link SignatureAndHashAlgorithm} object.
+ @throws IOException
+
+
+ An implementation of {@link TlsSRPIdentityManager} that simulates the existence of "unknown" identities
+ to obscure the fact that there is no verifier for them.
+
+
+ Create a {@link SimulatedTlsSRPIdentityManager} that implements the algorithm from RFC 5054 2.5.1.3
+
+ @param group the {@link SRP6GroupParameters} defining the group that SRP is operating in
+ @param seedKey the secret "seed key" referred to in RFC 5054 2.5.1.3
+ @return an instance of {@link SimulatedTlsSRPIdentityManager}
+
+
+ HMAC implementation based on original internet draft for HMAC (RFC 2104)
+
+ The difference is that padding is concatentated versus XORed with the key
+
+ H(K + opad, H(K + ipad, text))
+
+
+ Base constructor for one of the standard digest algorithms that the byteLength of
+ the algorithm is know for. Behaviour is undefined for digests other than MD5 or SHA1.
+
+ @param digest the digest.
+
+
+ Reset the mac generator.
+
+
+ RFC 4680
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called by the protocol handler to report the server certificate.
+
+
+ This method is responsible for certificate verification and validation
+
+ The server received
+
+
+
+
+ Return client credentials in response to server's certificate request
+
+
+ A containing server certificate request details
+
+
+ A to be used for client authentication
+ (or null for no client authentication)
+
+
+
+
+
+ A generic TLS 1.0-1.2 / SSLv3 block cipher. This can be used for AES or 3DES for example.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Called at the start of a new TLS session, before any other methods.
+
+
+ A
+
+
+
+ Return the session this client wants to resume, if any.
+ Note that the peer's certificate chain for the session (if any) may need to be periodically revalidated.
+
+ A representing the resumable session to be used for this connection,
+ or null to use a new session.
+
+
+
+
+ Return the to use for the TLSPlaintext.version field prior to
+ receiving the server version. NOTE: This method is not called for DTLS.
+
+
+ See RFC 5246 E.1.: "TLS clients that wish to negotiate with older servers MAY send any value
+ {03,XX} as the record layer version number. Typical values would be {03,00}, the lowest
+ version number supported by the client, and the value of ClientHello.client_version. No
+ single value will guarantee interoperability with all old servers, but this is a complex
+ topic beyond the scope of this document."
+
+ The to use.
+
+
+
+ Get the list of cipher suites that this client supports.
+
+
+ An array of values, each specifying a supported cipher suite.
+
+
+
+
+ Get the list of compression methods that this client supports.
+
+
+ An array of values, each specifying a supported compression method.
+
+
+
+
+ Get the (optional) table of client extensions to be included in (extended) client hello.
+
+
+ A (Int32 -> byte[]). May be null.
+
+
+
+
+
+
+
+
+ Notifies the client of the session_id sent in the ServerHello.
+
+ An array of
+
+
+
+ Report the cipher suite that was selected by the server.
+
+
+ The protocol handler validates this value against the offered cipher suites
+
+
+
+ A
+
+
+
+
+ Report the compression method that was selected by the server.
+
+
+ The protocol handler validates this value against the offered compression methods
+
+
+
+ A
+
+
+
+
+ Report the extensions from an extended server hello.
+
+
+ Will only be called if we returned a non-null result from .
+
+
+ A (Int32 -> byte[])
+
+
+
+ A list of
+
+
+
+
+ Return an implementation of to negotiate the key exchange
+ part of the protocol.
+
+
+ A
+
+
+
+
+
+ Return an implementation of to handle authentication
+ part of the protocol.
+
+
+
+
+ A list of
+
+
+
+ RFC 5077 3.3. NewSessionTicket Handshake Message
+
+ This method will be called (only) when a NewSessionTicket handshake message is received. The
+ ticket is opaque to the client and clients MUST NOT examine the ticket under the assumption
+ that it complies with e.g. RFC 5077 4. Recommended Ticket Construction .
+
+ The ticket
+
+
+
+ Constructor for blocking mode.
+ @param stream The bi-directional stream of data to/from the server
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for blocking mode.
+ @param input The stream of data from the server
+ @param output The stream of data to the server
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for non-blocking mode.
+
+ When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to
+ provide the received ciphertext, then use
+ {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+
+ Similarly, when data needs to be sent, use
+ {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use
+ {@link #readOutput(byte[], int, int)} to get the corresponding
+ ciphertext.
+
+ @param secureRandom
+ Random number generator for various cryptographic functions
+
+
+ Initiates a TLS handshake in the role of client.
+
+ In blocking mode, this will not return until the handshake is complete.
+ In non-blocking mode, use {@link TlsPeer#NotifyHandshakeComplete()} to
+ receive a callback when the handshake is complete.
+
+ @param tlsClient The {@link TlsClient} to use for the handshake.
+ @throws IOException If in blocking mode and handshake was not successful.
+
+
+ Used to get the resumable session, if any, used by this connection. Only available after the
+ handshake has successfully completed.
+
+ @return A {@link TlsSession} representing the resumable session used by this connection, or
+ null if no resumable session available.
+ @see TlsPeer#NotifyHandshakeComplete()
+
+
+ Export keying material according to RFC 5705: "Keying Material Exporters for TLS".
+
+ @param asciiLabel indicates which application will use the exported keys.
+ @param context_value allows the application using the exporter to mix its own data with the TLS PRF for
+ the exporter output.
+ @param length the number of bytes to generate
+ @return a pseudorandom bit string of 'length' bytes generated from the master_secret.
+
+
+ (D)TLS DH key exchange.
+
+
+ (D)TLS ECDH key exchange (see RFC 4492).
+
+
+ (D)TLS ECDHE key exchange (see RFC 4492).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A generic interface for key exchange implementations in (D)TLS.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A generic TLS MAC implementation, acting as an HMAC based on some underlying Digest.
+
+
+
+ Generate a new instance of an TlsMac.
+
+ @param context the TLS client context
+ @param digest The digest to use.
+ @param key A byte-array where the key for this MAC is located.
+ @param keyOff The number of bytes to skip, before the key starts in the buffer.
+ @param keyLen The length of the key.
+
+
+ @return the MAC write secret
+
+
+ @return The output length of this MAC.
+
+
+ Calculate the MAC for some given data.
+
+ @param type The message type of the message.
+ @param message A byte-buffer containing the message.
+ @param offset The number of bytes to skip, before the message starts.
+ @param length The length of the message.
+ @return A new byte-buffer containing the MAC value.
+
+
+
+ A NULL CipherSuite, with optional MAC.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ draft-mathewson-no-gmtunixtime-00 2. "If existing users of a TLS implementation may rely on
+ gmt_unix_time containing the current time, we recommend that implementors MAY provide the
+ ability to set gmt_unix_time as an option only, off by default."
+
+
+ true if the current time should be used in the gmt_unix_time field of
+ Random, or false if gmt_unix_time should contain a cryptographically
+ random value.
+
+
+
+
+ Report whether the server supports secure renegotiation
+
+
+ The protocol handler automatically processes the relevant extensions
+
+
+ A , true if the server supports secure renegotiation
+
+
+
+
+
+ Return an implementation of to handle record compression.
+
+ A
+
+
+
+
+ Return an implementation of to use for encryption/decryption.
+
+ A
+
+
+
+ This method will be called when an alert is raised by the protocol.
+
+
+ A human-readable message explaining what caused this alert. May be null.
+ The Exception that caused this alert to be raised. May be null.
+
+
+ This method will be called when an alert is received from the remote peer.
+
+
+
+
+ Notifies the peer that the handshake has been successfully completed.
+
+
+
+ This method is called, when a change cipher spec message is received.
+
+ @throws IOException If the message has an invalid content or the handshake is not in the correct
+ state.
+
+
+ Read data from the network. The method will return immediately, if there is still some data
+ left in the buffer, or block until some application data has been read from the network.
+
+ @param buf The buffer where the data will be copied to.
+ @param offset The position where the data will be placed in the buffer.
+ @param len The maximum number of bytes to read.
+ @return The number of bytes read.
+ @throws IOException If something goes wrong during reading data.
+
+
+ Send some application data to the remote system.
+
+ The method will handle fragmentation internally.
+
+ @param buf The buffer with the data.
+ @param offset The position in the buffer where the data is placed.
+ @param len The length of the data.
+ @throws IOException If something goes wrong during sending.
+
+
+ The secure bidirectional stream for this connection
+ Only allowed in blocking mode.
+
+
+ Offer input from an arbitrary source. Only allowed in non-blocking mode.
+
+ After this method returns, the input buffer is "owned" by this object. Other code
+ must not attempt to do anything with it.
+
+ This method will decrypt and process all records that are fully available.
+ If only part of a record is available, the buffer will be retained until the
+ remainder of the record is offered.
+
+ If any records containing application data were processed, the decrypted data
+ can be obtained using {@link #readInput(byte[], int, int)}. If any records
+ containing protocol data were processed, a response may have been generated.
+ You should always check to see if there is any available output after calling
+ this method by calling {@link #getAvailableOutputBytes()}.
+ @param input The input buffer to offer
+ @throws IOException If an error occurs while decrypting or processing a record
+
+
+ Gets the amount of received application data. A call to {@link #readInput(byte[], int, int)}
+ is guaranteed to be able to return at least this much data.
+
+ Only allowed in non-blocking mode.
+ @return The number of bytes of available application data
+
+
+ Retrieves received application data. Use {@link #getAvailableInputBytes()} to check
+ how much application data is currently available. This method functions similarly to
+ {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data
+ is available, nothing will be copied and zero will be returned.
+
+ Only allowed in non-blocking mode.
+ @param buffer The buffer to hold the application data
+ @param offset The start offset in the buffer at which the data is written
+ @param length The maximum number of bytes to read
+ @return The total number of bytes copied to the buffer. May be less than the
+ length specified if the length was greater than the amount of available data.
+
+
+ Offer output from an arbitrary source. Only allowed in non-blocking mode.
+
+ After this method returns, the specified section of the buffer will have been
+ processed. Use {@link #readOutput(byte[], int, int)} to get the bytes to
+ transmit to the other peer.
+
+ This method must not be called until after the handshake is complete! Attempting
+ to call it before the handshake is complete will result in an exception.
+ @param buffer The buffer containing application data to encrypt
+ @param offset The offset at which to begin reading data
+ @param length The number of bytes of data to read
+ @throws IOException If an error occurs encrypting the data, or the handshake is not complete
+
+
+ Gets the amount of encrypted data available to be sent. A call to
+ {@link #readOutput(byte[], int, int)} is guaranteed to be able to return at
+ least this much data.
+
+ Only allowed in non-blocking mode.
+ @return The number of bytes of available encrypted data
+
+
+ Retrieves encrypted data to be sent. Use {@link #getAvailableOutputBytes()} to check
+ how much encrypted data is currently available. This method functions similarly to
+ {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data
+ is available, nothing will be copied and zero will be returned.
+
+ Only allowed in non-blocking mode.
+ @param buffer The buffer to hold the encrypted data
+ @param offset The start offset in the buffer at which the data is written
+ @param length The maximum number of bytes to read
+ @return The total number of bytes copied to the buffer. May be less than the
+ length specified if the length was greater than the amount of available data.
+
+
+ Terminate this connection with an alert. Can be used for normal closure too.
+
+ @param alertLevel
+ See {@link AlertLevel} for values.
+ @param alertDescription
+ See {@link AlertDescription} for values.
+ @throws IOException
+ If alert was fatal.
+
+
+ Closes this connection.
+
+ @throws IOException If something goes wrong during closing.
+
+
+ Make sure the InputStream 'buf' now empty. Fail otherwise.
+
+ @param buf The InputStream to check.
+ @throws IOException If 'buf' is not empty.
+
+
+ 'sender' only relevant to SSLv3
+
+
+ Both streams can be the same object
+
+
+ (D)TLS PSK key exchange (RFC 4279).
+
+
+ (D)TLS and SSLv3 RSA key exchange.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A (Int32 -> byte[]). Will never be null.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get the (optional) table of server extensions to be included in (extended) server hello.
+
+
+ A (Int32 -> byte[]). May be null.
+
+
+
+
+
+ A ( ). May be null.
+
+
+
+
+
+
+
+
+ This method will be called (only) if the server included an extension of type
+ "status_request" with empty "extension_data" in the extended server hello. See RFC 3546
+ 3.6. Certificate Status Request . If a non-null is returned, it
+ is sent to the client as a handshake message of type "certificate_status".
+
+ A to be sent to the client (or null for none).
+
+
+
+
+
+
+
+
+
+ ( )
+
+
+
+
+ Called by the protocol handler to report the client certificate, only if GetCertificateRequest
+ returned non-null.
+
+ Note: this method is responsible for certificate verification and validation.
+ the effective client certificate (may be an empty chain).
+
+
+
+ RFC 5077 3.3. NewSessionTicket Handshake Message.
+
+ This method will be called (only) if a NewSessionTicket extension was sent by the server. See
+ RFC 5077 4. Recommended Ticket Construction for recommended format and protection.
+
+ The ticket )
+
+
+
+ Constructor for blocking mode.
+ @param stream The bi-directional stream of data to/from the client
+ @param output The stream of data to the client
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for blocking mode.
+ @param input The stream of data from the client
+ @param output The stream of data to the client
+ @param secureRandom Random number generator for various cryptographic functions
+
+
+ Constructor for non-blocking mode.
+
+ When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to
+ provide the received ciphertext, then use
+ {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+
+ Similarly, when data needs to be sent, use
+ {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use
+ {@link #readOutput(byte[], int, int)} to get the corresponding
+ ciphertext.
+
+ @param secureRandom
+ Random number generator for various cryptographic functions
+
+
+ Receives a TLS handshake in the role of server.
+
+ In blocking mode, this will not return until the handshake is complete.
+ In non-blocking mode, use {@link TlsPeer#notifyHandshakeComplete()} to
+ receive a callback when the handshake is complete.
+
+ @param tlsServer
+ @throws IOException If in blocking mode and handshake was not successful.
+
+
+
+
+
+ Check whether the given SRP group parameters are acceptable for use.
+
+ @param group the {@link SRP6GroupParameters} to check
+ @return true if (and only if) the specified group parameters are acceptable
+
+
+ Lookup the {@link TlsSRPLoginParameters} corresponding to the specified identity.
+
+ NOTE: To avoid "identity probing", unknown identities SHOULD be handled as recommended in RFC
+ 5054 2.5.1.3. {@link SimulatedTlsSRPIdentityManager} is provided for this purpose.
+
+ @param identity
+ the SRP identity sent by the connecting client
+ @return the {@link TlsSRPLoginParameters} for the specified identity, or else 'simulated'
+ parameters if the identity is not recognized. A null value is also allowed, but not
+ recommended.
+
+
+ (D)TLS SRP key exchange (RFC 5054).
+
+
+ RFC 5764 DTLS Extension to Establish Keys for SRTP.
+
+
+
+
+
+
+
+
+
+
+
+ Some helper functions for MicroTLS.
+
+
+ Add a 'signature_algorithms' extension to existing extensions.
+
+ @param extensions A {@link Hashtable} to add the extension to.
+ @param supportedSignatureAlgorithms {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @throws IOException
+
+
+ Get a 'signature_algorithms' extension from extensions.
+
+ @param extensions A {@link Hashtable} to get the extension from, if it is present.
+ @return A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}, or null.
+ @throws IOException
+
+
+ Create a 'signature_algorithms' extension value.
+
+ @param supportedSignatureAlgorithms A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @return A byte array suitable for use as an extension value.
+ @throws IOException
+
+
+ Read 'signature_algorithms' extension data.
+
+ @param extensionData The extension data.
+ @return A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}.
+ @throws IOException
+
+
+ RFC 6066 5.
+
+
+ Encode this {@link UrlAndHash} to a {@link Stream}.
+
+ @param output the {@link Stream} to encode to.
+ @throws IOException
+
+
+ Parse a {@link UrlAndHash} from a {@link Stream}.
+
+ @param context
+ the {@link TlsContext} of the current connection.
+ @param input
+ the {@link Stream} to parse from.
+ @return a {@link UrlAndHash} object.
+ @throws IOException
+
+
+ RFC 5764 4.1.1
+
+
+ @param protectionProfiles see {@link SrtpProtectionProfile} for valid constants.
+ @param mki valid lengths from 0 to 255.
+
+
+ @return see {@link SrtpProtectionProfile} for valid constants.
+
+
+ @return valid lengths from 0 to 255.
+
+
+ RFC 4681
+
+
+ return a = a + b - b preserved.
+
+
+ unsigned comparison on two arrays - note the arrays may
+ start with leading zeros.
+
+
+ return z = x / y - done in place (z value preserved, x contains the
+ remainder)
+
+
+ return whether or not a BigInteger is probably prime with a
+ probability of 1 - (1/2)**certainty.
+ From Knuth Vol 2, pg 395.
+
+
+ Calculate the numbers u1, u2, and u3 such that:
+
+ u1 * a + u2 * b = u3
+
+ where u3 is the greatest common divider of a and b.
+ a and b using the extended Euclid algorithm (refer p. 323
+ of The Art of Computer Programming vol 2, 2nd ed).
+ This also seems to have the side effect of calculating
+ some form of multiplicative inverse.
+
+ @param a First number to calculate gcd for
+ @param b Second number to calculate gcd for
+ @param u1Out the return object for the u1 value
+ @return The greatest common divisor of a and b
+
+
+ return w with w = x * x - w is assumed to have enough space.
+
+
+ return x with x = y * z - x is assumed to have enough space.
+
+
+ Calculate mQuote = -m^(-1) mod b with b = 2^32 (32 = word size)
+
+
+ Montgomery multiplication: a = x * y * R^(-1) mod m
+
+ Based algorithm 14.36 of Handbook of Applied Cryptography.
+
+ m, x, y should have length n
+ a should have length (n + 1)
+ b = 2^32, R = b^n
+
+ The result is put in x
+
+ NOTE: the indices of x, y, m, a different in HAC and in Java
+
+
+ return x = x % y - done in place (y value preserved)
+
+
+ do a left shift - this returns a new array.
+
+
+ do a right shift - this does it in place.
+
+
+ do a right shift by one - this does it in place.
+
+
+ returns x = x - y - we assume x is >= y
+
+
+ Utility methods for generating primes and testing for primality.
+
+
+ Used to return the output from the
+ {@linkplain Primes#enhancedMRProbablePrimeTest(BigInteger, SecureRandom, int) Enhanced
+ Miller-Rabin Probabilistic Primality Test}
+
+
+ Used to return the output from the {@linkplain Primes#generateSTRandomPrime(Digest, int, byte[]) Shawe-Taylor Random_Prime Routine}
+
+
+ FIPS 186-4 C.6 Shawe-Taylor Random_Prime Routine
+
+ Construct a provable prime number using a hash function.
+
+ @param hash
+ the {@link Digest} instance to use (as "Hash()"). Cannot be null.
+ @param length
+ the length (in bits) of the prime to be generated. Must be at least 2.
+ @param inputSeed
+ the seed to be used for the generation of the requested prime. Cannot be null or
+ empty.
+ @return an {@link STOutput} instance containing the requested prime.
+
+
+ FIPS 186-4 C.3.2 Enhanced Miller-Rabin Probabilistic Primality Test
+
+ Run several iterations of the Miller-Rabin algorithm with randomly-chosen bases. This is an
+ alternative to {@link #isMRProbablePrime(BigInteger, SecureRandom, int)} that provides more
+ information about a composite candidate, which may be useful when generating or validating
+ RSA moduli.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param random
+ the source of randomness to use to choose bases.
+ @param iterations
+ the number of randomly-chosen bases to perform the test for.
+ @return an {@link MROutput} instance that can be further queried for details.
+
+
+ A fast check for small divisors, up to some implementation-specific limit.
+
+ @param candidate
+ the {@link BigInteger} instance to test for division by small factors.
+
+ @return true if the candidate is found to have any small factors,
+ false otherwise.
+
+
+ FIPS 186-4 C.3.1 Miller-Rabin Probabilistic Primality Test
+
+ Run several iterations of the Miller-Rabin algorithm with randomly-chosen bases.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param random
+ the source of randomness to use to choose bases.
+ @param iterations
+ the number of randomly-chosen bases to perform the test for.
+ @return false if any witness to compositeness is found amongst the chosen bases
+ (so candidate is definitely NOT prime), or else true
+ (indicating primality with some probability dependent on the number of iterations
+ that were performed).
+
+
+ FIPS 186-4 C.3.1 Miller-Rabin Probabilistic Primality Test (to a fixed base).
+
+ Run a single iteration of the Miller-Rabin algorithm against the specified base.
+
+ @param candidate
+ the {@link BigInteger} instance to test for primality.
+ @param baseValue
+ the base value to use for this iteration.
+ @return false if the specified base is a witness to compositeness (so
+ candidate is definitely NOT prime), or else true.
+
+
+ Simple shift-and-add multiplication. Serves as reference implementation
+ to verify (possibly faster) implementations, and for very small scalars.
+
+ @param p
+ The point to multiply.
+ @param k
+ The multiplier.
+ @return The result of the point multiplication kP.
+
+
+ Base class for an elliptic curve.
+
+
+ Adds PreCompInfo for a point on this curve, under a given name. Used by
+ ECMultipliers to save the precomputation for this ECPoint for use
+ by subsequent multiplication.
+
+ @param point
+ The ECPoint to store precomputations for.
+ @param name
+ A String used to index precomputations of different types.
+ @param preCompInfo
+ The values precomputed by the ECMultiplier.
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system. Where more
+ than one point is to be normalized, this method will generally be more efficient than
+ normalizing each point separately.
+
+ @param points
+ An array of points that will be updated in place with their normalized versions,
+ where necessary
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system. Where more
+ than one point is to be normalized, this method will generally be more efficient than
+ normalizing each point separately. An (optional) z-scaling factor can be applied; effectively
+ each z coordinate is scaled by this value prior to normalization (but only one
+ actual multiplication is needed).
+
+ @param points
+ An array of points that will be updated in place with their normalized versions,
+ where necessary
+ @param off
+ The start of the range of points to normalize
+ @param len
+ The length of the range of points to normalize
+ @param iso
+ The (optional) z-scaling factor - can be null
+
+
+ Sets the default ECMultiplier, unless already set.
+
+
+ Decode a point on this curve from its ASN.1 encoding. The different
+ encodings are taken account of, including point compression for
+ Fp (X9.62 s 4.2.1 pg 17).
+ @return The decoded point.
+
+
+ Elliptic curve over Fp
+
+
+ The auxiliary values s0 and
+ s1 used for partial modular reduction for
+ Koblitz curves.
+
+
+ Solves a quadratic equation z2 + z = beta(X9.62
+ D.1.6) The other solution is z + 1.
+
+ @param beta
+ The value to solve the qradratic equation for.
+ @return the solution for z2 + z = beta or
+ null if no solution exists.
+
+
+ @return the auxiliary values s0 and
+ s1 used for partial modular reduction for
+ Koblitz curves.
+
+
+ Returns true if this is a Koblitz curve (ABC curve).
+ @return true if this is a Koblitz curve (ABC curve), false otherwise
+
+
+ Elliptic curves over F2m. The Weierstrass equation is given by
+ y2 + xy = x3 + ax2 + b.
+
+
+ The exponent m of F2m .
+
+
+ TPB: The integer k where xm +
+ xk + 1 represents the reduction polynomial
+ f(z).
+ PPB: The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ TPB: Always set to 0
+ PPB: The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ TPB: Always set to 0
+ PPB: The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ The point at infinity on this curve.
+
+
+ Constructor for Trinomial Polynomial Basis (TPB).
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+
+
+ Constructor for Trinomial Polynomial Basis (TPB).
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param order The order of the main subgroup of the elliptic curve.
+ @param cofactor The cofactor of the elliptic curve, i.e.
+ #Ea (F2m ) = h * n.
+
+
+ Constructor for Pentanomial Polynomial Basis (PPB).
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+
+
+ Constructor for Pentanomial Polynomial Basis (PPB).
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param a The coefficient a in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param b The coefficient b in the Weierstrass equation
+ for non-supersingular elliptic curves over
+ F2m .
+ @param order The order of the main subgroup of the elliptic curve.
+ @param cofactor The cofactor of the elliptic curve, i.e.
+ #Ea (F2m ) = h * n.
+
+
+ Return true if curve uses a Trinomial basis.
+
+ @return true if curve Trinomial, false otherwise.
+
+
+ return the field name for this field.
+
+ @return the string "Fp".
+
+
+ return a sqrt root - the routine verifies that the calculation
+ returns the right value - if none exists it returns null.
+
+
+ Class representing the Elements of the finite field
+ F2m in polynomial basis (PB)
+ representation. Both trinomial (Tpb) and pentanomial (Ppb) polynomial
+ basis representations are supported. Gaussian normal basis (GNB)
+ representation is not supported.
+
+
+ Indicates gaussian normal basis representation (GNB). Number chosen
+ according to X9.62. GNB is not implemented at present.
+
+
+ Indicates trinomial basis representation (Tpb). Number chosen
+ according to X9.62.
+
+
+ Indicates pentanomial basis representation (Ppb). Number chosen
+ according to X9.62.
+
+
+ Tpb or Ppb.
+
+
+ The exponent m of F2m .
+
+
+ The LongArray holding the bits.
+
+
+ Constructor for Ppb.
+ @param m The exponent m of
+ F2m .
+ @param k1 The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k2 The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param k3 The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+ @param x The BigInteger representing the value of the field element.
+
+
+ Constructor for Tpb.
+ @param m The exponent m of
+ F2m .
+ @param k The integer k where xm +
+ xk + 1 represents the reduction
+ polynomial f(z).
+ @param x The BigInteger representing the value of the field element.
+
+
+ Checks, if the ECFieldElements a and b
+ are elements of the same field F2m
+ (having the same representation).
+ @param a field element.
+ @param b field element to be compared.
+ @throws ArgumentException if a and b
+ are not elements of the same field
+ F2m (having the same
+ representation).
+
+
+ @return the representation of the field
+ F2m , either of
+ {@link F2mFieldElement.Tpb} (trinomial
+ basis representation) or
+ {@link F2mFieldElement.Ppb} (pentanomial
+ basis representation).
+
+
+ @return the degree m of the reduction polynomial
+ f(z).
+
+
+ @return Tpb: The integer k where xm +
+ xk + 1 represents the reduction polynomial
+ f(z).
+ Ppb: The integer k1 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ @return Tpb: Always returns 0
+ Ppb: The integer k2 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ @return Tpb: Always set to 0
+ Ppb: The integer k3 where xm +
+ xk3 + xk2 + xk1 + 1
+ represents the reduction polynomial f(z).
+
+
+ base class for points on elliptic curves.
+
+
+ Normalizes this point, and then returns the affine x-coordinate.
+
+ Note: normalization can be expensive, this method is deprecated in favour
+ of caller-controlled normalization.
+
+
+ Normalizes this point, and then returns the affine y-coordinate.
+
+ Note: normalization can be expensive, this method is deprecated in favour
+ of caller-controlled normalization.
+
+
+ Returns the affine x-coordinate after checking that this point is normalized.
+
+ @return The affine x-coordinate of this point
+ @throws IllegalStateException if the point is not normalized
+
+
+ Returns the affine y-coordinate after checking that this point is normalized
+
+ @return The affine y-coordinate of this point
+ @throws IllegalStateException if the point is not normalized
+
+
+ Returns the x-coordinate.
+
+ Caution: depending on the curve's coordinate system, this may not be the same value as in an
+ affine coordinate system; use Normalize() to get a point where the coordinates have their
+ affine values, or use AffineXCoord if you expect the point to already have been normalized.
+
+ @return the x-coordinate of this point
+
+
+ Returns the y-coordinate.
+
+ Caution: depending on the curve's coordinate system, this may not be the same value as in an
+ affine coordinate system; use Normalize() to get a point where the coordinates have their
+ affine values, or use AffineYCoord if you expect the point to already have been normalized.
+
+ @return the y-coordinate of this point
+
+
+ Normalization ensures that any projective coordinate is 1, and therefore that the x, y
+ coordinates reflect those of the equivalent point in an affine coordinate system.
+
+ @return a new ECPoint instance representing the same point, but with normalized coordinates
+
+
+ return the field element encoded with point compression. (S 4.3.6)
+
+
+ Multiplies this ECPoint by the given number.
+ @param k The multiplicator.
+ @return k * this.
+
+
+ Elliptic curve points over Fp
+
+
+ Create a point which encodes without point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+
+
+ Create a point that encodes with or without point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+ @param withCompression if true encode with point compression
+
+
+ Elliptic curve points over F2m
+
+
+ @param curve base curve
+ @param x x point
+ @param y y point
+
+
+ @param curve base curve
+ @param x x point
+ @param y y point
+ @param withCompression true if encode with point compression.
+
+
+ Constructor for point at infinity
+
+
+ Class representing a simple version of a big decimal. A
+ SimpleBigDecimal is basically a
+ {@link java.math.BigInteger BigInteger} with a few digits on the right of
+ the decimal point. The number of (binary) digits on the right of the decimal
+ point is called the scale of the SimpleBigDecimal.
+ Unlike in {@link java.math.BigDecimal BigDecimal}, the scale is not adjusted
+ automatically, but must be set manually. All SimpleBigDecimals
+ taking part in the same arithmetic operation must have equal scale. The
+ result of a multiplication of two SimpleBigDecimals returns a
+ SimpleBigDecimal with double scale.
+
+
+ Returns a SimpleBigDecimal representing the same numerical
+ value as value.
+ @param value The value of the SimpleBigDecimal to be
+ created.
+ @param scale The scale of the SimpleBigDecimal to be
+ created.
+ @return The such created SimpleBigDecimal.
+
+
+ Constructor for SimpleBigDecimal. The value of the
+ constructed SimpleBigDecimal Equals bigInt /
+ 2scale .
+ @param bigInt The bigInt value parameter.
+ @param scale The scale of the constructed SimpleBigDecimal.
+
+
+ Class holding methods for point multiplication based on the window
+ τ-adic nonadjacent form (WTNAF). The algorithms are based on the
+ paper "Improved Algorithms for Arithmetic on Anomalous Binary Curves"
+ by Jerome A. Solinas. The paper first appeared in the Proceedings of
+ Crypto 1997.
+
+
+ The window width of WTNAF. The standard value of 4 is slightly less
+ than optimal for running time, but keeps space requirements for
+ precomputation low. For typical curves, a value of 5 or 6 results in
+ a better running time. When changing this value, the
+ αu 's must be computed differently, see
+ e.g. "Guide to Elliptic Curve Cryptography", Darrel Hankerson,
+ Alfred Menezes, Scott Vanstone, Springer-Verlag New York Inc., 2004,
+ p. 121-122
+
+
+ 24
+
+
+ The αu 's for a=0 as an array
+ of ZTauElements.
+
+
+ The αu 's for a=0 as an array
+ of TNAFs.
+
+
+ The αu 's for a=1 as an array
+ of ZTauElements.
+
+
+ The αu 's for a=1 as an array
+ of TNAFs.
+
+
+ Computes the norm of an element λ of
+ Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ].
+ @return The norm of λ.
+
+
+ Computes the norm of an element λ of
+ R [τ], where λ = u + vτ
+ and u and u are real numbers (elements of
+ R ).
+ @param mu The parameter μ of the elliptic curve.
+ @param u The real part of the element λ of
+ R [τ].
+ @param v The τ-adic part of the element
+ λ of R [τ].
+ @return The norm of λ.
+
+
+ Rounds an element λ of R [τ]
+ to an element of Z [τ], such that their difference
+ has minimal norm. λ is given as
+ λ = λ0 + λ1 τ.
+ @param lambda0 The component λ0 .
+ @param lambda1 The component λ1 .
+ @param mu The parameter μ of the elliptic curve. Must
+ equal 1 or -1.
+ @return The rounded element of Z [τ].
+ @throws ArgumentException if lambda0 and
+ lambda1 do not have same scale.
+
+
+ Approximate division by n. For an integer
+ k, the value λ = s k / n is
+ computed to c bits of accuracy.
+ @param k The parameter k.
+ @param s The curve parameter s0 or
+ s1 .
+ @param vm The Lucas Sequence element Vm .
+ @param a The parameter a of the elliptic curve.
+ @param m The bit length of the finite field
+ F m .
+ @param c The number of bits of accuracy, i.e. the scale of the returned
+ SimpleBigDecimal.
+ @return The value λ = s k / n computed to
+ c bits of accuracy.
+
+
+ Computes the τ-adic NAF (non-adjacent form) of an
+ element λ of Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ].
+ @return The τ-adic NAF of λ.
+
+
+ Applies the operation τ() to an
+ AbstractF2mPoint.
+ @param p The AbstractF2mPoint to which τ() is applied.
+ @return τ(p)
+
+
+ Returns the parameter μ of the elliptic curve.
+ @param curve The elliptic curve from which to obtain μ.
+ The curve must be a Koblitz curve, i.e. a Equals
+ 0 or 1 and b Equals
+ 1.
+ @return μ of the elliptic curve.
+ @throws ArgumentException if the given ECCurve is not a Koblitz
+ curve.
+
+
+ Calculates the Lucas Sequence elements Uk-1 and
+ Uk or Vk-1 and
+ Vk .
+ @param mu The parameter μ of the elliptic curve.
+ @param k The index of the second element of the Lucas Sequence to be
+ returned.
+ @param doV If set to true, computes Vk-1 and
+ Vk , otherwise Uk-1 and
+ Uk .
+ @return An array with 2 elements, containing Uk-1
+ and Uk or Vk-1
+ and Vk .
+
+
+ Computes the auxiliary value tw . If the width is
+ 4, then for mu = 1, tw = 6 and for
+ mu = -1, tw = 10
+ @param mu The parameter μ of the elliptic curve.
+ @param w The window width of the WTNAF.
+ @return the auxiliary value tw
+
+
+ Computes the auxiliary values s0 and
+ s1 used for partial modular reduction.
+ @param curve The elliptic curve for which to compute
+ s0 and s1 .
+ @throws ArgumentException if curve is not a
+ Koblitz curve (Anomalous Binary Curve, ABC).
+
+
+ Partial modular reduction modulo
+ (τm - 1)/(τ - 1).
+ @param k The integer to be reduced.
+ @param m The bitlength of the underlying finite field.
+ @param a The parameter a of the elliptic curve.
+ @param s The auxiliary values s0 and
+ s1 .
+ @param mu The parameter μ of the elliptic curve.
+ @param c The precision (number of bits of accuracy) of the partial
+ modular reduction.
+ @return ρ := k partmod (τm - 1)/(τ - 1)
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by a BigInteger using the reduced τ-adic
+ NAF (RTNAF) method.
+ @param p The AbstractF2mPoint to Multiply.
+ @param k The BigInteger by which to Multiply p.
+ @return k * p
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the τ-adic NAF (TNAF) method.
+ @param p The AbstractF2mPoint to Multiply.
+ @param lambda The element λ of
+ Z [τ].
+ @return λ * p
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the τ-adic NAF (TNAF) method, given the TNAF
+ of λ.
+ @param p The AbstractF2mPoint to Multiply.
+ @param u The the TNAF of λ..
+ @return λ * p
+
+
+ Computes the [τ]-adic window NAF of an element
+ λ of Z [τ].
+ @param mu The parameter μ of the elliptic curve.
+ @param lambda The element λ of
+ Z [τ] of which to compute the
+ [τ]-adic NAF.
+ @param width The window width of the resulting WNAF.
+ @param pow2w 2width .
+ @param tw The auxiliary value tw .
+ @param alpha The αu 's for the window width.
+ @return The [τ]-adic window NAF of
+ λ.
+
+
+ Does the precomputation for WTNAF multiplication.
+ @param p The ECPoint for which to do the precomputation.
+ @param a The parameter a of the elliptic curve.
+ @return The precomputation array for p.
+
+
+ Class representing an element of Z [τ]. Let
+ λ be an element of Z [τ]. Then
+ λ is given as λ = u + vτ. The
+ components u and v may be used directly, there
+ are no accessor methods.
+ Immutable class.
+
+
+ The "real" part of λ.
+
+
+ The "τ-adic" part of λ.
+
+
+ Constructor for an element λ of
+ Z [τ].
+ @param u The "real" part of λ.
+ @param v The "τ-adic" part of
+ λ.
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve the curve to use
+ @param x affine x co-ordinate
+ @param y affine y co-ordinate
+ @param withCompression if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(boolean)}
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.CreatePoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ return a sqrt root - the routine verifies that the calculation returns the right value - if
+ none exists it returns null.
+
+
+ Create a point which encodes with point compression.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ Create a point that encodes with or without point compresion.
+
+ @param curve
+ the curve to use
+ @param x
+ affine x co-ordinate
+ @param y
+ affine y co-ordinate
+ @param withCompression
+ if true encode with point compression
+
+ @deprecated per-point compression property will be removed, refer
+ {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ @deprecated Use ECCurve.createPoint to construct points
+
+
+ @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)}
+
+
+ Joye's double-add algorithm.
+
+
+ Interface for classes encapsulating a point multiplication algorithm
+ for ECPoints.
+
+
+ Multiplies the ECPoint p by k, i.e.
+ p is added k times to itself.
+ @param p The ECPoint to be multiplied.
+ @param k The factor by which p is multiplied.
+ @return p multiplied by k.
+
+
+ Class holding precomputation data for fixed-point multiplications.
+
+
+ Array holding the precomputed ECPoints used for a fixed
+ point multiplication.
+
+
+ The width used for the precomputation. If a larger width precomputation
+ is already available this may be larger than was requested, so calling
+ code should refer to the actual width.
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (right-to-left) using
+ mixed coordinates.
+
+
+ By default, addition will be done in Jacobian coordinates, and doubling will be done in
+ Modified Jacobian coordinates (independent of the original coordinate system of each point).
+
+
+ Montgomery ladder.
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (left-to-right).
+
+
+ Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (right-to-left).
+
+
+ Interface for classes storing precomputation data for multiplication
+ algorithms. Used as a Memento (see GOF patterns) for
+ WNafMultiplier.
+
+
+ Class implementing the WNAF (Window Non-Adjacent Form) multiplication
+ algorithm.
+
+
+ Multiplies this by an integer k using the
+ Window NAF method.
+ @param k The integer by which this is multiplied.
+ @return A new ECPoint which equals this
+ multiplied by k.
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @return the window size to use
+
+
+ Class holding precomputation data for the WNAF (Window Non-Adjacent Form)
+ algorithm.
+
+
+ Array holding the precomputed ECPoints used for a Window
+ NAF multiplication.
+
+
+ Array holding the negations of the precomputed ECPoints used
+ for a Window NAF multiplication.
+
+
+ Holds an ECPoint representing Twice(this). Used for the
+ Window NAF multiplication to create or extend the precomputed values.
+
+
+ Computes the Window NAF (non-adjacent Form) of an integer.
+ @param width The width w of the Window NAF. The width is
+ defined as the minimal number w, such that for any
+ w consecutive digits in the resulting representation, at
+ most one is non-zero.
+ @param k The integer of which the Window NAF is computed.
+ @return The Window NAF of the given width, such that the following holds:
+ k = ∑i=0 l-1 ki 2i
+ , where the ki denote the elements of the
+ returned byte[].
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @return the window size to use
+
+
+ Determine window width to use for a scalar multiplication of the given size.
+
+ @param bits the bit-length of the scalar to multiply by
+ @param windowSizeCutoffs a monotonically increasing list of bit sizes at which to increment the window width
+ @return the window size to use
+
+
+ Class implementing the WTNAF (Window
+ τ-adic Non-Adjacent Form) algorithm.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by k using the reduced τ-adic NAF (RTNAF)
+ method.
+ @param p The AbstractF2mPoint to multiply.
+ @param k The integer by which to multiply k.
+ @return p multiplied by k.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ] using
+ the τ-adic NAF (TNAF) method.
+ @param p The AbstractF2mPoint to multiply.
+ @param lambda The element λ of
+ Z [τ] of which to compute the
+ [τ]-adic NAF.
+ @return p multiplied by λ.
+
+
+ Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint}
+ by an element λ of Z [τ]
+ using the window τ-adic NAF (TNAF) method, given the
+ WTNAF of λ.
+ @param p The AbstractF2mPoint to multiply.
+ @param u The the WTNAF of λ..
+ @return λ * p
+
+
+ Class holding precomputation data for the WTNAF (Window
+ τ-adic Non-Adjacent Form) algorithm.
+
+
+ Array holding the precomputed AbstractF2mPoints used for the
+ WTNAF multiplication in
+ {@link org.bouncycastle.math.ec.multiplier.WTauNafMultiplier.multiply()
+ WTauNafMultiplier.multiply()}.
+
+
+ 'Zeroless' Signed Digit Left-to-Right.
+
+
+ 'Zeroless' Signed Digit Right-to-Left.
+
+
+
+
+ BasicOcspResponse ::= SEQUENCE {
+ tbsResponseData ResponseData,
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL
+ }
+
+
+
+
+ The DER encoding of the tbsResponseData field.
+ In the event of an encoding error.
+
+
+ The certificates, if any, associated with the response.
+ In the event of an encoding error.
+
+
+
+ Verify the signature against the tbsResponseData object we contain.
+
+
+
+ The ASN.1 encoded representation of this object.
+
+
+ Generator for basic OCSP response objects.
+
+
+ basic constructor
+
+
+ construct with the responderID to be the SHA-1 keyHash of the passed in public key.
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param certStatus status of the certificate - null if okay
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param nextUpdate date when next update should be requested
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Add a response for a particular Certificate ID.
+
+ @param certID certificate ID details
+ @param thisUpdate date this response was valid on
+ @param nextUpdate date when next update should be requested
+ @param certStatus status of the certificate - null if okay
+ @param singleExtensions optional extensions
+
+
+ Set the extensions for the response.
+
+ @param responseExtensions the extension object to carry.
+
+
+
+ Generate the signed response using the passed in signature calculator.
+
+ Implementation of signing calculator factory.
+ The certificate chain associated with the response signer.
+ "produced at" date.
+
+
+
+ Return an IEnumerable of the signature names supported by the generator.
+
+ @return an IEnumerable containing recognised names.
+
+
+ create from an issuer certificate and the serial number of the
+ certificate it signed.
+ @exception OcspException if any problems occur creating the id fields.
+
+
+ return the serial number for the certificate associated
+ with this request.
+
+
+ Create a new CertificateID for a new serial number derived from a previous one
+ calculated for the same CA certificate.
+
+ @param original the previously calculated CertificateID for the CA.
+ @param newSerialNumber the serial number for the new certificate of interest.
+
+ @return a new CertificateID for newSerialNumber
+
+
+
+ OcspRequest ::= SEQUENCE {
+ tbsRequest TBSRequest,
+ optionalSignature [0] EXPLICIT Signature OPTIONAL }
+
+ TBSRequest ::= SEQUENCE {
+ version [0] EXPLICIT Version DEFAULT v1,
+ requestorName [1] EXPLICIT GeneralName OPTIONAL,
+ requestList SEQUENCE OF Request,
+ requestExtensions [2] EXPLICIT Extensions OPTIONAL }
+
+ Signature ::= SEQUENCE {
+ signatureAlgorithm AlgorithmIdentifier,
+ signature BIT STRING,
+ certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL}
+
+ Version ::= INTEGER { v1(0) }
+
+ Request ::= SEQUENCE {
+ reqCert CertID,
+ singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL }
+
+ CertID ::= SEQUENCE {
+ hashAlgorithm AlgorithmIdentifier,
+ issuerNameHash OCTET STRING, -- Hash of Issuer's DN
+ issuerKeyHash OCTET STRING, -- Hash of Issuers public key
+ serialNumber CertificateSerialNumber }
+
+
+
+ Return the DER encoding of the tbsRequest field.
+ @return DER encoding of tbsRequest
+ @throws OcspException in the event of an encoding error.
+
+
+ return the object identifier representing the signature algorithm
+
+
+ If the request is signed return a possibly empty CertStore containing the certificates in the
+ request. If the request is not signed the method returns null.
+
+ @return null if not signed, a CertStore otherwise
+ @throws OcspException
+
+
+ Return whether or not this request is signed.
+
+ @return true if signed false otherwise.
+
+
+ Verify the signature against the TBSRequest object we contain.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Add a request for the given CertificateID.
+
+ @param certId certificate ID of interest
+
+
+ Add a request with extensions
+
+ @param certId certificate ID of interest
+ @param singleRequestExtensions the extensions to attach to the request
+
+
+ Set the requestor name to the passed in X509Principal
+
+ @param requestorName a X509Principal representing the requestor name.
+
+
+ Generate an unsigned request
+
+ @return the OcspReq
+ @throws OcspException
+
+
+ Return an IEnumerable of the signature names supported by the generator.
+
+ @return an IEnumerable containing recognised names.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ base generator for an OCSP response - at the moment this only supports the
+ generation of responses containing BasicOCSP responses.
+
+
+ note 4 is not used.
+
+
+ Carrier for a ResponderID.
+
+
+ wrapper for the RevokedInfo object
+
+
+ return the revocation reason. Note: this field is optional, test for it
+ with hasRevocationReason() first.
+ @exception InvalidOperationException if a reason is asked for and none is avaliable
+
+
+ Return the status object for the response - null indicates good.
+
+ @return the status object for the response, null if it is good.
+
+
+ return the NextUpdate value - note: this is an optional field so may
+ be returned as null.
+
+ @return nextUpdate, or null if not present.
+
+
+ wrapper for the UnknownInfo object
+
+
+
+ Utility class for creating IBasicAgreement objects from their names/Oids
+
+
+
+
+ Cipher Utility class contains methods that can not be specifically grouped into other classes.
+
+
+
+
+ Returns a ObjectIdentifier for a give encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ Utility class for creating IDigest objects from their names/Oids
+
+
+
+
+ Returns a ObjectIdentifier for a given digest mechanism.
+
+ A string representation of the digest meanism.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ A class containing methods to interface the BouncyCastle world to the .NET Crypto world.
+
+
+
+
+ Create an System.Security.Cryptography.X509Certificate from an X509Certificate Structure.
+
+
+ A System.Security.Cryptography.X509Certificate.
+
+
+
+ Utility class for creating HMac object from their names/Oids
+
+
+
+
+
+
+
+
+
+ Returns a ObjectIdentifier for a give encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the Oid is not available.
+
+
+
+ Create and auto-seed an instance based on the given algorithm.
+
+ Equivalent to GetInstance(algorithm, true)
+ e.g. "SHA256PRNG"
+
+
+
+ Create an instance based on the given algorithm, with optional auto-seeding
+
+ e.g. "SHA256PRNG"
+ If true, the instance will be auto-seeded.
+
+
+
+ To replicate existing predictable output, replace with GetInstance("SHA1PRNG", false), followed by SetSeed(seed)
+
+
+
+ Use the specified instance of IRandomGenerator as random source.
+
+ This constructor performs no seeding of either the IRandomGenerator or the
+ constructed SecureRandom . It is the responsibility of the client to provide
+ proper seed material as necessary/appropriate for the given IRandomGenerator
+ implementation.
+
+ The source to generate all random bytes from.
+
+
+ base constructor.
+
+
+ create a SecurityUtilityException with the given message.
+
+ @param message the message to be carried with the exception.
+
+
+
+ Signer Utility class contains methods that can not be specifically grouped into other classes.
+
+
+
+
+ Returns an ObjectIdentifier for a given encoding.
+
+ A string representation of the encoding.
+ A DerObjectIdentifier, null if the OID is not available.
+
+
+
+ Utility class for creating IWrapper objects from their names/Oids
+
+
+
+ PEM generator for the original set of PEM objects used in Open SSL.
+
+
+ Class for reading OpenSSL PEM encoded streams containing
+ X509 certificates, PKCS8 encoded keys and PKCS7 objects.
+
+ In the case of PKCS7 objects the reader will return a CMS ContentInfo object. Keys and
+ Certificates will be returned using the appropriate java.security type.
+
+
+ Create a new PemReader
+
+ @param reader the Reader
+
+
+ Create a new PemReader with a password finder
+
+ @param reader the Reader
+ @param pFinder the password finder
+
+
+ Reads in a X509Certificate.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a X509CRL.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a PKCS10 certification request.
+
+ @return the certificate request.
+ @throws IOException if an I/O error occured
+
+
+ Reads in a X509 Attribute Certificate.
+
+ @return the X509 Attribute Certificate
+ @throws IOException if an I/O error occured
+
+
+ Reads in a PKCS7 object. This returns a ContentInfo object suitable for use with the CMS
+ API.
+
+ @return the X509Certificate
+ @throws IOException if an I/O error occured
+
+
+ Read a Key Pair
+
+
+ General purpose writer for OpenSSL PEM objects.
+
+
+ The TextWriter object to write the output to.
+
+
+ Constructor for an unencrypted private key PEM object.
+
+ @param key private key to be encoded.
+
+
+ Constructor for an encrypted private key PEM object.
+
+ @param key private key to be encoded
+ @param algorithm encryption algorithm to use
+ @param provider provider to use
+ @throws NoSuchAlgorithmException if algorithm/mode cannot be found
+
+
+
+ A class for verifying and creating Pkcs10 Certification requests.
+
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+ see
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ Name of Sig Alg.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+ Matching Private key for nominated (above) public key to be used to sign the request.
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ The factory for signature calculators to sign the PKCS#10 request with.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+ Matching Private key for nominated (above) public key to be used to sign the request.
+
+
+
+ Get the public key.
+
+ The public key.
+
+
+
+ Verify Pkcs10 Cert Request is valid.
+
+ true = valid.
+
+
+
+ A class for creating and verifying Pkcs10 Certification requests (this is an extension on ).
+ The requests are made using delay signing. This is useful for situations where
+ the private key is in another environment and not directly accessible (e.g. HSM)
+ So the first step creates the request, then the signing is done outside this
+ object and the signature is then used to complete the request.
+
+
+ CertificationRequest ::= Sequence {
+ certificationRequestInfo CertificationRequestInfo,
+ signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},
+ signature BIT STRING
+ }
+
+ CertificationRequestInfo ::= Sequence {
+ version Integer { v1(0) } (v1,...),
+ subject Name,
+ subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+ attributes [0] Attributes{{ CRIAttributes }}
+ }
+
+ Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+
+ Attr { ATTRIBUTE:IOSet } ::= Sequence {
+ type ATTRIBUTE.&id({IOSet}),
+ values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+ }
+
+ see
+
+
+
+ Instantiate a Pkcs10CertificationRequest object with the necessary credentials.
+
+ Name of Sig Alg.
+ X509Name of subject eg OU="My unit." O="My Organisatioin" C="au"
+ Public Key to be included in cert reqest.
+ ASN1Set of Attributes.
+
+ After the object is constructed use the and finally the
+ SignRequest methods to finalize the request.
+
+
+
+ simply return the cert entry for the private key
+
+
+ Utility class for reencoding PKCS#12 files to definite length.
+
+
+ Just re-encode the outer layer of the PKCS#12 file to definite length encoding.
+
+ @param berPKCS12File - original PKCS#12 file
+ @return a byte array representing the DER encoding of the PFX structure
+ @throws IOException
+
+
+ Re-encode the PKCS#12 structure to definite length encoding at the inner layer
+ as well, recomputing the MAC accordingly.
+
+ @param berPKCS12File - original PKCS12 file.
+ @param provider - provider to use for MAC calculation.
+ @return a byte array representing the DER encoding of the PFX structure.
+ @throws IOException on parsing, encoding errors.
+
+
+
+ Returns the revocationDate.
+
+
+
+
+ Returns the certStatus.
+
+
+
+ Returns an immutable Set of X.509 attribute certificate
+ extensions that this PkixAttrCertChecker supports or
+ null if no extensions are supported.
+
+ Each element of the set is a String representing the
+ Object Identifier (OID) of the X.509 extension that is supported.
+
+
+ All X.509 attribute certificate extensions that a
+ PkixAttrCertChecker might possibly be able to process
+ should be included in the set.
+
+
+ @return an immutable Set of X.509 extension OIDs (in
+ String format) supported by this
+ PkixAttrCertChecker, or null if no
+ extensions are supported
+
+
+ Performs checks on the specified attribute certificate. Every handled
+ extension is rmeoved from the unresolvedCritExts
+ collection.
+
+ @param attrCert The attribute certificate to be checked.
+ @param certPath The certificate path which belongs to the attribute
+ certificate issuer public key certificate.
+ @param holderCertPath The certificate path which belongs to the holder
+ certificate.
+ @param unresolvedCritExts a Collection of OID strings
+ representing the current set of unresolved critical extensions
+ @throws CertPathValidatorException if the specified attribute certificate
+ does not pass the check.
+
+
+ Returns a clone of this object.
+
+ @return a copy of this PkixAttrCertChecker
+
+
+ Build and validate a CertPath using the given parameter.
+
+ @param params PKIXBuilderParameters object containing all information to
+ build the CertPath
+
+
+ CertPathValidatorSpi implementation for X.509 Attribute Certificates la RFC 3281.
+
+ @see org.bouncycastle.x509.ExtendedPkixParameters
+
+
+ Validates an attribute certificate with the given certificate path.
+
+
+ params must be an instance of
+ ExtendedPkixParameters.
+
+ The target constraints in the params must be an
+ X509AttrCertStoreSelector with at least the attribute
+ certificate criterion set. Obey that also target informations may be
+ necessary to correctly validate this attribute certificate.
+
+ The attribute certificate issuer must be added to the trusted attribute
+ issuers with {@link ExtendedPkixParameters#setTrustedACIssuers(Set)}.
+
+ @param certPath The certificate path which belongs to the attribute
+ certificate issuer public key certificate.
+ @param params The PKIX parameters.
+ @return A PKIXCertPathValidatorResult of the result of
+ validating the certPath.
+ @throws InvalidAlgorithmParameterException if params is
+ inappropriate for this validator.
+ @throws CertPathValidatorException if the verification fails.
+
+
+
+ Summary description for PkixBuilderParameters.
+
+
+
+ Returns an instance of PkixBuilderParameters.
+
+ This method can be used to get a copy from other
+ PKIXBuilderParameters, PKIXParameters,
+ and ExtendedPKIXParameters instances.
+
+
+ @param pkixParams The PKIX parameters to create a copy of.
+ @return An PkixBuilderParameters instance.
+
+
+
+ Excluded certificates are not used for building a certification path.
+
+ the excluded certificates.
+
+
+
+ Sets the excluded certificates which are not used for building a
+ certification path. If the ISet is null an
+ empty set is assumed.
+
+
+ The given set is cloned to protect it against subsequent modifications.
+
+ The excluded certificates to set.
+
+
+ Can alse handle ExtendedPKIXBuilderParameters and
+ PKIXBuilderParameters.
+
+ @param params Parameters to set.
+ @see org.bouncycastle.x509.ExtendedPKIXParameters#setParams(java.security.cert.PKIXParameters)
+
+
+ Makes a copy of this PKIXParameters object. Changes to the
+ copy will not affect the original and vice versa.
+
+ @return a copy of this PKIXParameters object
+
+
+ An immutable sequence of certificates (a certification path).
+
+ This is an abstract class that defines the methods common to all CertPaths.
+ Subclasses can handle different kinds of certificates (X.509, PGP, etc.).
+
+ All CertPath objects have a type, a list of Certificates, and one or more
+ supported encodings. Because the CertPath class is immutable, a CertPath
+ cannot change in any externally visible way after being constructed. This
+ stipulation applies to all public fields and methods of this class and any
+ added or overridden by subclasses.
+
+ The type is a string that identifies the type of Certificates in the
+ certification path. For each certificate cert in a certification path
+ certPath, cert.getType().equals(certPath.getType()) must be true.
+
+ The list of Certificates is an ordered List of zero or more Certificates.
+ This List and all of the Certificates contained in it must be immutable.
+
+ Each CertPath object must support one or more encodings so that the object
+ can be translated into a byte array for storage or transmission to other
+ parties. Preferably, these encodings should be well-documented standards
+ (such as PKCS#7). One of the encodings supported by a CertPath is considered
+ the default encoding. This encoding is used if no encoding is explicitly
+ requested (for the {@link #getEncoded()} method, for instance).
+
+ All CertPath objects are also Serializable. CertPath objects are resolved
+ into an alternate {@link CertPathRep} object during serialization. This
+ allows a CertPath object to be serialized into an equivalent representation
+ regardless of its underlying implementation.
+
+ CertPath objects can be created with a CertificateFactory or they can be
+ returned by other classes, such as a CertPathBuilder.
+
+ By convention, X.509 CertPaths (consisting of X509Certificates), are ordered
+ starting with the target certificate and ending with a certificate issued by
+ the trust anchor. That is, the issuer of one certificate is the subject of
+ the following one. The certificate representing the
+ {@link TrustAnchor TrustAnchor} should not be included in the certification
+ path. Unvalidated X.509 CertPaths may not follow these conventions. PKIX
+ CertPathValidators will detect any departure from these conventions that
+ cause the certification path to be invalid and throw a
+ CertPathValidatorException.
+
+ Concurrent Access
+
+ All CertPath objects must be thread-safe. That is, multiple threads may
+ concurrently invoke the methods defined in this class on a single CertPath
+ object (or more than one) with no ill effects. This is also true for the List
+ returned by CertPath.getCertificates.
+
+ Requiring CertPath objects to be immutable and thread-safe allows them to be
+ passed around to various pieces of code without worrying about coordinating
+ access. Providing this thread-safety is generally not difficult, since the
+ CertPath and List objects in question are immutable.
+
+ @see CertificateFactory
+ @see CertPathBuilder
+
+ CertPath implementation for X.509 certificates.
+
+
+
+ @param certs
+
+
+ Creates a CertPath of the specified type.
+ This constructor is protected because most users should use
+ a CertificateFactory to create CertPaths.
+ @param type the standard name of the type of Certificatesin this path
+
+
+
+ Creates a CertPath of the specified type.
+ This constructor is protected because most users should use
+ a CertificateFactory to create CertPaths.
+
+ @param type the standard name of the type of Certificatesin this path
+
+
+
+ Returns an iteration of the encodings supported by this
+ certification path, with the default encoding
+ first. Attempts to modify the returned Iterator via its
+ remove method result in an UnsupportedOperationException.
+
+ @return an Iterator over the names of the supported encodings (as Strings)
+
+
+
+ Compares this certification path for equality with the specified object.
+ Two CertPaths are equal if and only if their types are equal and their
+ certificate Lists (and by implication the Certificates in those Lists)
+ are equal. A CertPath is never equal to an object that is not a CertPath.
+
+ This algorithm is implemented by this method. If it is overridden, the
+ behavior specified here must be maintained.
+
+ @param other
+ the object to test for equality with this certification path
+
+ @return true if the specified object is equal to this certification path,
+ false otherwise
+
+ @see Object#hashCode() Object.hashCode()
+
+
+ Returns the encoded form of this certification path, using
+ the default encoding.
+
+ @return the encoded bytes
+ @exception CertificateEncodingException if an encoding error occurs
+
+
+
+ Returns the encoded form of this certification path, using
+ the specified encoding.
+
+ @param encoding the name of the encoding to use
+ @return the encoded bytes
+ @exception CertificateEncodingException if an encoding error
+ occurs or the encoding requested is not supported
+
+
+
+
+ Returns the list of certificates in this certification
+ path.
+
+
+
+ Return a DERObject containing the encoded certificate.
+
+ @param cert the X509Certificate object to be encoded
+
+ @return the DERObject
+
+
+
+ Implements the PKIX CertPathBuilding algorithm for BouncyCastle.
+
+ @see CertPathBuilderSpi
+
+
+ Build and validate a CertPath using the given parameter.
+
+ @param params PKIXBuilderParameters object containing all information to
+ build the CertPath
+
+
+
+ Summary description for PkixCertPathBuilderException.
+
+
+
+
+ Summary description for PkixCertPathBuilderResult.
+
+
+
+ * Initializes the internal state of this PKIXCertPathChecker.
+ *
+ * The forward flag specifies the order that certificates
+ * will be passed to the {@link #check check} method (forward or reverse). A
+ * PKIXCertPathChecker must support reverse checking
+ * and may support forward checking.
+ *
+ *
+ * @param forward
+ * the order that certificates are presented to the
+ * check method. If true,
+ * certificates are presented from target to most-trusted CA
+ * (forward); if false, from most-trusted CA to
+ * target (reverse).
+ * @exception CertPathValidatorException
+ * if this PKIXCertPathChecker is unable to
+ * check certificates in the specified order; it should never
+ * be thrown if the forward flag is false since reverse
+ * checking must be supported
+
+
+ Indicates if forward checking is supported. Forward checking refers to
+ the ability of the PKIXCertPathChecker to perform its
+ checks when certificates are presented to the check method
+ in the forward direction (from target to most-trusted CA).
+
+ @return true if forward checking is supported,
+ false otherwise
+
+
+ * Returns an immutable Set of X.509 certificate extensions
+ * that this PKIXCertPathChecker supports (i.e. recognizes,
+ * is able to process), or null if no extensions are
+ * supported.
+ *
+ * Each element of the set is a String representing the
+ * Object Identifier (OID) of the X.509 extension that is supported. The OID
+ * is represented by a set of nonnegative integers separated by periods.
+ *
+ * All X.509 certificate extensions that a PKIXCertPathChecker
+ * might possibly be able to process should be included in the set.
+ *
+ *
+ * @return an immutable Set of X.509 extension OIDs (in
+ * String format) supported by this
+ * PKIXCertPathChecker, or null if no
+ * extensions are supported
+
+
+ Performs the check(s) on the specified certificate using its internal
+ state and removes any critical extensions that it processes from the
+ specified collection of OID strings that represent the unresolved
+ critical extensions. The certificates are presented in the order
+ specified by the init method.
+
+ @param cert
+ the Certificate to be checked
+ @param unresolvedCritExts
+ a Collection of OID strings representing the
+ current set of unresolved critical extensions
+ @exception CertPathValidatorException
+ if the specified certificate does not pass the check
+
+
+ Returns a clone of this object. Calls the Object.clone()
+ method. All subclasses which maintain state must support and override
+ this method, if necessary.
+
+ @return a copy of this PKIXCertPathChecker
+
+
+ The Service Provider Interface (SPI )
+ for the {@link CertPathValidator CertPathValidator} class. All
+ CertPathValidator implementations must include a class (the
+ SPI class) that extends this class (CertPathValidatorSpi)
+ and implements all of its methods. In general, instances of this class
+ should only be accessed through the CertPathValidator class.
+ For details, see the Java Cryptography Architecture.
+
+ Concurrent Access
+
+ Instances of this class need not be protected against concurrent
+ access from multiple threads. Threads that need to access a single
+ CertPathValidatorSpi instance concurrently should synchronize
+ amongst themselves and provide the necessary locking before calling the
+ wrapping CertPathValidator object.
+
+ However, implementations of CertPathValidatorSpi may still
+ encounter concurrency issues, since multiple threads each
+ manipulating a different CertPathValidatorSpi instance need not
+ synchronize.
+
+ CertPathValidatorSpi implementation for X.509 Certificate validation a la RFC
+ 3280.
+
+
+
+ An exception indicating one of a variety of problems encountered when
+ validating a certification path.
+
+ A CertPathValidatorException provides support for wrapping
+ exceptions. The {@link #getCause getCause} method returns the throwable,
+ if any, that caused this exception to be thrown.
+
+ A CertPathValidatorException may also include the
+ certification path that was being validated when the exception was thrown
+ and the index of the certificate in the certification path that caused the
+ exception to be thrown. Use the {@link #getCertPath getCertPath} and
+ {@link #getIndex getIndex} methods to retrieve this information.
+
+ Concurrent Access
+
+ Unless otherwise specified, the methods defined in this class are not
+ thread-safe. Multiple threads that need to access a single
+ object concurrently should synchronize amongst themselves and
+ provide the necessary locking. Multiple threads each manipulating
+ separate objects need not synchronize.
+
+ @see CertPathValidator
+
+
+
+
+ Creates a PkixCertPathValidatorException with the given detail
+ message. A detail message is a String that describes this
+ particular exception.
+
+ the detail message
+
+
+
+ Creates a PkixCertPathValidatorException with the specified
+ detail message and cause.
+
+ the detail message
+ the cause (which is saved for later retrieval by the
+ {@link #getCause getCause()} method). (A null
+ value is permitted, and indicates that the cause is
+ nonexistent or unknown.)
+
+
+
+ Creates a PkixCertPathValidatorException with the specified
+ detail message, cause, certification path, and index.
+
+ the detail message (or null if none)
+ the cause (or null if none)
+ the certification path that was in the process of being
+ validated when the error was encountered
+ the index of the certificate in the certification path that *
+
+
+
+ Returns the detail message for this CertPathValidatorException.
+
+ the detail message, or null if neither the message nor cause were specified
+
+
+ Returns the certification path that was being validated when the
+ exception was thrown.
+
+ @return the CertPath that was being validated when the
+ exception was thrown (or null if not specified)
+
+
+ Returns the index of the certificate in the certification path that
+ caused the exception to be thrown. Note that the list of certificates in
+ a CertPath is zero based. If no index has been set, -1 is
+ returned.
+
+ @return the index that has been set, or -1 if none has been set
+
+
+
+ Summary description for PkixCertPathValidatorResult.
+
+
+
+
+ Summary description for PkixCertPathValidatorUtilities.
+
+
+
+
+ key usage bits
+
+
+
+
+ Search the given Set of TrustAnchor's for one that is the
+ issuer of the given X509 certificate.
+
+ the X509 certificate
+ a Set of TrustAnchor's
+ the TrustAnchor object if found or
+ null if not.
+
+ @exception
+
+
+
+ Returns the issuer of an attribute certificate or certificate.
+
+ The attribute certificate or certificate.
+ The issuer as X500Principal.
+
+
+ Return the next working key inheriting DSA parameters if necessary.
+
+ This methods inherits DSA parameters from the indexed certificate or
+ previous certificates in the certificate chain to the returned
+ PublicKey. The list is searched upwards, meaning the end
+ certificate is at position 0 and previous certificates are following.
+
+
+ If the indexed certificate does not contain a DSA key this method simply
+ returns the public key. If the DSA key already contains DSA parameters
+ the key is also only returned.
+
+
+ @param certs The certification path.
+ @param index The index of the certificate which contains the public key
+ which should be extended with DSA parameters.
+ @return The public key of the certificate in list position
+ index extended with DSA parameters if applicable.
+ @throws Exception if DSA parameters cannot be inherited.
+
+
+
+ Return a Collection of all certificates or attribute certificates found
+ in the X509Store's that are matching the certSelect criteriums.
+
+ a {@link Selector} object that will be used to select
+ the certificates
+ a List containing only X509Store objects. These
+ are used to search for certificates.
+ a Collection of all found or
+ objects.
+ May be empty but never null.
+
+
+
+ Add the CRL issuers from the cRLIssuer field of the distribution point or
+ from the certificate if not given to the issuer criterion of the
+ selector.
+
+ The issuerPrincipals are a collection with a single
+ X500Principal for X509Certificates. For
+ {@link X509AttributeCertificate}s the issuer may contain more than one
+ X500Principal.
+
+
+ @param dp The distribution point.
+ @param issuerPrincipals The issuers of the certificate or attribute
+ certificate which contains the distribution point.
+ @param selector The CRL selector.
+ @param pkixParams The PKIX parameters containing the cert stores.
+ @throws Exception if an exception occurs while processing.
+ @throws ClassCastException if issuerPrincipals does not
+ contain only X500Principals.
+
+
+ Fetches complete CRLs according to RFC 3280.
+
+ @param dp The distribution point for which the complete CRL
+ @param cert The X509Certificate or
+ {@link org.bouncycastle.x509.X509AttributeCertificate} for
+ which the CRL should be searched.
+ @param currentDate The date for which the delta CRLs must be valid.
+ @param paramsPKIX The extended PKIX parameters.
+ @return A Set of X509CRLs with complete
+ CRLs.
+ @throws Exception if an exception occurs while picking the CRLs
+ or no CRLs are found.
+
+
+ Fetches delta CRLs according to RFC 3280 section 5.2.4.
+
+ @param currentDate The date for which the delta CRLs must be valid.
+ @param paramsPKIX The extended PKIX parameters.
+ @param completeCRL The complete CRL the delta CRL is for.
+ @return A Set of X509CRLs with delta CRLs.
+ @throws Exception if an exception occurs while picking the delta
+ CRLs.
+
+
+ Find the issuer certificates of a given certificate.
+
+ @param cert
+ The certificate for which an issuer should be found.
+ @param pkixParams
+ @return A Collection object containing the issuer
+ X509Certificates. Never null.
+
+ @exception Exception
+ if an error occurs.
+
+
+
+ Extract the value of the given extension, if it exists.
+
+ The extension object.
+ The object identifier to obtain.
+ Asn1Object
+ if the extension cannot be read.
+
+
+
+ crl checking
+ Return a Collection of all CRLs found in the X509Store's that are
+ matching the crlSelect criteriums.
+
+ a {@link X509CRLStoreSelector} object that will be used
+ to select the CRLs
+ a List containing only {@link org.bouncycastle.x509.X509Store
+ X509Store} objects. These are used to search for CRLs
+ a Collection of all found {@link X509CRL X509CRL} objects. May be
+ empty but never null.
+
+
+
+ Returns the intersection of the permitted IP ranges in
+ permitted with ip.
+
+ @param permitted A Set of permitted IP addresses with
+ their subnet mask as byte arrays.
+ @param ips The IP address with its subnet mask.
+ @return The Set of permitted IP ranges intersected with
+ ip.
+
+
+ Returns the union of the excluded IP ranges in excluded
+ with ip.
+
+ @param excluded A Set of excluded IP addresses with their
+ subnet mask as byte arrays.
+ @param ip The IP address with its subnet mask.
+ @return The Set of excluded IP ranges unified with
+ ip as byte arrays.
+
+
+ Calculates the union if two IP ranges.
+
+ @param ipWithSubmask1 The first IP address with its subnet mask.
+ @param ipWithSubmask2 The second IP address with its subnet mask.
+ @return A Set with the union of both addresses.
+
+
+ Calculates the interesction if two IP ranges.
+
+ @param ipWithSubmask1 The first IP address with its subnet mask.
+ @param ipWithSubmask2 The second IP address with its subnet mask.
+ @return A Set with the single IP address with its subnet
+ mask as a byte array or an empty Set.
+
+
+ Concatenates the IP address with its subnet mask.
+
+ @param ip The IP address.
+ @param subnetMask Its subnet mask.
+ @return The concatenated IP address with its subnet mask.
+
+
+ Splits the IP addresses and their subnet mask.
+
+ @param ipWithSubmask1 The first IP address with the subnet mask.
+ @param ipWithSubmask2 The second IP address with the subnet mask.
+ @return An array with two elements. Each element contains the IP address
+ and the subnet mask in this order.
+
+
+ Based on the two IP addresses and their subnet masks the IP range is
+ computed for each IP address - subnet mask pair and returned as the
+ minimum IP address and the maximum address of the range.
+
+ @param ip1 The first IP address.
+ @param subnetmask1 The subnet mask of the first IP address.
+ @param ip2 The second IP address.
+ @param subnetmask2 The subnet mask of the second IP address.
+ @return A array with two elements. The first/second element contains the
+ min and max IP address of the first/second IP address and its
+ subnet mask.
+
+
+ Checks if the IP ip is included in the permitted ISet
+ permitted.
+
+ @param permitted A Set of permitted IP addresses with
+ their subnet mask as byte arrays.
+ @param ip The IP address.
+ @throws PkixNameConstraintValidatorException
+ if the IP is not permitted.
+
+
+ Checks if the IP ip is included in the excluded ISet
+ excluded.
+
+ @param excluded A Set of excluded IP addresses with their
+ subnet mask as byte arrays.
+ @param ip The IP address.
+ @throws PkixNameConstraintValidatorException
+ if the IP is excluded.
+
+
+ Checks if the IP address ip is constrained by
+ constraint.
+
+ @param ip The IP address.
+ @param constraint The constraint. This is an IP address concatenated with
+ its subnetmask.
+ @return true if constrained, false
+ otherwise.
+
+
+ The common part of email1 and email2 is
+ added to the union union. If email1 and
+ email2 have nothing in common they are added both.
+
+ @param email1 Email address constraint 1.
+ @param email2 Email address constraint 2.
+ @param union The union.
+
+
+ The most restricting part from email1 and
+ email2 is added to the intersection intersect.
+
+ @param email1 Email address constraint 1.
+ @param email2 Email address constraint 2.
+ @param intersect The intersection.
+
+
+ Checks if the given GeneralName is in the permitted ISet.
+
+ @param name The GeneralName
+ @throws PkixNameConstraintValidatorException
+ If the name
+
+
+ Check if the given GeneralName is contained in the excluded ISet.
+
+ @param name The GeneralName.
+ @throws PkixNameConstraintValidatorException
+ If the name is
+ excluded.
+
+
+ Updates the permitted ISet of these name constraints with the intersection
+ with the given subtree.
+
+ @param permitted The permitted subtrees
+
+
+ Adds a subtree to the excluded ISet of these name constraints.
+
+ @param subtree A subtree with an excluded GeneralName.
+
+
+ Returns the maximum IP address.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The maximum IP address.
+
+
+ Returns the minimum IP address.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The minimum IP address.
+
+
+ Compares IP address ip1 with ip2. If ip1
+ is equal to ip2 0 is returned. If ip1 is bigger 1 is returned, -1
+ otherwise.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return 0 if ip1 is equal to ip2, 1 if ip1 is bigger, -1 otherwise.
+
+
+ Returns the logical OR of the IP addresses ip1 and
+ ip2.
+
+ @param ip1 The first IP address.
+ @param ip2 The second IP address.
+ @return The OR of ip1 and ip2.
+
+
+ Stringifies an IPv4 or v6 address with subnet mask.
+
+ @param ip The IP with subnet mask.
+ @return The stringified IP address.
+
+
+
+ Summary description for PkixParameters.
+
+
+
+ This is the default PKIX validity model. Actually there are two variants
+ of this: The PKIX model and the modified PKIX model. The PKIX model
+ verifies that all involved certificates must have been valid at the
+ current time. The modified PKIX model verifies that all involved
+ certificates were valid at the signing time. Both are indirectly choosen
+ with the {@link PKIXParameters#setDate(java.util.Date)} method, so this
+ methods sets the Date when all certificates must have been
+ valid.
+
+
+ This model uses the following validity model. Each certificate must have
+ been valid at the moment where is was used. That means the end
+ certificate must have been valid at the time the signature was done. The
+ CA certificate which signed the end certificate must have been valid,
+ when the end certificate was signed. The CA (or Root CA) certificate must
+ have been valid, when the CA certificate was signed and so on. So the
+ {@link PKIXParameters#setDate(java.util.Date)} method sets the time, when
+ the end certificate must have been valid.
It is used e.g.
+ in the German signature law.
+
+
+ Creates an instance of PKIXParameters with the specified Set of
+ most-trusted CAs. Each element of the set is a TrustAnchor.
+
+ Note that the Set is copied to protect against subsequent modifications.
+
+ @param trustAnchors
+ a Set of TrustAnchors
+
+ @exception InvalidAlgorithmParameterException
+ if the specified Set is empty
+ (trustAnchors.isEmpty() == true)
+ @exception NullPointerException
+ if the specified Set is null
+ @exception ClassCastException
+ if any of the elements in the Set are not of type
+ java.security.cert.TrustAnchor
+
+
+ Returns the required constraints on the target certificate. The
+ constraints are returned as an instance of CertSelector. If
+ null, no constraints are defined.
+
+ Note that the CertSelector returned is cloned to protect against
+ subsequent modifications.
+
+ @return a CertSelector specifying the constraints on the target
+ certificate (or null)
+
+ @see #setTargetCertConstraints(CertSelector)
+
+
+ Sets the required constraints on the target certificate. The constraints
+ are specified as an instance of CertSelector. If null, no constraints are
+ defined.
+
+ Note that the CertSelector specified is cloned to protect against
+ subsequent modifications.
+
+ @param selector
+ a CertSelector specifying the constraints on the target
+ certificate (or null)
+
+ @see #getTargetCertConstraints()
+
+
+ Returns an immutable Set of initial policy identifiers (OID strings),
+ indicating that any one of these policies would be acceptable to the
+ certificate user for the purposes of certification path processing. The
+ default return value is an empty Set, which is
+ interpreted as meaning that any policy would be acceptable.
+
+ @return an immutable Set of initial policy OIDs in String
+ format, or an empty Set (implying any policy is
+ acceptable). Never returns null.
+
+ @see #setInitialPolicies(java.util.Set)
+
+
+ Sets the Set of initial policy identifiers (OID strings),
+ indicating that any one of these policies would be acceptable to the
+ certificate user for the purposes of certification path processing. By
+ default, any policy is acceptable (i.e. all policies), so a user that
+ wants to allow any policy as acceptable does not need to call this
+ method, or can call it with an empty Set (or
+ null).
+
+ Note that the Set is copied to protect against subsequent modifications.
+
+
+ @param initialPolicies
+ a Set of initial policy OIDs in String format (or
+ null)
+
+ @exception ClassCastException
+ if any of the elements in the set are not of type String
+
+ @see #getInitialPolicies()
+
+
+ Sets a List of additional certification path checkers. If
+ the specified List contains an object that is not a PKIXCertPathChecker,
+ it is ignored.
+
+ Each PKIXCertPathChecker specified implements additional
+ checks on a certificate. Typically, these are checks to process and
+ verify private extensions contained in certificates. Each
+ PKIXCertPathChecker should be instantiated with any
+ initialization parameters needed to execute the check.
+
+ This method allows sophisticated applications to extend a PKIX
+ CertPathValidator or CertPathBuilder. Each
+ of the specified PKIXCertPathCheckers will be called, in turn, by a PKIX
+ CertPathValidator or CertPathBuilder for
+ each certificate processed or validated.
+
+ Regardless of whether these additional PKIXCertPathCheckers are set, a
+ PKIX CertPathValidator or CertPathBuilder
+ must perform all of the required PKIX checks on each certificate. The one
+ exception to this rule is if the RevocationEnabled flag is set to false
+ (see the {@link #setRevocationEnabled(boolean) setRevocationEnabled}
+ method).
+
+ Note that the List supplied here is copied and each PKIXCertPathChecker
+ in the list is cloned to protect against subsequent modifications.
+
+ @param checkers
+ a List of PKIXCertPathCheckers. May be null, in which case no
+ additional checkers will be used.
+ @exception ClassCastException
+ if any of the elements in the list are not of type
+ java.security.cert.PKIXCertPathChecker
+ @see #getCertPathCheckers()
+
+
+ Returns the List of certification path checkers. Each PKIXCertPathChecker
+ in the returned IList is cloned to protect against subsequent modifications.
+
+ @return an immutable List of PKIXCertPathCheckers (may be empty, but not
+ null)
+
+ @see #setCertPathCheckers(java.util.List)
+
+
+ Adds a PKIXCertPathChecker to the list of certification
+ path checkers. See the {@link #setCertPathCheckers setCertPathCheckers}
+ method for more details.
+
+ Note that the PKIXCertPathChecker is cloned to protect
+ against subsequent modifications.
+
+ @param checker a PKIXCertPathChecker to add to the list of
+ checks. If null, the checker is ignored (not added to list).
+
+
+ Method to support Clone() under J2ME.
+ super.Clone() does not exist and fields are not copied.
+
+ @param params Parameters to set. If this are
+ ExtendedPkixParameters they are copied to.
+
+
+ Whether delta CRLs should be used for checking the revocation status.
+ Defaults to false.
+
+
+ The validity model.
+ @see #CHAIN_VALIDITY_MODEL
+ @see #PKIX_VALIDITY_MODEL
+
+
+ Sets the Bouncy Castle Stores for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ The IList is cloned.
+
+
+ @param stores A list of stores to use.
+ @see #getStores
+ @throws ClassCastException if an element of stores is not
+ a {@link Store}.
+
+
+ Adds a Bouncy Castle {@link Store} to find CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ This method should be used to add local stores, like collection based
+ X.509 stores, if available. Local stores should be considered first,
+ before trying to use additional (remote) locations, because they do not
+ need possible additional network traffic.
+
+ If store is null it is ignored.
+
+
+ @param store The store to add.
+ @see #getStores
+
+
+ Adds an additional Bouncy Castle {@link Store} to find CRLs, certificates,
+ attribute certificates or cross certificates.
+
+ You should not use this method. This method is used for adding additional
+ X.509 stores, which are used to add (remote) locations, e.g. LDAP, found
+ during X.509 object processing, e.g. in certificates or CRLs. This method
+ is used in PKIX certification path processing.
+
+ If store is null it is ignored.
+
+
+ @param store The store to add.
+ @see #getStores()
+
+
+ Returns an IList of additional Bouncy Castle
+ Stores used for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ @return an immutable IList of additional Bouncy Castle
+ Stores. Never null.
+
+ @see #addAddionalStore(Store)
+
+
+ Returns an IList of Bouncy Castle
+ Stores used for finding CRLs, certificates, attribute
+ certificates or cross certificates.
+
+ @return an immutable IList of Bouncy Castle
+ Stores. Never null.
+
+ @see #setStores(IList)
+
+
+ Returns if additional {@link X509Store}s for locations like LDAP found
+ in certificates or CRLs should be used.
+
+ @return Returns true if additional stores are used.
+
+
+ Sets if additional {@link X509Store}s for locations like LDAP found in
+ certificates or CRLs should be used.
+
+ @param enabled true if additional stores are used.
+
+
+ Returns the required constraints on the target certificate or attribute
+ certificate. The constraints are returned as an instance of
+ IX509Selector. If null, no constraints are
+ defined.
+
+
+ The target certificate in a PKIX path may be a certificate or an
+ attribute certificate.
+
+ Note that the IX509Selector returned is cloned to protect
+ against subsequent modifications.
+
+ @return a IX509Selector specifying the constraints on the
+ target certificate or attribute certificate (or null)
+ @see #setTargetConstraints
+ @see X509CertStoreSelector
+ @see X509AttributeCertStoreSelector
+
+
+ Sets the required constraints on the target certificate or attribute
+ certificate. The constraints are specified as an instance of
+ IX509Selector. If null, no constraints are
+ defined.
+
+ The target certificate in a PKIX path may be a certificate or an
+ attribute certificate.
+
+ Note that the IX509Selector specified is cloned to protect
+ against subsequent modifications.
+
+
+ @param selector a IX509Selector specifying the constraints on
+ the target certificate or attribute certificate (or
+ null)
+ @see #getTargetConstraints
+ @see X509CertStoreSelector
+ @see X509AttributeCertStoreSelector
+
+
+ Returns the trusted attribute certificate issuers. If attribute
+ certificates is verified the trusted AC issuers must be set.
+
+ The returned ISet consists of TrustAnchors.
+
+ The returned ISet is immutable. Never null
+
+
+ @return Returns an immutable set of the trusted AC issuers.
+
+
+ Sets the trusted attribute certificate issuers. If attribute certificates
+ is verified the trusted AC issuers must be set.
+
+ The trustedACIssuers must be a ISet of
+ TrustAnchor
+
+ The given set is cloned.
+
+
+ @param trustedACIssuers The trusted AC issuers to set. Is never
+ null.
+ @throws ClassCastException if an element of stores is not
+ a TrustAnchor.
+
+
+ Returns the necessary attributes which must be contained in an attribute
+ certificate.
+
+ The returned ISet is immutable and contains
+ Strings with the OIDs.
+
+
+ @return Returns the necessary AC attributes.
+
+
+ Sets the necessary which must be contained in an attribute certificate.
+
+ The ISet must contain Strings with the
+ OIDs.
+
+ The set is cloned.
+
+
+ @param necessaryACAttributes The necessary AC attributes to set.
+ @throws ClassCastException if an element of
+ necessaryACAttributes is not a
+ String.
+
+
+ Returns the attribute certificates which are not allowed.
+
+ The returned ISet is immutable and contains
+ Strings with the OIDs.
+
+
+ @return Returns the prohibited AC attributes. Is never null.
+
+
+ Sets the attribute certificates which are not allowed.
+
+ The ISet must contain Strings with the
+ OIDs.
+
+ The set is cloned.
+
+
+ @param prohibitedACAttributes The prohibited AC attributes to set.
+ @throws ClassCastException if an element of
+ prohibitedACAttributes is not a
+ String.
+
+
+ Returns the attribute certificate checker. The returned set contains
+ {@link PKIXAttrCertChecker}s and is immutable.
+
+ @return Returns the attribute certificate checker. Is never
+ null.
+
+
+ Sets the attribute certificate checkers.
+
+ All elements in the ISet must a {@link PKIXAttrCertChecker}.
+
+
+ The given set is cloned.
+
+
+ @param attrCertCheckers The attribute certificate checkers to set. Is
+ never null.
+ @throws ClassCastException if an element of attrCertCheckers
+ is not a PKIXAttrCertChecker.
+
+
+
+ Summary description for PkixPolicyNode.
+
+
+
+ Constructors
+
+
+
+ This class helps to handle CRL revocation reasons mask. Each CRL handles a
+ certain set of revocation reasons.
+
+
+
+
+ Constructs are reason mask with the reasons.
+
+ The reasons.
+
+
+
+ A reason mask with no reason.
+
+
+
+
+ A mask with all revocation reasons.
+
+
+
+ Adds all reasons from the reasons mask to this mask.
+
+ @param mask The reasons mask to add.
+
+
+
+ Returns true if this reasons mask contains all possible
+ reasons.
+
+ true if this reasons mask contains all possible reasons.
+
+
+
+
+ Intersects this mask with the given reasons mask.
+
+ mask The mask to intersect with.
+ The intersection of this and teh given mask.
+
+
+
+ Returns true if the passed reasons mask has new reasons.
+
+ The reasons mask which should be tested for new reasons.
+ true if the passed reasons mask has new reasons.
+
+
+
+ Returns the reasons in this mask.
+
+
+
+ If the complete CRL includes an issuing distribution point (IDP) CRL
+ extension check the following:
+
+ (i) If the distribution point name is present in the IDP CRL extension
+ and the distribution field is present in the DP, then verify that one of
+ the names in the IDP matches one of the names in the DP. If the
+ distribution point name is present in the IDP CRL extension and the
+ distribution field is omitted from the DP, then verify that one of the
+ names in the IDP matches one of the names in the cRLIssuer field of the
+ DP.
+
+
+ (ii) If the onlyContainsUserCerts boolean is asserted in the IDP CRL
+ extension, verify that the certificate does not include the basic
+ constraints extension with the cA boolean asserted.
+
+
+ (iii) If the onlyContainsCACerts boolean is asserted in the IDP CRL
+ extension, verify that the certificate includes the basic constraints
+ extension with the cA boolean asserted.
+
+
+ (iv) Verify that the onlyContainsAttributeCerts boolean is not asserted.
+
+
+ @param dp The distribution point.
+ @param cert The certificate.
+ @param crl The CRL.
+ @throws AnnotatedException if one of the conditions is not met or an error occurs.
+
+
+ If the DP includes cRLIssuer, then verify that the issuer field in the
+ complete CRL matches cRLIssuer in the DP and that the complete CRL
+ contains an
+ g distribution point extension with the indirectCRL
+ boolean asserted. Otherwise, verify that the CRL issuer matches the
+ certificate issuer.
+
+ @param dp The distribution point.
+ @param cert The certificate ot attribute certificate.
+ @param crl The CRL for cert.
+ @throws AnnotatedException if one of the above conditions does not apply or an error
+ occurs.
+
+
+ Obtain and validate the certification path for the complete CRL issuer.
+ If a key usage extension is present in the CRL issuer's certificate,
+ verify that the cRLSign bit is set.
+
+ @param crl CRL which contains revocation information for the certificate
+ cert.
+ @param cert The attribute certificate or certificate to check if it is
+ revoked.
+ @param defaultCRLSignCert The issuer certificate of the certificate cert.
+ @param defaultCRLSignKey The public key of the issuer certificate
+ defaultCRLSignCert.
+ @param paramsPKIX paramsPKIX PKIX parameters.
+ @param certPathCerts The certificates on the certification path.
+ @return A Set with all keys of possible CRL issuer
+ certificates.
+ @throws AnnotatedException if the CRL is not valid or the status cannot be checked or
+ some error occurs.
+
+
+ Checks a distribution point for revocation information for the
+ certificate cert.
+
+ @param dp The distribution point to consider.
+ @param paramsPKIX PKIX parameters.
+ @param cert Certificate to check if it is revoked.
+ @param validDate The date when the certificate revocation status should be
+ checked.
+ @param defaultCRLSignCert The issuer certificate of the certificate cert.
+ @param defaultCRLSignKey The public key of the issuer certificate
+ defaultCRLSignCert.
+ @param certStatus The current certificate revocation status.
+ @param reasonMask The reasons mask which is already checked.
+ @param certPathCerts The certificates of the certification path.
+ @throws AnnotatedException if the certificate is revoked or the status cannot be checked
+ or some error occurs.
+
+
+ Checks a certificate if it is revoked.
+
+ @param paramsPKIX PKIX parameters.
+ @param cert Certificate to check if it is revoked.
+ @param validDate The date when the certificate revocation status should be
+ checked.
+ @param sign The issuer certificate of the certificate cert.
+ @param workingPublicKey The public key of the issuer certificate sign.
+ @param certPathCerts The certificates of the certification path.
+ @throws AnnotatedException if the certificate is revoked or the status cannot be checked
+ or some error occurs.
+
+
+ If use-deltas is set, verify the issuer and scope of the delta CRL.
+
+ @param deltaCRL The delta CRL.
+ @param completeCRL The complete CRL.
+ @param pkixParams The PKIX paramaters.
+ @throws AnnotatedException if an exception occurs.
+
+
+ Checks if an attribute certificate is revoked.
+
+ @param attrCert Attribute certificate to check if it is revoked.
+ @param paramsPKIX PKIX parameters.
+ @param issuerCert The issuer certificate of the attribute certificate
+ attrCert.
+ @param validDate The date when the certificate revocation status should
+ be checked.
+ @param certPathCerts The certificates of the certification path to be
+ checked.
+
+ @throws CertPathValidatorException if the certificate is revoked or the
+ status cannot be checked or some error occurs.
+
+
+ Searches for a holder public key certificate and verifies its
+ certification path.
+
+ @param attrCert the attribute certificate.
+ @param pkixParams The PKIX parameters.
+ @return The certificate path of the holder certificate.
+ @throws Exception if
+
+ no public key certificate can be found although holder
+ information is given by an entity name or a base certificate
+ ID
+ support classes cannot be created
+ no certification path for the public key certificate can
+ be built
+
+
+
+
+ Checks a distribution point for revocation information for the
+ certificate attrCert.
+
+ @param dp The distribution point to consider.
+ @param attrCert The attribute certificate which should be checked.
+ @param paramsPKIX PKIX parameters.
+ @param validDate The date when the certificate revocation status should
+ be checked.
+ @param issuerCert Certificate to check if it is revoked.
+ @param reasonMask The reasons mask which is already checked.
+ @param certPathCerts The certificates of the certification path to be
+ checked.
+ @throws Exception if the certificate is revoked or the status
+ cannot be checked or some error occurs.
+
+
+
+ A trust anchor or most-trusted Certification Authority (CA).
+
+ This class represents a "most-trusted CA", which is used as a trust anchor
+ for validating X.509 certification paths. A most-trusted CA includes the
+ public key of the CA, the CA's name, and any constraints upon the set of
+ paths which may be validated using this key. These parameters can be
+ specified in the form of a trusted X509Certificate or as individual
+ parameters.
+
+
+
+
+ Creates an instance of TrustAnchor with the specified X509Certificate and
+ optional name constraints, which are intended to be used as additional
+ constraints when validating an X.509 certification path.
+ The name constraints are specified as a byte array. This byte array
+ should contain the DER encoded form of the name constraints, as they
+ would appear in the NameConstraints structure defined in RFC 2459 and
+ X.509. The ASN.1 definition of this structure appears below.
+
+
+ NameConstraints ::= SEQUENCE {
+ permittedSubtrees [0] GeneralSubtrees OPTIONAL,
+ excludedSubtrees [1] GeneralSubtrees OPTIONAL }
+
+ GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
+
+ GeneralSubtree ::= SEQUENCE {
+ base GeneralName,
+ minimum [0] BaseDistance DEFAULT 0,
+ maximum [1] BaseDistance OPTIONAL }
+
+ BaseDistance ::= INTEGER (0..MAX)
+
+ GeneralName ::= CHOICE {
+ otherName [0] OtherName,
+ rfc822Name [1] IA5String,
+ dNSName [2] IA5String,
+ x400Address [3] ORAddress,
+ directoryName [4] Name,
+ ediPartyName [5] EDIPartyName,
+ uniformResourceIdentifier [6] IA5String,
+ iPAddress [7] OCTET STRING,
+ registeredID [8] OBJECT IDENTIFIER}
+
+
+ Note that the name constraints byte array supplied is cloned to protect
+ against subsequent modifications.
+
+ a trusted X509Certificate
+ a byte array containing the ASN.1 DER encoding of a
+ NameConstraints extension to be used for checking name
+ constraints. Only the value of the extension is included, not
+ the OID or criticality flag. Specify null to omit the
+ parameter.
+ if the specified X509Certificate is null
+
+
+
+ Creates an instance of TrustAnchor where the
+ most-trusted CA is specified as an X500Principal and public key.
+
+
+
+ Name constraints are an optional parameter, and are intended to be used
+ as additional constraints when validating an X.509 certification path.
+
+ The name constraints are specified as a byte array. This byte array
+ contains the DER encoded form of the name constraints, as they
+ would appear in the NameConstraints structure defined in RFC 2459
+ and X.509. The ASN.1 notation for this structure is supplied in the
+ documentation for the other constructors.
+
+ Note that the name constraints byte array supplied here is cloned to
+ protect against subsequent modifications.
+
+
+ the name of the most-trusted CA as X509Name
+ the public key of the most-trusted CA
+
+ a byte array containing the ASN.1 DER encoding of a NameConstraints extension to
+ be used for checking name constraints. Only the value of the extension is included,
+ not the OID or criticality flag. Specify null to omit the parameter.
+
+
+ if caPrincipal or pubKey is null
+
+
+
+
+ Creates an instance of TrustAnchor where the most-trusted
+ CA is specified as a distinguished name and public key. Name constraints
+ are an optional parameter, and are intended to be used as additional
+ constraints when validating an X.509 certification path.
+
+ The name constraints are specified as a byte array. This byte array
+ contains the DER encoded form of the name constraints, as they would
+ appear in the NameConstraints structure defined in RFC 2459 and X.509.
+
+ the X.500 distinguished name of the most-trusted CA in RFC
+ 2253 string format
+ the public key of the most-trusted CA
+ a byte array containing the ASN.1 DER encoding of a
+ NameConstraints extension to be used for checking name
+ constraints. Only the value of the extension is included, not
+ the OID or criticality flag. Specify null to omit the
+ parameter.
+ throws NullPointerException, IllegalArgumentException
+
+
+
+ Returns the most-trusted CA certificate.
+
+
+
+
+ Returns the name of the most-trusted CA as an X509Name.
+
+
+
+
+ Returns the name of the most-trusted CA in RFC 2253 string format.
+
+
+
+
+ Returns the public key of the most-trusted CA.
+
+
+
+
+ Decode the name constraints and clone them if not null.
+
+
+
+
+ Returns a formatted string describing the TrustAnchor.
+
+ a formatted string describing the TrustAnchor
+
+
+ Recognised hash algorithms for the time stamp protocol.
+
+
+ Fetches the signature time-stamp attributes from a SignerInformation object.
+ Checks that the MessageImprint for each time-stamp matches the signature field.
+ (see RFC 3161 Appendix A).
+
+ @param signerInfo a SignerInformation to search for time-stamps
+ @return a collection of TimeStampToken objects
+ @throws TSPValidationException
+
+
+ Validate the passed in certificate as being of the correct type to be used
+ for time stamping. To be valid it must have an ExtendedKeyUsage extension
+ which has a key purpose identifier of id-kp-timeStamping.
+
+ @param cert the certificate of interest.
+ @throws TspValidationException if the certicate fails on one of the check points.
+
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Exception thrown if a TSP request or response fails to validate.
+
+ If a failure code is associated with the exception it can be retrieved using
+ the getFailureCode() method.
+
+
+ Return the failure code associated with this exception - if one is set.
+
+ @return the failure code if set, -1 otherwise.
+
+
+ Base class for an RFC 3161 Time Stamp Request.
+
+
+ Create a TimeStampRequest from the past in byte array.
+
+ @param req byte array containing the request.
+ @throws IOException if the request is malformed.
+
+
+ Create a TimeStampRequest from the past in input stream.
+
+ @param in input stream containing the request.
+ @throws IOException if the request is malformed.
+
+
+ Validate the timestamp request, checking the digest to see if it is of an
+ accepted type and whether it is of the correct length for the algorithm specified.
+
+ @param algorithms a set of string OIDS giving accepted algorithms.
+ @param policies if non-null a set of policies we are willing to sign under.
+ @param extensions if non-null a set of extensions we are willing to accept.
+ @throws TspException if the request is invalid, or processing fails.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Generator for RFC 3161 Time Stamp Request objects.
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ @throws IOException
+
+
+ add a given extension field for the standard extensions tag
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ @throws IOException
+
+
+ add a given extension field for the standard extensions tag
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+ Base class for an RFC 3161 Time Stamp Response object.
+
+
+ Create a TimeStampResponse from a byte array containing an ASN.1 encoding.
+
+ @param resp the byte array containing the encoded response.
+ @throws TspException if the response is malformed.
+ @throws IOException if the byte array doesn't represent an ASN.1 encoding.
+
+
+ Create a TimeStampResponse from an input stream containing an ASN.1 encoding.
+
+ @param input the input stream containing the encoded response.
+ @throws TspException if the response is malformed.
+ @throws IOException if the stream doesn't represent an ASN.1 encoding.
+
+
+ Check this response against to see if it a well formed response for
+ the passed in request. Validation will include checking the time stamp
+ token if the response status is GRANTED or GRANTED_WITH_MODS.
+
+ @param request the request to be checked against
+ @throws TspException if the request can not match this response.
+
+
+ return the ASN.1 encoded representation of this object.
+
+
+ Generator for RFC 3161 Time Stamp Responses.
+
+
+ Return an appropriate TimeStampResponse.
+
+ If genTime is null a timeNotAvailable error response will be returned.
+
+ @param request the request this response is for.
+ @param serialNumber serial number for the response token.
+ @param genTime generation time for the response token.
+ @param provider provider to use for signature calculation.
+ @return
+ @throws NoSuchAlgorithmException
+ @throws NoSuchProviderException
+ @throws TSPException
+
+
+
+ Generate a TimeStampResponse with chosen status and FailInfoField.
+
+ @param status the PKIStatus to set.
+ @param failInfoField the FailInfoField to set.
+ @param statusString an optional string describing the failure.
+ @return a TimeStampResponse with a failInfoField and optional statusString
+ @throws TSPException in case the response could not be created
+
+
+ Validate the time stamp token.
+
+ To be valid the token must be signed by the passed in certificate and
+ the certificate must be the one referred to by the SigningCertificate
+ attribute included in the hashed attributes of the token. The
+ certificate must also have the ExtendedKeyUsageExtension with only
+ KeyPurposeID.IdKPTimeStamping and have been valid at the time the
+ timestamp was created.
+
+
+ A successful call to validate means all the above are true.
+
+
+
+ Return the underlying CmsSignedData object.
+
+ @return the underlying CMS structure.
+
+
+ Return a ASN.1 encoded byte stream representing the encoded object.
+
+ @throws IOException if encoding fails.
+
+
+ basic creation - only the default attributes will be included here.
+
+
+ create with a signer with extra signed/unsigned attributes.
+
+
+ @return the nonce value, null if there isn't one.
+
+
+ General array utilities.
+
+
+
+ Are two arrays equal.
+
+ Left side.
+ Right side.
+ True if equal.
+
+
+
+ A constant time equals comparison - does not terminate early if
+ test will fail.
+
+ first array
+ second array
+ true if arrays equal, false otherwise.
+
+
+ Make a copy of a range of bytes from the passed in data array. The range can
+ extend beyond the end of the input array, in which case the return array will
+ be padded with zeroes.
+
+ @param data the array from which the data is to be copied.
+ @param from the start index at which the copying should take place.
+ @param to the final index of the range (exclusive).
+
+ @return a new byte array containing the range given.
+
+
+ BigInteger utilities.
+
+
+ Return the passed in value as an unsigned byte array.
+
+ @param value value to be converted.
+ @return a byte array without a leading zero byte if present in the signed encoding.
+
+
+ Return the passed in value as an unsigned byte array of specified length, zero-extended as necessary.
+
+ @param length desired length of result array.
+ @param n value to be converted.
+ @return a byte array of specified length, with leading zeroes as necessary given the size of n.
+
+
+ Return a random BigInteger not less than 'min' and not greater than 'max'
+
+ @param min the least value that may be generated
+ @param max the greatest value that may be generated
+ @param random the source of randomness
+ @return a random BigInteger value in the range [min,max]
+
+
+
+ Produce a copy of this object with its configuration and in its current state.
+
+
+ The returned object may be used simply to store the state, or may be used as a similar object
+ starting from the copied state.
+
+
+
+
+ Restore a copied object state into this object.
+
+
+ Implementations of this method should try to avoid or minimise memory allocation to perform the reset.
+
+ an object originally {@link #copy() copied} from an object of the same type as this instance.
+ if the provided object is not of the correct type.
+ if the other parameter is in some other way invalid.
+
+
+ Exception to be thrown on a failure to reset an object implementing Memoable.
+
+ The exception extends InvalidCastException to enable users to have a single handling case,
+ only introducing specific handling of this one if required.
+
+
+
+ Basic Constructor.
+
+ @param msg message to be associated with this exception.
+
+
+ General string utilities.
+
+
+
+ Return the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC) for a given DateTime value.
+
+ A UTC DateTime value not before epoch.
+ Number of whole milliseconds after epoch.
+ 'dateTime' is before epoch.
+
+
+
+ Create a DateTime value from the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).
+
+ Number of milliseconds since the epoch.
+ A UTC DateTime value
+
+
+
+ Return the current number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).
+
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+ @return a byte array containing the base 64 encoded data.
+
+
+ encode the input data producing a base 64 encoded byte array.
+
+ @return a byte array containing the base 64 encoded data.
+
+
+ Encode the byte data to base 64 writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Encode the byte data to base 64 writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded input data. It is assumed the input data is valid.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the base 64 encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ encode the input data producing a base 64 output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+
+ A buffering class to allow translation from one format to another to
+ be done in discrete chunks.
+
+
+
+
+ Create a buffered Decoder.
+
+ The translater to use.
+ The size of the buffer.
+
+
+
+ Process one byte of data.
+
+ Data in.
+ Byte array for the output.
+ The offset in the output byte array to start writing from.
+ The amount of output bytes.
+
+
+
+ Process data from a byte array.
+
+ The input data.
+ Start position within input data array.
+ Amount of data to process from input data array.
+ Array to store output.
+ Position in output array to start writing from.
+ The amount of output bytes.
+
+
+
+ A class that allows encoding of data using a specific encoder to be processed in chunks.
+
+
+
+
+ Create.
+
+ The translator to use.
+ Size of the chunks.
+
+
+
+ Process one byte of data.
+
+ The byte.
+ An array to store output in.
+ Offset within output array to start writing from.
+
+
+
+
+ Process data from a byte array.
+
+ Input data Byte array containing data to be processed.
+ Start position within input data array.
+ Amount of input data to be processed.
+ Output data array.
+ Offset within output data array to start writing to.
+ The amount of data written.
+
+
+
+ Class to decode and encode Hex.
+
+
+
+ encode the input data producing a Hex encoded byte array.
+
+ @return a byte array containing the Hex encoded data.
+
+
+ encode the input data producing a Hex encoded byte array.
+
+ @return a byte array containing the Hex encoded data.
+
+
+ Hex encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Hex encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded input data. It is assumed the input data is valid.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the Hex encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the Hex encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ encode the input data producing a Hex output stream.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the Hex encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+
+ A hex translator.
+
+
+
+
+ Return encoded block size.
+
+ 2
+
+
+
+ Encode some data.
+
+ Input data array.
+ Start position within input data array.
+ The amount of data to process.
+ The output data array.
+ The offset within the output data array to start writing from.
+ Amount of data encoded.
+
+
+
+ Returns the decoded block size.
+
+ 1
+
+
+
+ Decode data from a byte array.
+
+ The input data array.
+ Start position within input data array.
+ The amounty of data to process.
+ The output data array.
+ The position within the output data array to start writing from.
+ The amount of data written.
+
+
+ Encode and decode byte arrays (typically from binary to 7-bit ASCII
+ encodings).
+
+
+
+ Translator interface.
+
+
+
+ Convert binary data to and from UrlBase64 encoding. This is identical to
+ Base64 encoding, except that the padding character is "." and the other
+ non-alphanumeric characters are "-" and "_" instead of "+" and "/".
+
+ The purpose of UrlBase64 encoding is to provide a compact encoding of binary
+ data that is safe for use as an URL parameter. Base64 encoding does not
+ produce encoded values that are safe for use in URLs, since "/" can be
+ interpreted as a path delimiter; "+" is the encoded form of a space; and
+ "=" is used to separate a name from the corresponding value in an URL
+ parameter.
+
+
+
+ Encode the input data producing a URL safe base 64 encoded byte array.
+
+ @return a byte array containing the URL safe base 64 encoded data.
+
+
+ Encode the byte data writing it to the given output stream.
+
+ @return the number of bytes produced.
+
+
+ Decode the URL safe base 64 encoded input data - white space will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ decode the URL safe base 64 encoded byte data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ decode the URL safe base 64 encoded string data - whitespace will be ignored.
+
+ @return a byte array representing the decoded data.
+
+
+ Decode the URL safe base 64 encoded string data writing it to the given output stream,
+ whitespace characters will be ignored.
+
+ @return the number of bytes produced.
+
+
+ Convert binary data to and from UrlBase64 encoding. This is identical to
+ Base64 encoding, except that the padding character is "." and the other
+ non-alphanumeric characters are "-" and "_" instead of "+" and "/".
+
+ The purpose of UrlBase64 encoding is to provide a compact encoding of binary
+ data that is safe for use as an URL parameter. Base64 encoding does not
+ produce encoded values that are safe for use in URLs, since "/" can be
+ interpreted as a path delimiter; "+" is the encoded form of a space; and
+ "=" is used to separate a name from the corresponding value in an URL
+ parameter.
+
+
+
+
+ Pipe all bytes from inStr to outStr , throwing StreamFlowException if greater
+ than limit bytes in inStr .
+
+
+ A
+
+
+ A
+
+
+ A
+
+ The number of bytes actually transferred, if not greater than limit
+
+
+
+
+ A
+
+
+
+
+
+ A
+
+
+ A
+
+
+
+
+
+ A
+
+
+
+
+ A generic PEM writer, based on RFC 1421
+
+
+ Base constructor.
+
+ @param out output stream to use.
+
+
+ Return the number of bytes or characters required to contain the
+ passed in object if it is PEM encoded.
+
+ @param obj pem object to be output
+ @return an estimate of the number of bytes
+
+
+ Validate the given IPv4 or IPv6 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid address, false otherwise
+
+
+ Validate the given IPv4 or IPv6 address and netmask.
+
+ @param address the IP address as a string.
+
+ @return true if a valid address with netmask, false otherwise
+
+
+ Validate the given IPv4 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid IPv4 address, false otherwise
+
+
+ Validate the given IPv6 address.
+
+ @param address the IP address as a string.
+
+ @return true if a valid IPv4 address, false otherwise
+
+
+
+ Summary description for DeflaterOutputStream.
+
+
+
+
+ Summary description for DeflaterOutputStream.
+
+
+
+
+ The Holder object.
+
+ Holder ::= SEQUENCE {
+ baseCertificateID [0] IssuerSerial OPTIONAL,
+ -- the issuer and serial number of
+ -- the holder's Public Key Certificate
+ entityName [1] GeneralNames OPTIONAL,
+ -- the name of the claimant or role
+ objectDigestInfo [2] ObjectDigestInfo OPTIONAL
+ -- used to directly authenticate the holder,
+ -- for example, an executable
+ }
+
+
+
+
+ Constructs a holder for v2 attribute certificates with a hash value for
+ some type of object.
+
+ digestedObjectType can be one of the following:
+
+ 0 - publicKey - A hash of the public key of the holder must be
+ passed.
+ 1 - publicKeyCert - A hash of the public key certificate of the
+ holder must be passed.
+ 2 - otherObjectDigest - A hash of some other object type must be
+ passed. otherObjectTypeID must not be empty.
+
+
+ This cannot be used if a v1 attribute certificate is used.
+
+ @param digestedObjectType The digest object type.
+ @param digestAlgorithm The algorithm identifier for the hash.
+ @param otherObjectTypeID The object type ID if
+ digestedObjectType is
+ otherObjectDigest.
+ @param objectDigest The hash value.
+
+
+ Returns the digest object type if an object digest info is used.
+
+
+ 0 - publicKey - A hash of the public key of the holder must be
+ passed.
+ 1 - publicKeyCert - A hash of the public key certificate of the
+ holder must be passed.
+ 2 - otherObjectDigest - A hash of some other object type must be
+ passed. otherObjectTypeID must not be empty.
+
+
+
+ @return The digest object type or -1 if no object digest info is set.
+
+
+ Returns the other object type ID if an object digest info is used.
+
+ @return The other object type ID or null if no object
+ digest info is set.
+
+
+ Returns the hash if an object digest info is used.
+
+ @return The hash or null if no object digest info is set.
+
+
+ Returns the digest algorithm ID if an object digest info is used.
+
+ @return The digest algorithm ID or null if no object
+ digest info is set.
+
+
+ Return any principal objects inside the attribute certificate holder entity names field.
+
+ @return an array of IPrincipal objects (usually X509Name), null if no entity names field is set.
+
+
+ Return the principals associated with the issuer attached to this holder
+
+ @return an array of principals, null if no BaseCertificateID is set.
+
+
+ Return the serial number associated with the issuer attached to this holder.
+
+ @return the certificate serial number, null if no BaseCertificateID is set.
+
+
+ Carrying class for an attribute certificate issuer.
+
+
+ Set the issuer directly with the ASN.1 structure.
+
+ @param issuer The issuer
+
+
+ Return any principal objects inside the attribute certificate issuer object.
+ An array of IPrincipal objects (usually X509Principal).
+
+
+ Interface for an X.509 Attribute Certificate.
+
+
+ The version number for the certificate.
+
+
+ The serial number for the certificate.
+
+
+ The UTC DateTime before which the certificate is not valid.
+
+
+ The UTC DateTime after which the certificate is not valid.
+
+
+ The holder of the certificate.
+
+
+ The issuer details for the certificate.
+
+
+ Return the attributes contained in the attribute block in the certificate.
+ An array of attributes.
+
+
+ Return the attributes with the same type as the passed in oid.
+ The object identifier we wish to match.
+ An array of matched attributes, null if there is no match.
+
+
+ Return an ASN.1 encoded byte array representing the attribute certificate.
+ An ASN.1 encoded byte array.
+ If the certificate cannot be encoded.
+
+
+
+ Get all critical extension values, by oid
+
+ IDictionary with string (OID) keys and Asn1OctetString values
+
+
+
+ Get all non-critical extension values, by oid
+
+ IDictionary with string (OID) keys and Asn1OctetString values
+
+
+
+ A utility class that will extract X509Principal objects from X.509 certificates.
+
+ Use this in preference to trying to recreate a principal from a string, not all
+ DNs are what they should be, so it's best to leave them encoded where they
+ can be.
+
+
+
+ Return the issuer of the given cert as an X509Principal.
+
+
+ Return the subject of the given cert as an X509Principal.
+
+
+ Return the issuer of the given CRL as an X509Principal.
+
+
+
+ A factory to produce Public Key Info Objects.
+
+
+
+
+ Create a Subject Public Key Info object for a given public key.
+
+ One of ElGammalPublicKeyParameters, DSAPublicKeyParameter, DHPublicKeyParameters, RsaKeyParameters or ECPublicKeyParameters
+ A subject public key info object.
+ Throw exception if object provided is not one of the above.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate object and initializes it with the data
+ read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the certificates
+ read from the given input stream inStream.
+
+
+ Class for carrying the values in an X.509 Attribute.
+
+
+ @param at an object representing an attribute.
+
+
+ Create an X.509 Attribute with the type given by the passed in oid and
+ the value represented by an ASN.1 Set containing value.
+
+ @param oid type of the attribute
+ @param value value object to go into the atribute's value set.
+
+
+ Create an X.59 Attribute with the type given by the passed in oid and the
+ value represented by an ASN.1 Set containing the objects in value.
+
+ @param oid type of the attribute
+ @param value vector of values to go in the attribute's value set.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ An Object representing an X509 Certificate.
+ Has static methods for loading Certificates encoded in many forms that return X509Certificate Objects.
+
+
+
+
+ Return true if the current time is within the start and end times nominated on the certificate.
+
+ true id certificate is valid for the current time.
+
+
+
+ Return true if the nominated time is within the start and end times nominated on the certificate.
+
+ The time to test validity against.
+ True if certificate is valid for nominated time.
+
+
+
+ Checks if the current date is within certificate's validity period.
+
+
+
+
+ Checks if the given date is within certificate's validity period.
+
+ if the certificate is expired by given date
+ if the certificate is not yet valid on given date
+
+
+
+ Return the certificate's version.
+
+ An integer whose value Equals the version of the cerficate.
+
+
+
+ Return a BigInteger containing the serial number.
+
+ The Serial number.
+
+
+
+ Get the Issuer Distinguished Name. (Who signed the certificate.)
+
+ And X509Object containing name and value pairs.
+
+
+
+ Get the subject of this certificate.
+
+ An X509Name object containing name and value pairs.
+
+
+
+ The time that this certificate is valid from.
+
+ A DateTime object representing that time in the local time zone.
+
+
+
+ The time that this certificate is valid up to.
+
+ A DateTime object representing that time in the local time zone.
+
+
+
+ Return the Der encoded TbsCertificate data.
+ This is the certificate component less the signature.
+ To Get the whole certificate call the GetEncoded() member.
+
+ A byte array containing the Der encoded Certificate component.
+
+
+
+ The signature.
+
+ A byte array containg the signature of the certificate.
+
+
+
+ A meaningful version of the Signature Algorithm. (EG SHA1WITHRSA)
+
+ A sting representing the signature algorithm.
+
+
+
+ Get the Signature Algorithms Object ID.
+
+ A string containg a '.' separated object id.
+
+
+
+ Get the signature algorithms parameters. (EG DSA Parameters)
+
+ A byte array containing the Der encoded version of the parameters or null if there are none.
+
+
+
+ Get the issuers UID.
+
+ A DerBitString.
+
+
+
+ Get the subjects UID.
+
+ A DerBitString.
+
+
+
+ Get a key usage guidlines.
+
+
+
+
+ Get the public key of the subject of the certificate.
+
+ The public key parameters.
+
+
+
+ Return a Der encoded version of this certificate.
+
+ A byte array.
+
+
+
+ Verify the certificate's signature using the nominated public key.
+
+ An appropriate public key parameter object, RsaPublicKeyParameters, DsaPublicKeyParameters or ECDsaPublicKeyParameters
+ True if the signature is valid.
+ If key submitted is not of the above nominated types.
+
+
+
+ Verify the certificate's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the certificate's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the certificate algorithm is invalid.
+
+
+
+ This class contains a cross certificate pair. Cross certificates pairs may
+ contain two cross signed certificates from two CAs. A certificate from the
+ other CA to this CA is contained in the forward certificate, the certificate
+ from this CA to the other CA is contained in the reverse certificate.
+
+
+
+ Constructor
+ Certificate from the other CA to this CA.
+ Certificate from this CA to the other CA.
+
+
+ Constructor from a ASN.1 CertificatePair structure.
+ The CertificatePair ASN.1 object.
+
+
+ Returns the certificate from the other CA to this CA.
+
+
+ Returns the certificate from this CA to the other CA.
+
+
+ class for dealing with X509 certificates.
+
+ At the moment this will deal with "-----BEGIN CERTIFICATE-----" to "-----END CERTIFICATE-----"
+ base 64 encoded certs, as well as the BER binaries of certificates and some classes of PKCS#7
+ objects.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate object and initializes it with the data
+ read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the certificates
+ read from the given input stream inStream.
+
+
+ The following extensions are listed in RFC 2459 as relevant to CRLs
+
+ Authority Key Identifier
+ Issuer Alternative Name
+ CRL Number
+ Delta CRL Indicator (critical)
+ Issuing Distribution Point (critical)
+
+
+
+ Verify the CRL's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the CRL's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the CRL algorithm is invalid.
+
+
+ Returns a string representation of this CRL.
+
+ @return a string representation of this CRL.
+
+
+ Checks whether the given certificate is on this CRL.
+
+ @param cert the certificate to check for.
+ @return true if the given certificate is on this CRL,
+ false otherwise.
+
+
+ The following extensions are listed in RFC 2459 as relevant to CRL Entries
+
+ ReasonCode Hode Instruction Code Invalidity Date Certificate Issuer
+ (critical)
+
+
+ Constructor for CRLEntries of indirect CRLs. If isIndirect
+ is false {@link #getCertificateIssuer()} will always
+ return null, previousCertificateIssuer is
+ ignored. If this isIndirect is specified and this CrlEntry
+ has no certificate issuer CRL entry extension
+ previousCertificateIssuer is returned by
+ {@link #getCertificateIssuer()}.
+
+ @param c
+ TbsCertificateList.CrlEntry object.
+ @param isIndirect
+ true if the corresponding CRL is a indirect
+ CRL.
+ @param previousCertificateIssuer
+ Certificate issuer of the previous CrlEntry.
+
+
+
+ Create loading data from byte array.
+
+
+
+
+
+ Create loading data from byte array.
+
+
+
+
+ Generates a certificate revocation list (CRL) object and initializes
+ it with the data read from the input stream inStream.
+
+
+ Returns a (possibly empty) collection view of the CRLs read from
+ the given input stream inStream.
+
+ The inStream may contain a sequence of DER-encoded CRLs, or
+ a PKCS#7 CRL set. This is a PKCS#7 SignedData object, with the
+ only significant field being crls. In particular the signature
+ and the contents are ignored.
+
+
+
+ Get non critical extensions.
+
+ A set of non critical extension oids.
+
+
+
+ Get any critical extensions.
+
+ A sorted list of critical entension.
+
+
+
+ Get the value of a given extension.
+
+ The object ID of the extension.
+ An Asn1OctetString object if that extension is found or null if not.
+
+
+ A holding class for constructing an X509 Key Usage extension.
+
+
+ id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
+
+ KeyUsage ::= BIT STRING {
+ digitalSignature (0),
+ nonRepudiation (1),
+ keyEncipherment (2),
+ dataEncipherment (3),
+ keyAgreement (4),
+ keyCertSign (5),
+ cRLSign (6),
+ encipherOnly (7),
+ decipherOnly (8) }
+
+
+
+ Basic constructor.
+
+ @param usage - the bitwise OR of the Key Usage flags giving the
+ allowed uses for the key.
+ e.g. (X509KeyUsage.keyEncipherment | X509KeyUsage.dataEncipherment)
+
+
+ Return the digest algorithm using one of the standard JCA string
+ representations rather than the algorithm identifier (if possible).
+
+
+
+ Class to Generate X509V1 Certificates.
+
+
+
+
+ Default Constructor.
+
+
+
+
+ Reset the generator.
+
+
+
+
+ Set the certificate's serial number.
+
+ Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data.
+ You will be surprised how ugly a serial number collision can get.
+ The serial number.
+
+
+
+ Set the issuer distinguished name.
+ The issuer is the entity whose private key is used to sign the certificate.
+
+ The issuers DN.
+
+
+
+ Set the date that this certificate is to be valid from.
+
+
+
+
+
+ Set the date after which this certificate will no longer be valid.
+
+
+
+
+
+ Set the subject distinguished name.
+ The subject describes the entity associated with the public key.
+
+
+
+
+
+ Set the public key that this certificate identifies.
+
+
+
+
+
+ Set the signature algorithm that will be used to sign this certificate.
+ This can be either a name or an OID, names are treated as case insensitive.
+
+ string representation of the algorithm name
+
+
+
+ Generate a new X509Certificate.
+
+ The private key of the issuer used to sign this certificate.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate specifying a SecureRandom instance that you would like to use.
+
+ The private key of the issuer used to sign this certificate.
+ The Secure Random you want to use.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Certificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ An implementation of a version 2 X.509 Attribute Certificate.
+
+
+
+ Verify the certificate's signature using a verifier created using the passed in verifier provider.
+
+ An appropriate provider for verifying the certificate's signature.
+ True if the signature is valid.
+ If verifier provider is not appropriate or the certificate algorithm is invalid.
+
+
+ Class to produce an X.509 Version 2 AttributeCertificate.
+
+
+ Reset the generator
+
+
+ Set the Holder of this Attribute Certificate.
+
+
+ Set the issuer.
+
+
+ Set the serial number for the certificate.
+
+
+
+ Set the signature algorithm. This can be either a name or an OID, names
+ are treated as case insensitive.
+
+ The algorithm name.
+
+
+ Add an attribute.
+
+
+ Add a given extension field for the standard extensions tag.
+
+
+
+ Add a given extension field for the standard extensions tag.
+ The value parameter becomes the contents of the octet string associated
+ with the extension.
+
+
+
+
+ Generate an X509 certificate, based on the current issuer and subject.
+
+
+
+
+ Generate an X509 certificate, based on the current issuer and subject,
+ using the supplied source of randomness, if required.
+
+
+
+
+ Generate a new X.509 Attribute Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An IX509AttributeCertificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ class to produce an X.509 Version 2 CRL.
+
+
+ reset the generator
+
+
+ Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the
+ certificate.
+
+
+ Reason being as indicated by CrlReason, i.e. CrlReason.KeyCompromise
+ or 0 if CrlReason is not to be used
+
+
+
+ Add a CRL entry with an Invalidity Date extension as well as a CrlReason extension.
+ Reason being as indicated by CrlReason, i.e. CrlReason.KeyCompromise
+ or 0 if CrlReason is not to be used
+
+
+
+ Add a CRL entry with extensions.
+
+
+
+ Add the CRLEntry objects contained in a previous CRL.
+
+ @param other the X509Crl to source the other entries from.
+
+
+
+ Set the signature algorithm that will be used to sign this CRL.
+
+
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+ add a given extension field for the standard extensions tag (tag 0)
+
+
+
+ Generate an X.509 CRL, based on the current issuer and subject.
+
+ The private key of the issuer that is signing this certificate.
+ An X509Crl.
+
+
+
+ Generate an X.509 CRL, based on the current issuer and subject using the specified secure random.
+
+ The private key of the issuer that is signing this certificate.
+ Your Secure Random instance.
+ An X509Crl.
+
+
+
+ Generate a new X509Crl using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Crl.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+
+ A class to Generate Version 3 X509Certificates.
+
+
+
+
+ Reset the Generator.
+
+
+
+
+ Set the certificate's serial number.
+
+ Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data.
+ You will be surprised how ugly a serial number collision can Get.
+ The serial number.
+
+
+
+ Set the distinguished name of the issuer.
+ The issuer is the entity which is signing the certificate.
+
+ The issuer's DN.
+
+
+
+ Set the date that this certificate is to be valid from.
+
+
+
+
+
+ Set the date after which this certificate will no longer be valid.
+
+
+
+
+
+ Set the DN of the entity that this certificate is about.
+
+
+
+
+
+ Set the public key that this certificate identifies.
+
+
+
+
+
+ Set the signature algorithm that will be used to sign this certificate.
+
+
+
+
+
+ Set the subject unique ID - note: it is very rare that it is correct to do this.
+
+
+
+
+
+ Set the issuer unique ID - note: it is very rare that it is correct to do this.
+
+
+
+
+
+ Add a given extension field for the standard extensions tag (tag 3).
+
+ string containing a dotted decimal Object Identifier.
+ Is it critical.
+ The value.
+
+
+
+ Add an extension to this certificate.
+
+ Its Object Identifier.
+ Is it critical.
+ The value.
+
+
+
+ Add an extension using a string with a dotted decimal OID.
+
+ string containing a dotted decimal Object Identifier.
+ Is it critical.
+ byte[] containing the value of this extension.
+
+
+
+ Add an extension to this certificate.
+
+ Its Object Identifier.
+ Is it critical.
+ byte[] containing the value of this extension.
+
+
+
+ Add a given extension field for the standard extensions tag (tag 3),
+ copying the extension value from another certificate.
+
+
+
+ add a given extension field for the standard extensions tag (tag 3)
+ copying the extension value from another certificate.
+ @throws CertificateParsingException if the extension cannot be extracted.
+
+
+
+ Generate an X509Certificate.
+
+ The private key of the issuer that is signing this certificate.
+ An X509Certificate.
+
+
+
+ Generate an X509Certificate using your own SecureRandom.
+
+ The private key of the issuer that is signing this certificate.
+ You Secure Random instance.
+ An X509Certificate.
+
+
+
+ Generate a new X509Certificate using the passed in SignatureCalculator.
+
+ A signature calculator factory with the necessary algorithm details.
+ An X509Certificate.
+
+
+
+ Allows enumeration of the signature names supported by the generator.
+
+
+
+ A high level authority key identifier.
+
+
+ Constructor which will take the byte[] returned from getExtensionValue()
+
+ @param encodedValue a DER octet encoded string with the extension structure in it.
+ @throws IOException on parsing errors.
+
+
+ Create an AuthorityKeyIdentifier using the passed in certificate's public
+ key, issuer and serial number.
+
+ @param certificate the certificate providing the information.
+ @throws CertificateParsingException if there is a problem processing the certificate
+
+
+ Create an AuthorityKeyIdentifier using just the hash of the
+ public key.
+
+ @param pubKey the key to generate the hash from.
+ @throws InvalidKeyException if there is a problem using the key.
+
+
+ A high level subject key identifier.
+
+
+ Constructor which will take the byte[] returned from getExtensionValue()
+
+ @param encodedValue a DER octet encoded string with the extension structure in it.
+ @throws IOException on parsing errors.
+
+
+ This class is an Selector like implementation to select
+ attribute certificates from a given set of criteria.
+
+ @see org.bouncycastle.x509.X509AttributeCertificate
+ @see org.bouncycastle.x509.X509Store
+
+
+
+ Decides if the given attribute certificate should be selected.
+
+ The attribute certificate to be checked.
+ true if the object matches this selector.
+
+
+ The attribute certificate which must be matched.
+ If null is given, any will do.
+
+
+ The criteria for validity
+ If null is given any will do.
+
+
+ The holder.
+ If null is given any will do.
+
+
+ The issuer.
+ If null is given any will do.
+
+
+ The serial number.
+ If null is given any will do.
+
+
+ Adds a target name criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target names.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name The name as a GeneralName (not null)
+
+
+ Adds a target name criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target names.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name a byte array containing the name in ASN.1 DER encoded form of a GeneralName
+ @throws IOException if a parsing error occurs.
+
+
+ Adds a collection with target names criteria. If null is
+ given any will do.
+
+ The collection consists of either GeneralName objects or byte[] arrays representing
+ DER encoded GeneralName structures.
+
+
+ @param names A collection of target names.
+ @throws IOException if a parsing error occurs.
+ @see #AddTargetName(byte[])
+ @see #AddTargetName(GeneralName)
+
+
+ Gets the target names. The collection consists of Lists
+ made up of an Integer in the first entry and a DER encoded
+ byte array or a String in the second entry.
+ The returned collection is immutable.
+
+ @return The collection of target names
+ @see #setTargetNames(Collection)
+
+
+ Adds a target group criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target groups.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param group The group as GeneralName form (not null)
+
+
+ Adds a target group criterion for the attribute certificate to the target
+ information extension criteria. The X509AttributeCertificate
+ must contain at least one of the specified target groups.
+
+ Each attribute certificate may contain a target information extension
+ limiting the servers where this attribute certificate can be used. If
+ this extension is not present, the attribute certificate is not targeted
+ and may be accepted by any server.
+
+
+ @param name a byte array containing the group in ASN.1 DER encoded form of a GeneralName
+ @throws IOException if a parsing error occurs.
+
+
+ Adds a collection with target groups criteria. If null is
+ given any will do.
+
+ The collection consists of GeneralName objects or byte[]
+ representing DER encoded GeneralNames.
+
+
+ @param names A collection of target groups.
+ @throws IOException if a parsing error occurs.
+ @see #AddTargetGroup(byte[])
+ @see #AddTargetGroup(GeneralName)
+
+
+ Gets the target groups. The collection consists of Lists
+ made up of an Integer in the first entry and a DER encoded
+ byte array or a String in the second entry.
+ The returned collection is immutable.
+
+ @return The collection of target groups.
+ @see #setTargetGroups(Collection)
+
+
+
+ This class is an IX509Selector implementation to select
+ certificate pairs, which are e.g. used for cross certificates. The set of
+ criteria is given from two X509CertStoreSelector objects,
+ each of which, if present, must match the respective component of a pair.
+
+
+
+ The certificate pair which is used for testing on equality.
+
+
+ The certificate selector for the forward part.
+
+
+ The certificate selector for the reverse part.
+
+
+
+ Decides if the given certificate pair should be selected. If
+ obj is not a X509CertificatePair, this method
+ returns false.
+
+ The X509CertificatePair to be tested.
+ true if the object matches this selector.
+
+
+
+ An ISet of DerObjectIdentifier objects.
+
+
+
+ A simple collection backed store.
+
+
+ Basic constructor.
+
+ @param collection - initial contents for the store, this is copied.
+
+
+ Return the matches in the collection for the passed in selector.
+
+ @param selector the selector to match against.
+ @return a possibly empty collection of matching objects.
+
+
+ This class contains a collection for collection based X509Stores.
+
+
+
+ Constructor.
+
+ The collection is copied.
+
+
+ The collection containing X.509 object types.
+ If collection is null.
+
+
+ Returns a copy of the ICollection.
+
+
+ Returns a formatted string describing the parameters.
+
+
+
+ An ICollection of X509Name objects
+
+
+
+ The attribute certificate being checked. This is not a criterion.
+ Rather, it is optional information that may help a {@link X509Store} find
+ CRLs that would be relevant when checking revocation for the specified
+ attribute certificate. If null is specified, then no such
+ optional information is provided.
+
+ @param attrCert the IX509AttributeCertificate being checked (or
+ null)
+ @see #getAttrCertificateChecking()
+
+
+ If true only complete CRLs are returned. Defaults to
+ false.
+
+ @return true if only complete CRLs are returned.
+
+
+ Returns if this selector must match CRLs with the delta CRL indicator
+ extension set. Defaults to false.
+
+ @return Returns true if only CRLs with the delta CRL
+ indicator extension are selected.
+
+
+ The issuing distribution point.
+
+ The issuing distribution point extension is a CRL extension which
+ identifies the scope and the distribution point of a CRL. The scope
+ contains among others information about revocation reasons contained in
+ the CRL. Delta CRLs and complete CRLs must have matching issuing
+ distribution points.
+
+ The byte array is cloned to protect against subsequent modifications.
+
+ You must also enable or disable this criteria with
+ {@link #setIssuingDistributionPointEnabled(bool)}.
+
+ @param issuingDistributionPoint The issuing distribution point to set.
+ This is the DER encoded OCTET STRING extension value.
+ @see #getIssuingDistributionPoint()
+
+
+ Whether the issuing distribution point criteria should be applied.
+ Defaults to false.
+
+ You may also set the issuing distribution point criteria if not a missing
+ issuing distribution point should be assumed.
+
+ @return Returns if the issuing distribution point check is enabled.
+
+
+ The maximum base CRL number. Defaults to null.
+
+ @return Returns the maximum base CRL number.
+ @see #setMaxBaseCRLNumber(BigInteger)
+
+
+
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/net451/MimeKit.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net451/MimeKit.dll
new file mode 100644
index 00000000..16d3e7ec
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/net451/MimeKit.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/portable-net45+win+wp80+MonoAndroid10+Xamarin.iOS10+MonoTouch10/MimeKit.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/portable-net45+win+wp80+MonoAndroid10+Xamarin.iOS10+MonoTouch10/MimeKit.dll
new file mode 100644
index 00000000..0fbc23db
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/portable-net45+win+wp80+MonoAndroid10+Xamarin.iOS10+MonoTouch10/MimeKit.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/portable-net45+win+wp80+MonoAndroid10+Xamarin.iOS10+MonoTouch10/Portable.Text.Encoding.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/portable-net45+win+wp80+MonoAndroid10+Xamarin.iOS10+MonoTouch10/Portable.Text.Encoding.dll
new file mode 100644
index 00000000..f89a452a
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/portable-net45+win+wp80+MonoAndroid10+Xamarin.iOS10+MonoTouch10/Portable.Text.Encoding.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/wpa81/MimeKit.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/wpa81/MimeKit.dll
new file mode 100644
index 00000000..d851976a
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/wpa81/MimeKit.dll differ
diff --git a/build/approot/packages/MimeKit/1.3.0-beta7/lib/wpa81/Portable.Text.Encoding.dll b/build/approot/packages/MimeKit/1.3.0-beta7/lib/wpa81/Portable.Text.Encoding.dll
new file mode 100644
index 00000000..1d28206a
Binary files /dev/null and b/build/approot/packages/MimeKit/1.3.0-beta7/lib/wpa81/Portable.Text.Encoding.dll differ
diff --git a/build/approot/packages/Newtonsoft.Json/7.0.1/Newtonsoft.Json.nuspec b/build/approot/packages/Newtonsoft.Json/7.0.1/Newtonsoft.Json.nuspec
new file mode 100644
index 00000000..52f8106b
--- /dev/null
+++ b/build/approot/packages/Newtonsoft.Json/7.0.1/Newtonsoft.Json.nuspec
@@ -0,0 +1,17 @@
+
+
+
+ Newtonsoft.Json
+ 7.0.1
+ Json.NET
+ false
+ James Newton-King
+ James Newton-King
+ https://raw.github.com/JamesNK/Newtonsoft.Json/master/LICENSE.md
+ http://www.newtonsoft.com/json
+ http://www.newtonsoft.com/content/images/nugeticon.png
+ Json.NET is a popular high-performance JSON framework for .NET
+ en-US
+ json
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net20/Newtonsoft.Json.dll b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net20/Newtonsoft.Json.dll
new file mode 100644
index 00000000..71c489a3
Binary files /dev/null and b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net20/Newtonsoft.Json.dll differ
diff --git a/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net35/Newtonsoft.Json.dll b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net35/Newtonsoft.Json.dll
new file mode 100644
index 00000000..5e8eb8ee
Binary files /dev/null and b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net35/Newtonsoft.Json.dll differ
diff --git a/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net40/Newtonsoft.Json.dll b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net40/Newtonsoft.Json.dll
new file mode 100644
index 00000000..ae725c4b
Binary files /dev/null and b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net40/Newtonsoft.Json.dll differ
diff --git a/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net45/Newtonsoft.Json.dll b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net45/Newtonsoft.Json.dll
new file mode 100644
index 00000000..d4c90377
Binary files /dev/null and b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/net45/Newtonsoft.Json.dll differ
diff --git a/build/approot/packages/Newtonsoft.Json/7.0.1/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll
new file mode 100644
index 00000000..f2e197e9
Binary files /dev/null and b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll differ
diff --git a/build/approot/packages/Newtonsoft.Json/7.0.1/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll
new file mode 100644
index 00000000..89bc2b8c
Binary files /dev/null and b/build/approot/packages/Newtonsoft.Json/7.0.1/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll differ
diff --git a/build/approot/packages/Newtonsoft.Json/7.0.1/tools/install.ps1 b/build/approot/packages/Newtonsoft.Json/7.0.1/tools/install.ps1
new file mode 100644
index 00000000..d3e546ce
--- /dev/null
+++ b/build/approot/packages/Newtonsoft.Json/7.0.1/tools/install.ps1
@@ -0,0 +1,112 @@
+param($installPath, $toolsPath, $package, $project)
+
+# open json.net splash page on package install
+# don't open if json.net is installed as a dependency
+
+try
+{
+ $url = "http://www.newtonsoft.com/json/install?version=" + $package.Version
+ $dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
+
+ if ($dte2.ActiveWindow.Caption -eq "Package Manager Console")
+ {
+ # user is installing from VS NuGet console
+ # get reference to the window, the console host and the input history
+ # show webpage if "install-package newtonsoft.json" was last input
+
+ $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow])
+
+ $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor `
+ [System.Reflection.BindingFlags]::NonPublic)
+
+ $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1
+ if ($prop -eq $null) { return }
+
+ $hostInfo = $prop.GetValue($consoleWindow)
+ if ($hostInfo -eq $null) { return }
+
+ $history = $hostInfo.WpfConsole.InputHistory.History
+
+ $lastCommand = $history | select -last 1
+
+ if ($lastCommand)
+ {
+ $lastCommand = $lastCommand.Trim().ToLower()
+ if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json"))
+ {
+ $dte2.ItemOperations.Navigate($url) | Out-Null
+ }
+ }
+ }
+ else
+ {
+ # user is installing from VS NuGet dialog
+ # get reference to the window, then smart output console provider
+ # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation
+
+ $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor `
+ [System.Reflection.BindingFlags]::NonPublic)
+
+ $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor `
+ [System.Reflection.BindingFlags]::NonPublic)
+
+ if ($instanceField -eq $null -or $consoleField -eq $null) { return }
+
+ $instance = $instanceField.GetValue($null)
+
+ if ($instance -eq $null) { return }
+
+ $consoleProvider = $consoleField.GetValue($instance)
+ if ($consoleProvider -eq $null) { return }
+
+ $console = $consoleProvider.CreateOutputConsole($false)
+
+ $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor `
+ [System.Reflection.BindingFlags]::NonPublic)
+ if ($messagesField -eq $null) { return }
+
+ $messages = $messagesField.GetValue($console)
+ if ($messages -eq $null) { return }
+
+ $operations = $messages -split "=============================="
+
+ $lastOperation = $operations | select -last 1
+
+ if ($lastOperation)
+ {
+ $lastOperation = $lastOperation.ToLower()
+
+ $lines = $lastOperation -split "`r`n"
+
+ $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1
+
+ if ($installMatch)
+ {
+ $dte2.ItemOperations.Navigate($url) | Out-Null
+ }
+ }
+ }
+}
+catch
+{
+ try
+ {
+ $pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager")
+
+ $selection = $pmPane.TextDocument.Selection
+ $selection.StartOfDocument($false)
+ $selection.EndOfDocument($true)
+
+ if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'"))
+ {
+ $dte2.ItemOperations.Navigate($url) | Out-Null
+ }
+ }
+ catch
+ {
+ # stop potential errors from bubbling up
+ # worst case the splash page won't open
+ }
+}
+
+# still yolo
\ No newline at end of file
diff --git a/build/approot/packages/Npgsql/3.1.0-alpha6/Npgsql.nuspec b/build/approot/packages/Npgsql/3.1.0-alpha6/Npgsql.nuspec
new file mode 100644
index 00000000..ccb0a3ba
--- /dev/null
+++ b/build/approot/packages/Npgsql/3.1.0-alpha6/Npgsql.nuspec
@@ -0,0 +1,70 @@
+
+
+
+ Npgsql
+ 3.1.0-alpha6
+ false
+ Shay Rojansky,Emil Lenngren,Francisco Figueiredo Jr.,Kenji Uno,Jon Asher,Josh Cooley,Federico Di Gregorio,Jon Hanna,Chris Morgan,Dave Page,Glen Parker,Brar Piening,Hiroshi Saito
+ Shay Rojansky,Emil Lenngren,Francisco Figueiredo Jr.,Kenji Uno
+ http://www.npgsql.org/img/postgresql.gif
+ Npgsql is a .NET data provider for PostgreSQL, 100% implemented in C# code. PostgreSQL 9.x and above is officially supported, other versions may work.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Npgsql/3.1.0-alpha6/app/project.json b/build/approot/packages/Npgsql/3.1.0-alpha6/app/project.json
new file mode 100644
index 00000000..4ba2b425
--- /dev/null
+++ b/build/approot/packages/Npgsql/3.1.0-alpha6/app/project.json
@@ -0,0 +1,162 @@
+{
+ "version": "3.1.0-alpha6",
+ "owners": [
+ "Shay Rojansky",
+ "Emil Lenngren",
+ "Francisco Figueiredo Jr.",
+ "Kenji Uno"
+ ],
+ "authors": [
+ "Shay Rojansky",
+ "Emil Lenngren",
+ "Francisco Figueiredo Jr.",
+ "Kenji Uno",
+ "Jon Asher",
+ "Josh Cooley",
+ "Federico Di Gregorio",
+ "Jon Hanna",
+ "Chris Morgan",
+ "Dave Page",
+ "Glen Parker",
+ "Brar Piening",
+ "Hiroshi Saito"
+ ],
+ "description": "Npgsql is a .NET data provider for PostgreSQL, 100% implemented in C# code. PostgreSQL 9.x and above is officially supported, other versions may work.",
+ "iconUrl": "http://www.npgsql.org/img/postgresql.gif",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/npgsql/npgsql"
+ },
+ "compile": "../Shared/*.cs",
+ "compilationOptions": {
+ "warningsAsErrors": true,
+ "define": [
+ "__MonoCS__"
+ ],
+ "keyFile": "../../Npgsql.snk"
+ },
+ "commands": {
+ "rewrite-async": "AsyncRewriter"
+ },
+ "scripts": {
+ "prebuild": [
+ "dnx rewrite-async"
+ ]
+ },
+ "dependencies": {
+ "Npgsql": "3.1.0-alpha6"
+ },
+ "frameworks": {
+ "net45": {
+ "frameworkAssemblies": {
+ "System.Collections": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.Diagnostics.Contracts": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.Transactions": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.DirectoryServices": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.Data": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.Numerics": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.Xml": {
+ "version": "4.0.0.0",
+ "type": "build"
+ }
+ }
+ },
+ "net452": {
+ "frameworkAssemblies": {
+ "System.Collections": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.Diagnostics.Contracts": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.Transactions": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.DirectoryServices": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.Data": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.Numerics": {
+ "version": "4.0.0.0",
+ "type": "build"
+ },
+ "System.Xml": {
+ "version": "4.0.0.0",
+ "type": "build"
+ }
+ }
+ },
+ "dnx452": {
+ "frameworkAssemblies": {
+ "System.Collections": "4.0.0.0",
+ "System.Diagnostics.Contracts": "4.0.0.0",
+ "System.Transactions": "4.0.0.0",
+ "System.DirectoryServices": "4.0.0.0",
+ "System.Data": "4.0.0.0",
+ "System.Numerics": "4.0.0.0",
+ "System.Xml": "4.0.0.0"
+ }
+ },
+ "dnxcore50": {
+ "dependencies": {
+ "System.Collections.Concurrent": "4.0.11-*",
+ "System.Console": "4.0.0-*",
+ "System.ComponentModel": "4.0.1-*",
+ "System.ComponentModel.TypeConverter": "4.0.1-*",
+ "System.Data.Common": "4.0.1-*",
+ "System.Diagnostics.Contracts": "4.0.1-*",
+ "System.Diagnostics.Tools": "4.0.1-*",
+ "System.Globalization": "4.0.11-*",
+ "System.Globalization.Extensions": "4.0.1-*",
+ "System.Linq": "4.0.1-*",
+ "System.Net.NameResolution": "4.0.0-*",
+ "System.Net.Primitives": "4.0.11-*",
+ "System.Net.Sockets": "4.1.0-*",
+ "System.Net.Security": "4.0.0-*",
+ "System.Net.NetworkInformation": "4.1.0-*",
+ "System.Runtime": "4.0.21-*",
+ "System.Runtime.Extensions": "4.0.11-*",
+ "System.Runtime.InteropServices": "4.0.21-*",
+ "System.Runtime.Numerics": "4.0.1-*",
+ "System.Reflection": "4.1.0-*",
+ "System.Reflection.TypeExtensions": "4.0.1-*",
+ "System.Security.Cryptography.Primitives": "4.0.0-*",
+ "System.Security.Cryptography.Algorithms": "4.0.0-*",
+ "System.Security.Cryptography.X509Certificates": "4.0.0-*",
+ "System.Security.Principal": "4.0.1-*",
+ "System.Text.Encoding.Extensions": "4.0.11-*",
+ "System.Text.RegularExpressions": "4.0.11-*",
+ "System.Threading": "4.0.11-*",
+ "System.Threading.Thread": "4.0.0-*",
+ "System.Threading.Timer": "4.0.1-*"
+ }
+ }
+ },
+ "entryPoint": "Npgsql",
+ "loadable": false
+}
\ No newline at end of file
diff --git a/build/approot/packages/Npgsql/3.1.0-alpha6/app/rewrite-async b/build/approot/packages/Npgsql/3.1.0-alpha6/app/rewrite-async
new file mode 100644
index 00000000..8c4aa05f
--- /dev/null
+++ b/build/approot/packages/Npgsql/3.1.0-alpha6/app/rewrite-async
@@ -0,0 +1 @@
+dnx --appbase "$(dirname $0)" Microsoft.Dnx.ApplicationHost rewrite-async $@
\ No newline at end of file
diff --git a/build/approot/packages/Npgsql/3.1.0-alpha6/app/rewrite-async.cmd b/build/approot/packages/Npgsql/3.1.0-alpha6/app/rewrite-async.cmd
new file mode 100644
index 00000000..f37ad4b2
--- /dev/null
+++ b/build/approot/packages/Npgsql/3.1.0-alpha6/app/rewrite-async.cmd
@@ -0,0 +1 @@
+@dnx --appbase "%~dp0." Microsoft.Dnx.ApplicationHost rewrite-async %*
\ No newline at end of file
diff --git a/build/approot/packages/Npgsql/3.1.0-alpha6/lib/dnx452/Npgsql.dll b/build/approot/packages/Npgsql/3.1.0-alpha6/lib/dnx452/Npgsql.dll
new file mode 100644
index 00000000..efee8d9b
Binary files /dev/null and b/build/approot/packages/Npgsql/3.1.0-alpha6/lib/dnx452/Npgsql.dll differ
diff --git a/build/approot/packages/Npgsql/3.1.0-alpha6/lib/dnxcore50/Npgsql.dll b/build/approot/packages/Npgsql/3.1.0-alpha6/lib/dnxcore50/Npgsql.dll
new file mode 100644
index 00000000..d4a5eab3
Binary files /dev/null and b/build/approot/packages/Npgsql/3.1.0-alpha6/lib/dnxcore50/Npgsql.dll differ
diff --git a/build/approot/packages/Npgsql/3.1.0-alpha6/lib/net45/Npgsql.dll b/build/approot/packages/Npgsql/3.1.0-alpha6/lib/net45/Npgsql.dll
new file mode 100644
index 00000000..51478ba2
Binary files /dev/null and b/build/approot/packages/Npgsql/3.1.0-alpha6/lib/net45/Npgsql.dll differ
diff --git a/build/approot/packages/Npgsql/3.1.0-alpha6/lib/net452/Npgsql.dll b/build/approot/packages/Npgsql/3.1.0-alpha6/lib/net452/Npgsql.dll
new file mode 100644
index 00000000..7f4f75a2
Binary files /dev/null and b/build/approot/packages/Npgsql/3.1.0-alpha6/lib/net452/Npgsql.dll differ
diff --git a/build/approot/packages/Owin/1.0.0/Owin.nuspec b/build/approot/packages/Owin/1.0.0/Owin.nuspec
new file mode 100644
index 00000000..f4d81ee6
--- /dev/null
+++ b/build/approot/packages/Owin/1.0.0/Owin.nuspec
@@ -0,0 +1,15 @@
+
+
+
+ Owin
+ 1.0.0
+ OWIN
+ false
+ OWIN startup components contributors
+ OWIN startup components contributors
+ https://github.com/owin-contrib/owin-hosting/blob/master/LICENSE.txt
+ https://github.com/owin-contrib/owin-hosting/
+ OWIN IAppBuilder startup interface
+ OWIN
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Owin/1.0.0/lib/net40/Owin.dll b/build/approot/packages/Owin/1.0.0/lib/net40/Owin.dll
new file mode 100644
index 00000000..ba6e21ed
Binary files /dev/null and b/build/approot/packages/Owin/1.0.0/lib/net40/Owin.dll differ
diff --git a/build/approot/packages/PayPalButtonManagerSDK/2.10.109/PayPalButtonManagerSDK.nuspec b/build/approot/packages/PayPalButtonManagerSDK/2.10.109/PayPalButtonManagerSDK.nuspec
new file mode 100644
index 00000000..c6e0e6bd
--- /dev/null
+++ b/build/approot/packages/PayPalButtonManagerSDK/2.10.109/PayPalButtonManagerSDK.nuspec
@@ -0,0 +1,36 @@
+
+
+
+ PayPalButtonManagerSDK
+ 2.10.109
+ PayPal Button Manager SDK for .NET
+ true
+ PayPal
+ PayPal
+ https://github.com/paypal/buttonmanager-sdk-dotnet/blob/master/LICENSE.txt
+ https://github.com/paypal/buttonmanager-sdk-dotnet
+ https://avatars3.githubusercontent.com/u/476675?v=2&s=100
+ The PayPal Button Manager SDK provides the following methods:
+
+BMButtonSearch API Operation (NVP/SOAP): Use the BMButtonSearch API operation to obtain a list of your hosted Website Payments Standard buttons.
+
+BMCreateButton API Operation (NVP/SOAP): Use the BMCreateButton API operation to create a Website Payments Standard button.
+
+BMGetButtonDetails API Operation (NVP/SOAP): Use the BMGetButtonDetails API operation to obtain information about a hosted Website Payments Standard button.
+
+BMGetInventory API Operation (NVP/SOAP): Use the BMGetInventory API operation to determine the inventory levels and other inventory-related information for a button and menu items associated with the button.
+
+BMManageButtonStatus API Operation (NVP/SOAP): Use the BMManageButtonStatus API operation to change the status of a hosted button. Currently, you can only delete a button.
+
+BMSetInventory API Operation (NVP/SOAP): Use the BMSetInventory API operation to set the inventory level and inventory management features for the specified button.
+
+BMUpdateButton API Operation (NVP/SOAP): Use the BMUpdateButton API operation to modify a Website Payments Standard button that is hosted on PayPal.
+ The PayPal Button Manager SDK enables you to dynamically create, manage, and edit large numbers of PayPal Payments Standard buttons.
+ https://github.com/paypal/buttonmanager-sdk-dotnet/blob/master/Changelog.txt
+ Copyright © 2009-2015 PayPal
+ PayPal SDK .NET C# Button Manager
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/PayPalButtonManagerSDK/2.10.109/lib/net20/PayPalButtonManagerSDK.dll b/build/approot/packages/PayPalButtonManagerSDK/2.10.109/lib/net20/PayPalButtonManagerSDK.dll
new file mode 100644
index 00000000..21fa1652
Binary files /dev/null and b/build/approot/packages/PayPalButtonManagerSDK/2.10.109/lib/net20/PayPalButtonManagerSDK.dll differ
diff --git a/build/approot/packages/PayPalCoreSDK/1.7.1/PayPalCoreSDK.nuspec b/build/approot/packages/PayPalCoreSDK/1.7.1/PayPalCoreSDK.nuspec
new file mode 100644
index 00000000..35e8a9f8
--- /dev/null
+++ b/build/approot/packages/PayPalCoreSDK/1.7.1/PayPalCoreSDK.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ PayPalCoreSDK
+ 1.7.1
+ PayPal Core SDK for .NET
+ true
+ PayPal
+ PayPal
+ https://github.com/paypal/sdk-core-dotnet/blob/master/LICENSE.txt
+ https://github.com/paypal/sdk-core-dotnet
+ https://avatars3.githubusercontent.com/u/476675?v=2&s=100
+ The PayPal Core SDK addresses the essential needs of the PayPal API caller:
+Frequent and up-to-date releases: The PayPal Core SDK is available on NuGet, which translates as immediate SDK refreshes upon updates to PayPal APIs.
+Simpler configuration: The PayPal Core SDK supports dynamic configuration. And also lets you manage your API credentials (supports multiple credentials), connectivity details, and service endpoints using a configuration file.
+Compatibility: The PayPal Core SDK is optimized to support target .NET Frameworks 2.0, 3.5, 4.0, and 4.5.
+ The PayPal Core SDK calls the PayPal Platform API Web Service for the given payload and PayPal API profile settings.
+ https://github.com/paypal/sdk-core-dotnet/blob/master/CHANGELOG.md
+ Copyright © 2009-2016 PayPal
+ en-US
+ PayPal SDK .NET C# Core
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net20/PayPalCoreSDK.dll b/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net20/PayPalCoreSDK.dll
new file mode 100644
index 00000000..6a5a6ae1
Binary files /dev/null and b/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net20/PayPalCoreSDK.dll differ
diff --git a/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net35/PayPalCoreSDK.dll b/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net35/PayPalCoreSDK.dll
new file mode 100644
index 00000000..5549f141
Binary files /dev/null and b/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net35/PayPalCoreSDK.dll differ
diff --git a/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net40/PayPalCoreSDK.dll b/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net40/PayPalCoreSDK.dll
new file mode 100644
index 00000000..da5ddaa9
Binary files /dev/null and b/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net40/PayPalCoreSDK.dll differ
diff --git a/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net45/PayPalCoreSDK.dll b/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net45/PayPalCoreSDK.dll
new file mode 100644
index 00000000..c9ad33bd
Binary files /dev/null and b/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net45/PayPalCoreSDK.dll differ
diff --git a/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net451/PayPalCoreSDK.dll b/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net451/PayPalCoreSDK.dll
new file mode 100644
index 00000000..4ef1af5c
Binary files /dev/null and b/build/approot/packages/PayPalCoreSDK/1.7.1/lib/net451/PayPalCoreSDK.dll differ
diff --git a/build/approot/packages/Remotion.Linq/2.0.1/Remotion.Linq.nuspec b/build/approot/packages/Remotion.Linq/2.0.1/Remotion.Linq.nuspec
new file mode 100644
index 00000000..296f9618
--- /dev/null
+++ b/build/approot/packages/Remotion.Linq/2.0.1/Remotion.Linq.nuspec
@@ -0,0 +1,16 @@
+
+
+
+ Remotion.Linq
+ 2.0.1
+ re-linq - re-motion Linq Library
+ false
+ rubicon IT GmbH
+ rubicon IT GmbH
+ http://opensource.org/licenses/Apache-2.0
+ http://relinq.codeplex.com/
+ With re-linq, it's now easier than ever to create full-featured LINQ providers.
+ Copyright (c) rubicon IT GmbH, www.rubicon.eu - Licensed under Apache License, Version 2.0
+ re-motion LINQ ExpressionTrees
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Remotion.Linq/2.0.1/lib/net35/Remotion.Linq.XML b/build/approot/packages/Remotion.Linq/2.0.1/lib/net35/Remotion.Linq.XML
new file mode 100644
index 00000000..09bee8f1
--- /dev/null
+++ b/build/approot/packages/Remotion.Linq/2.0.1/lib/net35/Remotion.Linq.XML
@@ -0,0 +1,4231 @@
+
+
+
+ Remotion.Linq
+
+
+
+
+ Indicates the condition parameter of the assertion method.
+ The method itself should be marked by attribute.
+ The mandatory argument of the attribute is the assertion type.
+
+
+
+
+
+ Initializes new instance of AssertionConditionAttribute
+
+ Specifies condition type
+
+
+
+ Gets condition type
+
+
+
+
+ Specifies assertion type. If the assertion method argument satisifes the condition, then the execution continues.
+ Otherwise, execution is assumed to be halted
+
+
+
+
+ Indicates that the marked parameter should be evaluated to true
+
+
+
+
+ Indicates that the marked parameter should be evaluated to false
+
+
+
+
+ Indicates that the marked parameter should be evaluated to null value
+
+
+
+
+ Indicates that the marked parameter should be evaluated to not null value
+
+
+
+
+ Indicates that the marked method is assertion method, i.e. it halts control flow if one of the conditions is satisfied.
+ To set the condition, mark one of the parameters with attribute
+
+
+
+
+
+ When applied to target attribute, specifies a requirement for any type which is marked with
+ target attribute to implement or inherit specific type or types
+
+
+
+ [BaseTypeRequired(typeof(IComponent)] // Specify requirement
+ public class ComponentAttribute : Attribute
+ {}
+
+ [Component] // ComponentAttribute requires implementing IComponent interface
+ public class MyComponent : IComponent
+ {}
+
+
+
+
+
+ Initializes new instance of BaseTypeRequiredAttribute
+
+ Specifies which types are required
+
+
+
+ Gets enumerations of specified base types
+
+
+
+
+ Indicates that the value of marked element could be null sometimes, so the check for null is necessary before its usage
+
+
+
+
+ Indicates that the value of marked type (or its derivatives) cannot be compared using '==' or '!=' operators.
+ There is only exception to compare with null , it is permitted
+
+
+
+
+ Describes dependency between method input and output
+
+
+ Function definition table syntax:
+
+ - FDT ::= FDTRow [;FDTRow]*
+ - FDTRow ::= Input => Output | Output <= Input
+ - Input ::= ParameterName: Value [, Input]*
+ - Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value}
+ - Value ::= true | false | null | notnull | canbenull
+
+ If method has single input parameter, it's name could be omitted.
+ Using "halt" (or "void"/"nothing", which is the same) for method output means that methos doesn't return normally.
+ "canbenull" annotation is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute with rows separated by semicolon.
+
+
+
+ - [ContractAnnotation("=> halt")] public void TerminationMethod()
+ - [ContractAnnotation("halt <= condition: false")] public void Assert(bool condition, string text) // Regular Assertion method
+ - [ContractAnnotation("s:null => true")] public bool IsNullOrEmpty(string s) // String.IsNullOrEmpty
+ - [ContractAnnotation("null => null; notnull => notnull")] public object Transform(object data) // Method which returns null if parameter is null, and not null if parameter is not null
+ - [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")] public bool TryParse(string s, out Person result)
+
+
+
+
+
+ Only entity marked with attribute considered used
+
+
+
+
+ Indicates implicit assignment to a member
+
+
+
+
+ Indicates implicit instantiation of a type with fixed constructor signature.
+ That means any unused constructor parameters won't be reported as such.
+
+
+
+
+ Indicates implicit instantiation of a type
+
+
+
+
+ Specify what is considered used implicitly when marked with or
+
+
+
+
+ Members of entity marked with attribute are considered used
+
+
+
+
+ Entity marked with attribute and all its members considered used
+
+
+
+
+ Tells code analysis engine if the parameter is completely handled when the invoked method is on stack.
+ If the parameter is delegate, indicates that delegate is executed while the method is executed.
+ If the parameter is enumerable, indicates that it is enumerated while the method is executed.
+
+
+
+
+ Indicates that the function argument should be string literal and match one of the parameters of the caller function.
+ For example, has such parameter.
+
+
+
+
+ Indicates that method is *pure* linq method, with postponed enumeration. C# iterator methods (yield ...) are always LinqTunnel.
+
+
+
+
+ Indicates that marked element should be localized or not.
+
+
+
+
+ Initializes a new instance of the class with
+ set to .
+
+
+
+
+ Initializes a new instance of the class.
+
+ true if a element should be localized; otherwise, false .
+
+
+
+ Returns whether the value of the given object is equal to the current .
+
+ The object to test the value equality of.
+
+ true if the value of the given object is equal to that of the current; otherwise, false .
+
+
+
+
+ Returns the hash code for this instance.
+
+ A hash code for the current .
+
+
+
+ Gets a value indicating whether a element should be localized.
+ true if a element should be localized; otherwise, false .
+
+
+
+
+ Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes as unused (as well as by other usage inspections)
+
+
+
+
+ Gets value indicating what is meant to be used
+
+
+
+
+ Indicates that IEnumarable, passed as parameter, is not enumerated.
+
+
+
+
+
+ Indicates that the function is used to notify class type property value is changed.
+
+
+
+
+ Indicates that the value of marked element could never be null
+
+
+
+
+ This attribute is intended to mark publicly available API which should not be removed and so is treated as used.
+
+
+
+
+ Indicates that method doesn't contain observable side effects.
+
+
+
+
+ Indicates that marked method builds string by format pattern and (optional) arguments.
+ Parameter, which contains format string, should be given in constructor.
+ The format string should be in -like form
+
+
+
+
+ Initializes new instance of StringFormatMethodAttribute
+
+ Specifies which parameter of an annotated method should be treated as format-string
+
+
+
+ Gets format parameter name
+
+
+
+
+ Indicates that the marked method unconditionally terminates control flow execution.
+ For example, it could unconditionally throw exception
+
+
+
+
+ Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library),
+ so this symbol will not be marked as unused (as well as by other usage inspections)
+
+
+
+
+ Gets value indicating what is meant to be used
+
+
+
+
+ This utility class provides methods for checking arguments.
+
+
+ Some methods of this class return the value of the parameter. In some cases, this is useful because the value will be converted to another
+ type:
+ ("o", o);
+ }
+ ]]>
+ In some other cases, the input value is returned unmodified. This makes it easier to use the argument checks in calls to base class constructors
+ or property setters:
+
+
+
+
+ Returns the value itself if it is not and of the specified value type.
+ The type that must have.
+ The is a .
+ The is an instance of another type.
+
+
+ Checks of the is of the .
+ The is a .
+ The is an instance of another type.
+
+
+ Returns the value itself if it is of the specified type.
+ The type that must have.
+
+ is an instance of another type (which is not a subtype of ).
+
+ is null and cannot be null.
+
+ For non-nullable value types, you should use either or pass the type
+ instead.
+
+
+
+ Checks whether is not and can be assigned to .
+ The is .
+ The cannot be assigned to .
+
+
+ Checks whether can be assigned to .
+ The cannot be assigned to .
+
+
+ Checks whether can be assigned to .
+ The cannot be assigned to .
+
+
+ Checks whether all items in are of type or a null reference.
+ If at least one element is not of the specified type or a derived type.
+
+
+ Checks whether all items in are of type and not null references.
+ If at least one element is not of the specified type or a derived type.
+ If at least one element is a null reference.
+
+
+
+ Provides methods that throw an if an assertion fails.
+
+
+
+ This class contains methods that are conditional to the DEBUG and TRACE attributes ( and ).
+
+ Note that assertion expressions passed to these methods are not evaluated (read: executed) if the respective symbol are not defined during
+ compilation, nor are the methods called. This increases performance for production builds, but make sure that your assertion expressions do
+ not cause any side effects! See or and the for more information
+ about conditional compilation.
+
+ Assertions are no replacement for checking input parameters of public methods (see ).
+
+
+
+
+
+ Determines whether a type is nullable, ie. whether variables of it can be assigned .
+
+ The type to check.
+
+ true if is nullable; otherwise, false.
+
+
+ A type is nullable if it is a reference type or a nullable value type. This method returns false only for non-nullable value types.
+
+
+
+
+ Represents a data source in a query that adds new data items in addition to those provided by the .
+
+
+ In C#, the second "from" clause in the following sample corresponds to an :
+
+ var query = from s in Students
+ from f in s.Friends
+ select f;
+
+
+
+
+
+ Base class for and .
+
+
+
+
+
+ Common interface for from clauses ( and ). From clauses define query sources that
+ provide data items to the query which are filtered, ordered, projected, or otherwise processed by the following clauses.
+
+
+
+
+ Represents a clause within the . Implemented by , ,
+ , and .
+
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Represents a clause or result operator that generates items which are streamed to the following clauses or operators.
+
+
+
+
+ Gets the name of the items generated by this .
+
+
+ Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression.
+ However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for
+ uniquely identifying objects. To match an with its references, use the
+ property rather than the .
+
+
+
+
+ Gets the type of the items generated by this .
+
+
+
+
+ Copies the 's attributes, i.e. the , , and
+ .
+
+
+
+
+
+ The expression generating the data items for this from clause.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A name describing the items generated by the from clause.
+ The type of the items generated by the from clause.
+ The generating data items for this from clause.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Gets or sets a name describing the items generated by this from clause.
+
+
+ Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression.
+ However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for
+ uniquely identifying objects. To match an with its references, use the
+ property rather than the .
+
+
+
+
+ Gets or sets the type of the items generated by this from clause.
+
+
+ Changing the of a can make all objects that
+ point to that invalid, so the property setter should be used with care.
+
+
+
+
+ The expression generating the data items for this from clause.
+
+
+
+
+ Represents a clause in a 's collection. Body clauses take the items generated by
+ the , filtering ( ), ordering ( ), augmenting
+ ( ), or otherwise processing them before they are passed to the .
+
+
+
+
+ Accepts the specified visitor by calling one of its Visit... methods.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Clones this clause, registering its clone with the if it is a query source clause.
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Initializes a new instance of the class.
+
+ A name describing the items generated by the from clause.
+ The type of the items generated by the from clause.
+ The generating the items of this from clause.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Clones this clause, registering its clone with the .
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Aggregates all objects needed in the process of cloning a and its clauses.
+
+
+
+
+ Gets the clause mapping used during the cloning process. This is used to adjust the instances
+ of clauses to point to clauses in the cloned .
+
+
+
+
+ This interface should be implemented by visitors that handle the instances.
+
+
+
+
+ This interface should be implemented by visitors that handle VB-specific expressions.
+
+
+
+
+ Wraps an exception whose partial evaluation caused an exception.
+
+
+
+ When encounters an exception while evaluating an independent expression subtree, it
+ will wrap the subtree within a . The wrapper contains both the
+ instance and the that caused the exception.
+
+
+ To explicitly support this expression type, implement .
+ To ignore this wrapper and only handle the inner , call the method and visit the result.
+
+
+ Subclasses of that do not implement will,
+ by default, automatically reduce this expression type to the in the
+ method.
+
+
+ Subclasses of that do not implement will,
+ by default, ignore this expression and visit its child expressions via the and
+ methods.
+
+
+
+
+
+ Acts as a base class for custom extension expressions, providing advanced visitor support. Also allows extension expressions to be reduced to
+ a tree of standard expressions with equivalent semantics.
+
+
+ Custom extension expressions can specify their own or use a default one. re-linq reserves
+ values from 100000 to 150000 for its own expressions. Custom LINQ providers can use 150001 and above.
+
+
+
+
+ Defines a standard value that is used by all subclasses unless they specify
+ their own value.
+
+
+
+
+ Initializes a new instance of the class with a default value.
+
+ The type of the value represented by the .
+
+
+
+ Initializes a new instance of the class with a custom value.
+
+ The type of the value represented by the .
+ The value to use as this expression's value.
+ LINQ providers should use values starting from 150001 and above.
+
+
+
+ Must be overridden by subclasses by calling on all
+ children of this extension node.
+
+ The visitor to visit the child nodes with.
+ This , or an expression that should replace it in the surrounding tree.
+
+ If the visitor replaces any of the child nodes, a new instance should
+ be returned holding the new child nodes. If the node has no children or the visitor does not replace any child node, the method should
+ return this .
+
+
+
+
+ Reduces this instance to a tree of standard expressions. If this instance cannot be reduced, the same
+ is returned.
+
+ If is , a reduced version of this ; otherwise,
+ this .
+
+
+ This method can be called in order to produce a new that has the same semantics as this
+ but consists of expressions of standard node types. The reduction need not be complete, nodes can be
+ returned that themselves must be reduced.
+
+
+ Subclasses overriding the property to return must also override this method and cannot
+ call the base implementation.
+
+
+
+
+
+ Calls the method and checks certain invariants before returning the result. This method can only be called when
+ returns .
+
+ A reduced version of this .
+ This is not reducible - or - the method
+ violated one of the invariants (see Remarks).
+
+ This method checks the following invariants:
+
+ must not return .
+ must not return the original .
+ -
+ The new expression returned by
must be assignment-compatible with the type of the original
+ .
+
+
+
+
+
+
+ Accepts the specified visitor, by default dispatching to .
+ Inheritors of the class can override this method in order to dispatch to a specific Visit method.
+
+ The visitor whose Visit method should be invoked.
+ The returned by the visitor.
+
+ Overriders can test the for a specific interface. If the visitor supports the interface, the extension expression
+ can dispatch to the respective strongly-typed Visit method declared in the interface. If it does not, the extension expression should call
+ the base implementation of , which will dispatch to .
+
+
+
+
+ Gets a value indicating whether this instance can be reduced to a tree of standard expressions.
+
+
+ if this instance can be reduced; otherwise, .
+
+
+
+ If this method returns , the method can be called in order to produce a new
+ that has the same semantics as this but consists of
+ expressions of standard node types.
+
+
+ Subclasses overriding the property to return must also override the
+ method and cannot call its base implementation.
+
+
+
+
+
+ Represents an expression tree node that points to a query source represented by a . These expressions should always
+ point back, to a clause defined prior to the clause holding a . Otherwise, exceptions might be
+ thrown at runtime.
+
+
+ This particular expression overrides , i.e. it can be compared to another based
+ on the .
+
+
+
+
+ Determines whether the specified is equal to the current by
+ comparing the properties for reference equality.
+
+ The to compare with the current .
+
+ if the specified is a that points to the
+ same ; otherwise, false.
+
+
+
+
+ Gets the query source referenced by this expression.
+
+ The referenced query source.
+
+
+
+ Represents an that holds a subquery. The subquery is held by in its parsed form.
+
+
+
+
+ Represents a VB-specific comparison expression.
+
+
+
+ To explicitly support this expression type, implement .
+ To treat this expression as if it were an ordinary , call its method and visit the result.
+
+
+ Subclasses of that do not implement will, by default,
+ automatically reduce this expression type to in the method.
+
+
+ Subclasses of that do not implement will, by default,
+ ignore this expression and visit its child expressions via the and
+ methods.
+
+
+
+
+
+ Constructs a that is able to extract a specific simple expression from a complex
+ or .
+
+
+
+ For example, consider the task of determining the value of a specific query source [s] from an input value corresponding to a complex
+ expression. This will return a able to perform this task.
+
+
+
+ - If the complex expression is [s], it will simply return input => input.
+ - If the complex expression is new { a = [s], b = "..." }, it will return input => input.a.
+ - If the complex expression is new { a = new { b = [s], c = "..." }, d = "..." }, it will return input => input.a.b.
+
+
+
+
+
+
+ Provides a base class for expression visitors used with re-linq, adding support for and .
+
+
+
+
+ Implementation of the .NET 4.0 ExpressionVisitor for .NET 3.5 libraries. This type acts as a base class for the .
+
+
+
+
+ Adjusts the arguments for a so that they match the given members.
+
+ The arguments to adjust.
+ The members defining the required argument types.
+
+ A sequence of expressions that are equivalent to , but converted to the associated member's
+ result type if needed.
+
+
+
+
+ Constructs a that is able to extract a specific simple from a
+ complex .
+
+ The expression an accessor to which should be created.
+ The full expression containing the .
+ The input parameter to be used by the resulting lambda. Its type must match the type of .
+ The compares the via reference equality,
+ which means that exactly the same expression reference must be contained by for the visitor to return the
+ expected result. In addition, the visitor can only provide accessors for expressions nested in or
+ .
+ A acting as an accessor for the when an input matching
+ is given.
+
+
+
+
+ Takes an expression and replaces all instances, as defined by a given .
+ This is used whenever references to query sources should be replaced by a transformation.
+
+
+
+
+ Takes an expression and replaces all instances, as defined by a given
+ .
+
+ The expression to be scanned for references.
+ The clause mapping to be used for replacing instances.
+ If , the visitor will throw an exception when
+ not mapped in the is encountered. If ,
+ the visitor will ignore such expressions.
+ An expression with its instances replaced as defined by the
+ .
+
+
+
+ Performs a reverse operation, i.e. creates a from a given resolved expression,
+ substituting all objects by getting the referenced objects from the lambda's input parameter.
+
+
+ Given the following input:
+
+ - ItemExpression:
new AnonymousType ( a = [s1], b = [s2] )
+ - ResolvedExpression:
[s1].ID + [s2].ID
+
+ The visitor generates the following : input => input.a.ID + input.b.ID
+ The lambda's input parameter has the same type as the ItemExpression.
+
+
+
+
+ Performs a reverse operation, i.e. creates a from a given resolved expression,
+ substituting all objects by getting the referenced objects from the lambda's input parameter.
+
+ The item expression representing the items passed to the generated via its input
+ parameter.
+ The resolved expression for which to generate a reverse resolved .
+ A from the given resolved expression, substituting all
+ objects by getting the referenced objects from the lambda's input parameter. The generated has exactly one
+ parameter which is of the type defined by .
+
+
+
+ Performs a reverse operation on a , i.e. creates a new
+ with an additional parameter from a given resolved ,
+ substituting all objects by getting the referenced objects from the new input parameter.
+
+ The item expression representing the items passed to the generated via its new
+ input parameter.
+ The resolved for which to generate a reverse resolved .
+ The position at which to insert the new parameter.
+ A similar to the given resolved expression, substituting all
+ objects by getting the referenced objects from an additional input parameter. The new input parameter is of the type defined by
+ .
+
+
+
+ Represents the join part of a query, adding new data items and joining them with data items from previous clauses. In contrast to
+ , the does not provide access to the individual items of the joined query source.
+ Instead, it provides access to all joined items for each item coming from the previous clauses, thus grouping them together. The semantics
+ of this join is so that for all input items, a joined sequence is returned. That sequence can be empty if no joined items are available.
+
+
+ In C#, the "into" clause in the following sample corresponds to a . The "join" part before that is encapsulated
+ as a held in . The adds a new query source to the query
+ ("addresses"), but the item type of that query source is , not "Address". Therefore, it can be
+ used in the of an to extract the single items.
+
+ var query = from s in Students
+ join a in Addresses on s.AdressID equals a.ID into addresses
+ from a in addresses
+ select new { s, a };
+
+
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Clones this clause, registering its clone with the .
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Gets or sets a name describing the items generated by this .
+
+
+ Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression.
+ However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for
+ uniquely identifying objects. To match an with its references, use the
+ property rather than the .
+
+
+
+
+ Gets or sets the type of the items generated by this . This must implement .
+
+
+ Changing the of a can make all objects that
+ point to that invalid, so the property setter should be used with care.
+
+
+
+
+ Gets or sets the inner join clause of this . The represents the actual join operation
+ performed by this clause; its results are then grouped by this clause before streaming them to subsequent clauses.
+ objects outside the must not point to
+ because the items generated by it are only available in grouped form from outside this clause.
+
+
+
+
+ Represents the join part of a query, adding new data items and joining them with data items from previous clauses. This can either
+ be part of or of . The semantics of the
+ is that of an inner join, i.e. only combinations where both an input item and a joined item exist are returned.
+
+
+ In C#, the "join" clause in the following sample corresponds to a . The adds a new
+ query source to the query, selecting addresses (called "a") from the source "Addresses". It associates addresses and students by
+ comparing the students' "AddressID" properties with the addresses' "ID" properties. "a" corresponds to and
+ , "Addresses" is and the left and right side of the "equals" operator are held by
+ and , respectively:
+
+ var query = from s in Students
+ join a in Addresses on s.AdressID equals a.ID
+ select new { s, a };
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ A name describing the items generated by this .
+ The type of the items generated by this .
+ The expression that generates the inner sequence, i.e. the items of this .
+ An expression that selects the left side of the comparison by which source items and inner items are joined.
+ An expression that selects the right side of the comparison by which source items and inner items are joined.
+
+
+
+ Accepts the specified visitor by calling its
+ method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Accepts the specified visitor by calling its
+ method. This overload is used when visiting a that is held by a .
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The holding this instance.
+
+
+
+ Clones this clause, registering its clone with the .
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Gets or sets the type of the items generated by this .
+
+
+ Changing the of a can make all objects that
+ point to that invalid, so the property setter should be used with care.
+
+
+
+
+ Gets or sets a name describing the items generated by this .
+
+
+ Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression.
+ However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for
+ uniquely identifying objects. To match an with its references, use the
+ property rather than the .
+
+
+
+
+ Gets or sets the inner sequence, the expression that generates the inner sequence, i.e. the items of this .
+
+ The inner sequence.
+
+
+
+ Gets or sets the outer key selector, an expression that selects the right side of the comparison by which source items and inner items are joined.
+
+ The outer key selector.
+
+
+
+ Gets or sets the inner key selector, an expression that selects the left side of the comparison by which source items and inner items are joined.
+
+ The inner key selector.
+
+
+
+ Represents the main data source in a query, producing data items that are filtered, aggregated, projected, or otherwise processed by
+ subsequent clauses.
+
+
+ In C#, the first "from" clause in the following sample corresponds to the :
+
+ var query = from s in Students
+ from f in s.Friends
+ select f;
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ A name describing the items generated by the from clause.
+ The type of the items generated by the from clause.
+ The generating data items for this from clause.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+
+
+
+ Clones this clause, registering its clone with the .
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Represents the orderby part of a query, ordering data items according to some .
+
+
+ In C#, the whole "orderby" clause in the following sample (including two orderings) corresponds to an :
+
+ var query = from s in Students
+ orderby s.Last, s.First
+ select s;
+
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Clones this clause.
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Gets the instances that define how to sort the items coming from previous clauses. The order of the
+ in the collection defines their priorities. For example, { LastName, FirstName } would sort all items by
+ LastName, and only those items that have equal LastName values would be sorted by FirstName.
+
+
+
+
+ Represents a single ordering instruction in an .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The expression used to order the data items returned by the query.
+ The to use for sorting.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The in whose context this item is visited.
+ The index of this item in the 's collection.
+
+
+
+ Clones this item.
+
+ The clones of all query source clauses are registered with this .
+ A clone of this item.
+
+
+
+ Transforms all the expressions in this item via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ item, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Gets or sets the expression used to order the data items returned by the query.
+
+ The expression.
+
+
+
+ Gets or sets the direction to use for ordering data items.
+
+
+
+
+ Specifies the direction used to sort the result items in a query using an .
+
+
+
+
+ Sorts the items in an ascending way, from smallest to largest.
+
+
+
+
+ Sorts the items in an descending way, from largest to smallest.
+
+
+
+
+ Maps instances to instances. This is used by
+ in order to be able to correctly update references to old clauses to point to the new clauses. Via
+ , it can also be used manually.
+
+
+
+
+ Represents an operation that is executed on the result set of the query, aggregating, filtering, or restricting the number of result items
+ before the query result is returned.
+
+
+
+
+ Executes this result operator in memory, on a given input. Executing result operators in memory should only be
+ performed if the target query system does not support the operator.
+
+ The input for the result operator. This must match the type of expected by the operator.
+ The result of the operator.
+
+
+
+ Gets information about the data streamed out of this . This contains the result type a query would have if
+ it ended with this , and it optionally includes an describing
+ the streamed sequence's items.
+
+ Information about the data produced by the preceding , or the
+ of the query if no previous exists.
+ Gets information about the data streamed out of this .
+
+
+
+ Clones this item, registering its clone with the if it is a query source clause.
+
+ The clones of all query source clauses are registered with this .
+ A clone of this item.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this item in the 's collection.
+
+
+
+ Transforms all the expressions in this item via the given delegate. Subclasses must apply the
+ to any expressions they hold. If a subclass does not hold any expressions, it shouldn't do anything
+ in the implementation of this method.
+
+ The transformation object. This delegate is called for each within this
+ item, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Invokes the given via reflection on the given .
+
+ The input to invoke the method with.
+ The method to be invoked.
+ The result of the invocation
+
+
+
+ Gets the constant value of the given expression, assuming it is a . If it is
+ not, an is thrown.
+
+ The expected value type. If the value is not of this type, an is thrown.
+ A string describing the value; this will be included in the exception message if an exception is thrown.
+ The expression whose value to get.
+
+ The constant value of the given .
+
+
+
+
+ Represents aggregating the items returned by a query into a single value with an initial seeding value.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Aggregate" call in the following example corresponds to an .
+
+ var result = (from s in Students
+ select s).Aggregate(0, (totalAge, s) => totalAge + s.Age);
+
+
+
+
+
+ Represents a that is executed on a sequence, returning a scalar value or single item as its result.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The seed expression.
+ The aggregating function. This is a taking a parameter that represents the value accumulated so
+ far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators
+ are represented as expressions containing nodes.
+ The result selector, can be .
+
+
+
+ Gets the constant value of the property, assuming it is a . If it is
+ not, an is thrown.
+
+ The expected seed type. If the item is not of this type, an is thrown.
+ The constant value of the property.
+
+
+
+
+
+
+ Executes the aggregating operation in memory.
+
+ The type of the source items.
+ The type of the aggregated items.
+ The type of the result items.
+ The input sequence.
+ A object holding the aggregated value.
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets or sets the aggregating function. This is a taking a parameter that represents the value accumulated so
+ far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators
+ are represented as expressions containing nodes.
+
+ The aggregating function.
+
+
+
+ Gets or sets the seed of the accumulation. This is an denoting the starting value of the aggregation.
+
+ The seed of the accumulation.
+
+
+
+ Gets or sets the result selector. This is a applied after the aggregation to select the final value.
+ Can be .
+
+ The result selector.
+
+
+
+ Represents aggregating the items returned by a query into a single value. The first item is used as the seeding value for the aggregating
+ function.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Aggregate" call in the following example corresponds to an .
+
+ var result = (from s in Students
+ select s.Name).Aggregate((allNames, name) => allNames + " " + name);
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The aggregating function. This is a taking a parameter that represents the value accumulated so
+ far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators
+ are represented as expressions containing nodes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets or sets the aggregating function. This is a taking a parameter that represents the value accumulated so
+ far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators
+ are represented as expressions containing nodes.
+
+ The aggregating function.
+
+
+
+ Represents a check whether all items returned by a query satisfy a predicate.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "All" call in the following example corresponds to an .
+
+ var result = (from s in Students
+ select s).All();
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The predicate to evaluate. This is a resolved version of the body of the that would be
+ passed to .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets or sets the predicate to evaluate on all items in the sequence.
+ This is a resolved version of the body of the that would be
+ passed to .
+
+ The predicate.
+
+
+
+ Represents a check whether any items are returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ "Any" query methods taking a predicate are represented as into a combination of a and an
+ .
+
+
+ In C#, the "Any" call in the following example corresponds to an .
+
+ var result = (from s in Students
+ select s).Any();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Represents a calculation of an average value from the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Average" call in the following example corresponds to an .
+
+ var query = (from s in Students
+ select s.ID).Average();
+
+
+
+
+
+
+
+
+ Represents a cast of the items returned by a query to a different type.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, "Cast" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s.ID).Cast<int>();
+
+
+
+
+
+ Represents a that is executed on a sequence, returning a new sequence as its result.
+
+
+
+
+
+
+
+ Represents a that is executed on a sequence, choosing a single item for its result.
+
+
+
+
+ Represents concatenating the items returned by a query with a given set of items, similar to the but
+ retaining duplicates (and order).
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Concat" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Concat(students2);
+
+
+
+
+
+ Gets the value of , assuming holds a . If it doesn't,
+ an is thrown.
+
+ The constant value of .
+
+
+
+ Gets or sets the second source of this result operator, that is, an enumerable containing the items concatenated with the input sequence.
+
+
+
+
+ Represents a check whether the results returned by a query contain a specific item.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Contains" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Contains (student);
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The item for which to be searched.
+
+
+
+ Gets the constant value of the property, assuming it is a . If it is
+ not, an is thrown.
+
+ The expected item type. If the item is not of this type, an is thrown.
+ The constant value of the property.
+
+
+
+ Gets or sets an expression yielding the item for which to be searched. This must be compatible with (ie., assignable to) the source sequence
+ items.
+
+ The item expression.
+
+
+
+ Represents counting the number of items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ "Count" query methods taking a predicate are represented as a combination of a and a .
+ ///
+ In C#, the "Count" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Count();
+
+
+
+
+
+
+
+
+ Represents a guard clause yielding a singleton sequence with a default value if no items are returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Defaultifempty" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).DefaultIfEmpty ("student");
+
+
+
+
+
+ Represents a that is executed on a sequence, returning a new sequence with the same
+ item type as its result.
+
+
+
+
+ Gets the constant value of the property, assuming it is a . If it is
+ not, an is thrown. If it is , is returned.
+
+ The constant value of the property.
+
+
+
+ Gets or sets the optional default value.
+
+ The optional default value.
+
+
+
+ Represents the removal of duplicate values from the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Distinct" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Distinct();
+
+
+
+
+
+
+
+
+ Represents the removal of a given set of items from the result set of a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Except" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Except(students2);
+
+
+
+
+
+ Gets the value of , assuming holds a . If it doesn't,
+ an is thrown.
+
+ The constant value of .
+
+
+
+ Gets or sets the second source of this result operator, that is, an enumerable containing the items removed from the input sequence.
+
+
+
+
+ Represents taking only the first of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ "First" query methods taking a predicate are represented as a combination of a and a .
+
+
+ In C#, the "First" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).First();
+
+
+
+
+
+ Initializes a new instance of the .
+
+ The flag defines if a default expression should be regarded.
+
+
+
+
+
+
+ Represents grouping the items returned by a query according to some key retrieved by a , applying by an
+ to the grouped items. This is a result operator, operating on the whole result set of the query.
+
+
+ In C#, the "group by" clause in the following sample corresponds to a . "s" (a reference to the query source
+ "s", see ) is the expression, "s.Country" is the
+ expression:
+
+ var query = from s in Students
+ where s.First == "Hugo"
+ group s by s.Country;
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ A name associated with the items generated by the result operator.
+ The selector retrieving the key by which to group items.
+ The selector retrieving the elements to group.
+
+
+
+ Clones this clause, adjusting all instances held by it as defined by
+ .
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Gets or sets the name of the items generated by this .
+
+
+ Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression.
+ However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for
+ uniquely identifying objects. To match an with its references, use the
+ property rather than the .
+
+
+
+
+ Gets or sets the type of the items generated by this . The item type is an instantiation of
+ derived from the types of and .
+
+
+
+
+ Gets or sets the selector retrieving the key by which to group items.
+ This is a resolved version of the body of the that would be
+ passed to .
+
+ The key selector.
+
+
+
+ Gets or sets the selector retrieving the elements to group.
+ This is a resolved version of the body of the that would be
+ passed to .
+
+ The element selector.
+
+
+
+ Represents taking the mathematical intersection of a given set of items and the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Intersect" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Intersect(students2);
+
+
+
+
+
+ Gets the value of , assuming holds a . If it doesn't,
+ an is thrown.
+
+ The constant value of .
+
+
+
+ Gets or sets the second source of this result operator, that is, an enumerable containing the items intersected with the input sequence.
+
+
+
+
+ Represents taking only the last one of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ "Last" query methods taking a predicate are represented as a combination of a and a .
+
+
+ In C#, the "Last" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Last();
+
+
+
+
+
+ Initializes a new instance of the .
+
+ The flag defines if a default expression should be regarded.
+
+
+
+
+
+
+ Represents counting the number of items returned by a query as a 64-bit number.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ "LongCount" query methods taking a predicate are represented as a combination of a and a
+ .
+
+
+ In C#, the "LongCount" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).LongCount();
+
+
+
+
+
+
+
+
+ Represents taking only the greatest one of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ The semantics of "greatest" are defined by the query provider. "Max" query methods taking a selector are represented as a combination
+ of a and a .
+
+
+ In C#, the "Max" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s.ID).Max();
+
+
+
+
+
+ Initializes a new instance of the .
+
+
+
+
+
+
+
+ Represents taking only the smallest one of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ The semantics of "smallest" are defined by the query provider. "Min" query methods taking a selector are represented as a combination
+ of a and a .
+
+
+ In C#, the "Min" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s.ID).Min();
+
+
+
+
+
+ Initializes a new instance of the .
+
+
+
+
+
+
+
+ Represents filtering the items returned by a query to only return those items that are of a specific type.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "OfType" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s.ID).OfType<int>();
+
+
+
+
+
+
+
+
+ Represents reversing the sequence of items returned by of a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Reverse" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Reverse();
+
+
+
+
+
+
+
+
+ Represents taking the single item returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Single" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Single();
+
+
+
+
+
+ Initializes a new instance of the .
+
+ The flag defines if a default expression should be regarded.
+
+
+
+
+
+
+ Represents skipping a number of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Skip" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Skip (3);
+
+
+
+
+
+ Gets the constant value of the property, assuming it is a . If it is
+ not, an is thrown.
+
+ The constant value of the property.
+
+
+
+ Represents calculating the sum of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Sum" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s.ID).Sum();
+
+
+
+
+
+
+
+
+ Represents taking only a specific number of items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Take" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Take(3);
+
+
+
+
+
+ Initializes a new instance of the .
+
+ The number of elements which should be returned.
+
+
+
+ Gets the constant value of the property, assuming it is a . If it is
+ not, an is thrown.
+
+ The constant value of the property.
+
+
+
+ Represents forming the mathematical union of a given set of items and the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Union" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Union(students2);
+
+
+
+
+
+ Gets the value of , assuming holds a . If it doesn't,
+ an is thrown.
+
+ The constant value of .
+
+
+
+ Gets or sets the second source of this result operator, that is, an enumerable containing the items united with the input sequence.
+
+
+
+
+ Represents the select part of a query, projecting data items according to some .
+
+
+ In C#, the "select" clause in the following sample corresponds to a . "s" (a reference to the query source "s", see
+ ) is the expression:
+
+ var query = from s in Students
+ where s.First == "Hugo"
+ select s;
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The selector that projects the data items.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+
+
+
+ Clones this clause.
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Gets an object describing the data streaming out of this . If a query ends with
+ the , this corresponds to the query's output data. If a query has , the data
+ is further modified by those operators. Use to obtain the real result type of
+ a query model, including the .
+
+ Gets a object describing the data streaming out of this .
+
+ The data streamed from a is always of type instantiated
+ with the type of as its generic parameter. Its corresponds to the
+ .
+
+
+
+
+ Gets the selector defining what parts of the data items are returned by the query.
+
+
+
+
+ Holds the data needed to represent the output or input of a part of a query in memory. This is mainly used for
+ . The data held by implementations of this interface can be either a value or a sequence.
+
+
+
+
+ Gets an object describing the data held by this instance.
+
+ An object describing the data held by this instance.
+
+
+
+ Gets the value held by this instance.
+
+ The value.
+
+
+
+ Describes the data streamed out of a or .
+
+
+
+
+ Executes the specified with the given , calling either
+ or , depending on the type of data streamed
+ from this interface.
+
+ The query model to be executed.
+ The executor to use.
+ An object holding the results of the query execution.
+
+
+
+ Returns a new of the same type as this instance, but with a new .
+
+ The type to use for the property. The type must be compatible with the data described by this
+ , otherwise an exception is thrown.
+ The type may be a generic type definition if the supports generic types; in this case,
+ the type definition is automatically closed with generic parameters to match the data described by this .
+ A new of the same type as this instance, but with a new .
+ The is not compatible with the data described by this
+ .
+
+
+
+ Gets the type of the data described by this instance. For a sequence, this is a type implementing
+ , where T is instantiated with a concrete type. For a single value, this is the value type.
+
+
+
+
+ Describes a scalar value streamed out of a or . A scalar value corresponds to a
+ value calculated from the result set, as produced by or , for instance.
+
+
+
+
+ Describes a single or scalar value streamed out of a or .
+
+
+
+
+
+
+
+ Returns a new instance of the same type with a different .
+
+ The new data type.
+ The cannot be used for the clone.
+ A new instance of the same type with the given .
+
+
+
+
+
+
+ Gets the type of the data described by this instance. This is the type of the streamed value, or
+ if the value is .
+
+
+
+
+ Holds the data needed to represent the output or input of a part of a query in memory. This is mainly used for
+ . The data consists of a sequence of items.
+
+
+
+
+ Initializes a new instance of the class, setting the and
+ properties.
+
+ The sequence.
+ An instance of describing the sequence.
+
+
+
+ Gets the current sequence held by this object as well as an describing the
+ sequence's items, throwing an exception if the object does not hold a sequence of items of type .
+
+ The expected item type of the sequence.
+
+ The sequence and an describing its items.
+
+ Thrown when the item type is not the expected type .
+
+
+
+ Gets the current sequence for the operation. If the object is used as input, this
+ holds the input sequence for the operation. If the object is used as output, this holds the result of the operation.
+
+ The current sequence.
+
+
+
+ Describes sequence data streamed out of a or . Sequence data can be held by an object
+ implementing , and its items are described via a .
+
+
+
+
+ Returns a new with an adjusted .
+
+ The type to use for the property. The type must be convertible from the previous type, otherwise
+ an exception is thrown. The type may be a generic type definition; in this case,
+ the type definition is automatically closed with the type of the .
+
+ A new with a new .
+
+ The is not compatible with the items described by this
+ .
+
+
+
+ Gets the type of the items returned by the sequence described by this object, as defined by . Note that because
+ is covariant starting from .NET 4.0, this may be a more abstract type than what's returned by
+ 's property.
+
+
+
+
+ Gets an expression that describes the structure of the items held by the sequence described by this object.
+
+ The expression for the sequence's items.
+
+
+
+ Gets the type of the data described by this instance. This is a type implementing
+ , where T is instantiated with a concrete type.
+
+
+
+
+ Describes a single value streamed out of a or . A single value corresponds to one
+ item from the result set, as produced by or , for instance.
+
+
+
+
+ Holds the data needed to represent the output or input of a part of a query in memory. This is mainly used for
+ . The data is a single, non-sequence value and can only be consumed by result operators
+ working with single values.
+
+
+
+
+ Initializes a new instance of the class, setting the and properties.
+
+ The value.
+ A describing the value.
+
+
+
+ Gets the value held by , throwing an exception if the value is not of type .
+
+ The expected type of the value.
+ , cast to .
+ Thrown when if not of the expected type.
+
+
+
+ Gets an object describing the data held by this instance.
+
+
+ An object describing the data held by this instance.
+
+
+
+
+ Gets the current value for the operation. If the object is used as input, this
+ holds the input value for the operation. If the object is used as output, this holds the result of the operation.
+
+ The current value.
+
+
+
+ Represents the where part of a query, filtering data items according to some .
+
+
+ In C#, the "where" clause in the following sample corresponds to a :
+
+ var query = from s in Students
+ where s.First == "Hugo"
+ select s;
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The predicate used to filter data items.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Clones this clause.
+
+ The clones of all query source clauses are registered with this .
+
+
+
+
+ Gets the predicate, the expression representing the where condition by which the data items are filtered
+
+
+
+
+ Provides a way to enumerate an while items are inserted, removed, or cleared in a consistent fashion.
+
+ The element type of the .
+
+ This class subscribes to the event exposed by
+ and reacts on changes to the collection. If an item is inserted or removed before the current element, the enumerator will continue after
+ the current element without regarding the new or removed item. If the current item is removed, the enumerator will continue with the item that
+ previously followed the current item. If an item is inserted or removed after the current element, the enumerator will simply continue,
+ including the newly inserted item and not including the removed item. If an item is moved or replaced, the enumeration will also continue
+ with the item located at the next position in the sequence.
+
+
+
+
+ Represents an item enumerated by . This provides access
+ to the as well as the of the enumerated item.
+
+
+
+
+ Gets the index of the current enumerated item. Can only be called while enumerating, afterwards, it will throw an
+ . If an item is inserted into or removed from the collection before the current item, this
+ index will change.
+
+
+
+
+ Gets the value of the current enumerated item. Can only be called while enumerating, afterwards, it will throw an
+ .
+
+ The value.
+
+
+
+ Defines extension methods that simplify working with a dictionary that has a collection-values item-type.
+
+
+
+
+ Extension methods for
+
+
+
+
+ Returns an instance of that represents this collection and can be enumerated even while the collection changes;
+ the enumerator will adapt to the changes (see ).
+
+
+
+
+ Returns an instance of that represents this collection and can be enumerated even while the collection changes;
+ the enumerator will adapt to the changes (see ). The enumerable will yield
+ instances of type , which hold both the index and the value of the current item. If this collection changes
+ while enumerating, will reflect those changes.
+
+
+
+
+ Represents a default implementation of that is automatically used by
+ unless a custom is specified. The executes queries by parsing them into
+ an instance of type , which is then passed to an implementation of to obtain the
+ result set.
+
+
+
+
+ Provides a default implementation of that executes queries (subclasses of ) by
+ first parsing them into a and then passing that to a given implementation of .
+ Usually, should be used unless must be manually implemented.
+
+
+
+
+ Initializes a new instance of using a custom . Use this
+ constructor to customize how queries are parsed.
+
+ The used to parse queries. Specify an instance of
+ for default behavior.
+ The used to execute queries against a specific query backend.
+
+
+
+ Constructs an object that can evaluate the query represented by a specified expression tree. This
+ method delegates to .
+
+ An expression tree that represents a LINQ query.
+
+ An that can evaluate the query represented by the specified expression tree.
+
+
+
+
+ Constructs an object that can evaluate the query represented by a specified expression tree. This method is
+ called by the standard query operators defined by the class.
+
+ An expression tree that represents a LINQ query.
+
+ An that can evaluate the query represented by the specified expression tree.
+
+
+
+
+ Executes the query defined by the specified expression by parsing it with a
+ and then running it through the .
+ This method is invoked through the interface methods, for example by
+ and
+ , and it's also used by
+ when the is enumerated.
+
+
+ Override this method to replace the query execution mechanism by a custom implementation.
+
+
+
+
+ Executes the query defined by the specified expression by parsing it with a
+ and then running it through the .
+ The result is cast to .
+
+ The type of the query result.
+ The query expression to be executed.
+ The result of the query cast to .
+
+ This method is called by the standard query operators that return a single value, such as
+ or
+ .
+ In addition, it is called by to execute queries that return sequences.
+
+
+
+
+ Executes the query defined by the specified expression by parsing it with a
+ and then running it through the .
+
+ The query expression to be executed.
+ The result of the query.
+
+ This method is similar to the method, but without the cast to a defined return type.
+
+
+
+
+ The method generates a .
+
+ The query as expression chain.
+ a
+
+
+
+ Gets the used by this to parse LINQ queries.
+
+ The query parser.
+
+
+
+ Gets or sets the implementation of used to execute queries created via .
+
+ The executor used to execute queries.
+
+
+
+ Initializes a new instance of using a custom .
+
+
+ A type implementing . This type is used to construct the chain of query operators. Must be a generic type
+ definition.
+
+ The used to parse queries. Specify an instance of
+ for default behavior. See also .
+ The used to execute queries against a specific query backend.
+
+
+
+ Creates a new (of type with as its generic argument) that
+ represents the query defined by and is able to enumerate its results.
+
+ The type of the data items returned by the query.
+ An expression representing the query for which a should be created.
+ An that represents the query defined by .
+
+
+
+ Gets the type of queryable created by this provider. This is the generic type definition of an implementation of
+ (usually a subclass of ) with exactly one type argument.
+
+
+
+
+ Constitutes the bridge between re-linq and a concrete query provider implementation. Concrete providers implement this interface
+ and calls the respective method of the interface implementation when a query is to be executed.
+
+
+
+
+ Executes the given as a scalar query, i.e. as a query returning a scalar value of type .
+ The query ends with a scalar result operator, for example a or a .
+
+ The type of the scalar value returned by the query.
+ The representing the query to be executed. Analyze this via an
+ .
+ A scalar value of type that represents the query's result.
+
+ The difference between and is in the kind of object that is returned.
+ is used when a query that would otherwise return a collection result set should pick a single value from the
+ set, for example the first, last, minimum, maximum, or only value in the set. is used when a value is
+ calculated or aggregated from all the values in the collection result set. This applies to, for example, item counts, average calculations,
+ checks for the existence of a specific item, and so on.
+
+
+
+
+ Executes the given as a single object query, i.e. as a query returning a single object of type
+ .
+ The query ends with a single result operator, for example a or a .
+
+ The type of the single value returned by the query.
+ The representing the query to be executed. Analyze this via an
+ .
+ If , the executor must return a default value when its result set is empty;
+ if , it should throw an when its result set is empty.
+ A single value of type that represents the query's result.
+
+ The difference between and is in the kind of object that is returned.
+ is used when a query that would otherwise return a collection result set should pick a single value from the
+ set, for example the first, last, minimum, maximum, or only value in the set. is used when a value is
+ calculated or aggregated from all the values in the collection result set. This applies to, for example, item counts, average calculations,
+ checks for the existence of a specific item, and so on.
+
+
+
+
+ Executes the given as a collection query, i.e. as a query returning objects of type .
+ The query does not end with a scalar result operator, but it can end with a single result operator, for example
+ or . In such a case, the returned enumerable must yield exactly
+ one object (or none if the last result operator allows empty result sets).
+
+ The type of the items returned by the query.
+ The representing the query to be executed. Analyze this via an
+ .
+ A scalar value of type that represents the query's result.
+
+
+
+ Defines an interface for visiting the clauses of a .
+
+
+
+ When implement this interface, implement , then call Accept on every clause that should
+ be visited. Child clauses, joins, orderings, and result operators are not visited automatically; they always need to be explicitly visited
+ via , , ,
+ , and so on.
+
+
+ provides a robust default implementation of this interface that can be used as a base for other visitors.
+
+
+
+
+
+ Represents a being bound to an associated instance. This binding's
+ method returns only for the same the expression is bound to.
+
+
+
+
+
+ Represents a being bound to an associated instance. This is used by the
+ to represent assignments in constructor calls such as new AnonymousType (a = 5) ,
+ where a is the member of AnonymousType and 5 is the associated expression.
+ The method can be used to check whether the member bound to an expression matches a given
+ (considering read access). See the subclasses for details.
+
+
+
+
+ Represents a being bound to an associated instance.
+
+ This binding's
+ method returns for the same the expression is bound to or for a
+ whose getter method is the the expression is bound to.
+
+
+
+
+ Represents a being bound to an associated instance.
+
+ This binding's
+ method returns for the same the expression is bound to
+ or for its getter method's .
+
+
+
+
+ Replaces nodes according to a given mapping specification. Expressions are also replaced within subqueries; the
+ is changed by the replacement operations, it is not copied. The replacement node is not recursively searched for
+ occurrences of nodes to be replaced.
+
+
+
+
+ Takes an expression tree and first analyzes it for evaluatable subtrees (using ), i.e.
+ subtrees that can be pre-evaluated before actually generating the query. Examples for evaluatable subtrees are operations on constant
+ values (constant folding), access to closure variables (variables used by the LINQ query that are defined in an outer scope), or method
+ calls on known objects or their members. In a second step, it replaces all of the evaluatable subtrees (top-down and non-recursive) by
+ their evaluated counterparts.
+
+
+ This visitor visits each tree node at most twice: once via the for analysis and once
+ again to replace nodes if possible (unless the parent node has already been replaced).
+
+
+
+
+ Takes an expression tree and finds and evaluates all its evaluatable subtrees.
+
+
+
+
+ Evaluates an evaluatable subtree, i.e. an independent expression tree that is compilable and executable
+ without any data being passed in. The result of the evaluation is returned as a ; if the subtree
+ is already a , no evaluation is performed.
+
+ The subtree to be evaluated.
+ A holding the result of the evaluation.
+
+
+
+ Replaces all nodes that equal a given with a replacement node. Expressions are also replaced within subqueries; the
+ is changed by the replacement operations, it is not copied. The replacement node is not recursively searched for
+ occurrences of the to be replaced.
+
+
+
+
+ Preprocesses an expression tree for parsing. The preprocessing involves detection of sub-queries and VB-specific expressions.
+
+
+
+
+ Transforms a given . If the can handle the ,
+ it should return a new, transformed instance. Otherwise, it should return the input
+ instance.
+
+ The expression to be transformed.
+ The result of the transformation, or if no transformation was applied.
+
+
+
+ Manages registration and lookup of objects, and converts them to
+ weakly typed instances. Use this class together with
+ in order to apply the registered transformers to an tree.
+
+
+
+
+ defines an API for classes returning instances for specific
+ objects. Usually, the will be used when an implementation of this
+ interface is needed.
+
+
+
+
+ Gets the transformers for the given .
+
+ The to be transformed.
+
+ A sequence containing objects that should be applied to the . Must not
+ be .
+
+
+
+
+ Creates an with the default transformations provided by this library already registered.
+ New transformers can be registered by calling .
+
+ A default .
+
+ Currently, the default registry contains:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Registers the specified for the transformer's
+ . If
+ returns , the is registered as a generic transformer which will be applied to all
+ nodes.
+
+ The type of expressions handled by the . This should be a type implemented by all
+ expressions identified by . For generic transformers,
+ must be .
+ The transformer to register.
+
+
+ The order in which transformers are registered is the same order on which they will later be applied by
+ . When more than one transformer is registered for a certain ,
+ each of them will get a chance to transform a given , until the first one returns a new .
+ At that point, the transformation will start again with the new (and, if the expression's type has changed, potentially
+ different transformers).
+
+
+ When generic transformers are registered, they act as if they had been registered for all values (including
+ custom ones). They will be applied in the order registered, but only after all respective specific transformers have run (without modifying
+ the expression, which would restart the transformation process with the new expression as explained above).
+
+
+ When an is registered for an incompatible , this is not detected until
+ the transformer is actually applied to an of that .
+
+
+
+
+
+ is implemented by classes that transform instances. The
+ manages registration of instances, and the
+ applies the transformations.
+
+ The type of expressions handled by this implementation.
+
+
+ is a convenience interface that provides strong typing, whereas
+ only operates on instances.
+
+
+ can be used together with the class by using the
+ class as the transformation provider. converts
+ strongly typed instances to weakly typed delegate instances.
+
+
+
+
+
+ Transforms a given . If the implementation can handle the ,
+ it should return a new, transformed instance. Otherwise, it should return the input
+ instance.
+
+ The expression to be transformed.
+ The result of the transformation, or if no transformation was applied.
+
+
+
+ Gets the expression types supported by this .
+
+ The supported expression types. Return to support all expression types. (This is only sensible when
+ is .)
+
+
+
+
+ Dynamically discovers attributes implementing the interface on methods and get accessors
+ invoked by or instances and applies the respective
+ .
+
+
+
+
+ Defines an interface for attributes providing an for a given .
+
+
+
+ detects attributes implementing this interface while expressions are parsed
+ and uses the returned by to modify the expressions.
+
+
+ Only one attribute instance implementing must be applied to a single method or property
+ get accessor.
+
+
+
+
+
+ Detects nodes for and adds metadata to those nodes.
+ This allows LINQ providers to match member access and constructor arguments more easily.
+
+
+
+
+ Provides a base class for transformers detecting nodes for tuple types and adding metadata
+ to those nodes. This allows LINQ providers to match member access and constructor arguments more easily.
+
+
+
+
+ Detects expressions invoking a and replaces them with the body of that
+ (with the parameter references replaced with the invocation arguments).
+ Providers use this transformation to be able to handle queries with instances.
+
+
+ When the is applied to a delegate instance (rather than a
+ ), the ignores it.
+
+
+
+
+ Detects nodes for and adds metadata to those nodes.
+ This allows LINQ providers to match member access and constructor arguments more easily.
+
+
+
+
+ Chooses a given for a specific method (or property get accessor).
+
+
+ The must have a default constructor. To choose a transformer that does not have a default constructor,
+ create your own custom attribute class implementing
+ .
+
+
+
+
+ Replaces calls to and with casts and null checks. This allows LINQ providers
+ to treat nullables like reference types.
+
+
+
+
+ Detects nodes for the .NET tuple types and adds metadata to those nodes.
+ This allows LINQ providers to match member access and constructor arguments more easily.
+
+
+
+
+ Detects expressions calling the CompareString method used by Visual Basic .NET, and replaces them with
+ instances. Providers use this transformation to be able to handle VB string comparisons
+ more easily. See for details.
+
+
+
+
+ Detects expressions calling the Information.IsNothing (...) method used by Visual Basic .NET, and replaces them with
+ instances comparing with . Providers use this transformation to be able to
+ handle queries using IsNothing (...) more easily.
+
+
+
+
+ Applies delegates obtained from an to an expression tree.
+ The transformations occur in post-order (transforming child nodes before parent nodes). When a transformation changes
+ the current , its child nodes and itself will be revisited (and may be transformed again).
+
+
+
+
+ Replaces expression patterns of the form new T { x = 1, y = 2 }.x ( ) or
+ new T ( x = 1, y = 2 ).x ( ) to 1 (or 2 if y is accessed instead of x ).
+ Expressions are also replaced within subqueries; the is changed by the replacement operations, it is not copied.
+
+
+
+
+ Base class for typical implementations of the .
+
+
+
+
+
+
+ The interface defines an extension point for disabling partial evaluation on specific nodes.
+
+
+
+ Implement the individual evaluation methods and return to mark a specfic node as not partially
+ evaluatable. Note that the partial evaluation infrastructure will take care of visiting an node's children,
+ so the determination can usually be constrained to the attributes of the node itself.
+
+ Use the type as a base class for filter implementations that only require testing a few
+ node types, e.g. to disable partial evaluation for individual method calls.
+
+
+
+
+
+
+
+ Analyzes an expression tree by visiting each of its nodes, finding those subtrees that can be evaluated without modifying the meaning of
+ the tree.
+
+
+ An expression node/subtree is evaluatable if:
+
+ - it is not a
or any non-standard expression,
+ - it is not a
that involves an , and
+ - it does not have any of those non-evaluatable expressions as its children.
+
+
+ nodes are not evaluatable because they usually identify the flow of
+ some information from one query node to the next.
+
+ nodes that involve parameters or object instances are not evaluatable because they
+ should usually be translated into the target query syntax.
+
+ In .NET 3.5, non-standard expressions are not evaluatable because they cannot be compiled and evaluated by LINQ.
+ In .NET 4.0, non-standard expressions can be evaluated if they can be reduced to an evaluatable expression.
+
+
+
+
+
+ Determines whether the given is one of the expressions defined by for which
+ has a Visit method. handles those by calling the respective Visit method.
+
+ The expression to check. Must not be .
+
+ if is one of the expressions defined by and
+ has a Visit method for it; otherwise, .
+
+
+
+
+ Implementation of the null-object pattern for .
+
+
+
+
+
+ Parses an expression tree into a chain of objects after executing a sequence of
+ objects.
+
+
+
+
+ Creates a default that already has all expression node parser defined by the re-linq assembly
+ registered. Users can add inner providers to register their own expression node parsers.
+
+ A default that already has all expression node parser defined by the re-linq assembly
+ registered.
+
+
+
+ Creates a default that already has the expression tree processing steps defined by the re-linq assembly
+ registered. Users can insert additional processing steps.
+
+
+ The tranformation provider to be used by the included
+ in the result set. Use to create a default provider.
+
+
+ The expression filter used by the included in the result set.
+ Use to indicate that no custom filtering should be applied.
+
+
+ A default that already has all expression tree processing steps defined by the re-linq assembly
+ registered.
+
+
+ The following steps are included:
+
+
+ (parameterized with )
+
+
+
+
+
+ Initializes a new instance of the class with a custom and
+ implementation.
+
+ The to use when parsing trees. Use
+ to create an instance of that already includes all
+ default node types. (The can be customized as needed by adding or removing
+ ).
+ The to apply to trees before parsing their nodes. Use
+ to create an instance of that already includes
+ the default steps. (The can be customized as needed by adding or removing
+ ).
+
+
+
+ Parses the given into a chain of instances, using
+ to convert expressions to nodes.
+
+ The expression tree to parse.
+ A chain of instances representing the .
+
+
+
+ Gets the query operator represented by . If
+ is already a , that is the assumed query operator. If is a
+ and the member's getter is registered with , a corresponding
+ is constructed and returned. Otherwise, is returned.
+
+ The expression to get a query operator expression for.
+ A to be parsed as a query operator, or if the expression does not represent
+ a query operator.
+
+
+
+ Infers the associated identifier for the source expression node contained in methodCallExpression.Arguments[0]. For example, for the
+ call chain "source.Where (i => i > 5) " (which actually reads "Where (source, i => i > 5 "), the identifier "i" is associated
+ with the node generated for "source". If no identifier can be inferred, is returned.
+
+
+
+
+ Gets the node type provider used to parse instances in .
+
+ The node type provider.
+
+
+
+ Gets the processing steps used by to process the tree before analyzing its structure.
+
+ The processing steps.
+
+
+
+ Implements by storing a list of inner instances.
+ The method calls each inner instance in the order defined by the property. This is an
+ implementation of the Composite Pattern.
+
+
+
+
+ is implemented by classes that represent steps in the process of parsing the structure
+ of an tree. applies a series of these steps to the
+ tree before analyzing the query operators and creating a .
+
+
+
+ There are predefined implementations of that should only be left out when parsing an
+ tree when there are very good reasons to do so.
+
+
+ can be implemented to provide custom, complex transformations on an
+ tree. For performance reasons, avoid adding too many steps each of which visits the whole tree. For
+ simple transformations, consider using and - which can
+ batch several transformations into a single expression tree visiting run - rather than implementing a dedicated
+ .
+
+
+
+
+
+ Implements the interface by doing nothing in the method. This is an
+ implementation of the Null Object Pattern.
+
+
+
+
+ Analyzes an tree for sub-trees that are evaluatable in-memory, and evaluates those sub-trees.
+
+
+ The uses the for partial evaluation.
+ It performs two visiting runs over the tree.
+
+
+
+
+ Applies a given set of transformations to an tree. The transformations are provided by an instance of
+ (eg., ).
+
+
+ The uses the to apply the transformations.
+ It performs a single visiting run over the tree.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A class providing the transformations to apply to the tree, eg., an instance of
+ .
+
+
+
+ Provides a common interface for classes mapping a to the respective
+ type. Implementations are used by when a is encountered to
+ instantiate the right for the given method.
+
+
+
+
+ Determines whether a node type for the given can be returned by this
+ .
+
+
+
+
+ Gets the type of that matches the given , returning
+ if none can be found.
+
+
+
+
+ Represents a for the
+ and methods.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Acts as a base class for s standing for s that operate on the result of the query
+ rather than representing actual clauses, such as or .
+
+
+
+
+ Base class for implementations that represent instantiations of .
+
+
+
+
+ Interface for classes representing structural parts of an tree.
+
+
+
+
+ Resolves the specified by replacing any occurrence of
+ by the result of the projection of this . The result is an that goes all the
+ way to an .
+
+ The parameter representing the input data streaming into an . This is replaced
+ by the projection data coming out of this .
+ The expression to be resolved. Any occurrence of in this expression
+ is replaced.
+ Context information used during the current parsing process. This structure maps
+ s to the clauses created from them. Implementers that also implement
+ (such as or ) must add
+ their clauses to the mapping in if they want to be able to implement correctly.
+ An equivalent of with each occurrence of replaced by
+ the projection data streaming out of this .
+
+ This node does not support this operation because it does not stream any data to subsequent nodes.
+
+
+
+
+ Applies this to the specified query model. Nodes can add or replace clauses, add or replace expressions,
+ add or replace objects, or even create a completely new , depending on their semantics.
+
+ The query model this node should be applied to.
+ Context information used during the current parsing process. This structure maps
+ s to the clauses created from them. Implementers that
+ also implement (such as
+ or ) must add their clauses to the mapping in
+ in order to be able to implement correctly.
+ The modified or a new that reflects the changes made by this node.
+
+ For objects, which mark the end of an chain, this method must not be called.
+ Instead, use to generate a and instantiate a new
+ with that clause.
+
+
+
+
+ Gets the source that streams data into this node.
+
+ The source , or if this node is the end of the chain.
+
+
+
+ Gets the identifier associated with this . tries to find the identifier
+ that was originally associated with this node in the query written by the user by analyzing the parameter names of the next expression in the
+ method call chain.
+
+ The associated identifier.
+
+
+
+ Wraps the into a subquery after a node that indicates the end of the query (
+ or ). Override this method
+ when implementing a that does not need a subquery to be created if it occurs after the query end.
+
+
+
+ When an ordinary node follows a result operator or group node, it cannot simply append its clauses to the
+ because semantically, the result operator (or grouping) must be executed _before_ the clause. Therefore, in such scenarios, we wrap
+ the current query model into a that we put into the of a new
+ .
+
+
+ This method also changes the of this node because logically, all operations must be handled
+ by the new holding the . For example, consider the following call chain:
+
+ MainSource (...)
+ .Select (x => x)
+ .Distinct ()
+ .Select (x => x)
+
+
+ Naively, the last Select node would resolve (via Distinct and Select) to the created by the initial MainSource.
+ After this method is executed, however, that is part of the sub query, and a new
+ has been created to hold it. Therefore, we replace the chain as follows:
+
+ MainSource (MainSource (...).Select (x => x).Distinct ())
+ .Select (x => x)
+
+
+ Now, the last Select node resolves to the new .
+
+
+
+
+
+ Sets the result type override of the given .
+
+ The query model to set the of.
+
+ By default, the result type override is set to in the method. This ensures that the query
+ model represents the type of the query correctly. Specific node parsers can override this method to set the
+ to another value, or to clear it (set it to ). Do not leave the
+ unchanged when overriding this method, as a source node might have set it to a value that doesn't
+ fit this node.
+
+
+
+
+ Represents a for the
+ , ,
+ , and
+ methods.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for the
+ and
+ methods.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for the ,
+ ,
+ , and
+ methods.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for the different overloads of .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Encapsulates contextual information used while generating clauses from instances.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Acts as a base class for and , i.e., for node parsers for set operations
+ acting as an .
+
+
+
+
+ Interface for classes representing query source parts of an tree.
+
+
+
+
+ Represents a for and
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for ,
+ ,
+ for the Count properties of , , ,
+ and , and for the property of arrays.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for and
+ and
+ and
+
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Thrown whan an parser cannot be instantiated for a query. Note that this is not serializable
+ and intended to be caught in the call-site where it will then replaced by a different (serializable) exception.
+
+
+
+
+ Resolves an expression using , removing transparent identifiers and detecting subqueries
+ in the process. This is used by methods such as , which are
+ used when a clause is created from an .
+
+
+
+
+ Represents a for ,
+ ,
+ or
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for the different
+ overloads that do not take a result selector. The overloads with a result selector are represented by
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for the different
+ overloads that do take a result selector. The overloads without a result selector are represented by
+ .
+ It is generated by when an tree is parsed.
+
+
+ The GroupBy overloads with result selector are parsed as if they were a following a
+ :
+
+ x.GroupBy (k => key, e => element, (k, g) => result)
+
+ is therefore equivalent to:
+
+ c.GroupBy (k => key, e => element).Select (grouping => resultSub)
+
+ where resultSub is the same as result with k and g substituted with grouping.Key and grouping, respectively.
+
+
+
+
+ Represents a for
+
+ or
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for
+
+ or .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for ,
+ ,
+ or
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for ,
+ ,
+ and for the property of arrays.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents the first expression in a LINQ query, which acts as the main query source.
+ It is generated by when an tree is parsed.
+ This node usually marks the end (i.e. the first node) of an chain that represents a query.
+
+
+
+
+ Represents a for or .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Creates instances of classes implementing the interface via Reflection.
+
+
+ The classes implementing instantiated by this factory must implement a single constructor. The source and
+ constructor parameters handed to the method are passed on to the constructor; for each argument where no
+ parameter is passed, is passed to the constructor.
+
+
+
+
+ Creates an instace of type .
+
+
+ Thrown if the or the
+ do not match expected constructor parameters of the .
+
+
+
+
+ Contains metadata about a that is parsed into a .
+
+
+
+
+ Gets the associated identifier, i.e. the name the user gave the data streaming out of this expression. For example, the
+ corresponding to a from c in C clause should get the identifier "c".
+ If there is no user-defined identifier (or the identifier is impossible to infer from the expression tree), a generated identifier
+ is given instead.
+
+
+
+
+ Gets the source expression node, i.e. the node streaming data into the parsed node.
+
+ The source.
+
+
+
+ Gets the being parsed.
+
+
+
+
+ Represents a for or .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for
+ and .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Provides common functionality used by implementors of .
+
+
+
+
+ Replaces the given parameter with a back-reference to the corresponding to .
+
+ The referenced node.
+ The parameter to replace with a .
+ The expression in which to replace the parameter.
+ The clause generation context.
+ , with replaced with a
+ pointing to the clause corresponding to .
+
+
+
+ Gets the corresponding to the given , throwing an
+ if no such clause has been registered in the given .
+
+ The node for which the should be returned.
+ The clause generation context.
+ The corresponding to .
+
+
+
+ Caches a resolved expression in the classes.
+
+
+
+
+ Represents a for .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ This node represents an additional query source introduced to the query.
+
+
+
+
+ Represents a for ,
+ ,
+ or
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for the different overloads of .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it follows an , an ,
+ a , or a .
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it follows an , an ,
+ a , or a .
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ is implemented by classes taking an tree and parsing it into a .
+
+
+ The default implementation of this interface is . LINQ providers can, however, implement
+ themselves, eg. in order to decorate or replace the functionality of .
+
+
+
+
+ Gets the of the given .
+
+ The expression tree to parse.
+ A that represents the query defined in .
+
+
+
+ Parses a and creates an from it. This is used by
+ for parsing whole expression trees.
+
+
+
+
+ Implements by storing a list of inner instances.
+ The and methods delegate to these inner instances. This is an
+ implementation of the Composite Pattern.
+
+
+
+
+ Maps the objects used in objects to the respective
+ types. This is used by when a is encountered to instantiate the
+ right for the given method.
+
+
+
+
+ Creates a and registers all relevant implementations in the Remotion.Linq assembly.
+
+
+ A with all types in the Remotion.Linq assembly registered.
+
+
+
+
+ Gets the registerable method definition from a given . A registerable method is a object
+ that can be registered via a call to . When the given is passed to
+ and its corresponding registerable method was registered, the correct node type is returned.
+
+ The method for which the registerable method should be retrieved. Must not be .
+
+ to throw a if the method cannot be matched to a distinct generic method definition,
+ to return if an unambiguous match is not possible.
+
+
+
+ itself, unless it is a closed generic method or declared in a closed generic type. In the latter cases,
+ the corresponding generic method definition respectively the method declared in a generic type definition is returned.
+
+ If no generic method definition could be matched and was set to ,
+ is returned.
+
+
+
+ Thrown if is set to and no distinct generic method definition could be resolved.
+
+
+
+
+ Registers the specific with the given . The given methods must either be non-generic
+ or open generic method definitions. If a method has already been registered before, the later registration overwrites the earlier one.
+
+
+
+
+ Determines whether the specified method was registered with this .
+
+
+
+
+ Gets the type of registered with this instance that
+ matches the given , returning if none can be found.
+
+
+
+
+ Returns the count of the registered s.
+
+
+
+
+ Maps the objects used in objects to the respective
+ types based on the method names and a filter (as defined by ).
+ This is used by when a is encountered to instantiate the right
+ for the given method.
+
+
+
+
+ Creates a and registers all relevant implementations in the Remotion.Linq assembly.
+
+
+ A with all types in the Remotion.Linq assembly registered.
+
+
+
+
+ Registers the given for the query operator methods defined by the given
+ objects.
+
+ A sequence of objects defining the methods to register the node type for.
+ The type of the to register.
+
+
+
+ Determines whether the specified method was registered with this .
+
+
+
+
+ Gets the type of registered with this instance that
+ matches the given , returning if none can be found.
+
+
+
+
+ Returns the count of the registered method names.
+
+
+
+
+ Defines a name and a filter predicate used when determining the matching expression node type by .
+
+
+
+
+ Takes an tree and parses it into a by use of an .
+ It first transforms the tree into a chain of instances, and then calls
+ and in order to instantiate all the
+ s. With those, a is created and returned.
+
+
+
+
+ Initializes a new instance of the class, using default parameters for parsing.
+ The used has all relevant methods of the class
+ automatically registered, and the comprises partial evaluation, and default
+ expression transformations. See ,
+ , and
+ for details.
+
+
+
+
+ Initializes a new instance of the class, using the given to
+ convert instances into s. Use this constructor if you wish to customize the
+ parser. To use a default parser (with the possibility to register custom node types), use the method.
+
+ The expression tree parser.
+
+
+
+ Gets the of the given .
+
+ The expression tree to parse.
+ A that represents the query defined in .
+
+
+
+ Applies all nodes to a , which is created by the trailing in the
+ chain.
+
+ The entry point to the chain.
+ The clause generation context collecting context information during the parsing process.
+ A created by the training and transformed by each node in the
+ chain.
+
+
+
+ Gets the used by to parse instances.
+
+ The node type registry.
+
+
+
+ Gets the used by to process the tree
+ before analyzing its structure.
+
+ The processor.
+
+
+
+ Implements an that throws an exception for every expression type that is not explicitly supported.
+ Inherit from this class to ensure that an exception is thrown when an expression is passed
+
+
+
+
+ Called when an unhandled item is visited. This method provides the item the visitor cannot handle ( ),
+ the that is not implemented in the visitor, and a delegate that can be used to invoke the
+ of the class. The default behavior of this method is to call the
+ method, but it can be overridden to do something else.
+
+ The type of the item that could not be handled. Either an type, a
+ type, or .
+ The result type expected for the visited .
+ The unhandled item.
+ The visit method that is not implemented.
+ The behavior exposed by for this item type.
+ An object to replace in the expression tree. Alternatively, the method can throw any exception.
+
+
+
+ can be used to build tuples incorporating a sequence of s.
+ For example, given three expressions, exp1, exp2, and exp3, it will build nested s that are equivalent to the
+ following: new KeyValuePair(exp1, new KeyValuePair(exp2, exp3)).
+ Given an whose type matches that of a tuple built by , the builder can also return
+ an enumeration of accessor expressions that can be used to access the tuple elements in the same order as they were put into the nested tuple
+ expression. In above example, this would yield tupleExpression.Key, tupleExpression.Value.Key, and tupleExpression.Value.Value.
+ This class can be handy whenever a set of needs to be put into a single
+ (eg., a select projection), especially if each sub-expression needs to be explicitly accessed at a later point of time (eg., to retrieve the
+ items from a statement surrounding a sub-statement yielding the tuple in its select projection).
+
+
+
+
+ Acts as a common base class for implementations based on re-linq. In a specific LINQ provider, a custom queryable
+ class should be derived from which supplies an implementation of that is used to
+ execute the query. This is then used as an entry point (the main data source) of a LINQ query.
+
+ The type of the result items yielded by this query.
+
+
+
+ Initializes a new instance of the class with a and the given
+ . This constructor should be used by subclasses to begin a new query. The generated by
+ this constructor is a pointing back to this .
+
+ The used to parse queries. Specify an instance of
+ for default behavior. See also .
+ The used to execute the query represented by this .
+
+
+
+ Initializes a new instance of the class with a specific . This constructor
+ should only be used to begin a query when does not fit the requirements.
+
+ The provider used to execute the query represented by this and to construct
+ queries around this .
+
+
+
+ Initializes a new instance of the class with a given and
+ . This is an infrastructure constructor that must be exposed on subclasses because it is used by
+ to construct queries around this when a query method (e.g. of the
+ class) is called.
+
+ The provider used to execute the query represented by this and to construct
+ queries around this .
+ The expression representing the query.
+
+
+
+ Executes the query via the and returns an enumerator that iterates through the items returned by the query.
+
+
+ A that can be used to iterate through the query result.
+
+
+
+
+ Gets the expression tree that is associated with the instance of . This expression describes the
+ query represented by this .
+
+
+
+ The that is associated with this instance of .
+
+
+
+
+ Gets the query provider that is associated with this data source. The provider is used to execute the query. By default, a
+ is used that parses the query and passes it on to an implementation of .
+
+
+
+ The that is associated with this data source.
+
+
+
+
+ Gets the type of the element(s) that are returned when the expression tree associated with this instance of is executed.
+
+
+
+ A that represents the type of the element(s) that are returned when the expression tree associated with this object is executed.
+
+
+
+
+ Provides an abstraction of an expression tree created for a LINQ query. instances are passed to LINQ providers based
+ on re-linq via , but you can also use to parse an expression tree by hand or construct
+ a manually via its constructor.
+
+
+ The different parts of the query are mapped to clauses, see , , and
+ . The simplest way to process all the clauses belonging to a is by implementing
+ (or deriving from ) and calling .
+
+
+
+
+ Initializes a new instance of
+
+ The of the query. This is the starting point of the query, generating items
+ that are filtered and projected by the query.
+ The of the query. This is the end point of
+ the query, it defines what is actually returned for each of the items coming from the and passing the
+ . After it, only the modify the result of the query.
+
+
+
+ Gets an object describing the data streaming out of this . If a query ends with
+ the , this corresponds to . If a query has
+ , the data is further modified by those operators.
+
+ Gets a object describing the data streaming out of this .
+
+ The data streamed from a is often of type instantiated
+ with a specific item type, unless the
+ query ends with a . For example, if the query ends with a , the
+ result type will be .
+
+
+ The is not compatible with the calculated calculated from the .
+
+
+
+
+ Gets the which is used by the .
+
+
+
+
+
+ Accepts an implementation of or , as defined by the Visitor pattern.
+
+
+
+
+ Returns a representation of this .
+
+
+
+
+ Clones this , returning a new equivalent to this instance, but with its clauses being
+ clones of this instance's clauses. Any in the cloned clauses that points back to another clause
+ in this (including its subqueries) is adjusted to point to the respective clones in the cloned
+ . Any subquery nested in the is also cloned.
+
+
+
+
+ Clones this , returning a new equivalent to this instance, but with its clauses being
+ clones of this instance's clauses. Any in the cloned clauses that points back to another clause
+ in this (including its subqueries) is adjusted to point to the respective clones in the cloned
+ . Any subquery nested in the is also cloned.
+
+ The defining how to adjust instances of
+ in the cloned . If there is a
+ that points out of the being cloned, specify its replacement via this parameter. At the end of the cloning process,
+ this object maps all the clauses in this original to the clones created in the process.
+
+
+
+
+ Transforms all the expressions in this 's clauses via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ , and those expressions will be replaced with what the delegate returns.
+
+
+
+ Returns a new name with the given prefix. The name is different from that of any added
+ in the . Note that clause names that are changed after the clause is added as well as names of other clauses
+ than from clauses are not considered when determining "unique" names. Use names only for readability and debugging, not
+ for uniquely identifying clauses.
+
+
+
+
+ Executes this via the given . By default, this indirectly calls
+ , but this can be modified by the .
+
+ The to use for executing this query.
+
+
+
+ Determines whether this represents an identity query. An identity query is a query without any body clauses
+ whose selects exactly the items produced by its . An identity query can have
+ .
+
+
+ if this represents an identity query; otherwise, .
+
+
+ An example for an identity query is the subquery in that is produced for the in the following
+ query:
+
+ from order in ...
+ select order.OrderItems.Count()
+
+ In this query, the will become a because
+ is treated as a query operator. The
+ in that has no and a trivial ,
+ so its method returns . The outer , on the other hand, does not
+ have a trivial , so its method returns .
+
+
+
+
+ Creates a new that has this as a sub-query in its .
+
+ The name of the new 's .
+ A new whose 's is a
+ that holds this instance.
+
+
+
+ Gets or sets the query's . This is the starting point of the query, generating items that are processed by
+ the and projected or grouped by the .
+
+
+
+
+ Gets or sets the query's select clause. This is the end point of the query, it defines what is actually returned for each of the
+ items coming from the and passing the . After it, only the
+ modify the result of the query.
+
+
+
+
+ Gets a collection representing the query's body clauses. Body clauses take the items generated by the ,
+ filtering ( ), ordering ( ), augmenting ( ), or otherwise
+ processing them before they are passed to the .
+
+
+
+
+ Gets the result operators attached to this . Result operators modify the query's result set, aggregating,
+ filtering, or otherwise processing the result before it is returned.
+
+
+
+
+ Collects clauses and creates a from them. This provides a simple way to first add all the clauses and then
+ create the rather than the two-step approach (first and ,
+ then the s) required by 's constructor.
+
+
+
+
+ Provides a default implementation of which automatically visits child items. That is, the default
+ implementation of automatically calls Accept on all clauses in the
+ and the default implementation of automatically calls on the
+ instances in its collection, and so on.
+
+
+ This visitor is hardened against modifications performed on the visited while the model is currently being visited.
+ That is, if a the collection changes while a body clause (or a child item of a body clause) is currently
+ being processed, the visitor will handle that gracefully. The same applies to and
+ .
+
+
+
+
+ Takes a and transforms it by replacing its instances ( and
+ ) that contain subqueries with equivalent flattened clauses. Subqueries that contain a
+ (such as or ) cannot be
+ flattened.
+
+
+ As an example, take the following query:
+
+ from c in Customers
+ from o in (from oi in OrderInfos where oi.Customer == c orderby oi.OrderDate select oi.Order)
+ orderby o.Product.Name
+ select new { c, o }
+
+ This will be transformed into:
+
+ from c in Customers
+ from oi in OrderInfos
+ where oi.Customer == c
+ orderby oi.OrderDate
+ orderby oi.Order.Product.Name
+ select new { c, oi.Order }
+
+ As another example, take the following query:
+
+ from c in (from o in Orders select o.Customer)
+ where c.Name.StartsWith ("Miller")
+ select c
+
+ (This query is never produced by the , the only way to construct it is via manually building a
+ .)
+ This will be transforemd into:
+
+ from o in Orders
+ where o.Customer.Name.StartsWith ("Miller")
+ select o
+
+
+
+
+
+ Generates unique identifiers based on a set of known identifiers.
+ An identifier is generated by appending a number to a given prefix. The identifier is considered unique when no known identifier
+ exists which equals the prefix/number combination.
+
+
+
+
+ Adds the given to the set of known identifiers.
+
+ The identifier to add.
+
+
+
+ Gets a unique identifier starting with the given . The identifier is generating by appending a number to the
+ prefix so that the resulting string does not match a known identifier.
+
+ The prefix to use for the identifier.
+ A unique identifier starting with .
+
+
+
+ Provides extensions for working with trees.
+
+
+
+
+ Builds a string from the tree, including .NET 3.5.
+
+
+
+
+ Provider a utility API for dealing with the item type of generic collections.
+
+
+
+
+ Tries to extract the item type from the input .
+
+
+ The that might be an implementation of the interface. Must not be .
+
+ An output parameter containing the extracted item or .
+ if an could be extracted, otherwise .
+
+
+
+ Transforms an expression tree into a human-readable string, taking all the custom expression nodes into account.
+ It does so by replacing all instances of custom expression nodes by parameters that have the desired string as their names. This is done
+ to circumvent a limitation in the class, where overriding in custom expressions
+ will not work.
+
+
+
+
+ Extends with events that indicate when the collection was changed.
+
+ The type of items held by this .
+
+
+
+ Occurs after an item was changed in this .
+
+
+
+
+ Provides event data for 's events.
+
+
+
+
diff --git a/build/approot/packages/Remotion.Linq/2.0.1/lib/net35/Remotion.Linq.dll b/build/approot/packages/Remotion.Linq/2.0.1/lib/net35/Remotion.Linq.dll
new file mode 100644
index 00000000..e799debe
Binary files /dev/null and b/build/approot/packages/Remotion.Linq/2.0.1/lib/net35/Remotion.Linq.dll differ
diff --git a/build/approot/packages/Remotion.Linq/2.0.1/lib/net40/Remotion.Linq.XML b/build/approot/packages/Remotion.Linq/2.0.1/lib/net40/Remotion.Linq.XML
new file mode 100644
index 00000000..6c65a72f
--- /dev/null
+++ b/build/approot/packages/Remotion.Linq/2.0.1/lib/net40/Remotion.Linq.XML
@@ -0,0 +1,4089 @@
+
+
+
+ Remotion.Linq
+
+
+
+
+ Indicates the condition parameter of the assertion method.
+ The method itself should be marked by attribute.
+ The mandatory argument of the attribute is the assertion type.
+
+
+
+
+
+ Initializes new instance of AssertionConditionAttribute
+
+ Specifies condition type
+
+
+
+ Gets condition type
+
+
+
+
+ Specifies assertion type. If the assertion method argument satisifes the condition, then the execution continues.
+ Otherwise, execution is assumed to be halted
+
+
+
+
+ Indicates that the marked parameter should be evaluated to true
+
+
+
+
+ Indicates that the marked parameter should be evaluated to false
+
+
+
+
+ Indicates that the marked parameter should be evaluated to null value
+
+
+
+
+ Indicates that the marked parameter should be evaluated to not null value
+
+
+
+
+ Indicates that the marked method is assertion method, i.e. it halts control flow if one of the conditions is satisfied.
+ To set the condition, mark one of the parameters with attribute
+
+
+
+
+
+ When applied to target attribute, specifies a requirement for any type which is marked with
+ target attribute to implement or inherit specific type or types
+
+
+
+ [BaseTypeRequired(typeof(IComponent)] // Specify requirement
+ public class ComponentAttribute : Attribute
+ {}
+
+ [Component] // ComponentAttribute requires implementing IComponent interface
+ public class MyComponent : IComponent
+ {}
+
+
+
+
+
+ Initializes new instance of BaseTypeRequiredAttribute
+
+ Specifies which types are required
+
+
+
+ Gets enumerations of specified base types
+
+
+
+
+ Indicates that the value of marked element could be null sometimes, so the check for null is necessary before its usage
+
+
+
+
+ Indicates that the value of marked type (or its derivatives) cannot be compared using '==' or '!=' operators.
+ There is only exception to compare with null , it is permitted
+
+
+
+
+ Describes dependency between method input and output
+
+
+ Function definition table syntax:
+
+ - FDT ::= FDTRow [;FDTRow]*
+ - FDTRow ::= Input => Output | Output <= Input
+ - Input ::= ParameterName: Value [, Input]*
+ - Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value}
+ - Value ::= true | false | null | notnull | canbenull
+
+ If method has single input parameter, it's name could be omitted.
+ Using "halt" (or "void"/"nothing", which is the same) for method output means that methos doesn't return normally.
+ "canbenull" annotation is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute with rows separated by semicolon.
+
+
+
+ - [ContractAnnotation("=> halt")] public void TerminationMethod()
+ - [ContractAnnotation("halt <= condition: false")] public void Assert(bool condition, string text) // Regular Assertion method
+ - [ContractAnnotation("s:null => true")] public bool IsNullOrEmpty(string s) // String.IsNullOrEmpty
+ - [ContractAnnotation("null => null; notnull => notnull")] public object Transform(object data) // Method which returns null if parameter is null, and not null if parameter is not null
+ - [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")] public bool TryParse(string s, out Person result)
+
+
+
+
+
+ Only entity marked with attribute considered used
+
+
+
+
+ Indicates implicit assignment to a member
+
+
+
+
+ Indicates implicit instantiation of a type with fixed constructor signature.
+ That means any unused constructor parameters won't be reported as such.
+
+
+
+
+ Indicates implicit instantiation of a type
+
+
+
+
+ Specify what is considered used implicitly when marked with or
+
+
+
+
+ Members of entity marked with attribute are considered used
+
+
+
+
+ Entity marked with attribute and all its members considered used
+
+
+
+
+ Tells code analysis engine if the parameter is completely handled when the invoked method is on stack.
+ If the parameter is delegate, indicates that delegate is executed while the method is executed.
+ If the parameter is enumerable, indicates that it is enumerated while the method is executed.
+
+
+
+
+ Indicates that the function argument should be string literal and match one of the parameters of the caller function.
+ For example, has such parameter.
+
+
+
+
+ Indicates that method is *pure* linq method, with postponed enumeration. C# iterator methods (yield ...) are always LinqTunnel.
+
+
+
+
+ Indicates that marked element should be localized or not.
+
+
+
+
+ Initializes a new instance of the class with
+ set to .
+
+
+
+
+ Initializes a new instance of the class.
+
+ true if a element should be localized; otherwise, false .
+
+
+
+ Returns whether the value of the given object is equal to the current .
+
+ The object to test the value equality of.
+
+ true if the value of the given object is equal to that of the current; otherwise, false .
+
+
+
+
+ Returns the hash code for this instance.
+
+ A hash code for the current .
+
+
+
+ Gets a value indicating whether a element should be localized.
+ true if a element should be localized; otherwise, false .
+
+
+
+
+ Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes as unused (as well as by other usage inspections)
+
+
+
+
+ Gets value indicating what is meant to be used
+
+
+
+
+ Indicates that IEnumarable, passed as parameter, is not enumerated.
+
+
+
+
+
+ Indicates that the function is used to notify class type property value is changed.
+
+
+
+
+ Indicates that the value of marked element could never be null
+
+
+
+
+ This attribute is intended to mark publicly available API which should not be removed and so is treated as used.
+
+
+
+
+ Indicates that method doesn't contain observable side effects.
+
+
+
+
+ Indicates that marked method builds string by format pattern and (optional) arguments.
+ Parameter, which contains format string, should be given in constructor.
+ The format string should be in -like form
+
+
+
+
+ Initializes new instance of StringFormatMethodAttribute
+
+ Specifies which parameter of an annotated method should be treated as format-string
+
+
+
+ Gets format parameter name
+
+
+
+
+ Indicates that the marked method unconditionally terminates control flow execution.
+ For example, it could unconditionally throw exception
+
+
+
+
+ Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library),
+ so this symbol will not be marked as unused (as well as by other usage inspections)
+
+
+
+
+ Gets value indicating what is meant to be used
+
+
+
+
+ This utility class provides methods for checking arguments.
+
+
+ Some methods of this class return the value of the parameter. In some cases, this is useful because the value will be converted to another
+ type:
+ ("o", o);
+ }
+ ]]>
+ In some other cases, the input value is returned unmodified. This makes it easier to use the argument checks in calls to base class constructors
+ or property setters:
+
+
+
+
+ Returns the value itself if it is not and of the specified value type.
+ The type that must have.
+ The is a .
+ The is an instance of another type.
+
+
+ Checks of the is of the .
+ The is a .
+ The is an instance of another type.
+
+
+ Returns the value itself if it is of the specified type.
+ The type that must have.
+
+ is an instance of another type (which is not a subtype of ).
+
+ is null and cannot be null.
+
+ For non-nullable value types, you should use either or pass the type
+ instead.
+
+
+
+ Checks whether is not and can be assigned to .
+ The is .
+ The cannot be assigned to .
+
+
+ Checks whether can be assigned to .
+ The cannot be assigned to .
+
+
+ Checks whether can be assigned to .
+ The cannot be assigned to .
+
+
+ Checks whether all items in are of type or a null reference.
+ If at least one element is not of the specified type or a derived type.
+
+
+ Checks whether all items in are of type and not null references.
+ If at least one element is not of the specified type or a derived type.
+ If at least one element is a null reference.
+
+
+
+ Provides methods that throw an if an assertion fails.
+
+
+
+ This class contains methods that are conditional to the DEBUG and TRACE attributes ( and ).
+
+ Note that assertion expressions passed to these methods are not evaluated (read: executed) if the respective symbol are not defined during
+ compilation, nor are the methods called. This increases performance for production builds, but make sure that your assertion expressions do
+ not cause any side effects! See or and the for more information
+ about conditional compilation.
+
+ Assertions are no replacement for checking input parameters of public methods (see ).
+
+
+
+
+
+ Determines whether a type is nullable, ie. whether variables of it can be assigned .
+
+ The type to check.
+
+ true if is nullable; otherwise, false.
+
+
+ A type is nullable if it is a reference type or a nullable value type. This method returns false only for non-nullable value types.
+
+
+
+
+ Represents a data source in a query that adds new data items in addition to those provided by the .
+
+
+ In C#, the second "from" clause in the following sample corresponds to an :
+
+ var query = from s in Students
+ from f in s.Friends
+ select f;
+
+
+
+
+
+ Base class for and .
+
+
+
+
+
+ Common interface for from clauses ( and ). From clauses define query sources that
+ provide data items to the query which are filtered, ordered, projected, or otherwise processed by the following clauses.
+
+
+
+
+ Represents a clause within the . Implemented by , ,
+ , and .
+
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Represents a clause or result operator that generates items which are streamed to the following clauses or operators.
+
+
+
+
+ Gets the name of the items generated by this .
+
+
+ Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression.
+ However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for
+ uniquely identifying objects. To match an with its references, use the
+ property rather than the .
+
+
+
+
+ Gets the type of the items generated by this .
+
+
+
+
+ Copies the 's attributes, i.e. the , , and
+ .
+
+
+
+
+
+ The expression generating the data items for this from clause.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A name describing the items generated by the from clause.
+ The type of the items generated by the from clause.
+ The generating data items for this from clause.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Gets or sets a name describing the items generated by this from clause.
+
+
+ Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression.
+ However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for
+ uniquely identifying objects. To match an with its references, use the
+ property rather than the .
+
+
+
+
+ Gets or sets the type of the items generated by this from clause.
+
+
+ Changing the of a can make all objects that
+ point to that invalid, so the property setter should be used with care.
+
+
+
+
+ The expression generating the data items for this from clause.
+
+
+
+
+ Represents a clause in a 's collection. Body clauses take the items generated by
+ the , filtering ( ), ordering ( ), augmenting
+ ( ), or otherwise processing them before they are passed to the .
+
+
+
+
+ Accepts the specified visitor by calling one of its Visit... methods.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Clones this clause, registering its clone with the if it is a query source clause.
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Initializes a new instance of the class.
+
+ A name describing the items generated by the from clause.
+ The type of the items generated by the from clause.
+ The generating the items of this from clause.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Clones this clause, registering its clone with the .
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Aggregates all objects needed in the process of cloning a and its clauses.
+
+
+
+
+ Gets the clause mapping used during the cloning process. This is used to adjust the instances
+ of clauses to point to clauses in the cloned .
+
+
+
+
+ This interface should be implemented by visitors that handle the instances.
+
+
+
+
+ This interface should be implemented by visitors that handle VB-specific expressions.
+
+
+
+
+ Wraps an exception whose partial evaluation caused an exception.
+
+
+
+ When encounters an exception while evaluating an independent expression subtree, it
+ will wrap the subtree within a . The wrapper contains both the
+ instance and the that caused the exception.
+
+
+ To explicitly support this expression type, implement .
+ To ignore this wrapper and only handle the inner , call the method and visit the result.
+
+
+ Subclasses of that do not implement will,
+ by default, automatically reduce this expression type to the in the
+ method.
+
+
+ Subclasses of that do not implement will,
+ by default, ignore this expression and visit its child expressions via the and
+ methods.
+
+
+
+
+
+ Represents an expression tree node that points to a query source represented by a . These expressions should always
+ point back, to a clause defined prior to the clause holding a . Otherwise, exceptions might be
+ thrown at runtime.
+
+
+ This particular expression overrides , i.e. it can be compared to another based
+ on the .
+
+
+
+
+ Determines whether the specified is equal to the current by
+ comparing the properties for reference equality.
+
+ The to compare with the current .
+
+ if the specified is a that points to the
+ same ; otherwise, false.
+
+
+
+
+ Gets the query source referenced by this expression.
+
+ The referenced query source.
+
+
+
+ Represents an that holds a subquery. The subquery is held by in its parsed form.
+
+
+
+
+ Represents a VB-specific comparison expression.
+
+
+
+ To explicitly support this expression type, implement .
+ To treat this expression as if it were an ordinary , call its method and visit the result.
+
+
+ Subclasses of that do not implement will, by default,
+ automatically reduce this expression type to in the method.
+
+
+ Subclasses of that do not implement will, by default,
+ ignore this expression and visit its child expressions via the and
+ methods.
+
+
+
+
+
+ Constructs a that is able to extract a specific simple expression from a complex
+ or .
+
+
+
+ For example, consider the task of determining the value of a specific query source [s] from an input value corresponding to a complex
+ expression. This will return a able to perform this task.
+
+
+
+ - If the complex expression is [s], it will simply return input => input.
+ - If the complex expression is new { a = [s], b = "..." }, it will return input => input.a.
+ - If the complex expression is new { a = new { b = [s], c = "..." }, d = "..." }, it will return input => input.a.b.
+
+
+
+
+
+
+ Provides a base class for expression visitors used with re-linq, adding support for and .
+
+
+
+
+ Adjusts the arguments for a so that they match the given members.
+
+ The arguments to adjust.
+ The members defining the required argument types.
+
+ A sequence of expressions that are equivalent to , but converted to the associated member's
+ result type if needed.
+
+
+
+
+ Constructs a that is able to extract a specific simple from a
+ complex .
+
+ The expression an accessor to which should be created.
+ The full expression containing the .
+ The input parameter to be used by the resulting lambda. Its type must match the type of .
+ The compares the via reference equality,
+ which means that exactly the same expression reference must be contained by for the visitor to return the
+ expected result. In addition, the visitor can only provide accessors for expressions nested in or
+ .
+ A acting as an accessor for the when an input matching
+ is given.
+
+
+
+
+ Takes an expression and replaces all instances, as defined by a given .
+ This is used whenever references to query sources should be replaced by a transformation.
+
+
+
+
+ Takes an expression and replaces all instances, as defined by a given
+ .
+
+ The expression to be scanned for references.
+ The clause mapping to be used for replacing instances.
+ If , the visitor will throw an exception when
+ not mapped in the is encountered. If ,
+ the visitor will ignore such expressions.
+ An expression with its instances replaced as defined by the
+ .
+
+
+
+ Performs a reverse operation, i.e. creates a from a given resolved expression,
+ substituting all objects by getting the referenced objects from the lambda's input parameter.
+
+
+ Given the following input:
+
+ - ItemExpression:
new AnonymousType ( a = [s1], b = [s2] )
+ - ResolvedExpression:
[s1].ID + [s2].ID
+
+ The visitor generates the following : input => input.a.ID + input.b.ID
+ The lambda's input parameter has the same type as the ItemExpression.
+
+
+
+
+ Performs a reverse operation, i.e. creates a from a given resolved expression,
+ substituting all objects by getting the referenced objects from the lambda's input parameter.
+
+ The item expression representing the items passed to the generated via its input
+ parameter.
+ The resolved expression for which to generate a reverse resolved .
+ A from the given resolved expression, substituting all
+ objects by getting the referenced objects from the lambda's input parameter. The generated has exactly one
+ parameter which is of the type defined by .
+
+
+
+ Performs a reverse operation on a , i.e. creates a new
+ with an additional parameter from a given resolved ,
+ substituting all objects by getting the referenced objects from the new input parameter.
+
+ The item expression representing the items passed to the generated via its new
+ input parameter.
+ The resolved for which to generate a reverse resolved .
+ The position at which to insert the new parameter.
+ A similar to the given resolved expression, substituting all
+ objects by getting the referenced objects from an additional input parameter. The new input parameter is of the type defined by
+ .
+
+
+
+ Represents the join part of a query, adding new data items and joining them with data items from previous clauses. In contrast to
+ , the does not provide access to the individual items of the joined query source.
+ Instead, it provides access to all joined items for each item coming from the previous clauses, thus grouping them together. The semantics
+ of this join is so that for all input items, a joined sequence is returned. That sequence can be empty if no joined items are available.
+
+
+ In C#, the "into" clause in the following sample corresponds to a . The "join" part before that is encapsulated
+ as a held in . The adds a new query source to the query
+ ("addresses"), but the item type of that query source is , not "Address". Therefore, it can be
+ used in the of an to extract the single items.
+
+ var query = from s in Students
+ join a in Addresses on s.AdressID equals a.ID into addresses
+ from a in addresses
+ select new { s, a };
+
+
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Clones this clause, registering its clone with the .
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Gets or sets a name describing the items generated by this .
+
+
+ Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression.
+ However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for
+ uniquely identifying objects. To match an with its references, use the
+ property rather than the .
+
+
+
+
+ Gets or sets the type of the items generated by this . This must implement .
+
+
+ Changing the of a can make all objects that
+ point to that invalid, so the property setter should be used with care.
+
+
+
+
+ Gets or sets the inner join clause of this . The represents the actual join operation
+ performed by this clause; its results are then grouped by this clause before streaming them to subsequent clauses.
+ objects outside the must not point to
+ because the items generated by it are only available in grouped form from outside this clause.
+
+
+
+
+ Represents the join part of a query, adding new data items and joining them with data items from previous clauses. This can either
+ be part of or of . The semantics of the
+ is that of an inner join, i.e. only combinations where both an input item and a joined item exist are returned.
+
+
+ In C#, the "join" clause in the following sample corresponds to a . The adds a new
+ query source to the query, selecting addresses (called "a") from the source "Addresses". It associates addresses and students by
+ comparing the students' "AddressID" properties with the addresses' "ID" properties. "a" corresponds to and
+ , "Addresses" is and the left and right side of the "equals" operator are held by
+ and , respectively:
+
+ var query = from s in Students
+ join a in Addresses on s.AdressID equals a.ID
+ select new { s, a };
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ A name describing the items generated by this .
+ The type of the items generated by this .
+ The expression that generates the inner sequence, i.e. the items of this .
+ An expression that selects the left side of the comparison by which source items and inner items are joined.
+ An expression that selects the right side of the comparison by which source items and inner items are joined.
+
+
+
+ Accepts the specified visitor by calling its
+ method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Accepts the specified visitor by calling its
+ method. This overload is used when visiting a that is held by a .
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The holding this instance.
+
+
+
+ Clones this clause, registering its clone with the .
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Gets or sets the type of the items generated by this .
+
+
+ Changing the of a can make all objects that
+ point to that invalid, so the property setter should be used with care.
+
+
+
+
+ Gets or sets a name describing the items generated by this .
+
+
+ Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression.
+ However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for
+ uniquely identifying objects. To match an with its references, use the
+ property rather than the .
+
+
+
+
+ Gets or sets the inner sequence, the expression that generates the inner sequence, i.e. the items of this .
+
+ The inner sequence.
+
+
+
+ Gets or sets the outer key selector, an expression that selects the right side of the comparison by which source items and inner items are joined.
+
+ The outer key selector.
+
+
+
+ Gets or sets the inner key selector, an expression that selects the left side of the comparison by which source items and inner items are joined.
+
+ The inner key selector.
+
+
+
+ Represents the main data source in a query, producing data items that are filtered, aggregated, projected, or otherwise processed by
+ subsequent clauses.
+
+
+ In C#, the first "from" clause in the following sample corresponds to the :
+
+ var query = from s in Students
+ from f in s.Friends
+ select f;
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ A name describing the items generated by the from clause.
+ The type of the items generated by the from clause.
+ The generating data items for this from clause.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+
+
+
+ Clones this clause, registering its clone with the .
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Represents the orderby part of a query, ordering data items according to some .
+
+
+ In C#, the whole "orderby" clause in the following sample (including two orderings) corresponds to an :
+
+ var query = from s in Students
+ orderby s.Last, s.First
+ select s;
+
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Clones this clause.
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Gets the instances that define how to sort the items coming from previous clauses. The order of the
+ in the collection defines their priorities. For example, { LastName, FirstName } would sort all items by
+ LastName, and only those items that have equal LastName values would be sorted by FirstName.
+
+
+
+
+ Represents a single ordering instruction in an .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The expression used to order the data items returned by the query.
+ The to use for sorting.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The in whose context this item is visited.
+ The index of this item in the 's collection.
+
+
+
+ Clones this item.
+
+ The clones of all query source clauses are registered with this .
+ A clone of this item.
+
+
+
+ Transforms all the expressions in this item via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ item, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Gets or sets the expression used to order the data items returned by the query.
+
+ The expression.
+
+
+
+ Gets or sets the direction to use for ordering data items.
+
+
+
+
+ Specifies the direction used to sort the result items in a query using an .
+
+
+
+
+ Sorts the items in an ascending way, from smallest to largest.
+
+
+
+
+ Sorts the items in an descending way, from largest to smallest.
+
+
+
+
+ Maps instances to instances. This is used by
+ in order to be able to correctly update references to old clauses to point to the new clauses. Via
+ , it can also be used manually.
+
+
+
+
+ Represents an operation that is executed on the result set of the query, aggregating, filtering, or restricting the number of result items
+ before the query result is returned.
+
+
+
+
+ Executes this result operator in memory, on a given input. Executing result operators in memory should only be
+ performed if the target query system does not support the operator.
+
+ The input for the result operator. This must match the type of expected by the operator.
+ The result of the operator.
+
+
+
+ Gets information about the data streamed out of this . This contains the result type a query would have if
+ it ended with this , and it optionally includes an describing
+ the streamed sequence's items.
+
+ Information about the data produced by the preceding , or the
+ of the query if no previous exists.
+ Gets information about the data streamed out of this .
+
+
+
+ Clones this item, registering its clone with the if it is a query source clause.
+
+ The clones of all query source clauses are registered with this .
+ A clone of this item.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this item in the 's collection.
+
+
+
+ Transforms all the expressions in this item via the given delegate. Subclasses must apply the
+ to any expressions they hold. If a subclass does not hold any expressions, it shouldn't do anything
+ in the implementation of this method.
+
+ The transformation object. This delegate is called for each within this
+ item, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Invokes the given via reflection on the given .
+
+ The input to invoke the method with.
+ The method to be invoked.
+ The result of the invocation
+
+
+
+ Gets the constant value of the given expression, assuming it is a . If it is
+ not, an is thrown.
+
+ The expected value type. If the value is not of this type, an is thrown.
+ A string describing the value; this will be included in the exception message if an exception is thrown.
+ The expression whose value to get.
+
+ The constant value of the given .
+
+
+
+
+ Represents aggregating the items returned by a query into a single value with an initial seeding value.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Aggregate" call in the following example corresponds to an .
+
+ var result = (from s in Students
+ select s).Aggregate(0, (totalAge, s) => totalAge + s.Age);
+
+
+
+
+
+ Represents a that is executed on a sequence, returning a scalar value or single item as its result.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The seed expression.
+ The aggregating function. This is a taking a parameter that represents the value accumulated so
+ far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators
+ are represented as expressions containing nodes.
+ The result selector, can be .
+
+
+
+ Gets the constant value of the property, assuming it is a . If it is
+ not, an is thrown.
+
+ The expected seed type. If the item is not of this type, an is thrown.
+ The constant value of the property.
+
+
+
+
+
+
+ Executes the aggregating operation in memory.
+
+ The type of the source items.
+ The type of the aggregated items.
+ The type of the result items.
+ The input sequence.
+ A object holding the aggregated value.
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets or sets the aggregating function. This is a taking a parameter that represents the value accumulated so
+ far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators
+ are represented as expressions containing nodes.
+
+ The aggregating function.
+
+
+
+ Gets or sets the seed of the accumulation. This is an denoting the starting value of the aggregation.
+
+ The seed of the accumulation.
+
+
+
+ Gets or sets the result selector. This is a applied after the aggregation to select the final value.
+ Can be .
+
+ The result selector.
+
+
+
+ Represents aggregating the items returned by a query into a single value. The first item is used as the seeding value for the aggregating
+ function.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Aggregate" call in the following example corresponds to an .
+
+ var result = (from s in Students
+ select s.Name).Aggregate((allNames, name) => allNames + " " + name);
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The aggregating function. This is a taking a parameter that represents the value accumulated so
+ far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators
+ are represented as expressions containing nodes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets or sets the aggregating function. This is a taking a parameter that represents the value accumulated so
+ far and returns a new accumulated value. This is a resolved expression, i.e. items streaming in from prior clauses and result operators
+ are represented as expressions containing nodes.
+
+ The aggregating function.
+
+
+
+ Represents a check whether all items returned by a query satisfy a predicate.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "All" call in the following example corresponds to an .
+
+ var result = (from s in Students
+ select s).All();
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The predicate to evaluate. This is a resolved version of the body of the that would be
+ passed to .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets or sets the predicate to evaluate on all items in the sequence.
+ This is a resolved version of the body of the that would be
+ passed to .
+
+ The predicate.
+
+
+
+ Represents a check whether any items are returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ "Any" query methods taking a predicate are represented as into a combination of a and an
+ .
+
+
+ In C#, the "Any" call in the following example corresponds to an .
+
+ var result = (from s in Students
+ select s).Any();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Represents a calculation of an average value from the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Average" call in the following example corresponds to an .
+
+ var query = (from s in Students
+ select s.ID).Average();
+
+
+
+
+
+
+
+
+ Represents a cast of the items returned by a query to a different type.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, "Cast" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s.ID).Cast<int>();
+
+
+
+
+
+ Represents a that is executed on a sequence, returning a new sequence as its result.
+
+
+
+
+
+
+
+ Represents a that is executed on a sequence, choosing a single item for its result.
+
+
+
+
+ Represents concatenating the items returned by a query with a given set of items, similar to the but
+ retaining duplicates (and order).
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Concat" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Concat(students2);
+
+
+
+
+
+ Gets the value of , assuming holds a . If it doesn't,
+ an is thrown.
+
+ The constant value of .
+
+
+
+ Gets or sets the second source of this result operator, that is, an enumerable containing the items concatenated with the input sequence.
+
+
+
+
+ Represents a check whether the results returned by a query contain a specific item.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Contains" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Contains (student);
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The item for which to be searched.
+
+
+
+ Gets the constant value of the property, assuming it is a . If it is
+ not, an is thrown.
+
+ The expected item type. If the item is not of this type, an is thrown.
+ The constant value of the property.
+
+
+
+ Gets or sets an expression yielding the item for which to be searched. This must be compatible with (ie., assignable to) the source sequence
+ items.
+
+ The item expression.
+
+
+
+ Represents counting the number of items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ "Count" query methods taking a predicate are represented as a combination of a and a .
+ ///
+ In C#, the "Count" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Count();
+
+
+
+
+
+
+
+
+ Represents a guard clause yielding a singleton sequence with a default value if no items are returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Defaultifempty" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).DefaultIfEmpty ("student");
+
+
+
+
+
+ Represents a that is executed on a sequence, returning a new sequence with the same
+ item type as its result.
+
+
+
+
+ Gets the constant value of the property, assuming it is a . If it is
+ not, an is thrown. If it is , is returned.
+
+ The constant value of the property.
+
+
+
+ Gets or sets the optional default value.
+
+ The optional default value.
+
+
+
+ Represents the removal of duplicate values from the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Distinct" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Distinct();
+
+
+
+
+
+
+
+
+ Represents the removal of a given set of items from the result set of a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Except" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Except(students2);
+
+
+
+
+
+ Gets the value of , assuming holds a . If it doesn't,
+ an is thrown.
+
+ The constant value of .
+
+
+
+ Gets or sets the second source of this result operator, that is, an enumerable containing the items removed from the input sequence.
+
+
+
+
+ Represents taking only the first of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ "First" query methods taking a predicate are represented as a combination of a and a .
+
+
+ In C#, the "First" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).First();
+
+
+
+
+
+ Initializes a new instance of the .
+
+ The flag defines if a default expression should be regarded.
+
+
+
+
+
+
+ Represents grouping the items returned by a query according to some key retrieved by a , applying by an
+ to the grouped items. This is a result operator, operating on the whole result set of the query.
+
+
+ In C#, the "group by" clause in the following sample corresponds to a . "s" (a reference to the query source
+ "s", see ) is the expression, "s.Country" is the
+ expression:
+
+ var query = from s in Students
+ where s.First == "Hugo"
+ group s by s.Country;
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ A name associated with the items generated by the result operator.
+ The selector retrieving the key by which to group items.
+ The selector retrieving the elements to group.
+
+
+
+ Clones this clause, adjusting all instances held by it as defined by
+ .
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Gets or sets the name of the items generated by this .
+
+
+ Item names are inferred when a query expression is parsed, and they usually correspond to the variable names present in that expression.
+ However, note that names are not necessarily unique within a . Use names only for readability and debugging, not for
+ uniquely identifying objects. To match an with its references, use the
+ property rather than the .
+
+
+
+
+ Gets or sets the type of the items generated by this . The item type is an instantiation of
+ derived from the types of and .
+
+
+
+
+ Gets or sets the selector retrieving the key by which to group items.
+ This is a resolved version of the body of the that would be
+ passed to .
+
+ The key selector.
+
+
+
+ Gets or sets the selector retrieving the elements to group.
+ This is a resolved version of the body of the that would be
+ passed to .
+
+ The element selector.
+
+
+
+ Represents taking the mathematical intersection of a given set of items and the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Intersect" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Intersect(students2);
+
+
+
+
+
+ Gets the value of , assuming holds a . If it doesn't,
+ an is thrown.
+
+ The constant value of .
+
+
+
+ Gets or sets the second source of this result operator, that is, an enumerable containing the items intersected with the input sequence.
+
+
+
+
+ Represents taking only the last one of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ "Last" query methods taking a predicate are represented as a combination of a and a .
+
+
+ In C#, the "Last" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Last();
+
+
+
+
+
+ Initializes a new instance of the .
+
+ The flag defines if a default expression should be regarded.
+
+
+
+
+
+
+ Represents counting the number of items returned by a query as a 64-bit number.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ "LongCount" query methods taking a predicate are represented as a combination of a and a
+ .
+
+
+ In C#, the "LongCount" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).LongCount();
+
+
+
+
+
+
+
+
+ Represents taking only the greatest one of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ The semantics of "greatest" are defined by the query provider. "Max" query methods taking a selector are represented as a combination
+ of a and a .
+
+
+ In C#, the "Max" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s.ID).Max();
+
+
+
+
+
+ Initializes a new instance of the .
+
+
+
+
+
+
+
+ Represents taking only the smallest one of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ The semantics of "smallest" are defined by the query provider. "Min" query methods taking a selector are represented as a combination
+ of a and a .
+
+
+ In C#, the "Min" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s.ID).Min();
+
+
+
+
+
+ Initializes a new instance of the .
+
+
+
+
+
+
+
+ Represents filtering the items returned by a query to only return those items that are of a specific type.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "OfType" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s.ID).OfType<int>();
+
+
+
+
+
+
+
+
+ Represents reversing the sequence of items returned by of a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Reverse" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Reverse();
+
+
+
+
+
+
+
+
+ Represents taking the single item returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Single" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Single();
+
+
+
+
+
+ Initializes a new instance of the .
+
+ The flag defines if a default expression should be regarded.
+
+
+
+
+
+
+ Represents skipping a number of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Skip" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Skip (3);
+
+
+
+
+
+ Gets the constant value of the property, assuming it is a . If it is
+ not, an is thrown.
+
+ The constant value of the property.
+
+
+
+ Represents calculating the sum of the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Sum" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s.ID).Sum();
+
+
+
+
+
+
+
+
+ Represents taking only a specific number of items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Take" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Take(3);
+
+
+
+
+
+ Initializes a new instance of the .
+
+ The number of elements which should be returned.
+
+
+
+ Gets the constant value of the property, assuming it is a . If it is
+ not, an is thrown.
+
+ The constant value of the property.
+
+
+
+ Represents forming the mathematical union of a given set of items and the items returned by a query.
+ This is a result operator, operating on the whole result set of a query.
+
+
+ In C#, the "Union" call in the following example corresponds to a .
+
+ var query = (from s in Students
+ select s).Union(students2);
+
+
+
+
+
+ Gets the value of , assuming holds a . If it doesn't,
+ an is thrown.
+
+ The constant value of .
+
+
+
+ Gets or sets the second source of this result operator, that is, an enumerable containing the items united with the input sequence.
+
+
+
+
+ Represents the select part of a query, projecting data items according to some .
+
+
+ In C#, the "select" clause in the following sample corresponds to a . "s" (a reference to the query source "s", see
+ ) is the expression:
+
+ var query = from s in Students
+ where s.First == "Hugo"
+ select s;
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The selector that projects the data items.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+
+
+
+ Clones this clause.
+
+ The clones of all query source clauses are registered with this .
+ A clone of this clause.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Gets an object describing the data streaming out of this . If a query ends with
+ the , this corresponds to the query's output data. If a query has , the data
+ is further modified by those operators. Use to obtain the real result type of
+ a query model, including the .
+
+ Gets a object describing the data streaming out of this .
+
+ The data streamed from a is always of type instantiated
+ with the type of as its generic parameter. Its corresponds to the
+ .
+
+
+
+
+ Gets the selector defining what parts of the data items are returned by the query.
+
+
+
+
+ Holds the data needed to represent the output or input of a part of a query in memory. This is mainly used for
+ . The data held by implementations of this interface can be either a value or a sequence.
+
+
+
+
+ Gets an object describing the data held by this instance.
+
+ An object describing the data held by this instance.
+
+
+
+ Gets the value held by this instance.
+
+ The value.
+
+
+
+ Describes the data streamed out of a or .
+
+
+
+
+ Executes the specified with the given , calling either
+ or , depending on the type of data streamed
+ from this interface.
+
+ The query model to be executed.
+ The executor to use.
+ An object holding the results of the query execution.
+
+
+
+ Returns a new of the same type as this instance, but with a new .
+
+ The type to use for the property. The type must be compatible with the data described by this
+ , otherwise an exception is thrown.
+ The type may be a generic type definition if the supports generic types; in this case,
+ the type definition is automatically closed with generic parameters to match the data described by this .
+ A new of the same type as this instance, but with a new .
+ The is not compatible with the data described by this
+ .
+
+
+
+ Gets the type of the data described by this instance. For a sequence, this is a type implementing
+ , where T is instantiated with a concrete type. For a single value, this is the value type.
+
+
+
+
+ Describes a scalar value streamed out of a or . A scalar value corresponds to a
+ value calculated from the result set, as produced by or , for instance.
+
+
+
+
+ Describes a single or scalar value streamed out of a or .
+
+
+
+
+
+
+
+ Returns a new instance of the same type with a different .
+
+ The new data type.
+ The cannot be used for the clone.
+ A new instance of the same type with the given .
+
+
+
+
+
+
+ Gets the type of the data described by this instance. This is the type of the streamed value, or
+ if the value is .
+
+
+
+
+ Holds the data needed to represent the output or input of a part of a query in memory. This is mainly used for
+ . The data consists of a sequence of items.
+
+
+
+
+ Initializes a new instance of the class, setting the and
+ properties.
+
+ The sequence.
+ An instance of describing the sequence.
+
+
+
+ Gets the current sequence held by this object as well as an describing the
+ sequence's items, throwing an exception if the object does not hold a sequence of items of type .
+
+ The expected item type of the sequence.
+
+ The sequence and an describing its items.
+
+ Thrown when the item type is not the expected type .
+
+
+
+ Gets the current sequence for the operation. If the object is used as input, this
+ holds the input sequence for the operation. If the object is used as output, this holds the result of the operation.
+
+ The current sequence.
+
+
+
+ Describes sequence data streamed out of a or . Sequence data can be held by an object
+ implementing , and its items are described via a .
+
+
+
+
+ Returns a new with an adjusted .
+
+ The type to use for the property. The type must be convertible from the previous type, otherwise
+ an exception is thrown. The type may be a generic type definition; in this case,
+ the type definition is automatically closed with the type of the .
+
+ A new with a new .
+
+ The is not compatible with the items described by this
+ .
+
+
+
+ Gets the type of the items returned by the sequence described by this object, as defined by . Note that because
+ is covariant starting from .NET 4.0, this may be a more abstract type than what's returned by
+ 's property.
+
+
+
+
+ Gets an expression that describes the structure of the items held by the sequence described by this object.
+
+ The expression for the sequence's items.
+
+
+
+ Gets the type of the data described by this instance. This is a type implementing
+ , where T is instantiated with a concrete type.
+
+
+
+
+ Describes a single value streamed out of a or . A single value corresponds to one
+ item from the result set, as produced by or , for instance.
+
+
+
+
+ Holds the data needed to represent the output or input of a part of a query in memory. This is mainly used for
+ . The data is a single, non-sequence value and can only be consumed by result operators
+ working with single values.
+
+
+
+
+ Initializes a new instance of the class, setting the and properties.
+
+ The value.
+ A describing the value.
+
+
+
+ Gets the value held by , throwing an exception if the value is not of type .
+
+ The expected type of the value.
+ , cast to .
+ Thrown when if not of the expected type.
+
+
+
+ Gets an object describing the data held by this instance.
+
+
+ An object describing the data held by this instance.
+
+
+
+
+ Gets the current value for the operation. If the object is used as input, this
+ holds the input value for the operation. If the object is used as output, this holds the result of the operation.
+
+ The current value.
+
+
+
+ Represents the where part of a query, filtering data items according to some .
+
+
+ In C#, the "where" clause in the following sample corresponds to a :
+
+ var query = from s in Students
+ where s.First == "Hugo"
+ select s;
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The predicate used to filter data items.
+
+
+
+ Accepts the specified visitor by calling its method.
+
+ The visitor to accept.
+ The query model in whose context this clause is visited.
+ The index of this clause in the 's collection.
+
+
+
+ Transforms all the expressions in this clause and its child objects via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ clause, and those expressions will be replaced with what the delegate returns.
+
+
+
+ Clones this clause.
+
+ The clones of all query source clauses are registered with this .
+
+
+
+
+ Gets the predicate, the expression representing the where condition by which the data items are filtered
+
+
+
+
+ Provides a way to enumerate an while items are inserted, removed, or cleared in a consistent fashion.
+
+ The element type of the .
+
+ This class subscribes to the event exposed by
+ and reacts on changes to the collection. If an item is inserted or removed before the current element, the enumerator will continue after
+ the current element without regarding the new or removed item. If the current item is removed, the enumerator will continue with the item that
+ previously followed the current item. If an item is inserted or removed after the current element, the enumerator will simply continue,
+ including the newly inserted item and not including the removed item. If an item is moved or replaced, the enumeration will also continue
+ with the item located at the next position in the sequence.
+
+
+
+
+ Represents an item enumerated by . This provides access
+ to the as well as the of the enumerated item.
+
+
+
+
+ Gets the index of the current enumerated item. Can only be called while enumerating, afterwards, it will throw an
+ . If an item is inserted into or removed from the collection before the current item, this
+ index will change.
+
+
+
+
+ Gets the value of the current enumerated item. Can only be called while enumerating, afterwards, it will throw an
+ .
+
+ The value.
+
+
+
+ Defines extension methods that simplify working with a dictionary that has a collection-values item-type.
+
+
+
+
+ Extension methods for
+
+
+
+
+ Returns an instance of that represents this collection and can be enumerated even while the collection changes;
+ the enumerator will adapt to the changes (see ).
+
+
+
+
+ Returns an instance of that represents this collection and can be enumerated even while the collection changes;
+ the enumerator will adapt to the changes (see ). The enumerable will yield
+ instances of type , which hold both the index and the value of the current item. If this collection changes
+ while enumerating, will reflect those changes.
+
+
+
+
+ Represents a default implementation of that is automatically used by
+ unless a custom is specified. The executes queries by parsing them into
+ an instance of type , which is then passed to an implementation of to obtain the
+ result set.
+
+
+
+
+ Provides a default implementation of that executes queries (subclasses of ) by
+ first parsing them into a and then passing that to a given implementation of .
+ Usually, should be used unless must be manually implemented.
+
+
+
+
+ Initializes a new instance of using a custom . Use this
+ constructor to customize how queries are parsed.
+
+ The used to parse queries. Specify an instance of
+ for default behavior.
+ The used to execute queries against a specific query backend.
+
+
+
+ Constructs an object that can evaluate the query represented by a specified expression tree. This
+ method delegates to .
+
+ An expression tree that represents a LINQ query.
+
+ An that can evaluate the query represented by the specified expression tree.
+
+
+
+
+ Constructs an object that can evaluate the query represented by a specified expression tree. This method is
+ called by the standard query operators defined by the class.
+
+ An expression tree that represents a LINQ query.
+
+ An that can evaluate the query represented by the specified expression tree.
+
+
+
+
+ Executes the query defined by the specified expression by parsing it with a
+ and then running it through the .
+ This method is invoked through the interface methods, for example by
+ and
+ , and it's also used by
+ when the is enumerated.
+
+
+ Override this method to replace the query execution mechanism by a custom implementation.
+
+
+
+
+ Executes the query defined by the specified expression by parsing it with a
+ and then running it through the .
+ The result is cast to .
+
+ The type of the query result.
+ The query expression to be executed.
+ The result of the query cast to .
+
+ This method is called by the standard query operators that return a single value, such as
+ or
+ .
+ In addition, it is called by to execute queries that return sequences.
+
+
+
+
+ Executes the query defined by the specified expression by parsing it with a
+ and then running it through the .
+
+ The query expression to be executed.
+ The result of the query.
+
+ This method is similar to the method, but without the cast to a defined return type.
+
+
+
+
+ The method generates a .
+
+ The query as expression chain.
+ a
+
+
+
+ Gets the used by this to parse LINQ queries.
+
+ The query parser.
+
+
+
+ Gets or sets the implementation of used to execute queries created via .
+
+ The executor used to execute queries.
+
+
+
+ Initializes a new instance of using a custom .
+
+
+ A type implementing . This type is used to construct the chain of query operators. Must be a generic type
+ definition.
+
+ The used to parse queries. Specify an instance of
+ for default behavior. See also .
+ The used to execute queries against a specific query backend.
+
+
+
+ Creates a new (of type with as its generic argument) that
+ represents the query defined by and is able to enumerate its results.
+
+ The type of the data items returned by the query.
+ An expression representing the query for which a should be created.
+ An that represents the query defined by .
+
+
+
+ Gets the type of queryable created by this provider. This is the generic type definition of an implementation of
+ (usually a subclass of ) with exactly one type argument.
+
+
+
+
+ Constitutes the bridge between re-linq and a concrete query provider implementation. Concrete providers implement this interface
+ and calls the respective method of the interface implementation when a query is to be executed.
+
+
+
+
+ Executes the given as a scalar query, i.e. as a query returning a scalar value of type .
+ The query ends with a scalar result operator, for example a or a .
+
+ The type of the scalar value returned by the query.
+ The representing the query to be executed. Analyze this via an
+ .
+ A scalar value of type that represents the query's result.
+
+ The difference between and is in the kind of object that is returned.
+ is used when a query that would otherwise return a collection result set should pick a single value from the
+ set, for example the first, last, minimum, maximum, or only value in the set. is used when a value is
+ calculated or aggregated from all the values in the collection result set. This applies to, for example, item counts, average calculations,
+ checks for the existence of a specific item, and so on.
+
+
+
+
+ Executes the given as a single object query, i.e. as a query returning a single object of type
+ .
+ The query ends with a single result operator, for example a or a .
+
+ The type of the single value returned by the query.
+ The representing the query to be executed. Analyze this via an
+ .
+ If , the executor must return a default value when its result set is empty;
+ if , it should throw an when its result set is empty.
+ A single value of type that represents the query's result.
+
+ The difference between and is in the kind of object that is returned.
+ is used when a query that would otherwise return a collection result set should pick a single value from the
+ set, for example the first, last, minimum, maximum, or only value in the set. is used when a value is
+ calculated or aggregated from all the values in the collection result set. This applies to, for example, item counts, average calculations,
+ checks for the existence of a specific item, and so on.
+
+
+
+
+ Executes the given as a collection query, i.e. as a query returning objects of type .
+ The query does not end with a scalar result operator, but it can end with a single result operator, for example
+ or . In such a case, the returned enumerable must yield exactly
+ one object (or none if the last result operator allows empty result sets).
+
+ The type of the items returned by the query.
+ The representing the query to be executed. Analyze this via an
+ .
+ A scalar value of type that represents the query's result.
+
+
+
+ Defines an interface for visiting the clauses of a .
+
+
+
+ When implement this interface, implement , then call Accept on every clause that should
+ be visited. Child clauses, joins, orderings, and result operators are not visited automatically; they always need to be explicitly visited
+ via , , ,
+ , and so on.
+
+
+ provides a robust default implementation of this interface that can be used as a base for other visitors.
+
+
+
+
+
+ Represents a being bound to an associated instance. This binding's
+ method returns only for the same the expression is bound to.
+
+
+
+
+
+ Represents a being bound to an associated instance. This is used by the
+ to represent assignments in constructor calls such as new AnonymousType (a = 5) ,
+ where a is the member of AnonymousType and 5 is the associated expression.
+ The method can be used to check whether the member bound to an expression matches a given
+ (considering read access). See the subclasses for details.
+
+
+
+
+ Represents a being bound to an associated instance.
+
+ This binding's
+ method returns for the same the expression is bound to or for a
+ whose getter method is the the expression is bound to.
+
+
+
+
+ Represents a being bound to an associated instance.
+
+ This binding's
+ method returns for the same the expression is bound to
+ or for its getter method's .
+
+
+
+
+ Replaces nodes according to a given mapping specification. Expressions are also replaced within subqueries; the
+ is changed by the replacement operations, it is not copied. The replacement node is not recursively searched for
+ occurrences of nodes to be replaced.
+
+
+
+
+ Takes an expression tree and first analyzes it for evaluatable subtrees (using ), i.e.
+ subtrees that can be pre-evaluated before actually generating the query. Examples for evaluatable subtrees are operations on constant
+ values (constant folding), access to closure variables (variables used by the LINQ query that are defined in an outer scope), or method
+ calls on known objects or their members. In a second step, it replaces all of the evaluatable subtrees (top-down and non-recursive) by
+ their evaluated counterparts.
+
+
+ This visitor visits each tree node at most twice: once via the for analysis and once
+ again to replace nodes if possible (unless the parent node has already been replaced).
+
+
+
+
+ Takes an expression tree and finds and evaluates all its evaluatable subtrees.
+
+
+
+
+ Evaluates an evaluatable subtree, i.e. an independent expression tree that is compilable and executable
+ without any data being passed in. The result of the evaluation is returned as a ; if the subtree
+ is already a , no evaluation is performed.
+
+ The subtree to be evaluated.
+ A holding the result of the evaluation.
+
+
+
+ Replaces all nodes that equal a given with a replacement node. Expressions are also replaced within subqueries; the
+ is changed by the replacement operations, it is not copied. The replacement node is not recursively searched for
+ occurrences of the to be replaced.
+
+
+
+
+ Preprocesses an expression tree for parsing. The preprocessing involves detection of sub-queries and VB-specific expressions.
+
+
+
+
+ Transforms a given . If the can handle the ,
+ it should return a new, transformed instance. Otherwise, it should return the input
+ instance.
+
+ The expression to be transformed.
+ The result of the transformation, or if no transformation was applied.
+
+
+
+ Manages registration and lookup of objects, and converts them to
+ weakly typed instances. Use this class together with
+ in order to apply the registered transformers to an tree.
+
+
+
+
+ defines an API for classes returning instances for specific
+ objects. Usually, the will be used when an implementation of this
+ interface is needed.
+
+
+
+
+ Gets the transformers for the given .
+
+ The to be transformed.
+
+ A sequence containing objects that should be applied to the . Must not
+ be .
+
+
+
+
+ Creates an with the default transformations provided by this library already registered.
+ New transformers can be registered by calling .
+
+ A default .
+
+ Currently, the default registry contains:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Registers the specified for the transformer's
+ . If
+ returns , the is registered as a generic transformer which will be applied to all
+ nodes.
+
+ The type of expressions handled by the . This should be a type implemented by all
+ expressions identified by . For generic transformers,
+ must be .
+ The transformer to register.
+
+
+ The order in which transformers are registered is the same order on which they will later be applied by
+ . When more than one transformer is registered for a certain ,
+ each of them will get a chance to transform a given , until the first one returns a new .
+ At that point, the transformation will start again with the new (and, if the expression's type has changed, potentially
+ different transformers).
+
+
+ When generic transformers are registered, they act as if they had been registered for all values (including
+ custom ones). They will be applied in the order registered, but only after all respective specific transformers have run (without modifying
+ the expression, which would restart the transformation process with the new expression as explained above).
+
+
+ When an is registered for an incompatible , this is not detected until
+ the transformer is actually applied to an of that .
+
+
+
+
+
+ is implemented by classes that transform instances. The
+ manages registration of instances, and the
+ applies the transformations.
+
+ The type of expressions handled by this implementation.
+
+
+ is a convenience interface that provides strong typing, whereas
+ only operates on instances.
+
+
+ can be used together with the class by using the
+ class as the transformation provider. converts
+ strongly typed instances to weakly typed delegate instances.
+
+
+
+
+
+ Transforms a given . If the implementation can handle the ,
+ it should return a new, transformed instance. Otherwise, it should return the input
+ instance.
+
+ The expression to be transformed.
+ The result of the transformation, or if no transformation was applied.
+
+
+
+ Gets the expression types supported by this .
+
+ The supported expression types. Return to support all expression types. (This is only sensible when
+ is .)
+
+
+
+
+ Dynamically discovers attributes implementing the interface on methods and get accessors
+ invoked by or instances and applies the respective
+ .
+
+
+
+
+ Defines an interface for attributes providing an for a given .
+
+
+
+ detects attributes implementing this interface while expressions are parsed
+ and uses the returned by to modify the expressions.
+
+
+ Only one attribute instance implementing must be applied to a single method or property
+ get accessor.
+
+
+
+
+
+ Detects nodes for and adds metadata to those nodes.
+ This allows LINQ providers to match member access and constructor arguments more easily.
+
+
+
+
+ Provides a base class for transformers detecting nodes for tuple types and adding metadata
+ to those nodes. This allows LINQ providers to match member access and constructor arguments more easily.
+
+
+
+
+ Detects expressions invoking a and replaces them with the body of that
+ (with the parameter references replaced with the invocation arguments).
+ Providers use this transformation to be able to handle queries with instances.
+
+
+ When the is applied to a delegate instance (rather than a
+ ), the ignores it.
+
+
+
+
+ Detects nodes for and adds metadata to those nodes.
+ This allows LINQ providers to match member access and constructor arguments more easily.
+
+
+
+
+ Chooses a given for a specific method (or property get accessor).
+
+
+ The must have a default constructor. To choose a transformer that does not have a default constructor,
+ create your own custom attribute class implementing
+ .
+
+
+
+
+ Replaces calls to and with casts and null checks. This allows LINQ providers
+ to treat nullables like reference types.
+
+
+
+
+ Detects nodes for the .NET tuple types and adds metadata to those nodes.
+ This allows LINQ providers to match member access and constructor arguments more easily.
+
+
+
+
+ Detects expressions calling the CompareString method used by Visual Basic .NET, and replaces them with
+ instances. Providers use this transformation to be able to handle VB string comparisons
+ more easily. See for details.
+
+
+
+
+ Detects expressions calling the Information.IsNothing (...) method used by Visual Basic .NET, and replaces them with
+ instances comparing with . Providers use this transformation to be able to
+ handle queries using IsNothing (...) more easily.
+
+
+
+
+ Applies delegates obtained from an to an expression tree.
+ The transformations occur in post-order (transforming child nodes before parent nodes). When a transformation changes
+ the current , its child nodes and itself will be revisited (and may be transformed again).
+
+
+
+
+ Replaces expression patterns of the form new T { x = 1, y = 2 }.x ( ) or
+ new T ( x = 1, y = 2 ).x ( ) to 1 (or 2 if y is accessed instead of x ).
+ Expressions are also replaced within subqueries; the is changed by the replacement operations, it is not copied.
+
+
+
+
+ Base class for typical implementations of the .
+
+
+
+
+
+
+ The interface defines an extension point for disabling partial evaluation on specific nodes.
+
+
+
+ Implement the individual evaluation methods and return to mark a specfic node as not partially
+ evaluatable. Note that the partial evaluation infrastructure will take care of visiting an node's children,
+ so the determination can usually be constrained to the attributes of the node itself.
+
+ Use the type as a base class for filter implementations that only require testing a few
+ node types, e.g. to disable partial evaluation for individual method calls.
+
+
+
+
+
+
+
+ Analyzes an expression tree by visiting each of its nodes, finding those subtrees that can be evaluated without modifying the meaning of
+ the tree.
+
+
+ An expression node/subtree is evaluatable if:
+
+ - it is not a
or any non-standard expression,
+ - it is not a
that involves an , and
+ - it does not have any of those non-evaluatable expressions as its children.
+
+
+ nodes are not evaluatable because they usually identify the flow of
+ some information from one query node to the next.
+
+ nodes that involve parameters or object instances are not evaluatable because they
+ should usually be translated into the target query syntax.
+
+ In .NET 3.5, non-standard expressions are not evaluatable because they cannot be compiled and evaluated by LINQ.
+ In .NET 4.0, non-standard expressions can be evaluated if they can be reduced to an evaluatable expression.
+
+
+
+
+
+ Determines whether the given is one of the expressions defined by for which
+ has a dedicated Visit method. handles those by calling the respective Visit method.
+
+ The expression to check. Must not be .
+
+ if is one of the expressions defined by and
+ has a dedicated Visit method for it; otherwise, .
+ Note that -type expressions are considered 'not supported' and will also return .
+
+
+
+
+ Implementation of the null-object pattern for .
+
+
+
+
+
+ Parses an expression tree into a chain of objects after executing a sequence of
+ objects.
+
+
+
+
+ Creates a default that already has all expression node parser defined by the re-linq assembly
+ registered. Users can add inner providers to register their own expression node parsers.
+
+ A default that already has all expression node parser defined by the re-linq assembly
+ registered.
+
+
+
+ Creates a default that already has the expression tree processing steps defined by the re-linq assembly
+ registered. Users can insert additional processing steps.
+
+
+ The tranformation provider to be used by the included
+ in the result set. Use to create a default provider.
+
+
+ The expression filter used by the included in the result set.
+ Use to indicate that no custom filtering should be applied.
+
+
+ A default that already has all expression tree processing steps defined by the re-linq assembly
+ registered.
+
+
+ The following steps are included:
+
+
+ (parameterized with )
+
+
+
+
+
+ Initializes a new instance of the class with a custom and
+ implementation.
+
+ The to use when parsing trees. Use
+ to create an instance of that already includes all
+ default node types. (The can be customized as needed by adding or removing
+ ).
+ The to apply to trees before parsing their nodes. Use
+ to create an instance of that already includes
+ the default steps. (The can be customized as needed by adding or removing
+ ).
+
+
+
+ Parses the given into a chain of instances, using
+ to convert expressions to nodes.
+
+ The expression tree to parse.
+ A chain of instances representing the .
+
+
+
+ Gets the query operator represented by . If
+ is already a , that is the assumed query operator. If is a
+ and the member's getter is registered with , a corresponding
+ is constructed and returned. Otherwise, is returned.
+
+ The expression to get a query operator expression for.
+ A to be parsed as a query operator, or if the expression does not represent
+ a query operator.
+
+
+
+ Infers the associated identifier for the source expression node contained in methodCallExpression.Arguments[0]. For example, for the
+ call chain "source.Where (i => i > 5) " (which actually reads "Where (source, i => i > 5 "), the identifier "i" is associated
+ with the node generated for "source". If no identifier can be inferred, is returned.
+
+
+
+
+ Gets the node type provider used to parse instances in .
+
+ The node type provider.
+
+
+
+ Gets the processing steps used by to process the tree before analyzing its structure.
+
+ The processing steps.
+
+
+
+ Implements by storing a list of inner instances.
+ The method calls each inner instance in the order defined by the property. This is an
+ implementation of the Composite Pattern.
+
+
+
+
+ is implemented by classes that represent steps in the process of parsing the structure
+ of an tree. applies a series of these steps to the
+ tree before analyzing the query operators and creating a .
+
+
+
+ There are predefined implementations of that should only be left out when parsing an
+ tree when there are very good reasons to do so.
+
+
+ can be implemented to provide custom, complex transformations on an
+ tree. For performance reasons, avoid adding too many steps each of which visits the whole tree. For
+ simple transformations, consider using and - which can
+ batch several transformations into a single expression tree visiting run - rather than implementing a dedicated
+ .
+
+
+
+
+
+ Implements the interface by doing nothing in the method. This is an
+ implementation of the Null Object Pattern.
+
+
+
+
+ Analyzes an tree for sub-trees that are evaluatable in-memory, and evaluates those sub-trees.
+
+
+ The uses the for partial evaluation.
+ It performs two visiting runs over the tree.
+
+
+
+
+ Applies a given set of transformations to an tree. The transformations are provided by an instance of
+ (eg., ).
+
+
+ The uses the to apply the transformations.
+ It performs a single visiting run over the tree.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A class providing the transformations to apply to the tree, eg., an instance of
+ .
+
+
+
+ Provides a common interface for classes mapping a to the respective
+ type. Implementations are used by when a is encountered to
+ instantiate the right for the given method.
+
+
+
+
+ Determines whether a node type for the given can be returned by this
+ .
+
+
+
+
+ Gets the type of that matches the given , returning
+ if none can be found.
+
+
+
+
+ Represents a for the
+ and methods.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Acts as a base class for s standing for s that operate on the result of the query
+ rather than representing actual clauses, such as or .
+
+
+
+
+ Base class for implementations that represent instantiations of .
+
+
+
+
+ Interface for classes representing structural parts of an tree.
+
+
+
+
+ Resolves the specified by replacing any occurrence of
+ by the result of the projection of this . The result is an that goes all the
+ way to an .
+
+ The parameter representing the input data streaming into an . This is replaced
+ by the projection data coming out of this .
+ The expression to be resolved. Any occurrence of in this expression
+ is replaced.
+ Context information used during the current parsing process. This structure maps
+ s to the clauses created from them. Implementers that also implement
+ (such as or ) must add
+ their clauses to the mapping in if they want to be able to implement correctly.
+ An equivalent of with each occurrence of replaced by
+ the projection data streaming out of this .
+
+ This node does not support this operation because it does not stream any data to subsequent nodes.
+
+
+
+
+ Applies this to the specified query model. Nodes can add or replace clauses, add or replace expressions,
+ add or replace objects, or even create a completely new , depending on their semantics.
+
+ The query model this node should be applied to.
+ Context information used during the current parsing process. This structure maps
+ s to the clauses created from them. Implementers that
+ also implement (such as
+ or ) must add their clauses to the mapping in
+ in order to be able to implement correctly.
+ The modified or a new that reflects the changes made by this node.
+
+ For objects, which mark the end of an chain, this method must not be called.
+ Instead, use to generate a and instantiate a new
+ with that clause.
+
+
+
+
+ Gets the source that streams data into this node.
+
+ The source , or if this node is the end of the chain.
+
+
+
+ Gets the identifier associated with this . tries to find the identifier
+ that was originally associated with this node in the query written by the user by analyzing the parameter names of the next expression in the
+ method call chain.
+
+ The associated identifier.
+
+
+
+ Wraps the into a subquery after a node that indicates the end of the query (
+ or ). Override this method
+ when implementing a that does not need a subquery to be created if it occurs after the query end.
+
+
+
+ When an ordinary node follows a result operator or group node, it cannot simply append its clauses to the
+ because semantically, the result operator (or grouping) must be executed _before_ the clause. Therefore, in such scenarios, we wrap
+ the current query model into a that we put into the of a new
+ .
+
+
+ This method also changes the of this node because logically, all operations must be handled
+ by the new holding the . For example, consider the following call chain:
+
+ MainSource (...)
+ .Select (x => x)
+ .Distinct ()
+ .Select (x => x)
+
+
+ Naively, the last Select node would resolve (via Distinct and Select) to the created by the initial MainSource.
+ After this method is executed, however, that is part of the sub query, and a new
+ has been created to hold it. Therefore, we replace the chain as follows:
+
+ MainSource (MainSource (...).Select (x => x).Distinct ())
+ .Select (x => x)
+
+
+ Now, the last Select node resolves to the new .
+
+
+
+
+
+ Sets the result type override of the given .
+
+ The query model to set the of.
+
+ By default, the result type override is set to in the method. This ensures that the query
+ model represents the type of the query correctly. Specific node parsers can override this method to set the
+ to another value, or to clear it (set it to ). Do not leave the
+ unchanged when overriding this method, as a source node might have set it to a value that doesn't
+ fit this node.
+
+
+
+
+ Represents a for the
+ , ,
+ , and
+ methods.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for the
+ and
+ methods.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for the ,
+ ,
+ , and
+ methods.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for the different overloads of .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Encapsulates contextual information used while generating clauses from instances.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Acts as a base class for and , i.e., for node parsers for set operations
+ acting as an .
+
+
+
+
+ Interface for classes representing query source parts of an tree.
+
+
+
+
+ Represents a for and
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for ,
+ ,
+ for the Count properties of , , ,
+ and , and for the property of arrays.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for and
+ and
+ and
+
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Thrown whan an parser cannot be instantiated for a query. Note that this is not serializable
+ and intended to be caught in the call-site where it will then replaced by a different (serializable) exception.
+
+
+
+
+ Resolves an expression using , removing transparent identifiers and detecting subqueries
+ in the process. This is used by methods such as , which are
+ used when a clause is created from an .
+
+
+
+
+ Represents a for ,
+ ,
+ or
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for the different
+ overloads that do not take a result selector. The overloads with a result selector are represented by
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for the different
+ overloads that do take a result selector. The overloads without a result selector are represented by
+ .
+ It is generated by when an tree is parsed.
+
+
+ The GroupBy overloads with result selector are parsed as if they were a following a
+ :
+
+ x.GroupBy (k => key, e => element, (k, g) => result)
+
+ is therefore equivalent to:
+
+ c.GroupBy (k => key, e => element).Select (grouping => resultSub)
+
+ where resultSub is the same as result with k and g substituted with grouping.Key and grouping, respectively.
+
+
+
+
+ Represents a for
+
+ or
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for
+
+ or .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for ,
+ ,
+ or
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for ,
+ ,
+ and for the property of arrays.
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents the first expression in a LINQ query, which acts as the main query source.
+ It is generated by when an tree is parsed.
+ This node usually marks the end (i.e. the first node) of an chain that represents a query.
+
+
+
+
+ Represents a for or .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Creates instances of classes implementing the interface via Reflection.
+
+
+ The classes implementing instantiated by this factory must implement a single constructor. The source and
+ constructor parameters handed to the method are passed on to the constructor; for each argument where no
+ parameter is passed, is passed to the constructor.
+
+
+
+
+ Creates an instace of type .
+
+
+ Thrown if the or the
+ do not match expected constructor parameters of the .
+
+
+
+
+ Contains metadata about a that is parsed into a .
+
+
+
+
+ Gets the associated identifier, i.e. the name the user gave the data streaming out of this expression. For example, the
+ corresponding to a from c in C clause should get the identifier "c".
+ If there is no user-defined identifier (or the identifier is impossible to infer from the expression tree), a generated identifier
+ is given instead.
+
+
+
+
+ Gets the source expression node, i.e. the node streaming data into the parsed node.
+
+ The source.
+
+
+
+ Gets the being parsed.
+
+
+
+
+ Represents a for or .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for
+ and .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Provides common functionality used by implementors of .
+
+
+
+
+ Replaces the given parameter with a back-reference to the corresponding to .
+
+ The referenced node.
+ The parameter to replace with a .
+ The expression in which to replace the parameter.
+ The clause generation context.
+ , with replaced with a
+ pointing to the clause corresponding to .
+
+
+
+ Gets the corresponding to the given , throwing an
+ if no such clause has been registered in the given .
+
+ The node for which the should be returned.
+ The clause generation context.
+ The corresponding to .
+
+
+
+ Caches a resolved expression in the classes.
+
+
+
+
+ Represents a for .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ This node represents an additional query source introduced to the query.
+
+
+
+
+ Represents a for ,
+ ,
+ or
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for the different overloads of .
+ It is generated by when an tree is parsed.
+ When this node is used, it marks the beginning (i.e. the last node) of an chain that represents a query.
+
+
+
+
+ Represents a for .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it follows an , an ,
+ a , or a .
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it follows an , an ,
+ a , or a .
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+ When this node is used, it usually follows (or replaces) a of an chain that
+ represents a query.
+
+
+
+
+ Represents a for
+ .
+ It is generated by when an tree is parsed.
+
+
+
+
+ is implemented by classes taking an tree and parsing it into a .
+
+
+ The default implementation of this interface is . LINQ providers can, however, implement
+ themselves, eg. in order to decorate or replace the functionality of .
+
+
+
+
+ Gets the of the given .
+
+ The expression tree to parse.
+ A that represents the query defined in .
+
+
+
+ Parses a and creates an from it. This is used by
+ for parsing whole expression trees.
+
+
+
+
+ Implements by storing a list of inner instances.
+ The and methods delegate to these inner instances. This is an
+ implementation of the Composite Pattern.
+
+
+
+
+ Maps the objects used in objects to the respective
+ types. This is used by when a is encountered to instantiate the
+ right for the given method.
+
+
+
+
+ Creates a and registers all relevant implementations in the Remotion.Linq assembly.
+
+
+ A with all types in the Remotion.Linq assembly registered.
+
+
+
+
+ Gets the registerable method definition from a given . A registerable method is a object
+ that can be registered via a call to . When the given is passed to
+ and its corresponding registerable method was registered, the correct node type is returned.
+
+ The method for which the registerable method should be retrieved. Must not be .
+
+ to throw a if the method cannot be matched to a distinct generic method definition,
+ to return if an unambiguous match is not possible.
+
+
+
+ itself, unless it is a closed generic method or declared in a closed generic type. In the latter cases,
+ the corresponding generic method definition respectively the method declared in a generic type definition is returned.
+
+ If no generic method definition could be matched and was set to ,
+ is returned.
+
+
+
+ Thrown if is set to and no distinct generic method definition could be resolved.
+
+
+
+
+ Registers the specific with the given . The given methods must either be non-generic
+ or open generic method definitions. If a method has already been registered before, the later registration overwrites the earlier one.
+
+
+
+
+ Determines whether the specified method was registered with this .
+
+
+
+
+ Gets the type of registered with this instance that
+ matches the given , returning if none can be found.
+
+
+
+
+ Returns the count of the registered s.
+
+
+
+
+ Maps the objects used in objects to the respective
+ types based on the method names and a filter (as defined by ).
+ This is used by when a is encountered to instantiate the right
+ for the given method.
+
+
+
+
+ Creates a and registers all relevant implementations in the Remotion.Linq assembly.
+
+
+ A with all types in the Remotion.Linq assembly registered.
+
+
+
+
+ Registers the given for the query operator methods defined by the given
+ objects.
+
+ A sequence of objects defining the methods to register the node type for.
+ The type of the to register.
+
+
+
+ Determines whether the specified method was registered with this .
+
+
+
+
+ Gets the type of registered with this instance that
+ matches the given , returning if none can be found.
+
+
+
+
+ Returns the count of the registered method names.
+
+
+
+
+ Defines a name and a filter predicate used when determining the matching expression node type by .
+
+
+
+
+ Takes an tree and parses it into a by use of an .
+ It first transforms the tree into a chain of instances, and then calls
+ and in order to instantiate all the
+ s. With those, a is created and returned.
+
+
+
+
+ Initializes a new instance of the class, using default parameters for parsing.
+ The used has all relevant methods of the class
+ automatically registered, and the comprises partial evaluation, and default
+ expression transformations. See ,
+ , and
+ for details.
+
+
+
+
+ Initializes a new instance of the class, using the given to
+ convert instances into s. Use this constructor if you wish to customize the
+ parser. To use a default parser (with the possibility to register custom node types), use the method.
+
+ The expression tree parser.
+
+
+
+ Gets the of the given .
+
+ The expression tree to parse.
+ A that represents the query defined in .
+
+
+
+ Applies all nodes to a , which is created by the trailing in the
+ chain.
+
+ The entry point to the chain.
+ The clause generation context collecting context information during the parsing process.
+ A created by the training and transformed by each node in the
+ chain.
+
+
+
+ Gets the used by to parse instances.
+
+ The node type registry.
+
+
+
+ Gets the used by to process the tree
+ before analyzing its structure.
+
+ The processor.
+
+
+
+ Implements an that throws an exception for every expression type that is not explicitly supported.
+ Inherit from this class to ensure that an exception is thrown when an expression is passed
+
+
+
+
+ Called when an unhandled item is visited. This method provides the item the visitor cannot handle ( ),
+ the that is not implemented in the visitor, and a delegate that can be used to invoke the
+ of the class. The default behavior of this method is to call the
+ method, but it can be overridden to do something else.
+
+ The type of the item that could not be handled. Either an type, a
+ type, or .
+ The result type expected for the visited .
+ The unhandled item.
+ The visit method that is not implemented.
+ The behavior exposed by for this item type.
+ An object to replace in the expression tree. Alternatively, the method can throw any exception.
+
+
+
+ can be used to build tuples incorporating a sequence of s.
+ For example, given three expressions, exp1, exp2, and exp3, it will build nested s that are equivalent to the
+ following: new KeyValuePair(exp1, new KeyValuePair(exp2, exp3)).
+ Given an whose type matches that of a tuple built by , the builder can also return
+ an enumeration of accessor expressions that can be used to access the tuple elements in the same order as they were put into the nested tuple
+ expression. In above example, this would yield tupleExpression.Key, tupleExpression.Value.Key, and tupleExpression.Value.Value.
+ This class can be handy whenever a set of needs to be put into a single
+ (eg., a select projection), especially if each sub-expression needs to be explicitly accessed at a later point of time (eg., to retrieve the
+ items from a statement surrounding a sub-statement yielding the tuple in its select projection).
+
+
+
+
+ Acts as a common base class for implementations based on re-linq. In a specific LINQ provider, a custom queryable
+ class should be derived from which supplies an implementation of that is used to
+ execute the query. This is then used as an entry point (the main data source) of a LINQ query.
+
+ The type of the result items yielded by this query.
+
+
+
+ Initializes a new instance of the class with a and the given
+ . This constructor should be used by subclasses to begin a new query. The generated by
+ this constructor is a pointing back to this .
+
+ The used to parse queries. Specify an instance of
+ for default behavior. See also .
+ The used to execute the query represented by this .
+
+
+
+ Initializes a new instance of the class with a specific . This constructor
+ should only be used to begin a query when does not fit the requirements.
+
+ The provider used to execute the query represented by this and to construct
+ queries around this .
+
+
+
+ Initializes a new instance of the class with a given and
+ . This is an infrastructure constructor that must be exposed on subclasses because it is used by
+ to construct queries around this when a query method (e.g. of the
+ class) is called.
+
+ The provider used to execute the query represented by this and to construct
+ queries around this .
+ The expression representing the query.
+
+
+
+ Executes the query via the and returns an enumerator that iterates through the items returned by the query.
+
+
+ A that can be used to iterate through the query result.
+
+
+
+
+ Gets the expression tree that is associated with the instance of . This expression describes the
+ query represented by this .
+
+
+
+ The that is associated with this instance of .
+
+
+
+
+ Gets the query provider that is associated with this data source. The provider is used to execute the query. By default, a
+ is used that parses the query and passes it on to an implementation of .
+
+
+
+ The that is associated with this data source.
+
+
+
+
+ Gets the type of the element(s) that are returned when the expression tree associated with this instance of is executed.
+
+
+
+ A that represents the type of the element(s) that are returned when the expression tree associated with this object is executed.
+
+
+
+
+ Provides an abstraction of an expression tree created for a LINQ query. instances are passed to LINQ providers based
+ on re-linq via , but you can also use to parse an expression tree by hand or construct
+ a manually via its constructor.
+
+
+ The different parts of the query are mapped to clauses, see , , and
+ . The simplest way to process all the clauses belonging to a is by implementing
+ (or deriving from ) and calling .
+
+
+
+
+ Initializes a new instance of
+
+ The of the query. This is the starting point of the query, generating items
+ that are filtered and projected by the query.
+ The of the query. This is the end point of
+ the query, it defines what is actually returned for each of the items coming from the and passing the
+ . After it, only the modify the result of the query.
+
+
+
+ Gets an object describing the data streaming out of this . If a query ends with
+ the , this corresponds to . If a query has
+ , the data is further modified by those operators.
+
+ Gets a object describing the data streaming out of this .
+
+ The data streamed from a is often of type instantiated
+ with a specific item type, unless the
+ query ends with a . For example, if the query ends with a , the
+ result type will be .
+
+
+ The is not compatible with the calculated calculated from the .
+
+
+
+
+ Gets the which is used by the .
+
+
+
+
+
+ Accepts an implementation of or , as defined by the Visitor pattern.
+
+
+
+
+ Returns a representation of this .
+
+
+
+
+ Clones this , returning a new equivalent to this instance, but with its clauses being
+ clones of this instance's clauses. Any in the cloned clauses that points back to another clause
+ in this (including its subqueries) is adjusted to point to the respective clones in the cloned
+ . Any subquery nested in the is also cloned.
+
+
+
+
+ Clones this , returning a new equivalent to this instance, but with its clauses being
+ clones of this instance's clauses. Any in the cloned clauses that points back to another clause
+ in this (including its subqueries) is adjusted to point to the respective clones in the cloned
+ . Any subquery nested in the is also cloned.
+
+ The defining how to adjust instances of
+ in the cloned . If there is a
+ that points out of the being cloned, specify its replacement via this parameter. At the end of the cloning process,
+ this object maps all the clauses in this original to the clones created in the process.
+
+
+
+
+ Transforms all the expressions in this 's clauses via the given delegate.
+
+ The transformation object. This delegate is called for each within this
+ , and those expressions will be replaced with what the delegate returns.
+
+
+
+ Returns a new name with the given prefix. The name is different from that of any added
+ in the . Note that clause names that are changed after the clause is added as well as names of other clauses
+ than from clauses are not considered when determining "unique" names. Use names only for readability and debugging, not
+ for uniquely identifying clauses.
+
+
+
+
+ Executes this via the given . By default, this indirectly calls
+ , but this can be modified by the .
+
+ The to use for executing this query.
+
+
+
+ Determines whether this represents an identity query. An identity query is a query without any body clauses
+ whose selects exactly the items produced by its . An identity query can have
+ .
+
+
+ if this represents an identity query; otherwise, .
+
+
+ An example for an identity query is the subquery in that is produced for the in the following
+ query:
+
+ from order in ...
+ select order.OrderItems.Count()
+
+ In this query, the will become a because
+ is treated as a query operator. The
+ in that has no and a trivial ,
+ so its method returns . The outer , on the other hand, does not
+ have a trivial , so its method returns .
+
+
+
+
+ Creates a new that has this as a sub-query in its .
+
+ The name of the new 's .
+ A new whose 's is a
+ that holds this instance.
+
+
+
+ Gets or sets the query's . This is the starting point of the query, generating items that are processed by
+ the and projected or grouped by the .
+
+
+
+
+ Gets or sets the query's select clause. This is the end point of the query, it defines what is actually returned for each of the
+ items coming from the and passing the . After it, only the
+ modify the result of the query.
+
+
+
+
+ Gets a collection representing the query's body clauses. Body clauses take the items generated by the ,
+ filtering ( ), ordering ( ), augmenting ( ), or otherwise
+ processing them before they are passed to the .
+
+
+
+
+ Gets the result operators attached to this . Result operators modify the query's result set, aggregating,
+ filtering, or otherwise processing the result before it is returned.
+
+
+
+
+ Collects clauses and creates a from them. This provides a simple way to first add all the clauses and then
+ create the rather than the two-step approach (first and ,
+ then the s) required by 's constructor.
+
+
+
+
+ Provides a default implementation of which automatically visits child items. That is, the default
+ implementation of automatically calls Accept on all clauses in the
+ and the default implementation of automatically calls on the
+ instances in its collection, and so on.
+
+
+ This visitor is hardened against modifications performed on the visited while the model is currently being visited.
+ That is, if a the collection changes while a body clause (or a child item of a body clause) is currently
+ being processed, the visitor will handle that gracefully. The same applies to and
+ .
+
+
+
+
+ Takes a and transforms it by replacing its instances ( and
+ ) that contain subqueries with equivalent flattened clauses. Subqueries that contain a
+ (such as or ) cannot be
+ flattened.
+
+
+ As an example, take the following query:
+
+ from c in Customers
+ from o in (from oi in OrderInfos where oi.Customer == c orderby oi.OrderDate select oi.Order)
+ orderby o.Product.Name
+ select new { c, o }
+
+ This will be transformed into:
+
+ from c in Customers
+ from oi in OrderInfos
+ where oi.Customer == c
+ orderby oi.OrderDate
+ orderby oi.Order.Product.Name
+ select new { c, oi.Order }
+
+ As another example, take the following query:
+
+ from c in (from o in Orders select o.Customer)
+ where c.Name.StartsWith ("Miller")
+ select c
+
+ (This query is never produced by the , the only way to construct it is via manually building a
+ .)
+ This will be transforemd into:
+
+ from o in Orders
+ where o.Customer.Name.StartsWith ("Miller")
+ select o
+
+
+
+
+
+ Generates unique identifiers based on a set of known identifiers.
+ An identifier is generated by appending a number to a given prefix. The identifier is considered unique when no known identifier
+ exists which equals the prefix/number combination.
+
+
+
+
+ Adds the given to the set of known identifiers.
+
+ The identifier to add.
+
+
+
+ Gets a unique identifier starting with the given . The identifier is generating by appending a number to the
+ prefix so that the resulting string does not match a known identifier.
+
+ The prefix to use for the identifier.
+ A unique identifier starting with .
+
+
+
+ Provides extensions for working with trees.
+
+
+
+
+ Builds a string from the tree, including .NET 3.5.
+
+
+
+
+ Provider a utility API for dealing with the item type of generic collections.
+
+
+
+
+ Tries to extract the item type from the input .
+
+
+ The that might be an implementation of the interface. Must not be .
+
+ An output parameter containing the extracted item or .
+ if an could be extracted, otherwise .
+
+
+
diff --git a/build/approot/packages/Remotion.Linq/2.0.1/lib/net40/Remotion.Linq.dll b/build/approot/packages/Remotion.Linq/2.0.1/lib/net40/Remotion.Linq.dll
new file mode 100644
index 00000000..6bd24179
Binary files /dev/null and b/build/approot/packages/Remotion.Linq/2.0.1/lib/net40/Remotion.Linq.dll differ
diff --git a/build/approot/packages/Remotion.Linq/2.0.1/lib/net45/Remotion.Linq.dll b/build/approot/packages/Remotion.Linq/2.0.1/lib/net45/Remotion.Linq.dll
new file mode 100644
index 00000000..ed9f512e
Binary files /dev/null and b/build/approot/packages/Remotion.Linq/2.0.1/lib/net45/Remotion.Linq.dll differ
diff --git a/build/approot/packages/Remotion.Linq/2.0.1/lib/portable-net45+win+wpa81+wp80/Remotion.Linq.dll b/build/approot/packages/Remotion.Linq/2.0.1/lib/portable-net45+win+wpa81+wp80/Remotion.Linq.dll
new file mode 100644
index 00000000..ed9f512e
Binary files /dev/null and b/build/approot/packages/Remotion.Linq/2.0.1/lib/portable-net45+win+wpa81+wp80/Remotion.Linq.dll differ
diff --git a/build/approot/packages/System.Collections.Immutable/1.1.37/System.Collections.Immutable.nuspec b/build/approot/packages/System.Collections.Immutable/1.1.37/System.Collections.Immutable.nuspec
new file mode 100644
index 00000000..b3279531
--- /dev/null
+++ b/build/approot/packages/System.Collections.Immutable/1.1.37/System.Collections.Immutable.nuspec
@@ -0,0 +1,45 @@
+
+
+
+ System.Collections.Immutable
+ 1.1.37
+ System.Collections.Immutable
+ true
+ Microsoft
+ microsoft,dotnetframework
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. Like strings, any methods that perform modifications will not change the existing instance but instead return a new instance. For efficiency reasons, the implementation uses a sharing mechanism to ensure that newly created instances share as much data as possible with the previous instance while ensuring that operations have a predictable time complexity.
+
+Commonly Used Types:
+System.Collections.Immutable.ImmutableArray
+System.Collections.Immutable.ImmutableArray<T>
+System.Collections.Immutable.ImmutableDictionary
+System.Collections.Immutable.ImmutableDictionary<TKey,TValue>
+System.Collections.Immutable.ImmutableHashSet
+System.Collections.Immutable.ImmutableHashSet<T>
+System.Collections.Immutable.ImmutableList
+System.Collections.Immutable.ImmutableList<T>
+System.Collections.Immutable.ImmutableQueue
+System.Collections.Immutable.ImmutableQueue<T>
+System.Collections.Immutable.ImmutableSortedDictionary
+System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue>
+System.Collections.Immutable.ImmutableSortedSet
+System.Collections.Immutable.ImmutableSortedSet<T>
+System.Collections.Immutable.ImmutableStack
+System.Collections.Immutable.ImmutableStack<T>
+ © Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Collections.Immutable/1.1.37/lib/dotnet/System.Collections.Immutable.dll b/build/approot/packages/System.Collections.Immutable/1.1.37/lib/dotnet/System.Collections.Immutable.dll
new file mode 100644
index 00000000..6fc2d69a
Binary files /dev/null and b/build/approot/packages/System.Collections.Immutable/1.1.37/lib/dotnet/System.Collections.Immutable.dll differ
diff --git a/build/approot/packages/System.Collections.Immutable/1.1.37/lib/portable-net45+win8+wp8+wpa81/System.Collections.Immutable.dll b/build/approot/packages/System.Collections.Immutable/1.1.37/lib/portable-net45+win8+wp8+wpa81/System.Collections.Immutable.dll
new file mode 100644
index 00000000..6fc2d69a
Binary files /dev/null and b/build/approot/packages/System.Collections.Immutable/1.1.37/lib/portable-net45+win8+wp8+wpa81/System.Collections.Immutable.dll differ
diff --git a/build/approot/packages/System.Collections/4.0.0/License.rtf b/build/approot/packages/System.Collections/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.Collections/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Collections/4.0.0/System.Collections.nuspec b/build/approot/packages/System.Collections/4.0.0/System.Collections.nuspec
new file mode 100644
index 00000000..7b6d1845
--- /dev/null
+++ b/build/approot/packages/System.Collections/4.0.0/System.Collections.nuspec
@@ -0,0 +1,43 @@
+
+
+
+ System.Collections
+ 4.0.0
+ System.Collections
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides classes that define generic collections, which allow developers to create strongly typed collections that provide better type safety and performance than non-generic strongly typed collections.
+
+Commonly Used Types:
+System.Collections.Generic.List<T>
+System.Collections.Generic.Dictionary<TKey, TValue>
+System.Collections.Generic.Queue<T>
+System.Collections.Generic.Stack<T>
+System.Collections.Generic.HashSet<T>
+System.Collections.Generic.LinkedList<T>
+System.Collections.Generic.EqualityComparer<T>
+System.Collections.Generic.Comparer<T>
+System.Collections.Generic.SortedDictionary<TKey, TValue>
+ Provides classes that define generic collections, which allow developers to create strongly typed collections that provide better type safety and performance than non-generic strongly typed collections.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Collections/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.Collections/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.Collections/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/lib/net45/_._ b/build/approot/packages/System.Collections/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/lib/win8/_._ b/build/approot/packages/System.Collections/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Collections/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Collections/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.Collections/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.Collections/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.Collections/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.Collections/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/ref/dotnet/System.Collections.dll b/build/approot/packages/System.Collections/4.0.0/ref/dotnet/System.Collections.dll
new file mode 100644
index 00000000..1ae63c54
Binary files /dev/null and b/build/approot/packages/System.Collections/4.0.0/ref/dotnet/System.Collections.dll differ
diff --git a/build/approot/packages/System.Collections/4.0.0/ref/net45/_._ b/build/approot/packages/System.Collections/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/ref/netcore50/System.Collections.dll b/build/approot/packages/System.Collections/4.0.0/ref/netcore50/System.Collections.dll
new file mode 100644
index 00000000..1ae63c54
Binary files /dev/null and b/build/approot/packages/System.Collections/4.0.0/ref/netcore50/System.Collections.dll differ
diff --git a/build/approot/packages/System.Collections/4.0.0/ref/win8/_._ b/build/approot/packages/System.Collections/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Collections/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Collections/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.Collections/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Collections/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.Collections/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/License.rtf b/build/approot/packages/System.Diagnostics.Debug/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/System.Diagnostics.Debug.nuspec b/build/approot/packages/System.Diagnostics.Debug/4.0.0/System.Diagnostics.Debug.nuspec
new file mode 100644
index 00000000..8e67e3a1
--- /dev/null
+++ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/System.Diagnostics.Debug.nuspec
@@ -0,0 +1,43 @@
+
+
+
+ System.Diagnostics.Debug
+ 4.0.0
+ System.Diagnostics.Debug
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides classes and attributes that allows basic interaction with a debugger.
+
+Commonly Used Types:
+System.Diagnostics.Debug
+System.Diagnostics.DebuggerStepThroughAttribute
+System.Diagnostics.Debugger
+System.Diagnostics.DebuggerDisplayAttribute
+System.Diagnostics.DebuggerBrowsableAttribute
+System.Diagnostics.DebuggerBrowsableState
+System.Diagnostics.DebuggerHiddenAttribute
+System.Diagnostics.DebuggerNonUserCodeAttribute
+System.Diagnostics.DebuggerTypeProxyAttribute
+ Provides classes and attributes that allows basic interaction with a debugger.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/net45/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/win8/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/dotnet/System.Diagnostics.Debug.dll b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/dotnet/System.Diagnostics.Debug.dll
new file mode 100644
index 00000000..fbbb15f4
Binary files /dev/null and b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/dotnet/System.Diagnostics.Debug.dll differ
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/net45/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/netcore50/System.Diagnostics.Debug.dll b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/netcore50/System.Diagnostics.Debug.dll
new file mode 100644
index 00000000..fbbb15f4
Binary files /dev/null and b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/netcore50/System.Diagnostics.Debug.dll differ
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/win8/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.Diagnostics.Debug/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.DiagnosticSource/4.0.0-beta-23516/System.Diagnostics.DiagnosticSource.nuspec b/build/approot/packages/System.Diagnostics.DiagnosticSource/4.0.0-beta-23516/System.Diagnostics.DiagnosticSource.nuspec
new file mode 100644
index 00000000..1cb95a51
--- /dev/null
+++ b/build/approot/packages/System.Diagnostics.DiagnosticSource/4.0.0-beta-23516/System.Diagnostics.DiagnosticSource.nuspec
@@ -0,0 +1,27 @@
+
+
+
+ System.Diagnostics.DiagnosticSource
+ 4.0.0-beta-23516
+ System.Diagnostics.DiagnosticSource
+ true
+ Microsoft
+ microsoft,dotnetframework
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides Classes that allow you to decouple code logging rich (unserializable) diagnostics/telemetry (e.g. framework) from code that consumes it (e.g. tools)
+
+Commonly Used Types:
+System.Diagnostics.DiagnosticListener
+System.Diagnostics.DiagnosticSource
+ - 1548494
+ © Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Diagnostics.DiagnosticSource/4.0.0-beta-23516/lib/dotnet5.2/System.Diagnostics.DiagnosticSource.dll b/build/approot/packages/System.Diagnostics.DiagnosticSource/4.0.0-beta-23516/lib/dotnet5.2/System.Diagnostics.DiagnosticSource.dll
new file mode 100644
index 00000000..43aed368
Binary files /dev/null and b/build/approot/packages/System.Diagnostics.DiagnosticSource/4.0.0-beta-23516/lib/dotnet5.2/System.Diagnostics.DiagnosticSource.dll differ
diff --git a/build/approot/packages/System.Diagnostics.DiagnosticSource/4.0.0-beta-23516/lib/portable-net45+win8+wp8+wpa81/System.Diagnostics.DiagnosticSource.dll b/build/approot/packages/System.Diagnostics.DiagnosticSource/4.0.0-beta-23516/lib/portable-net45+win8+wp8+wpa81/System.Diagnostics.DiagnosticSource.dll
new file mode 100644
index 00000000..43aed368
Binary files /dev/null and b/build/approot/packages/System.Diagnostics.DiagnosticSource/4.0.0-beta-23516/lib/portable-net45+win8+wp8+wpa81/System.Diagnostics.DiagnosticSource.dll differ
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/License.rtf b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/System.Diagnostics.Tracing.nuspec b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/System.Diagnostics.Tracing.nuspec
new file mode 100644
index 00000000..6ba47532
--- /dev/null
+++ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/System.Diagnostics.Tracing.nuspec
@@ -0,0 +1,41 @@
+
+
+
+ System.Diagnostics.Tracing
+ 4.0.0
+ System.Diagnostics.Tracing
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides class that enable you to create high performance tracing events to be captured by event tracing for Windows (ETW).
+
+Commonly Used Types:
+System.Diagnostics.Tracing.EventSource
+System.Diagnostics.Tracing.EventListener
+System.Diagnostics.Tracing.EventLevel
+System.Diagnostics.Tracing.EventKeywords
+System.Diagnostics.Tracing.EventWrittenEventArgs
+System.Diagnostics.Tracing.EventAttribute
+System.Diagnostics.Tracing.EventSourceAttribute
+System.Diagnostics.Tracing.NonEventAttribute
+ Provides class that enable you to create high performance tracing events to be captured by event tracing for Windows (ETW).
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/net45/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/win8/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/dotnet/System.Diagnostics.Tracing.dll b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/dotnet/System.Diagnostics.Tracing.dll
new file mode 100644
index 00000000..10790ce4
Binary files /dev/null and b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/dotnet/System.Diagnostics.Tracing.dll differ
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/net45/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/netcore50/System.Diagnostics.Tracing.dll b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/netcore50/System.Diagnostics.Tracing.dll
new file mode 100644
index 00000000..10790ce4
Binary files /dev/null and b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/netcore50/System.Diagnostics.Tracing.dll differ
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/win8/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.Diagnostics.Tracing/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/License.rtf b/build/approot/packages/System.Globalization/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.Globalization/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Globalization/4.0.0/System.Globalization.nuspec b/build/approot/packages/System.Globalization/4.0.0/System.Globalization.nuspec
new file mode 100644
index 00000000..7506bc1a
--- /dev/null
+++ b/build/approot/packages/System.Globalization/4.0.0/System.Globalization.nuspec
@@ -0,0 +1,43 @@
+
+
+
+ System.Globalization
+ 4.0.0
+ System.Globalization
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides classes that define culture-related information, including language, country/region, calendars in use, format patterns for dates, currency, and numbers, and sort order for strings.
+
+Commonly Used Types:
+System.Globalization.DateTimeFormatInfo
+System.Globalization.CultureInfo
+System.Globalization.NumberFormatInfo
+System.Globalization.CalendarWeekRule
+System.Globalization.TextInfo
+System.Globalization.Calendar
+System.Globalization.CompareInfo
+System.Globalization.CompareOptions
+System.Globalization.UnicodeCategory
+ Provides classes that define culture-related information, including language, country/region, calendars in use, format patterns for dates, currency, and numbers, and sort order for strings.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Globalization/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.Globalization/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.Globalization/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/lib/net45/_._ b/build/approot/packages/System.Globalization/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/lib/win8/_._ b/build/approot/packages/System.Globalization/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Globalization/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Globalization/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.Globalization/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.Globalization/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.Globalization/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.Globalization/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/ref/dotnet/System.Globalization.dll b/build/approot/packages/System.Globalization/4.0.0/ref/dotnet/System.Globalization.dll
new file mode 100644
index 00000000..4b0e2fc1
Binary files /dev/null and b/build/approot/packages/System.Globalization/4.0.0/ref/dotnet/System.Globalization.dll differ
diff --git a/build/approot/packages/System.Globalization/4.0.0/ref/net45/_._ b/build/approot/packages/System.Globalization/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/ref/netcore50/System.Globalization.dll b/build/approot/packages/System.Globalization/4.0.0/ref/netcore50/System.Globalization.dll
new file mode 100644
index 00000000..4b0e2fc1
Binary files /dev/null and b/build/approot/packages/System.Globalization/4.0.0/ref/netcore50/System.Globalization.dll differ
diff --git a/build/approot/packages/System.Globalization/4.0.0/ref/win8/_._ b/build/approot/packages/System.Globalization/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Globalization/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Globalization/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.Globalization/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Globalization/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.Globalization/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/License.rtf b/build/approot/packages/System.IO/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.IO/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.IO/4.0.0/System.IO.nuspec b/build/approot/packages/System.IO/4.0.0/System.IO.nuspec
new file mode 100644
index 00000000..b3347d70
--- /dev/null
+++ b/build/approot/packages/System.IO/4.0.0/System.IO.nuspec
@@ -0,0 +1,48 @@
+
+
+
+ System.IO
+ 4.0.0
+ System.IO
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides base input and output (I/O) types, including System.IO.Stream, System.IO.StreamReader and System.IO.StreamWriter, that allow reading and writing to data streams
+
+Commonly Used Types:
+System.IO.Stream
+System.IO.IOException
+System.IO.EndOfStreamException
+System.IO.FileNotFoundException
+System.IO.MemoryStream
+System.IO.StreamReader
+System.IO.StreamWriter
+System.IO.StringWriter
+System.IO.TextWriter
+System.IO.TextReader
+ Provides base input and output (I/O) types, including System.IO.Stream, System.IO.StreamReader and System.IO.StreamWriter, that allow reading and writing to data streams
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.IO/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.IO/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.IO/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/lib/net45/_._ b/build/approot/packages/System.IO/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/lib/win8/_._ b/build/approot/packages/System.IO/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/lib/wp80/_._ b/build/approot/packages/System.IO/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.IO/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.IO/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.IO/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.IO/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.IO/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/ref/dotnet/System.IO.dll b/build/approot/packages/System.IO/4.0.0/ref/dotnet/System.IO.dll
new file mode 100644
index 00000000..97702f12
Binary files /dev/null and b/build/approot/packages/System.IO/4.0.0/ref/dotnet/System.IO.dll differ
diff --git a/build/approot/packages/System.IO/4.0.0/ref/net45/_._ b/build/approot/packages/System.IO/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/ref/netcore50/System.IO.dll b/build/approot/packages/System.IO/4.0.0/ref/netcore50/System.IO.dll
new file mode 100644
index 00000000..97702f12
Binary files /dev/null and b/build/approot/packages/System.IO/4.0.0/ref/netcore50/System.IO.dll differ
diff --git a/build/approot/packages/System.IO/4.0.0/ref/win8/_._ b/build/approot/packages/System.IO/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/ref/wp80/_._ b/build/approot/packages/System.IO/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.IO/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.IO/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IO/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.IO/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.IdentityModel.Tokens.Jwt/5.0.0-rc1-211161024/System.IdentityModel.Tokens.Jwt.nuspec b/build/approot/packages/System.IdentityModel.Tokens.Jwt/5.0.0-rc1-211161024/System.IdentityModel.Tokens.Jwt.nuspec
new file mode 100644
index 00000000..03e3f255
--- /dev/null
+++ b/build/approot/packages/System.IdentityModel.Tokens.Jwt/5.0.0-rc1-211161024/System.IdentityModel.Tokens.Jwt.nuspec
@@ -0,0 +1,39 @@
+
+
+
+ System.IdentityModel.Tokens.Jwt
+ 5.0.0-rc1-211161024
+ true
+ Microsoft
+ Microsoft
+ https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/master/LICENSE.txt
+ Includes types that provide support for JWT tokens.
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.IdentityModel.Tokens.Jwt/5.0.0-rc1-211161024/lib/dotnet5.4/System.IdentityModel.Tokens.Jwt.dll b/build/approot/packages/System.IdentityModel.Tokens.Jwt/5.0.0-rc1-211161024/lib/dotnet5.4/System.IdentityModel.Tokens.Jwt.dll
new file mode 100644
index 00000000..7e7ed5f5
Binary files /dev/null and b/build/approot/packages/System.IdentityModel.Tokens.Jwt/5.0.0-rc1-211161024/lib/dotnet5.4/System.IdentityModel.Tokens.Jwt.dll differ
diff --git a/build/approot/packages/System.IdentityModel.Tokens.Jwt/5.0.0-rc1-211161024/lib/net451/System.IdentityModel.Tokens.Jwt.dll b/build/approot/packages/System.IdentityModel.Tokens.Jwt/5.0.0-rc1-211161024/lib/net451/System.IdentityModel.Tokens.Jwt.dll
new file mode 100644
index 00000000..c4b255da
Binary files /dev/null and b/build/approot/packages/System.IdentityModel.Tokens.Jwt/5.0.0-rc1-211161024/lib/net451/System.IdentityModel.Tokens.Jwt.dll differ
diff --git a/build/approot/packages/System.IdentityModel.Tokens/5.0.0-rc1-211161024/System.IdentityModel.Tokens.nuspec b/build/approot/packages/System.IdentityModel.Tokens/5.0.0-rc1-211161024/System.IdentityModel.Tokens.nuspec
new file mode 100644
index 00000000..e869157d
--- /dev/null
+++ b/build/approot/packages/System.IdentityModel.Tokens/5.0.0-rc1-211161024/System.IdentityModel.Tokens.nuspec
@@ -0,0 +1,45 @@
+
+
+
+ System.IdentityModel.Tokens
+ 5.0.0-rc1-211161024
+ true
+ Microsoft
+ Microsoft
+ https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/master/LICENSE.txt
+ Includes types that provide support for cryptographic operations.
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.IdentityModel.Tokens/5.0.0-rc1-211161024/lib/dotnet5.4/System.IdentityModel.Tokens.dll b/build/approot/packages/System.IdentityModel.Tokens/5.0.0-rc1-211161024/lib/dotnet5.4/System.IdentityModel.Tokens.dll
new file mode 100644
index 00000000..dcca8147
Binary files /dev/null and b/build/approot/packages/System.IdentityModel.Tokens/5.0.0-rc1-211161024/lib/dotnet5.4/System.IdentityModel.Tokens.dll differ
diff --git a/build/approot/packages/System.IdentityModel.Tokens/5.0.0-rc1-211161024/lib/net451/System.IdentityModel.Tokens.dll b/build/approot/packages/System.IdentityModel.Tokens/5.0.0-rc1-211161024/lib/net451/System.IdentityModel.Tokens.dll
new file mode 100644
index 00000000..7ae01218
Binary files /dev/null and b/build/approot/packages/System.IdentityModel.Tokens/5.0.0-rc1-211161024/lib/net451/System.IdentityModel.Tokens.dll differ
diff --git a/build/approot/packages/System.Linq/4.0.0/System.Linq.nuspec b/build/approot/packages/System.Linq/4.0.0/System.Linq.nuspec
new file mode 100644
index 00000000..c693ed98
--- /dev/null
+++ b/build/approot/packages/System.Linq/4.0.0/System.Linq.nuspec
@@ -0,0 +1,42 @@
+
+
+
+ System.Linq
+ 4.0.0
+ System.Linq
+ true
+ Microsoft
+ microsoft,dotnetframework
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides classes and interfaces that supports queries that use Language-Integrated Query (LINQ).
+
+Commonly Used Types:
+System.Linq.Enumerable
+System.Linq.IGrouping<TKey, TElement>
+System.Linq.IOrderedEnumerable<TElement>
+System.Linq.ILookup<TKey, TElement>
+System.Linq.Lookup<TKey, TElement>
+ © Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Linq/4.0.0/lib/dotnet/System.Linq.dll b/build/approot/packages/System.Linq/4.0.0/lib/dotnet/System.Linq.dll
new file mode 100644
index 00000000..35ff442a
Binary files /dev/null and b/build/approot/packages/System.Linq/4.0.0/lib/dotnet/System.Linq.dll differ
diff --git a/build/approot/packages/System.Linq/4.0.0/lib/net45/_._ b/build/approot/packages/System.Linq/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Linq/4.0.0/lib/netcore50/System.Linq.dll b/build/approot/packages/System.Linq/4.0.0/lib/netcore50/System.Linq.dll
new file mode 100644
index 00000000..35ff442a
Binary files /dev/null and b/build/approot/packages/System.Linq/4.0.0/lib/netcore50/System.Linq.dll differ
diff --git a/build/approot/packages/System.Linq/4.0.0/lib/win8/_._ b/build/approot/packages/System.Linq/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Linq/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Linq/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Linq/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Linq/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Linq/4.0.0/ref/dotnet/System.Linq.dll b/build/approot/packages/System.Linq/4.0.0/ref/dotnet/System.Linq.dll
new file mode 100644
index 00000000..a11c2224
Binary files /dev/null and b/build/approot/packages/System.Linq/4.0.0/ref/dotnet/System.Linq.dll differ
diff --git a/build/approot/packages/System.Linq/4.0.0/ref/net45/_._ b/build/approot/packages/System.Linq/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Linq/4.0.0/ref/netcore50/System.Linq.dll b/build/approot/packages/System.Linq/4.0.0/ref/netcore50/System.Linq.dll
new file mode 100644
index 00000000..a11c2224
Binary files /dev/null and b/build/approot/packages/System.Linq/4.0.0/ref/netcore50/System.Linq.dll differ
diff --git a/build/approot/packages/System.Linq/4.0.0/ref/win8/_._ b/build/approot/packages/System.Linq/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Linq/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Linq/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Linq/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Linq/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/System.Numerics.Vectors.nuspec b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/System.Numerics.Vectors.nuspec
new file mode 100644
index 00000000..b492d1f8
--- /dev/null
+++ b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/System.Numerics.Vectors.nuspec
@@ -0,0 +1,44 @@
+
+
+
+ System.Numerics.Vectors
+ 4.1.1-beta-23516
+ System.Numerics.Vectors
+ true
+ Microsoft
+ microsoft,dotnetframework
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides hardware-accelerated numeric types, suitable for high-performance processing and graphics applications.
+
+Commonly Used Types:
+System.Numerics.Matrix3x2
+System.Numerics.Matrix4x4
+System.Numerics.Plane
+System.Numerics.Quaternion
+System.Numerics.Vector2
+System.Numerics.Vector3
+System.Numerics.Vector4
+System.Numerics.Vector
+System.Numerics.Vector<T>
+ - 1548494
+ © Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/MonoAndroid10/_._ b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/MonoTouch10/_._ b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/dotnet5.4/System.Numerics.Vectors.dll b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/dotnet5.4/System.Numerics.Vectors.dll
new file mode 100644
index 00000000..52e4b56d
Binary files /dev/null and b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/dotnet5.4/System.Numerics.Vectors.dll differ
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/net46/System.Numerics.Vectors.dll b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/net46/System.Numerics.Vectors.dll
new file mode 100644
index 00000000..7a3c5ae1
Binary files /dev/null and b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/net46/System.Numerics.Vectors.dll differ
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/net46/_._ b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/net46/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/portable-net45+win8/System.Numerics.Vectors.dll b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/portable-net45+win8/System.Numerics.Vectors.dll
new file mode 100644
index 00000000..52e4b56d
Binary files /dev/null and b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/portable-net45+win8/System.Numerics.Vectors.dll differ
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/xamarinios10/_._ b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/xamarinmac20/_._ b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/MonoAndroid10/_._ b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/MonoTouch10/_._ b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/dotnet5.4/System.Numerics.Vectors.dll b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/dotnet5.4/System.Numerics.Vectors.dll
new file mode 100644
index 00000000..5023deaa
Binary files /dev/null and b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/dotnet5.4/System.Numerics.Vectors.dll differ
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/net46/System.Numerics.Vectors.dll b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/net46/System.Numerics.Vectors.dll
new file mode 100644
index 00000000..7a3c5ae1
Binary files /dev/null and b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/net46/System.Numerics.Vectors.dll differ
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/net46/_._ b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/net46/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/xamarinios10/_._ b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/xamarinmac20/_._ b/build/approot/packages/System.Numerics.Vectors/4.1.1-beta-23516/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/System.Reflection.Extensions.nuspec b/build/approot/packages/System.Reflection.Extensions/4.0.0/System.Reflection.Extensions.nuspec
new file mode 100644
index 00000000..6826980e
--- /dev/null
+++ b/build/approot/packages/System.Reflection.Extensions/4.0.0/System.Reflection.Extensions.nuspec
@@ -0,0 +1,39 @@
+
+
+
+ System.Reflection.Extensions
+ 4.0.0
+ System.Reflection.Extensions
+ true
+ Microsoft
+ microsoft,dotnetframework
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides custom attribute extension methods for System.Reflection types.
+
+Commonly Used Types:
+System.Reflection.InterfaceMapping
+System.Reflection.CustomAttributeExtensions
+System.Reflection.RuntimeReflectionExtensions
+ © Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/DNXCore50/System.Reflection.Extensions.dll b/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/DNXCore50/System.Reflection.Extensions.dll
new file mode 100644
index 00000000..85edbde4
Binary files /dev/null and b/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/DNXCore50/System.Reflection.Extensions.dll differ
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/net45/_._ b/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/netcore50/System.Reflection.Extensions.dll b/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/netcore50/System.Reflection.Extensions.dll
new file mode 100644
index 00000000..083d7048
Binary files /dev/null and b/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/netcore50/System.Reflection.Extensions.dll differ
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/win8/_._ b/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Reflection.Extensions/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/dotnet/System.Reflection.Extensions.dll b/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/dotnet/System.Reflection.Extensions.dll
new file mode 100644
index 00000000..02075879
Binary files /dev/null and b/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/dotnet/System.Reflection.Extensions.dll differ
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/net45/_._ b/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/netcore50/System.Reflection.Extensions.dll b/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/netcore50/System.Reflection.Extensions.dll
new file mode 100644
index 00000000..02075879
Binary files /dev/null and b/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/netcore50/System.Reflection.Extensions.dll differ
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/win8/_._ b/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Reflection.Extensions/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Extensions/4.0.0/runtimes/win8-aot/lib/netcore50/System.Reflection.Extensions.dll b/build/approot/packages/System.Reflection.Extensions/4.0.0/runtimes/win8-aot/lib/netcore50/System.Reflection.Extensions.dll
new file mode 100644
index 00000000..d9f20f27
Binary files /dev/null and b/build/approot/packages/System.Reflection.Extensions/4.0.0/runtimes/win8-aot/lib/netcore50/System.Reflection.Extensions.dll differ
diff --git a/build/approot/packages/System.Reflection.Metadata/1.1.0/System.Reflection.Metadata.nuspec b/build/approot/packages/System.Reflection.Metadata/1.1.0/System.Reflection.Metadata.nuspec
new file mode 100644
index 00000000..3db6e745
--- /dev/null
+++ b/build/approot/packages/System.Reflection.Metadata/1.1.0/System.Reflection.Metadata.nuspec
@@ -0,0 +1,41 @@
+
+
+
+ System.Reflection.Metadata
+ 1.1.0
+ System.Reflection.Metadata
+ true
+ Microsoft
+ microsoft,dotnetframework
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ This packages provides a low-level .NET (ECMA-335) metadata reader. It's geared for performance and is the ideal choice for building higher-level libraries that intend to provide their own object model, such as compilers.
+
+Commonly Used Types:
+System.Reflection.Metadata.MetadataReader
+System.Reflection.PortableExecutable.PEReader
+ - 1541996
+ © Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Reflection.Metadata/1.1.0/lib/dotnet5.2/System.Reflection.Metadata.dll b/build/approot/packages/System.Reflection.Metadata/1.1.0/lib/dotnet5.2/System.Reflection.Metadata.dll
new file mode 100644
index 00000000..07ef2851
Binary files /dev/null and b/build/approot/packages/System.Reflection.Metadata/1.1.0/lib/dotnet5.2/System.Reflection.Metadata.dll differ
diff --git a/build/approot/packages/System.Reflection.Metadata/1.1.0/lib/portable-net45+win8/System.Reflection.Metadata.dll b/build/approot/packages/System.Reflection.Metadata/1.1.0/lib/portable-net45+win8/System.Reflection.Metadata.dll
new file mode 100644
index 00000000..07ef2851
Binary files /dev/null and b/build/approot/packages/System.Reflection.Metadata/1.1.0/lib/portable-net45+win8/System.Reflection.Metadata.dll differ
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/System.Reflection.Primitives.nuspec b/build/approot/packages/System.Reflection.Primitives/4.0.0/System.Reflection.Primitives.nuspec
new file mode 100644
index 00000000..b58b54dd
--- /dev/null
+++ b/build/approot/packages/System.Reflection.Primitives/4.0.0/System.Reflection.Primitives.nuspec
@@ -0,0 +1,40 @@
+
+
+
+ System.Reflection.Primitives
+ 4.0.0
+ System.Reflection.Primitives
+ true
+ Microsoft
+ microsoft,dotnetframework
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides common enumerations for reflection-based libraries.
+
+Commonly Used Types:
+System.Reflection.FieldAttributes
+System.Reflection.Emit.OpCode
+System.Reflection.TypeAttributes
+System.Reflection.MethodAttributes
+System.Reflection.CallingConventions
+System.Reflection.PropertyAttributes
+System.Reflection.EventAttributes
+System.Reflection.ParameterAttributes
+System.Reflection.GenericParameterAttributes
+System.Reflection.MethodImplAttributes
+ © Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/DNXCore50/System.Reflection.Primitives.dll b/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/DNXCore50/System.Reflection.Primitives.dll
new file mode 100644
index 00000000..72d1b8d1
Binary files /dev/null and b/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/DNXCore50/System.Reflection.Primitives.dll differ
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/net45/_._ b/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/netcore50/System.Reflection.Primitives.dll b/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/netcore50/System.Reflection.Primitives.dll
new file mode 100644
index 00000000..b52f8536
Binary files /dev/null and b/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/netcore50/System.Reflection.Primitives.dll differ
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/win8/_._ b/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Reflection.Primitives/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/dotnet/System.Reflection.Primitives.dll b/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/dotnet/System.Reflection.Primitives.dll
new file mode 100644
index 00000000..5a1a3891
Binary files /dev/null and b/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/dotnet/System.Reflection.Primitives.dll differ
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/net45/_._ b/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/netcore50/System.Reflection.Primitives.dll b/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/netcore50/System.Reflection.Primitives.dll
new file mode 100644
index 00000000..5a1a3891
Binary files /dev/null and b/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/netcore50/System.Reflection.Primitives.dll differ
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/win8/_._ b/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Reflection.Primitives/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection.Primitives/4.0.0/runtimes/win8-aot/lib/netcore50/System.Reflection.Primitives.dll b/build/approot/packages/System.Reflection.Primitives/4.0.0/runtimes/win8-aot/lib/netcore50/System.Reflection.Primitives.dll
new file mode 100644
index 00000000..73c2fe02
Binary files /dev/null and b/build/approot/packages/System.Reflection.Primitives/4.0.0/runtimes/win8-aot/lib/netcore50/System.Reflection.Primitives.dll differ
diff --git a/build/approot/packages/System.Reflection/4.0.0/License.rtf b/build/approot/packages/System.Reflection/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.Reflection/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Reflection/4.0.0/System.Reflection.nuspec b/build/approot/packages/System.Reflection/4.0.0/System.Reflection.nuspec
new file mode 100644
index 00000000..5e164034
--- /dev/null
+++ b/build/approot/packages/System.Reflection/4.0.0/System.Reflection.nuspec
@@ -0,0 +1,47 @@
+
+
+
+ System.Reflection
+ 4.0.0
+ System.Reflection
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides types that retrieve information about assemblies, modules, members, parameters, and other entities in managed code by examining their metadata. These types also can be used to manipulate instances of loaded types, for example to hook up events or to invoke methods.
+
+Commonly Used Types:
+System.Reflection.MethodInfo
+System.Reflection.PropertyInfo
+System.Reflection.ParameterInfo
+System.Reflection.FieldInfo
+System.Reflection.ConstructorInfo
+System.Reflection.Assembly
+System.Reflection.MemberInfo
+System.Reflection.EventInfo
+System.Reflection.Module
+ Provides types that retrieve information about assemblies, modules, members, parameters, and other entities in managed code by examining their metadata. These types also can be used to manipulate instances of loaded types, for example to hook up events or to invoke methods.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Reflection/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.Reflection/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.Reflection/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/lib/net45/_._ b/build/approot/packages/System.Reflection/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/lib/win8/_._ b/build/approot/packages/System.Reflection/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Reflection/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Reflection/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.Reflection/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.Reflection/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.Reflection/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.Reflection/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/ref/dotnet/System.Reflection.dll b/build/approot/packages/System.Reflection/4.0.0/ref/dotnet/System.Reflection.dll
new file mode 100644
index 00000000..df384f50
Binary files /dev/null and b/build/approot/packages/System.Reflection/4.0.0/ref/dotnet/System.Reflection.dll differ
diff --git a/build/approot/packages/System.Reflection/4.0.0/ref/net45/_._ b/build/approot/packages/System.Reflection/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/ref/netcore50/System.Reflection.dll b/build/approot/packages/System.Reflection/4.0.0/ref/netcore50/System.Reflection.dll
new file mode 100644
index 00000000..df384f50
Binary files /dev/null and b/build/approot/packages/System.Reflection/4.0.0/ref/netcore50/System.Reflection.dll differ
diff --git a/build/approot/packages/System.Reflection/4.0.0/ref/win8/_._ b/build/approot/packages/System.Reflection/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Reflection/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Reflection/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.Reflection/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Reflection/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.Reflection/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/System.Resources.ResourceManager.nuspec b/build/approot/packages/System.Resources.ResourceManager/4.0.0/System.Resources.ResourceManager.nuspec
new file mode 100644
index 00000000..38200fce
--- /dev/null
+++ b/build/approot/packages/System.Resources.ResourceManager/4.0.0/System.Resources.ResourceManager.nuspec
@@ -0,0 +1,37 @@
+
+
+
+ System.Resources.ResourceManager
+ 4.0.0
+ System.Resources.ResourceManager
+ true
+ Microsoft
+ microsoft,dotnetframework
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides classes and attributes that allow developers to create, store, and manage various culture-specific resources used in an application.
+
+Commonly Used Types:
+System.Resources.ResourceManager
+System.Resources.NeutralResourcesLanguageAttribute
+System.Resources.SatelliteContractVersionAttribute
+System.Resources.MissingManifestResourceException
+ © Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/DNXCore50/System.Resources.ResourceManager.dll b/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/DNXCore50/System.Resources.ResourceManager.dll
new file mode 100644
index 00000000..7abedb77
Binary files /dev/null and b/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/DNXCore50/System.Resources.ResourceManager.dll differ
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/net45/_._ b/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/netcore50/System.Resources.ResourceManager.dll b/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/netcore50/System.Resources.ResourceManager.dll
new file mode 100644
index 00000000..741d8196
Binary files /dev/null and b/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/netcore50/System.Resources.ResourceManager.dll differ
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/win8/_._ b/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Resources.ResourceManager/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/dotnet/System.Resources.ResourceManager.dll b/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/dotnet/System.Resources.ResourceManager.dll
new file mode 100644
index 00000000..887eb8f9
Binary files /dev/null and b/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/dotnet/System.Resources.ResourceManager.dll differ
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/net45/_._ b/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/netcore50/System.Resources.ResourceManager.dll b/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/netcore50/System.Resources.ResourceManager.dll
new file mode 100644
index 00000000..887eb8f9
Binary files /dev/null and b/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/netcore50/System.Resources.ResourceManager.dll differ
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/win8/_._ b/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Resources.ResourceManager/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Resources.ResourceManager/4.0.0/runtimes/win8-aot/lib/netcore50/System.Resources.ResourceManager.dll b/build/approot/packages/System.Resources.ResourceManager/4.0.0/runtimes/win8-aot/lib/netcore50/System.Resources.ResourceManager.dll
new file mode 100644
index 00000000..550474ec
Binary files /dev/null and b/build/approot/packages/System.Resources.ResourceManager/4.0.0/runtimes/win8-aot/lib/netcore50/System.Resources.ResourceManager.dll differ
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/License.rtf b/build/approot/packages/System.Runtime.Extensions/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.Runtime.Extensions/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/System.Runtime.Extensions.nuspec b/build/approot/packages/System.Runtime.Extensions/4.0.0/System.Runtime.Extensions.nuspec
new file mode 100644
index 00000000..d714a2c9
--- /dev/null
+++ b/build/approot/packages/System.Runtime.Extensions/4.0.0/System.Runtime.Extensions.nuspec
@@ -0,0 +1,43 @@
+
+
+
+ System.Runtime.Extensions
+ 4.0.0
+ System.Runtime.Extensions
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides commonly-used classes for performing mathematical functions, conversions, string comparisons and querying environment information.
+
+Commonly Used Types:
+System.Math
+System.Environment
+System.Random
+System.Progress<T>
+System.Convert
+System.Diagnostics.Stopwatch
+System.Runtime.Versioning.FrameworkName
+System.StringComparer
+System.IO.Path
+ Provides commonly-used classes for performing mathematical functions, conversions, string comparisons and querying environment information.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/net45/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/win8/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/dotnet/System.Runtime.Extensions.dll b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/dotnet/System.Runtime.Extensions.dll
new file mode 100644
index 00000000..58e548f6
Binary files /dev/null and b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/dotnet/System.Runtime.Extensions.dll differ
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/net45/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/netcore50/System.Runtime.Extensions.dll b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/netcore50/System.Runtime.Extensions.dll
new file mode 100644
index 00000000..58e548f6
Binary files /dev/null and b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/netcore50/System.Runtime.Extensions.dll differ
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/win8/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.Runtime.Extensions/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/License.rtf b/build/approot/packages/System.Runtime.InteropServices/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/System.Runtime.InteropServices.nuspec b/build/approot/packages/System.Runtime.InteropServices/4.0.0/System.Runtime.InteropServices.nuspec
new file mode 100644
index 00000000..861bd7d1
--- /dev/null
+++ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/System.Runtime.InteropServices.nuspec
@@ -0,0 +1,42 @@
+
+
+
+ System.Runtime.InteropServices
+ 4.0.0
+ System.Runtime.InteropServices
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides types that support COM interop and platform invoke services.
+
+Commonly Used Types:
+System.Runtime.InteropServices.GCHandle
+System.Runtime.InteropServices.GuidAttribute
+System.Runtime.InteropServices.COMException
+System.DllNotFoundException
+System.Runtime.InteropServices.DllImportAttribute
+ Provides types that support COM interop and platform invoke services.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/net45/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/win8/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/dotnet/System.Runtime.InteropServices.dll b/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/dotnet/System.Runtime.InteropServices.dll
new file mode 100644
index 00000000..f2fd3223
Binary files /dev/null and b/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/dotnet/System.Runtime.InteropServices.dll differ
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/net45/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/netcore50/System.Runtime.InteropServices.dll b/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/netcore50/System.Runtime.InteropServices.dll
new file mode 100644
index 00000000..f2fd3223
Binary files /dev/null and b/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/netcore50/System.Runtime.InteropServices.dll differ
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/win8/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.Runtime.InteropServices/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/License.rtf b/build/approot/packages/System.Runtime/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.Runtime/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Runtime/4.0.0/System.Runtime.nuspec b/build/approot/packages/System.Runtime/4.0.0/System.Runtime.nuspec
new file mode 100644
index 00000000..ed0f77af
--- /dev/null
+++ b/build/approot/packages/System.Runtime/4.0.0/System.Runtime.nuspec
@@ -0,0 +1,48 @@
+
+
+
+ System.Runtime
+ 4.0.0
+ System.Runtime
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides the fundamental primitives, classes and base classes that define commonly-used value and reference data types, events and event handlers, interfaces, attributes, and exceptions. This packages represents the core package, and provides the minimal set of types required to build a managed application.
+
+Commonly Used Types:
+System.Object
+System.Exception
+System.Int16
+System.Int32
+System.Int64
+System.Enum
+System.String
+System.Char
+System.Boolean
+System.SByte
+System.Byte
+System.DateTime
+System.DateTimeOffset
+System.Single
+System.Double
+System.UInt16
+System.UInt32
+System.UInt64
+System.IDisposable
+System.Uri
+ Provides the fundamental primitives, classes and base classes that define commonly-used value and reference data types, events and event handlers, interfaces, attributes, and exceptions. This packages represents the core package, and provides the minimal set of types required to build a managed application.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Runtime/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.Runtime/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.Runtime/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/lib/net45/_._ b/build/approot/packages/System.Runtime/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/lib/win8/_._ b/build/approot/packages/System.Runtime/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Runtime/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Runtime/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.Runtime/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.Runtime/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.Runtime/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.Runtime/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/ref/dotnet/System.Runtime.dll b/build/approot/packages/System.Runtime/4.0.0/ref/dotnet/System.Runtime.dll
new file mode 100644
index 00000000..0afd7a96
Binary files /dev/null and b/build/approot/packages/System.Runtime/4.0.0/ref/dotnet/System.Runtime.dll differ
diff --git a/build/approot/packages/System.Runtime/4.0.0/ref/net45/_._ b/build/approot/packages/System.Runtime/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/ref/netcore50/System.Runtime.dll b/build/approot/packages/System.Runtime/4.0.0/ref/netcore50/System.Runtime.dll
new file mode 100644
index 00000000..0afd7a96
Binary files /dev/null and b/build/approot/packages/System.Runtime/4.0.0/ref/netcore50/System.Runtime.dll differ
diff --git a/build/approot/packages/System.Runtime/4.0.0/ref/win8/_._ b/build/approot/packages/System.Runtime/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Runtime/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Runtime/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.Runtime/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Runtime/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.Runtime/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/License.rtf b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/System.Text.Encoding.Extensions.nuspec b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/System.Text.Encoding.Extensions.nuspec
new file mode 100644
index 00000000..5408e988
--- /dev/null
+++ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/System.Text.Encoding.Extensions.nuspec
@@ -0,0 +1,41 @@
+
+
+
+ System.Text.Encoding.Extensions
+ 4.0.0
+ System.Text.Encoding.Extensions
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides support for specific encodings, including ASCII, UTF-7, UTF-8, UTF-16, and UTF-32.
+
+Commonly Used Types:
+System.Text.UTF8Encoding
+System.Text.UnicodeEncoding
+System.Text.ASCIIEncoding
+System.Text.UTF7Encoding
+System.Text.UTF32Encoding
+ Provides support for specific encodings, including ASCII, UTF-7, UTF-8, UTF-16, and UTF-32.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/net45/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/win8/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/dotnet/System.Text.Encoding.Extensions.dll b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/dotnet/System.Text.Encoding.Extensions.dll
new file mode 100644
index 00000000..f8f278ef
Binary files /dev/null and b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/dotnet/System.Text.Encoding.Extensions.dll differ
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/net45/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/netcore50/System.Text.Encoding.Extensions.dll b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/netcore50/System.Text.Encoding.Extensions.dll
new file mode 100644
index 00000000..f8f278ef
Binary files /dev/null and b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/netcore50/System.Text.Encoding.Extensions.dll differ
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/win8/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.Text.Encoding.Extensions/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/License.rtf b/build/approot/packages/System.Text.Encoding/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.Text.Encoding/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/System.Text.Encoding.nuspec b/build/approot/packages/System.Text.Encoding/4.0.0/System.Text.Encoding.nuspec
new file mode 100644
index 00000000..4a4941a5
--- /dev/null
+++ b/build/approot/packages/System.Text.Encoding/4.0.0/System.Text.Encoding.nuspec
@@ -0,0 +1,44 @@
+
+
+
+ System.Text.Encoding
+ 4.0.0
+ System.Text.Encoding
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides base abstract encoding classes for converting blocks of characters to and from blocks of bytes.
+
+Commonly Used Types:
+System.Text.Encoding
+System.Text.DecoderFallbackException
+System.Text.Decoder
+System.Text.EncoderFallbackException
+System.Text.Encoder
+System.Text.EncoderFallback
+System.Text.EncoderFallbackBuffer
+System.Text.DecoderFallback
+System.Text.DecoderFallbackBuffer
+System.Text.DecoderExceptionFallback
+ Provides base abstract encoding classes for converting blocks of characters to and from blocks of bytes.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/lib/net45/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/lib/win8/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/ref/dotnet/System.Text.Encoding.dll b/build/approot/packages/System.Text.Encoding/4.0.0/ref/dotnet/System.Text.Encoding.dll
new file mode 100644
index 00000000..c2be3e71
Binary files /dev/null and b/build/approot/packages/System.Text.Encoding/4.0.0/ref/dotnet/System.Text.Encoding.dll differ
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/ref/net45/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/ref/netcore50/System.Text.Encoding.dll b/build/approot/packages/System.Text.Encoding/4.0.0/ref/netcore50/System.Text.Encoding.dll
new file mode 100644
index 00000000..c2be3e71
Binary files /dev/null and b/build/approot/packages/System.Text.Encoding/4.0.0/ref/netcore50/System.Text.Encoding.dll differ
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/ref/win8/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Text.Encoding/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.Text.Encoding/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/License.rtf b/build/approot/packages/System.Threading/4.0.0/License.rtf
new file mode 100644
index 00000000..3aec6b65
--- /dev/null
+++ b/build/approot/packages/System.Threading/4.0.0/License.rtf
@@ -0,0 +1,118 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Calibri;}{\f3\fnil\fcharset0 Calibri;}{\f4\fnil\fcharset2 Symbol;}}
+{\colortbl ;\red31\green73\blue125;\red0\green0\blue255;}
+{\*\listtable
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx360}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc2\leveljc0\levelstartat1{\leveltext\'02\'02.;}{\levelnumbers\'01;}\jclisttab\tx720}\listid1 }
+{\list\listhybrid
+{\listlevel\levelnfc0\leveljc0\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}\jclisttab\tx363}
+{\listlevel\levelnfc4\leveljc0\levelstartat1{\leveltext\'02\'01.;}{\levelnumbers\'01;}\jclisttab\tx363}\listid2 }}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}{\s3 heading 3;}}
+{\*\generator Riched20 6.2.9200}\viewkind4\uc1
+\pard\nowidctlpar\sb120\sa120\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\par
+
+\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT .NET LIBRARY \par
+
+\pard\nowidctlpar\sb120\sa120\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120\b0 updates,\par
+{\pntext\f4\'B7\tab}supplements,\par
+{\pntext\f4\'B7\tab}Internet-based services, and\par
+{\pntext\f4\'B7\tab}support services\par
+
+\pard\nowidctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+
+\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard
+{\listtext\f0 1.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120 INSTALLATION AND USE RIGHTS. \par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 Installation and Use.\b0\fs20 You may install and use any number of copies of the software to design, develop and test your programs.\par
+{\listtext\f0 b.\tab}\b\fs19 Third Party Programs.\b0\fs20 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard
+{\listtext\f0 2.\tab}\jclisttab\tx360\ls1\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls1\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 DISTRIBUTABLE CODE.\~ \b0 The software is comprised of Distributable Code. \f1\ldblquote\f0 Distributable Code\f1\rdblquote\f0 is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\par
+
+\pard
+{\listtext\f0 i.\tab}\jclisttab\tx720\ls1\ilvl2\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077 Right to Use and Distribute. \par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 You may copy and distribute the object code form of the software.\par
+{\pntext\f4\'B7\tab}Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b ii.\tab Distribution Requirements.\b0 \b For any Distributable Code you distribute, you must\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 add significant primary functionality to it in your programs;\par
+{\pntext\f4\'B7\tab}require distributors and external end users to agree to terms that protect it at least as much as this agreement;\par
+{\pntext\f4\'B7\tab}display your valid copyright notice on your programs; and\par
+{\pntext\f4\'B7\tab}indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\par
+
+\pard\nowidctlpar\s3\fi-357\li1077\sb120\sa120\tx1077\b iii.\tab Distribution Restrictions.\b0 \b You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-357\li1434\sb120\sa120\b0 alter any copyright, trademark or patent notice in the Distributable Code;\par
+{\pntext\f4\'B7\tab}use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\par
+{\pntext\f4\'B7\tab}include Distributable Code in malicious, deceptive or unlawful programs; or\par
+{\pntext\f4\'B7\tab}modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\fi-358\li1792\sb120\sa120 the code be disclosed or distributed in source code form; or\cf1\f2\par
+{\pntext\f4\'B7\tab}\cf0\f0 others have the right to modify it.\cf1\f2\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\cf0\b\f0 3.\tab\fs19 SCOPE OF LICENSE. \b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 work around any technical limitations in the software;\par
+{\pntext\f4\'B7\tab}reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+{\pntext\f4\'B7\tab}publish the software for others to copy;\par
+{\pntext\f4\'B7\tab}rent, lease or lend the software;\par
+{\pntext\f4\'B7\tab}transfer the software or this agreement to any third party; or\par
+{\pntext\f4\'B7\tab}use the software for commercial software hosting services.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\fs20 4.\tab\fs19 BACKUP COPY. \b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par
+\b\fs20 5.\tab\fs19 DOCUMENTATION. \b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par
+\b\fs20 6.\tab\fs19 EXPORT RESTRICTIONS. \b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\cf2\ul\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting}}}}\f0\fs19 .\cf2\ul\fs20\par
+\cf0\ulnone\b 7.\tab\fs19 SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par
+\b\fs20 8.\tab\fs19 ENTIRE AGREEMENT. \b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par
+\b\fs20 9.\tab\fs19 APPLICABLE LAW.\par
+
+\pard
+{\listtext\f0 a.\tab}\jclisttab\tx363\ls2\ilvl1\nowidctlpar\s2\fi-363\li720\sb120\sa120 United States. \b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par
+{\listtext\f0 b.\tab}\b Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 10.\tab\fs19 LEGAL EFFECT. \b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par
+\b\fs20 11.\tab\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\nowidctlpar\li357\sb120\sa120 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\par
+
+\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\fs20 12.\tab\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent363{\pntxtb\'B7}}\nowidctlpar\fi-363\li720\sb120\sa120 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+{\pntext\f4\'B7\tab}claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\nowidctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\par
+Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EXON\'c9RATION DE GARANTIE. \b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\par
+\b LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES. \b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\par
+
+\pard\nowidctlpar\sb120\sa120\lang9 Cette limitation concerne :\par
+
+\pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent360{\pntxtb\'B7}}\nowidctlpar\li720\sb120\sa120 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\par
+{\pntext\f4\'B7\tab}les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\par
+
+\pard\nowidctlpar\sb120\sa120 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\par
+
+\pard\nowidctlpar\s1\sb120\sa120\b\lang1033 EFFET JURIDIQUE. \b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\par
+
+\pard\nowidctlpar\sb120\sa120\b\fs20\lang1036\par
+
+\pard\sa200\sl276\slmult1\b0\f3\fs22\lang9\par
+}
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Threading/4.0.0/System.Threading.nuspec b/build/approot/packages/System.Threading/4.0.0/System.Threading.nuspec
new file mode 100644
index 00000000..e140d11a
--- /dev/null
+++ b/build/approot/packages/System.Threading/4.0.0/System.Threading.nuspec
@@ -0,0 +1,44 @@
+
+
+
+ System.Threading
+ 4.0.0
+ System.Threading
+ true
+ Microsoft
+ Microsoft
+ http://go.microsoft.com/fwlink/?LinkId=329770
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Provides the fundamental synchronization primitives, including System.Threading.Monitor and System.Threading.Mutex, that are required when writing asynchronous code.
+
+Commonly Used Types:
+System.Threading.Monitor
+System.Threading.SynchronizationContext
+System.Threading.ManualResetEvent
+System.Threading.AutoResetEvent
+System.Threading.ThreadLocal<T>
+System.Threading.EventWaitHandle
+System.Threading.SemaphoreSlim
+System.Threading.Mutex
+ Provides the fundamental synchronization primitives, including System.Threading.Monitor and System.Threading.Mutex, that are required when writing asynchronous code.
+ Copyright © Microsoft Corporation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/System.Threading/4.0.0/lib/MonoAndroid10/_._ b/build/approot/packages/System.Threading/4.0.0/lib/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/lib/MonoTouch10/_._ b/build/approot/packages/System.Threading/4.0.0/lib/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/lib/net45/_._ b/build/approot/packages/System.Threading/4.0.0/lib/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/lib/win8/_._ b/build/approot/packages/System.Threading/4.0.0/lib/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/lib/wp80/_._ b/build/approot/packages/System.Threading/4.0.0/lib/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/lib/wpa81/_._ b/build/approot/packages/System.Threading/4.0.0/lib/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/lib/xamarinios10/_._ b/build/approot/packages/System.Threading/4.0.0/lib/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/lib/xamarinmac20/_._ b/build/approot/packages/System.Threading/4.0.0/lib/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/ref/MonoAndroid10/_._ b/build/approot/packages/System.Threading/4.0.0/ref/MonoAndroid10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/ref/MonoTouch10/_._ b/build/approot/packages/System.Threading/4.0.0/ref/MonoTouch10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/ref/dotnet/System.Threading.dll b/build/approot/packages/System.Threading/4.0.0/ref/dotnet/System.Threading.dll
new file mode 100644
index 00000000..3a68050b
Binary files /dev/null and b/build/approot/packages/System.Threading/4.0.0/ref/dotnet/System.Threading.dll differ
diff --git a/build/approot/packages/System.Threading/4.0.0/ref/net45/_._ b/build/approot/packages/System.Threading/4.0.0/ref/net45/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/ref/netcore50/System.Threading.dll b/build/approot/packages/System.Threading/4.0.0/ref/netcore50/System.Threading.dll
new file mode 100644
index 00000000..3a68050b
Binary files /dev/null and b/build/approot/packages/System.Threading/4.0.0/ref/netcore50/System.Threading.dll differ
diff --git a/build/approot/packages/System.Threading/4.0.0/ref/win8/_._ b/build/approot/packages/System.Threading/4.0.0/ref/win8/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/ref/wp80/_._ b/build/approot/packages/System.Threading/4.0.0/ref/wp80/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/ref/wpa81/_._ b/build/approot/packages/System.Threading/4.0.0/ref/wpa81/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/ref/xamarinios10/_._ b/build/approot/packages/System.Threading/4.0.0/ref/xamarinios10/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/System.Threading/4.0.0/ref/xamarinmac20/_._ b/build/approot/packages/System.Threading/4.0.0/ref/xamarinmac20/_._
new file mode 100644
index 00000000..e69de29b
diff --git a/build/approot/packages/WebGrease/1.5.2/WebGrease.nuspec b/build/approot/packages/WebGrease/1.5.2/WebGrease.nuspec
new file mode 100644
index 00000000..649037e8
--- /dev/null
+++ b/build/approot/packages/WebGrease/1.5.2/WebGrease.nuspec
@@ -0,0 +1,17 @@
+
+
+
+ WebGrease
+ 1.5.2
+ true
+ webgrease@microsoft.com
+ Microsoft
+ http://www.microsoft.com/web/webpi/eula/msn_webgrease_eula.htm
+ Web Grease is a suite of tools for optimizing javascript, css files and images.
+ en-US
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/approot/packages/WebGrease/1.5.2/lib/WebGrease.dll b/build/approot/packages/WebGrease/1.5.2/lib/WebGrease.dll
new file mode 100644
index 00000000..1d308f8e
Binary files /dev/null and b/build/approot/packages/WebGrease/1.5.2/lib/WebGrease.dll differ
diff --git a/build/approot/packages/WebGrease/1.5.2/tools/WG.exe b/build/approot/packages/WebGrease/1.5.2/tools/WG.exe
new file mode 100644
index 00000000..c6120a99
Binary files /dev/null and b/build/approot/packages/WebGrease/1.5.2/tools/WG.exe differ
diff --git a/build/approot/packages/WebGrease/1.5.2/tools/install.ps1 b/build/approot/packages/WebGrease/1.5.2/tools/install.ps1
new file mode 100644
index 00000000..df7a527a
--- /dev/null
+++ b/build/approot/packages/WebGrease/1.5.2/tools/install.ps1
@@ -0,0 +1,90 @@
+param($installPath, $toolsPath, $package, $project)
+
+# Return a relative path with reference to root as Uri object
+# $rootPath - root path
+# $relativePath - relative path
+# $appendToRelativePath - Optional parameter. If provided will be appended to relative Path using Path.Combine()
+Function GetRelativeUri($rootPath, $relativePath, $appendToRelativePath)
+{
+ if($rootPath -eq $null)
+ {
+ return $null
+ }
+
+ if($relativePath -eq $null)
+ {
+ return $null
+ }
+
+ $rootUri = new-object system.Uri($rootPath)
+ $targetPath = $relativePath
+
+ # If appendToRelativePath is provided then use it
+ if($appendToRelativePath -ne $null)
+ {
+ $targetPath = [io.path]::Combine($relativePath, $appendToRelativePath)
+ }
+
+ $targetUri = new-object system.Uri($targetPath)
+ $relativeUri = $rootUri.MakeRelativeUri($targetUri)
+
+ return $relativeUri
+}
+
+# Visual Studio execution done via NuGet Package Manager
+Function VSExecution($installPath, $package, $project)
+{
+ #$project.DTE.ExecuteCommand("File.SaveAll", [system.string]::Empty)
+
+ # Get the msbuild version of the project and add the import
+ $msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1
+
+ # add a property for us to be able to reference the path where the package was installed
+ $relativePackageUri = GetRelativeUri $project.FullName $installPath"\lib"
+
+ $msbuild.Xml.AddProperty("WebGreaseLibPath", $relativePackageUri.ToString().Replace([System.IO.Path]::AltDirectorySeparatorChar, [System.IO.Path]::DirectorySeparatorChar))
+
+ # save the project
+ $project.Save()
+}
+
+# Command line execution done by any external tool (For example, NuGetUpdater)
+# $package - package id
+# $project - parameter value is path to Project file in this case.
+Function CommandLineExecution($installPath, $package, $project)
+{
+ [Reflection.Assembly]::LoadWithPartialName("Microsoft.Build")
+ [Reflection.Assembly]::LoadWithPartialName("System.Xml")
+ [Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq")
+
+ # Get the msbuild version of the project and add the import
+ $projXDoc = [System.Xml.Linq.XDocument]::Load($project)
+
+ $defaultNameSpace = $projXDoc.Root.GetDefaultNamespace()
+
+ $propertyGroup = [System.Xml.Linq.XName]::Get("PropertyGroup", $defaultNameSpace.NamespaceName)
+ $webGreaseBuildLocation = [System.Xml.Linq.XName]::Get("WebGreaseLibPath", $defaultNameSpace.NamespaceName)
+
+ # add a property for us to be able to reference the path where the package was installed
+ $relativePackageUri = GetRelativeUri $project.FullName $installPath"\lib"
+
+ $propGroupElement = $projXDoc.Root.Elements($propertyGroup) | Select-Object -First 1
+ IF ($propGroupElement -ne $null)
+ {
+ $newElement = new-object System.Xml.Linq.XElement($webGreaseBuildLocation, $relativePackageUri.ToString().Replace([System.IO.Path]::AltDirectorySeparatorChar, [System.IO.Path]::DirectorySeparatorChar))
+ $propGroupElement.Add($newElement)
+ }
+
+ # save the project
+ $projXDoc.Save($project)
+}
+
+
+IF ($project -is [system.string])
+{
+ CommandLineExecution $installPath $package $project
+}
+ELSE
+{
+ VSExecution $installPath $package $project
+}
diff --git a/build/approot/packages/WebGrease/1.5.2/tools/uninstall.ps1 b/build/approot/packages/WebGrease/1.5.2/tools/uninstall.ps1
new file mode 100644
index 00000000..99dec621
--- /dev/null
+++ b/build/approot/packages/WebGrease/1.5.2/tools/uninstall.ps1
@@ -0,0 +1,63 @@
+param($installPath, $toolsPath, $package, $project)
+
+# Visual Studio execution done via NuGet Package Manager
+Function VSExecution($toolsPath, $project)
+{
+
+
+ $project.DTE.ExecuteCommand("File.SaveAll", [system.string]::Empty)
+
+ # Get the msbuild version of the project and add the import
+ $msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1
+
+ # now remove our property that points to this package path, "WebGreaseLibPath"
+ foreach ($property in $msbuild.Properties)
+ {
+ if ($property.Name -eq "WebGreaseLibPath")
+ {
+ $propertyToRemove = $property
+ }
+ }
+
+ if ($propertyToRemove -ne $null)
+ {
+ $propertyToRemove.Project.RemoveProperty($propertyToRemove)
+ $project.Save()
+ }
+
+ $project.DTE.ExecuteCommand("File.SaveAll", [system.string]::Empty)
+}
+
+# Command line execution done by any external tool (For example, NuGetUpdater)
+# $project - parameter value is path to Project file in this case.
+Function CommandLineExecution($toolsPath, $project)
+{
+ [Reflection.Assembly]::LoadWithPartialName("System.Xml")
+ [Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq")
+
+
+
+ $projXDoc = [System.Xml.Linq.XDocument]::Load($project)
+ $defaultNameSpace = $projXDoc.Root.GetDefaultNamespace()
+ $xmlReader = $projXDoc.CreateReader()
+ $namespaceManager = new-object System.Xml.XmlNamespaceManager($xmlReader.NameTable)
+ $namespaceManager.AddNamespace("my", $defaultNameSpace.NamespaceName)
+
+ $msnRfPackageElement = [System.Xml.XPath.Extensions]::XPathSelectElement($projXDoc.Root, "//my:WebGreaseLibPath", $namespaceManager)
+ if($msnRfPackageElement -ne $null)
+ {
+ $msnRfPackageElement.Remove()
+ }
+
+ # save the project
+ $projXDoc.Save($project)
+}
+
+IF ($project -is [system.string])
+{
+ CommandLineExecution $toolsPath $project
+}
+ELSE
+{
+ VSExecution $toolsPath $project
+}
diff --git a/build/approot/packages/Zlib.Portable.Signed/1.11.0/Zlib.Portable.Signed.nuspec b/build/approot/packages/Zlib.Portable.Signed/1.11.0/Zlib.Portable.Signed.nuspec
new file mode 100644
index 00000000..701d25dc
--- /dev/null
+++ b/build/approot/packages/Zlib.Portable.Signed/1.11.0/Zlib.Portable.Signed.nuspec
@@ -0,0 +1,33 @@
+
+
+
+ Zlib.Portable.Signed
+ 1.11.0
+ Zlib.Portable
+ true
+ AdvancedREI,onovotny
+ AdvancedREI
+ http://en.wikipedia.org/wiki/Zlib_License
+ http://dotnetzip.codeplex.com/
+ A Portable Class Library port of the popular Zlib library from http://dotnetzip.codeplex.com. Works on .NET 4, 4.0.3, & 4.5.x, Sliverlight 5, Windows Phone 8.x, Windows 8.x, Xamarin.iOS, & Xamarin.Android.
+ A Portable Class Library port of the popular Zlib library from http://dotnetzip.codeplex.com. Works on .NET 4, 4.0.3, & 4.5.x, Sliverlight 5, Windows Phone 8.x, Windows 8.x, Xamarin.iOS, & Xamarin.Android.
+ 1.11.0
+ • Fixed a bug where the wrong encoding was selected in Silverlight.
+ • Added support for a signed version of the assembly with the Zlib.Portable.Signed package.
+
+ 1.10.0
+ • Added support for Windows Phone 8.1, Xamarin.iOS, and Xamarin.Android. (Thanks Mattias Cibien!)
+ • Fixed a long-standing issue with GZip trailer validation. (Thanks Johannes Rudolph!)
+ • Removed support for Windows Phone 7.5 and Silverlight 4. (Sorry, guys!)
+
+ 1.9.2
+ • Update package to include zlib license requirements.
+
+ 1.9.1.2
+ • Adjustments to the NuGet package.
+
+ 1.9.1
+ • Initial release.
+ zip gzip deflate dotnetzip bzip2 lzma portable compression
+
+
\ No newline at end of file
diff --git a/build/approot/packages/Zlib.Portable.Signed/1.11.0/lib/portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid/Zlib.Portable.dll b/build/approot/packages/Zlib.Portable.Signed/1.11.0/lib/portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid/Zlib.Portable.dll
new file mode 100644
index 00000000..bb685c38
Binary files /dev/null and b/build/approot/packages/Zlib.Portable.Signed/1.11.0/lib/portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid/Zlib.Portable.dll differ
diff --git a/build/approot/packages/Zlib.Portable.Signed/1.11.0/lib/portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid/Zlib.Portable.xml b/build/approot/packages/Zlib.Portable.Signed/1.11.0/lib/portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid/Zlib.Portable.xml
new file mode 100644
index 00000000..6063d7d1
--- /dev/null
+++ b/build/approot/packages/Zlib.Portable.Signed/1.11.0/lib/portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid/Zlib.Portable.xml
@@ -0,0 +1,3430 @@
+
+
+
+ Zlib.Portable
+
+
+
+
+ Computes a CRC-32. The CRC-32 algorithm is parameterized - you
+ can set the polynomial and enable or disable bit
+ reversal. This can be used for GZIP, BZip2, or ZIP.
+
+
+ This type is used internally by DotNetZip; it is generally not used
+ directly by applications wishing to create, read, or manipulate zip
+ archive files.
+
+
+
+
+ Indicates the total number of bytes applied to the CRC.
+
+
+
+
+ Indicates the current CRC for all blocks slurped in.
+
+
+
+
+ Returns the CRC32 for the specified stream.
+
+ The stream over which to calculate the CRC32
+ the CRC32 calculation
+
+
+
+ Returns the CRC32 for the specified stream, and writes the input into the
+ output stream.
+
+ The stream over which to calculate the CRC32
+ The stream into which to deflate the input
+ the CRC32 calculation
+
+
+
+ Get the CRC32 for the given (word,byte) combo. This is a
+ computation defined by PKzip for PKZIP 2.0 (weak) encryption.
+
+ The word to start with.
+ The byte to combine it with.
+ The CRC-ized result.
+
+
+
+ Update the value for the running CRC32 using the given block of bytes.
+ This is useful when using the CRC32() class in a Stream.
+
+ block of bytes to slurp
+ starting point in the block
+ how many bytes within the block to slurp
+
+
+
+ Process one byte in the CRC.
+
+ the byte to include into the CRC .
+
+
+
+ Process a run of N identical bytes into the CRC.
+
+
+
+ This method serves as an optimization for updating the CRC when a
+ run of identical bytes is found. Rather than passing in a buffer of
+ length n, containing all identical bytes b, this method accepts the
+ byte value and the length of the (virtual) buffer - the length of
+ the run.
+
+
+ the byte to include into the CRC.
+ the number of times that byte should be repeated.
+
+
+
+ Combines the given CRC32 value with the current running total.
+
+
+ This is useful when using a divide-and-conquer approach to
+ calculating a CRC. Multiple threads can each calculate a
+ CRC32 on a segment of the data, and then combine the
+ individual CRC32 values at the end.
+
+ the crc value to be combined with this one
+ the length of data the CRC value was calculated on
+
+
+
+ Create an instance of the CRC32 class using the default settings: no
+ bit reversal, and a polynomial of 0xEDB88320.
+
+
+
+
+ Create an instance of the CRC32 class, specifying whether to reverse
+ data bits or not.
+
+
+ specify true if the instance should reverse data bits.
+
+
+
+ In the CRC-32 used by BZip2, the bits are reversed. Therefore if you
+ want a CRC32 with compatibility with BZip2, you should pass true
+ here. In the CRC-32 used by GZIP and PKZIP, the bits are not
+ reversed; Therefore if you want a CRC32 with compatibility with
+ those, you should pass false.
+
+
+
+
+
+ Create an instance of the CRC32 class, specifying the polynomial and
+ whether to reverse data bits or not.
+
+
+ The polynomial to use for the CRC, expressed in the reversed (LSB)
+ format: the highest ordered bit in the polynomial value is the
+ coefficient of the 0th power; the second-highest order bit is the
+ coefficient of the 1 power, and so on. Expressed this way, the
+ polynomial for the CRC-32C used in IEEE 802.3, is 0xEDB88320.
+
+
+ specify true if the instance should reverse data bits.
+
+
+
+
+ In the CRC-32 used by BZip2, the bits are reversed. Therefore if you
+ want a CRC32 with compatibility with BZip2, you should pass true
+ here for the reverseBits parameter. In the CRC-32 used by
+ GZIP and PKZIP, the bits are not reversed; Therefore if you want a
+ CRC32 with compatibility with those, you should pass false for the
+ reverseBits parameter.
+
+
+
+
+
+ Reset the CRC-32 class - clear the CRC "remainder register."
+
+
+
+ Use this when employing a single instance of this class to compute
+ multiple, distinct CRCs on multiple, distinct data blocks.
+
+
+
+
+
+ A Stream that calculates a CRC32 (a checksum) on all bytes read,
+ or on all bytes written.
+
+
+
+
+ This class can be used to verify the CRC of a ZipEntry when
+ reading from a stream, or to calculate a CRC when writing to a
+ stream. The stream should be used to either read, or write, but
+ not both. If you intermix reads and writes, the results are not
+ defined.
+
+
+
+ This class is intended primarily for use internally by the
+ DotNetZip library.
+
+
+
+
+
+ The default constructor.
+
+
+
+ Instances returned from this constructor will leave the underlying
+ stream open upon Close(). The stream uses the default CRC32
+ algorithm, which implies a polynomial of 0xEDB88320.
+
+
+ The underlying stream
+
+
+
+ The constructor allows the caller to specify how to handle the
+ underlying stream at close.
+
+
+
+ The stream uses the default CRC32 algorithm, which implies a
+ polynomial of 0xEDB88320.
+
+
+ The underlying stream
+ true to leave the underlying stream
+ open upon close of the CrcCalculatorStream ; false otherwise.
+
+
+
+ A constructor allowing the specification of the length of the stream
+ to read.
+
+
+
+ The stream uses the default CRC32 algorithm, which implies a
+ polynomial of 0xEDB88320.
+
+
+ Instances returned from this constructor will leave the underlying
+ stream open upon Close().
+
+
+ The underlying stream
+ The length of the stream to slurp
+
+
+
+ A constructor allowing the specification of the length of the stream
+ to read, as well as whether to keep the underlying stream open upon
+ Close().
+
+
+
+ The stream uses the default CRC32 algorithm, which implies a
+ polynomial of 0xEDB88320.
+
+
+ The underlying stream
+ The length of the stream to slurp
+ true to leave the underlying stream
+ open upon close of the CrcCalculatorStream ; false otherwise.
+
+
+
+ A constructor allowing the specification of the length of the stream
+ to read, as well as whether to keep the underlying stream open upon
+ Close(), and the CRC32 instance to use.
+
+
+
+ The stream uses the specified CRC32 instance, which allows the
+ application to specify how the CRC gets calculated.
+
+
+ The underlying stream
+ The length of the stream to slurp
+ true to leave the underlying stream
+ open upon close of the CrcCalculatorStream ; false otherwise.
+ the CRC32 instance to use to calculate the CRC32
+
+
+
+ Gets the total number of bytes run through the CRC32 calculator.
+
+
+
+ This is either the total number of bytes read, or the total number of
+ bytes written, depending on the direction of this stream.
+
+
+
+
+ Provides the current CRC for all blocks slurped in.
+
+
+
+ The running total of the CRC is kept as data is written or read
+ through the stream. read this property after all reads or writes to
+ get an accurate CRC for the entire stream.
+
+
+
+
+
+ Indicates whether the underlying stream will be left open when the
+ CrcCalculatorStream is Closed.
+
+
+
+ Set this at any point before calling .
+
+
+
+
+
+ Read from the stream
+
+ the buffer to read
+ the offset at which to start
+ the number of bytes to read
+ the number of bytes actually read
+
+
+
+ Write to the stream.
+
+ the buffer from which to write
+ the offset at which to start writing
+ the number of bytes to write
+
+
+
+ Indicates whether the stream supports reading.
+
+
+
+
+ Indicates whether the stream supports seeking.
+
+
+
+ Always returns false.
+
+
+
+
+
+ Indicates whether the stream supports writing.
+
+
+
+
+ Flush the stream.
+
+
+
+
+ Returns the length of the underlying stream.
+
+
+
+
+ The getter for this property returns the total bytes read.
+ If you use the setter, it will throw
+ .
+
+
+
+
+ Seeking is not supported on this stream. This method always throws
+
+
+ N/A
+ N/A
+ N/A
+
+
+
+ This method always throws
+
+
+ N/A
+
+
+
+ A class for compressing and decompressing streams using the Deflate algorithm.
+
+
+
+
+
+ The DeflateStream is a Decorator on a . It adds DEFLATE compression or decompression to any
+ stream.
+
+
+
+ Using this stream, applications can compress or decompress data via stream
+ Read and Write operations. Either compresssion or decompression
+ can occur through either reading or writing. The compression format used is
+ DEFLATE, which is documented in IETF RFC 1951 , "DEFLATE
+ Compressed Data Format Specification version 1.3.".
+
+
+
+ This class is similar to , except that
+ ZlibStream adds the RFC
+ 1950 - ZLIB framing bytes to a compressed stream when compressing, or
+ expects the RFC1950 framing bytes when decompressing. The DeflateStream
+ does not.
+
+
+
+
+
+
+
+
+
+ Create a DeflateStream using the specified CompressionMode.
+
+
+
+ When mode is CompressionMode.Compress , the DeflateStream will use
+ the default compression level. The "captive" stream will be closed when
+ the DeflateStream is closed.
+
+
+
+ This example uses a DeflateStream to compress data from a file, and writes
+ the compressed data to another file.
+
+ using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress))
+ {
+ using (var raw = System.IO.File.Create(fileToCompress + ".deflated"))
+ {
+ using (Stream compressor = new DeflateStream(raw, CompressionMode.Compress))
+ {
+ byte[] buffer = new byte[WORKING_BUFFER_SIZE];
+ int n;
+ while ((n= input.Read(buffer, 0, buffer.Length)) != 0)
+ {
+ compressor.Write(buffer, 0, n);
+ }
+ }
+ }
+ }
+
+
+
+ Using input As Stream = File.OpenRead(fileToCompress)
+ Using raw As FileStream = File.Create(fileToCompress & ".deflated")
+ Using compressor As Stream = New DeflateStream(raw, CompressionMode.Compress)
+ Dim buffer As Byte() = New Byte(4096) {}
+ Dim n As Integer = -1
+ Do While (n <> 0)
+ If (n > 0) Then
+ compressor.Write(buffer, 0, n)
+ End If
+ n = input.Read(buffer, 0, buffer.Length)
+ Loop
+ End Using
+ End Using
+ End Using
+
+
+ The stream which will be read or written.
+ Indicates whether the DeflateStream will compress or decompress.
+
+
+
+ Create a DeflateStream using the specified CompressionMode and the specified CompressionLevel.
+
+
+
+
+
+ When mode is CompressionMode.Decompress , the level parameter is
+ ignored. The "captive" stream will be closed when the DeflateStream is
+ closed.
+
+
+
+
+
+
+ This example uses a DeflateStream to compress data from a file, and writes
+ the compressed data to another file.
+
+
+ using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress))
+ {
+ using (var raw = System.IO.File.Create(fileToCompress + ".deflated"))
+ {
+ using (Stream compressor = new DeflateStream(raw,
+ CompressionMode.Compress,
+ CompressionLevel.BestCompression))
+ {
+ byte[] buffer = new byte[WORKING_BUFFER_SIZE];
+ int n= -1;
+ while (n != 0)
+ {
+ if (n > 0)
+ compressor.Write(buffer, 0, n);
+ n= input.Read(buffer, 0, buffer.Length);
+ }
+ }
+ }
+ }
+
+
+
+ Using input As Stream = File.OpenRead(fileToCompress)
+ Using raw As FileStream = File.Create(fileToCompress & ".deflated")
+ Using compressor As Stream = New DeflateStream(raw, CompressionMode.Compress, CompressionLevel.BestCompression)
+ Dim buffer As Byte() = New Byte(4096) {}
+ Dim n As Integer = -1
+ Do While (n <> 0)
+ If (n > 0) Then
+ compressor.Write(buffer, 0, n)
+ End If
+ n = input.Read(buffer, 0, buffer.Length)
+ Loop
+ End Using
+ End Using
+ End Using
+
+
+ The stream to be read or written while deflating or inflating.
+ Indicates whether the DeflateStream will compress or decompress.
+ A tuning knob to trade speed for effectiveness.
+
+
+
+ Create a DeflateStream using the specified
+ CompressionMode , and explicitly specify whether the
+ stream should be left open after Deflation or Inflation.
+
+
+
+
+
+ This constructor allows the application to request that the captive stream
+ remain open after the deflation or inflation occurs. By default, after
+ Close() is called on the stream, the captive stream is also
+ closed. In some cases this is not desired, for example if the stream is a
+ memory stream that will be re-read after compression. Specify true for
+ the parameter to leave the stream open.
+
+
+
+ The DeflateStream will use the default compression level.
+
+
+
+ See the other overloads of this constructor for example code.
+
+
+
+
+ The stream which will be read or written. This is called the
+ "captive" stream in other places in this documentation.
+
+
+
+ Indicates whether the DeflateStream will compress or decompress.
+
+
+ true if the application would like the stream to
+ remain open after inflation/deflation.
+
+
+
+ Create a DeflateStream using the specified CompressionMode
+ and the specified CompressionLevel , and explicitly specify whether
+ the stream should be left open after Deflation or Inflation.
+
+
+
+
+
+ When mode is CompressionMode.Decompress , the level parameter is ignored.
+
+
+
+ This constructor allows the application to request that the captive stream
+ remain open after the deflation or inflation occurs. By default, after
+ Close() is called on the stream, the captive stream is also
+ closed. In some cases this is not desired, for example if the stream is a
+ that will be re-read after
+ compression. Specify true for the parameter
+ to leave the stream open.
+
+
+
+
+
+
+ This example shows how to use a DeflateStream to compress data from
+ a file, and store the compressed data into another file.
+
+
+ using (var output = System.IO.File.Create(fileToCompress + ".deflated"))
+ {
+ using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress))
+ {
+ using (Stream compressor = new DeflateStream(output, CompressionMode.Compress, CompressionLevel.BestCompression, true))
+ {
+ byte[] buffer = new byte[WORKING_BUFFER_SIZE];
+ int n= -1;
+ while (n != 0)
+ {
+ if (n > 0)
+ compressor.Write(buffer, 0, n);
+ n= input.Read(buffer, 0, buffer.Length);
+ }
+ }
+ }
+ // can write additional data to the output stream here
+ }
+
+
+
+ Using output As FileStream = File.Create(fileToCompress & ".deflated")
+ Using input As Stream = File.OpenRead(fileToCompress)
+ Using compressor As Stream = New DeflateStream(output, CompressionMode.Compress, CompressionLevel.BestCompression, True)
+ Dim buffer As Byte() = New Byte(4096) {}
+ Dim n As Integer = -1
+ Do While (n <> 0)
+ If (n > 0) Then
+ compressor.Write(buffer, 0, n)
+ End If
+ n = input.Read(buffer, 0, buffer.Length)
+ Loop
+ End Using
+ End Using
+ ' can write additional data to the output stream here.
+ End Using
+
+
+ The stream which will be read or written.
+ Indicates whether the DeflateStream will compress or decompress.
+ true if the application would like the stream to remain open after inflation/deflation.
+ A tuning knob to trade speed for effectiveness.
+
+
+
+ This property sets the flush behavior on the stream.
+
+ See the ZLIB documentation for the meaning of the flush behavior.
+
+
+
+
+ The size of the working buffer for the compression codec.
+
+
+
+
+ The working buffer is used for all stream operations. The default size is
+ 1024 bytes. The minimum size is 128 bytes. You may get better performance
+ with a larger buffer. Then again, you might not. You would have to test
+ it.
+
+
+
+ Set this before the first call to Read() or Write() on the
+ stream. If you try to set it afterwards, it will throw.
+
+
+
+
+
+ The ZLIB strategy to be used during compression.
+
+
+
+ By tweaking this parameter, you may be able to optimize the compression for
+ data with particular characteristics.
+
+
+
+ Returns the total number of bytes input so far.
+
+
+ Returns the total number of bytes output so far.
+
+
+
+ Dispose the stream.
+
+
+
+ This may or may not result in a Close() call on the captive
+ stream. See the constructors that have a leaveOpen parameter
+ for more information.
+
+
+ Application code won't call this code directly. This method may be
+ invoked in two distinct scenarios. If disposing == true, the method
+ has been called directly or indirectly by a user's code, for example
+ via the public Dispose() method. In this case, both managed and
+ unmanaged resources can be referenced and disposed. If disposing ==
+ false, the method has been called by the runtime from inside the
+ object finalizer and this method should not reference other objects;
+ in that case only unmanaged resources must be referenced or
+ disposed.
+
+
+
+ true if the Dispose method was invoked by user code.
+
+
+
+
+ Indicates whether the stream can be read.
+
+
+ The return value depends on whether the captive stream supports reading.
+
+
+
+
+ Indicates whether the stream supports Seek operations.
+
+
+ Always returns false.
+
+
+
+
+ Indicates whether the stream can be written.
+
+
+ The return value depends on whether the captive stream supports writing.
+
+
+
+
+ Flush the stream.
+
+
+
+
+ Reading this property always throws a .
+
+
+
+
+ The position of the stream pointer.
+
+
+
+ Setting this property always throws a . Reading will return the total bytes
+ written out, if used in writing, or the total bytes read in, if used in
+ reading. The count may refer to compressed bytes or uncompressed bytes,
+ depending on how you've used the stream.
+
+
+
+
+ Read data from the stream.
+
+
+
+
+ If you wish to use the DeflateStream to compress data while
+ reading, you can create a DeflateStream with
+ CompressionMode.Compress , providing an uncompressed data stream.
+ Then call Read() on that DeflateStream , and the data read will be
+ compressed as you read. If you wish to use the DeflateStream to
+ decompress data while reading, you can create a DeflateStream with
+ CompressionMode.Decompress , providing a readable compressed data
+ stream. Then call Read() on that DeflateStream , and the data read
+ will be decompressed as you read.
+
+
+
+ A DeflateStream can be used for Read() or Write() , but not both.
+
+
+
+ The buffer into which the read data should be placed.
+ the offset within that data array to put the first byte read.
+ the number of bytes to read.
+ the number of bytes actually read
+
+
+
+ Calling this method always throws a .
+
+ this is irrelevant, since it will always throw!
+ this is irrelevant, since it will always throw!
+ irrelevant!
+
+
+
+ Calling this method always throws a .
+
+ this is irrelevant, since it will always throw!
+
+
+
+ Write data to the stream.
+
+
+
+
+ If you wish to use the DeflateStream to compress data while
+ writing, you can create a DeflateStream with
+ CompressionMode.Compress , and a writable output stream. Then call
+ Write() on that DeflateStream , providing uncompressed data
+ as input. The data sent to the output stream will be the compressed form
+ of the data written. If you wish to use the DeflateStream to
+ decompress data while writing, you can create a DeflateStream with
+ CompressionMode.Decompress , and a writable output stream. Then
+ call Write() on that stream, providing previously compressed
+ data. The data sent to the output stream will be the decompressed form of
+ the data written.
+
+
+
+ A DeflateStream can be used for Read() or Write() ,
+ but not both.
+
+
+
+
+ The buffer holding data to write to the stream.
+ the offset within that data array to find the first byte to write.
+ the number of bytes to write.
+
+
+
+ Compress a string into a byte array using DEFLATE (RFC 1951).
+
+
+
+ Uncompress it with .
+
+
+ DeflateStream.UncompressString(byte[])
+ DeflateStream.CompressBuffer(byte[])
+ GZipStream.CompressString(string)
+ ZlibStream.CompressString(string)
+
+
+ A string to compress. The string will first be encoded
+ using UTF8, then compressed.
+
+
+ The string in compressed form
+
+
+
+ Compress a byte array into a new byte array using DEFLATE.
+
+
+
+ Uncompress it with .
+
+
+ DeflateStream.CompressString(string)
+ DeflateStream.UncompressBuffer(byte[])
+ GZipStream.CompressBuffer(byte[])
+ ZlibStream.CompressBuffer(byte[])
+
+
+ A buffer to compress.
+
+
+ The data in compressed form
+
+
+
+ Uncompress a DEFLATE'd byte array into a single string.
+
+
+ DeflateStream.CompressString(String)
+ DeflateStream.UncompressBuffer(byte[])
+ GZipStream.UncompressString(byte[])
+ ZlibStream.UncompressString(byte[])
+
+
+ A buffer containing DEFLATE-compressed data.
+
+
+ The uncompressed string
+
+
+
+ Uncompress a DEFLATE'd byte array into a byte array.
+
+
+ DeflateStream.CompressBuffer(byte[])
+ DeflateStream.UncompressString(byte[])
+ GZipStream.UncompressBuffer(byte[])
+ ZlibStream.UncompressBuffer(byte[])
+
+
+ A buffer containing data that has been compressed with DEFLATE.
+
+
+ The data in uncompressed form
+
+
+
+ A class for compressing and decompressing GZIP streams.
+
+
+
+
+ The GZipStream is a Decorator on a
+ . It adds GZIP compression or decompression to any
+ stream.
+
+
+
+ Like the System.IO.Compression.GZipStream in the .NET Base Class Library, the
+ Ionic.Zlib.GZipStream can compress while writing, or decompress while
+ reading, but not vice versa. The compression method used is GZIP, which is
+ documented in IETF RFC
+ 1952 , "GZIP file format specification version 4.3".
+
+
+ A GZipStream can be used to decompress data (through Read() ) or
+ to compress data (through Write() ), but not both.
+
+
+
+ If you wish to use the GZipStream to compress data, you must wrap it
+ around a write-able stream. As you call Write() on the GZipStream , the
+ data will be compressed into the GZIP format. If you want to decompress data,
+ you must wrap the GZipStream around a readable stream that contains an
+ IETF RFC 1952-compliant stream. The data will be decompressed as you call
+ Read() on the GZipStream .
+
+
+
+ Though the GZIP format allows data from multiple files to be concatenated
+ together, this stream handles only a single segment of GZIP format, typically
+ representing a single file.
+
+
+
+ This class is similar to and .
+ ZlibStream handles RFC1950-compliant streams.
+ handles RFC1951-compliant streams. This class handles RFC1952-compliant streams.
+
+
+
+
+
+
+
+
+
+ The comment on the GZIP stream.
+
+
+
+
+ The GZIP format allows for each file to optionally have an associated
+ comment stored with the file. The comment is encoded with the ISO-8859-1
+ code page. To include a comment in a GZIP stream you create, set this
+ property before calling Write() for the first time on the
+ GZipStream .
+
+
+
+ When using GZipStream to decompress, you can retrieve this property
+ after the first call to Read() . If no comment has been set in the
+ GZIP bytestream, the Comment property will return null
+ (Nothing in VB).
+
+
+
+
+
+ The FileName for the GZIP stream.
+
+
+
+
+
+ The GZIP format optionally allows each file to have an associated
+ filename. When compressing data (through Write() ), set this
+ FileName before calling Write() the first time on the GZipStream .
+ The actual filename is encoded into the GZIP bytestream with the
+ ISO-8859-1 code page, according to RFC 1952. It is the application's
+ responsibility to insure that the FileName can be encoded and decoded
+ correctly with this code page.
+
+
+
+ When decompressing (through Read() ), you can retrieve this value
+ any time after the first Read() . In the case where there was no filename
+ encoded into the GZIP bytestream, the property will return null (Nothing
+ in VB).
+
+
+
+
+
+ The last modified time for the GZIP stream.
+
+
+
+ GZIP allows the storage of a last modified time with each GZIP entry.
+ When compressing data, you can set this before the first call to
+ Write() . When decompressing, you can retrieve this value any time
+ after the first call to Read() .
+
+
+
+
+ The CRC on the GZIP stream.
+
+
+ This is used for internal error checking. You probably don't need to look at this property.
+
+
+
+
+ Create a GZipStream using the specified CompressionMode .
+
+
+
+
+ When mode is CompressionMode.Compress , the GZipStream will use the
+ default compression level.
+
+
+
+ As noted in the class documentation, the CompressionMode (Compress
+ or Decompress) also establishes the "direction" of the stream. A
+ GZipStream with CompressionMode.Compress works only through
+ Write() . A GZipStream with
+ CompressionMode.Decompress works only through Read() .
+
+
+
+
+
+ This example shows how to use a GZipStream to compress data.
+
+ using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress))
+ {
+ using (var raw = System.IO.File.Create(outputFile))
+ {
+ using (Stream compressor = new GZipStream(raw, CompressionMode.Compress))
+ {
+ byte[] buffer = new byte[WORKING_BUFFER_SIZE];
+ int n;
+ while ((n= input.Read(buffer, 0, buffer.Length)) != 0)
+ {
+ compressor.Write(buffer, 0, n);
+ }
+ }
+ }
+ }
+
+
+ Dim outputFile As String = (fileToCompress & ".compressed")
+ Using input As Stream = File.OpenRead(fileToCompress)
+ Using raw As FileStream = File.Create(outputFile)
+ Using compressor As Stream = New GZipStream(raw, CompressionMode.Compress)
+ Dim buffer As Byte() = New Byte(4096) {}
+ Dim n As Integer = -1
+ Do While (n <> 0)
+ If (n > 0) Then
+ compressor.Write(buffer, 0, n)
+ End If
+ n = input.Read(buffer, 0, buffer.Length)
+ Loop
+ End Using
+ End Using
+ End Using
+
+
+
+
+ This example shows how to use a GZipStream to uncompress a file.
+
+ private void GunZipFile(string filename)
+ {
+ if (!filename.EndsWith(".gz))
+ throw new ArgumentException("filename");
+ var DecompressedFile = filename.Substring(0,filename.Length-3);
+ byte[] working = new byte[WORKING_BUFFER_SIZE];
+ int n= 1;
+ using (System.IO.Stream input = System.IO.File.OpenRead(filename))
+ {
+ using (Stream decompressor= new Ionic.Zlib.GZipStream(input, CompressionMode.Decompress, true))
+ {
+ using (var output = System.IO.File.Create(DecompressedFile))
+ {
+ while (n !=0)
+ {
+ n= decompressor.Read(working, 0, working.Length);
+ if (n > 0)
+ {
+ output.Write(working, 0, n);
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+
+ Private Sub GunZipFile(ByVal filename as String)
+ If Not (filename.EndsWith(".gz)) Then
+ Throw New ArgumentException("filename")
+ End If
+ Dim DecompressedFile as String = filename.Substring(0,filename.Length-3)
+ Dim working(WORKING_BUFFER_SIZE) as Byte
+ Dim n As Integer = 1
+ Using input As Stream = File.OpenRead(filename)
+ Using decompressor As Stream = new Ionic.Zlib.GZipStream(input, CompressionMode.Decompress, True)
+ Using output As Stream = File.Create(UncompressedFile)
+ Do
+ n= decompressor.Read(working, 0, working.Length)
+ If n > 0 Then
+ output.Write(working, 0, n)
+ End IF
+ Loop While (n > 0)
+ End Using
+ End Using
+ End Using
+ End Sub
+
+
+
+ The stream which will be read or written.
+ Indicates whether the GZipStream will compress or decompress.
+
+
+
+ Create a GZipStream using the specified CompressionMode and
+ the specified CompressionLevel .
+
+
+
+
+ The CompressionMode (Compress or Decompress) also establishes the
+ "direction" of the stream. A GZipStream with
+ CompressionMode.Compress works only through Write() . A
+ GZipStream with CompressionMode.Decompress works only
+ through Read() .
+
+
+
+
+
+
+ This example shows how to use a GZipStream to compress a file into a .gz file.
+
+
+ using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress))
+ {
+ using (var raw = System.IO.File.Create(fileToCompress + ".gz"))
+ {
+ using (Stream compressor = new GZipStream(raw,
+ CompressionMode.Compress,
+ CompressionLevel.BestCompression))
+ {
+ byte[] buffer = new byte[WORKING_BUFFER_SIZE];
+ int n;
+ while ((n= input.Read(buffer, 0, buffer.Length)) != 0)
+ {
+ compressor.Write(buffer, 0, n);
+ }
+ }
+ }
+ }
+
+
+
+ Using input As Stream = File.OpenRead(fileToCompress)
+ Using raw As FileStream = File.Create(fileToCompress & ".gz")
+ Using compressor As Stream = New GZipStream(raw, CompressionMode.Compress, CompressionLevel.BestCompression)
+ Dim buffer As Byte() = New Byte(4096) {}
+ Dim n As Integer = -1
+ Do While (n <> 0)
+ If (n > 0) Then
+ compressor.Write(buffer, 0, n)
+ End If
+ n = input.Read(buffer, 0, buffer.Length)
+ Loop
+ End Using
+ End Using
+ End Using
+
+
+ The stream to be read or written while deflating or inflating.
+ Indicates whether the GZipStream will compress or decompress.
+ A tuning knob to trade speed for effectiveness.
+
+
+
+ Create a GZipStream using the specified CompressionMode , and
+ explicitly specify whether the stream should be left open after Deflation
+ or Inflation.
+
+
+
+
+ This constructor allows the application to request that the captive stream
+ remain open after the deflation or inflation occurs. By default, after
+ Close() is called on the stream, the captive stream is also
+ closed. In some cases this is not desired, for example if the stream is a
+ memory stream that will be re-read after compressed data has been written
+ to it. Specify true for the parameter to leave
+ the stream open.
+
+
+
+ The (Compress or Decompress) also
+ establishes the "direction" of the stream. A GZipStream with
+ CompressionMode.Compress works only through Write() . A GZipStream
+ with CompressionMode.Decompress works only through Read() .
+
+
+
+ The GZipStream will use the default compression level. If you want
+ to specify the compression level, see .
+
+
+
+ See the other overloads of this constructor for example code.
+
+
+
+
+
+ The stream which will be read or written. This is called the "captive"
+ stream in other places in this documentation.
+
+
+ Indicates whether the GZipStream will compress or decompress.
+
+
+
+ true if the application would like the base stream to remain open after
+ inflation/deflation.
+
+
+
+
+ Create a GZipStream using the specified CompressionMode and the
+ specified CompressionLevel , and explicitly specify whether the
+ stream should be left open after Deflation or Inflation.
+
+
+
+
+
+ This constructor allows the application to request that the captive stream
+ remain open after the deflation or inflation occurs. By default, after
+ Close() is called on the stream, the captive stream is also
+ closed. In some cases this is not desired, for example if the stream is a
+ memory stream that will be re-read after compressed data has been written
+ to it. Specify true for the parameter to
+ leave the stream open.
+
+
+
+ As noted in the class documentation, the CompressionMode (Compress
+ or Decompress) also establishes the "direction" of the stream. A
+ GZipStream with CompressionMode.Compress works only through
+ Write() . A GZipStream with CompressionMode.Decompress works only
+ through Read() .
+
+
+
+
+
+ This example shows how to use a GZipStream to compress data.
+
+ using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress))
+ {
+ using (var raw = System.IO.File.Create(outputFile))
+ {
+ using (Stream compressor = new GZipStream(raw, CompressionMode.Compress, CompressionLevel.BestCompression, true))
+ {
+ byte[] buffer = new byte[WORKING_BUFFER_SIZE];
+ int n;
+ while ((n= input.Read(buffer, 0, buffer.Length)) != 0)
+ {
+ compressor.Write(buffer, 0, n);
+ }
+ }
+ }
+ }
+
+
+ Dim outputFile As String = (fileToCompress & ".compressed")
+ Using input As Stream = File.OpenRead(fileToCompress)
+ Using raw As FileStream = File.Create(outputFile)
+ Using compressor As Stream = New GZipStream(raw, CompressionMode.Compress, CompressionLevel.BestCompression, True)
+ Dim buffer As Byte() = New Byte(4096) {}
+ Dim n As Integer = -1
+ Do While (n <> 0)
+ If (n > 0) Then
+ compressor.Write(buffer, 0, n)
+ End If
+ n = input.Read(buffer, 0, buffer.Length)
+ Loop
+ End Using
+ End Using
+ End Using
+
+
+ The stream which will be read or written.
+ Indicates whether the GZipStream will compress or decompress.
+ true if the application would like the stream to remain open after inflation/deflation.
+ A tuning knob to trade speed for effectiveness.
+
+
+
+ This property sets the flush behavior on the stream.
+
+
+
+
+ The size of the working buffer for the compression codec.
+
+
+
+
+ The working buffer is used for all stream operations. The default size is
+ 1024 bytes. The minimum size is 128 bytes. You may get better performance
+ with a larger buffer. Then again, you might not. You would have to test
+ it.
+
+
+
+ Set this before the first call to Read() or Write() on the
+ stream. If you try to set it afterwards, it will throw.
+
+
+
+
+ Returns the total number of bytes input so far.
+
+
+ Returns the total number of bytes output so far.
+
+
+
+ Dispose the stream.
+
+
+
+ This may or may not result in a Close() call on the captive
+ stream. See the constructors that have a leaveOpen parameter
+ for more information.
+
+
+ This method may be invoked in two distinct scenarios. If disposing
+ == true, the method has been called directly or indirectly by a
+ user's code, for example via the public Dispose() method. In this
+ case, both managed and unmanaged resources can be referenced and
+ disposed. If disposing == false, the method has been called by the
+ runtime from inside the object finalizer and this method should not
+ reference other objects; in that case only unmanaged resources must
+ be referenced or disposed.
+
+
+
+ indicates whether the Dispose method was invoked by user code.
+
+
+
+
+ Indicates whether the stream can be read.
+
+
+ The return value depends on whether the captive stream supports reading.
+
+
+
+
+ Indicates whether the stream supports Seek operations.
+
+
+ Always returns false.
+
+
+
+
+ Indicates whether the stream can be written.
+
+
+ The return value depends on whether the captive stream supports writing.
+
+
+
+
+ Flush the stream.
+
+
+
+
+ Reading this property always throws a .
+
+
+
+
+ The position of the stream pointer.
+
+
+
+ Setting this property always throws a . Reading will return the total bytes
+ written out, if used in writing, or the total bytes read in, if used in
+ reading. The count may refer to compressed bytes or uncompressed bytes,
+ depending on how you've used the stream.
+
+
+
+
+ Read and decompress data from the source stream.
+
+
+
+ With a GZipStream , decompression is done through reading.
+
+
+
+
+ byte[] working = new byte[WORKING_BUFFER_SIZE];
+ using (System.IO.Stream input = System.IO.File.OpenRead(_CompressedFile))
+ {
+ using (Stream decompressor= new Ionic.Zlib.GZipStream(input, CompressionMode.Decompress, true))
+ {
+ using (var output = System.IO.File.Create(_DecompressedFile))
+ {
+ int n;
+ while ((n= decompressor.Read(working, 0, working.Length)) !=0)
+ {
+ output.Write(working, 0, n);
+ }
+ }
+ }
+ }
+
+
+ The buffer into which the decompressed data should be placed.
+ the offset within that data array to put the first byte read.
+ the number of bytes to read.
+ the number of bytes actually read
+
+
+
+ Calling this method always throws a .
+
+ irrelevant; it will always throw!
+ irrelevant; it will always throw!
+ irrelevant!
+
+
+
+ Calling this method always throws a .
+
+ irrelevant; this method will always throw!
+
+
+
+ Write data to the stream.
+
+
+
+
+ If you wish to use the GZipStream to compress data while writing,
+ you can create a GZipStream with CompressionMode.Compress , and a
+ writable output stream. Then call Write() on that GZipStream ,
+ providing uncompressed data as input. The data sent to the output stream
+ will be the compressed form of the data written.
+
+
+
+ A GZipStream can be used for Read() or Write() , but not
+ both. Writing implies compression. Reading implies decompression.
+
+
+
+ The buffer holding data to write to the stream.
+ the offset within that data array to find the first byte to write.
+ the number of bytes to write.
+
+
+
+ Compress a string into a byte array using GZip.
+
+
+
+ Uncompress it with .
+
+
+
+
+
+
+ A string to compress. The string will first be encoded
+ using UTF8, then compressed.
+
+
+ The string in compressed form
+
+
+
+ Compress a byte array into a new byte array using GZip.
+
+
+
+ Uncompress it with .
+
+
+
+
+
+
+ A buffer to compress.
+
+
+ The data in compressed form
+
+
+
+ Uncompress a GZip'ed byte array into a single string.
+
+
+
+
+
+
+ A buffer containing GZIP-compressed data.
+
+
+ The uncompressed string
+
+
+
+ Uncompress a GZip'ed byte array into a byte array.
+
+
+
+
+
+
+ A buffer containing data that has been compressed with GZip.
+
+
+ The data in uncompressed form
+
+
+
+ A class for compressing streams using the
+ Deflate algorithm with multiple threads.
+
+
+
+
+ This class performs DEFLATE compression through writing. For
+ more information on the Deflate algorithm, see IETF RFC 1951,
+ "DEFLATE Compressed Data Format Specification version 1.3."
+
+
+
+ This class is similar to , except
+ that this class is for compression only, and this implementation uses an
+ approach that employs multiple worker threads to perform the DEFLATE. On
+ a multi-cpu or multi-core computer, the performance of this class can be
+ significantly higher than the single-threaded DeflateStream, particularly
+ for larger streams. How large? Anything over 10mb is a good candidate
+ for parallel compression.
+
+
+
+ The tradeoff is that this class uses more memory and more CPU than the
+ vanilla DeflateStream, and also is less efficient as a compressor. For
+ large files the size of the compressed data stream can be less than 1%
+ larger than the size of a compressed data stream from the vanialla
+ DeflateStream. For smaller files the difference can be larger. The
+ difference will also be larger if you set the BufferSize to be lower than
+ the default value. Your mileage may vary. Finally, for small files, the
+ ParallelDeflateOutputStream can be much slower than the vanilla
+ DeflateStream, because of the overhead associated to using the thread
+ pool.
+
+
+
+
+
+
+
+ Create a ParallelDeflateOutputStream.
+
+
+
+
+ This stream compresses data written into it via the DEFLATE
+ algorithm (see RFC 1951), and writes out the compressed byte stream.
+
+
+
+ The instance will use the default compression level, the default
+ buffer sizes and the default number of threads and buffers per
+ thread.
+
+
+
+ This class is similar to ,
+ except that this implementation uses an approach that employs
+ multiple worker threads to perform the DEFLATE. On a multi-cpu or
+ multi-core computer, the performance of this class can be
+ significantly higher than the single-threaded DeflateStream,
+ particularly for larger streams. How large? Anything over 10mb is
+ a good candidate for parallel compression.
+
+
+
+
+
+
+ This example shows how to use a ParallelDeflateOutputStream to compress
+ data. It reads a file, compresses it, and writes the compressed data to
+ a second, output file.
+
+
+ byte[] buffer = new byte[WORKING_BUFFER_SIZE];
+ int n= -1;
+ String outputFile = fileToCompress + ".compressed";
+ using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress))
+ {
+ using (var raw = System.IO.File.Create(outputFile))
+ {
+ using (Stream compressor = new ParallelDeflateOutputStream(raw))
+ {
+ while ((n= input.Read(buffer, 0, buffer.Length)) != 0)
+ {
+ compressor.Write(buffer, 0, n);
+ }
+ }
+ }
+ }
+
+
+ Dim buffer As Byte() = New Byte(4096) {}
+ Dim n As Integer = -1
+ Dim outputFile As String = (fileToCompress & ".compressed")
+ Using input As Stream = File.OpenRead(fileToCompress)
+ Using raw As FileStream = File.Create(outputFile)
+ Using compressor As Stream = New ParallelDeflateOutputStream(raw)
+ Do While (n <> 0)
+ If (n > 0) Then
+ compressor.Write(buffer, 0, n)
+ End If
+ n = input.Read(buffer, 0, buffer.Length)
+ Loop
+ End Using
+ End Using
+ End Using
+
+
+ The stream to which compressed data will be written.
+
+
+
+ Create a ParallelDeflateOutputStream using the specified CompressionLevel.
+
+
+ See the
+ constructor for example code.
+
+ The stream to which compressed data will be written.
+ A tuning knob to trade speed for effectiveness.
+
+
+
+ Create a ParallelDeflateOutputStream and specify whether to leave the captive stream open
+ when the ParallelDeflateOutputStream is closed.
+
+
+ See the
+ constructor for example code.
+
+ The stream to which compressed data will be written.
+
+ true if the application would like the stream to remain open after inflation/deflation.
+
+
+
+
+ Create a ParallelDeflateOutputStream and specify whether to leave the captive stream open
+ when the ParallelDeflateOutputStream is closed.
+
+
+ See the
+ constructor for example code.
+
+ The stream to which compressed data will be written.
+ A tuning knob to trade speed for effectiveness.
+
+ true if the application would like the stream to remain open after inflation/deflation.
+
+
+
+
+ Create a ParallelDeflateOutputStream using the specified
+ CompressionLevel and CompressionStrategy, and specifying whether to
+ leave the captive stream open when the ParallelDeflateOutputStream is
+ closed.
+
+
+ See the
+ constructor for example code.
+
+ The stream to which compressed data will be written.
+ A tuning knob to trade speed for effectiveness.
+
+ By tweaking this parameter, you may be able to optimize the compression for
+ data with particular characteristics.
+
+
+ true if the application would like the stream to remain open after inflation/deflation.
+
+
+
+
+ The ZLIB strategy to be used during compression.
+
+
+
+
+
+ The maximum number of buffer pairs to use.
+
+
+
+
+ This property sets an upper limit on the number of memory buffer
+ pairs to create. The implementation of this stream allocates
+ multiple buffers to facilitate parallel compression. As each buffer
+ fills up, this stream uses
+ ThreadPool.QueueUserWorkItem()
+ to compress those buffers in a background threadpool thread. After a
+ buffer is compressed, it is re-ordered and written to the output
+ stream.
+
+
+
+ A higher number of buffer pairs enables a higher degree of
+ parallelism, which tends to increase the speed of compression on
+ multi-cpu computers. On the other hand, a higher number of buffer
+ pairs also implies a larger memory consumption, more active worker
+ threads, and a higher cpu utilization for any compression. This
+ property enables the application to limit its memory consumption and
+ CPU utilization behavior depending on requirements.
+
+
+
+ For each compression "task" that occurs in parallel, there are 2
+ buffers allocated: one for input and one for output. This property
+ sets a limit for the number of pairs. The total amount of storage
+ space allocated for buffering will then be (N*S*2), where N is the
+ number of buffer pairs, S is the size of each buffer ( ). By default, DotNetZip allocates 4 buffer
+ pairs per CPU core, so if your machine has 4 cores, and you retain
+ the default buffer size of 128k, then the
+ ParallelDeflateOutputStream will use 4 * 4 * 2 * 128kb of buffer
+ memory in total, or 4mb, in blocks of 128kb. If you then set this
+ property to 8, then the number will be 8 * 2 * 128kb of buffer
+ memory, or 2mb.
+
+
+
+ CPU utilization will also go up with additional buffers, because a
+ larger number of buffer pairs allows a larger number of background
+ threads to compress in parallel. If you find that parallel
+ compression is consuming too much memory or CPU, you can adjust this
+ value downward.
+
+
+
+ The default value is 16. Different values may deliver better or
+ worse results, depending on your priorities and the dynamic
+ performance characteristics of your storage and compute resources.
+
+
+
+ This property is not the number of buffer pairs to use; it is an
+ upper limit. An illustration: Suppose you have an application that
+ uses the default value of this property (which is 16), and it runs
+ on a machine with 2 CPU cores. In that case, DotNetZip will allocate
+ 4 buffer pairs per CPU core, for a total of 8 pairs. The upper
+ limit specified by this property has no effect.
+
+
+
+ The application can set this value at any time, but it is effective
+ only before the first call to Write(), which is when the buffers are
+ allocated.
+
+
+
+
+
+ The size of the buffers used by the compressor threads.
+
+
+
+
+ The default buffer size is 128k. The application can set this value
+ at any time, but it is effective only before the first Write().
+
+
+
+ Larger buffer sizes implies larger memory consumption but allows
+ more efficient compression. Using smaller buffer sizes consumes less
+ memory but may result in less effective compression. For example,
+ using the default buffer size of 128k, the compression delivered is
+ within 1% of the compression delivered by the single-threaded . On the other hand, using a
+ BufferSize of 8k can result in a compressed data stream that is 5%
+ larger than that delivered by the single-threaded
+ DeflateStream . Excessively small buffer sizes can also cause
+ the speed of the ParallelDeflateOutputStream to drop, because of
+ larger thread scheduling overhead dealing with many many small
+ buffers.
+
+
+
+ The total amount of storage space allocated for buffering will be
+ (N*S*2), where N is the number of buffer pairs, and S is the size of
+ each buffer (this property). There are 2 buffers used by the
+ compressor, one for input and one for output. By default, DotNetZip
+ allocates 4 buffer pairs per CPU core, so if your machine has 4
+ cores, then the number of buffer pairs used will be 16. If you
+ accept the default value of this property, 128k, then the
+ ParallelDeflateOutputStream will use 16 * 2 * 128kb of buffer memory
+ in total, or 4mb, in blocks of 128kb. If you set this property to
+ 64kb, then the number will be 16 * 2 * 64kb of buffer memory, or
+ 2mb.
+
+
+
+
+
+
+ The CRC32 for the data that was written out, prior to compression.
+
+
+ This value is meaningful only after a call to Close().
+
+
+
+
+ The total number of uncompressed bytes processed by the ParallelDeflateOutputStream.
+
+
+ This value is meaningful only after a call to Close().
+
+
+
+
+ Write data to the stream.
+
+
+
+
+
+ To use the ParallelDeflateOutputStream to compress data, create a
+ ParallelDeflateOutputStream with CompressionMode.Compress, passing a
+ writable output stream. Then call Write() on that
+ ParallelDeflateOutputStream, providing uncompressed data as input. The
+ data sent to the output stream will be the compressed form of the data
+ written.
+
+
+
+ To decompress data, use the class.
+
+
+
+ The buffer holding data to write to the stream.
+ the offset within that data array to find the first byte to write.
+ the number of bytes to write.
+
+
+
+ Flush the stream.
+
+
+
+
+ Close the stream.
+
+
+ You must call Close on the stream to guarantee that all of the data written in has
+ been compressed, and the compressed data has been written out.
+
+
+
+ Dispose the object
+
+
+ Because ParallelDeflateOutputStream is IDisposable, the
+ application must call this method when finished using the instance.
+
+
+ This method is generally called implicitly upon exit from
+ a using scope in C# (Using in VB).
+
+
+
+
+
+ Resets the stream for use with another stream.
+
+
+ Because the ParallelDeflateOutputStream is expensive to create, it
+ has been designed so that it can be recycled and re-used. You have
+ to call Close() on the stream first, then you can call Reset() on
+ it, to use it again on another stream.
+
+
+
+ The new output stream for this era.
+
+
+
+
+ ParallelDeflateOutputStream deflater = null;
+ foreach (var inputFile in listOfFiles)
+ {
+ string outputFile = inputFile + ".compressed";
+ using (System.IO.Stream input = System.IO.File.OpenRead(inputFile))
+ {
+ using (var outStream = System.IO.File.Create(outputFile))
+ {
+ if (deflater == null)
+ deflater = new ParallelDeflateOutputStream(outStream,
+ CompressionLevel.Best,
+ CompressionStrategy.Default,
+ true);
+ deflater.Reset(outStream);
+
+ while ((n= input.Read(buffer, 0, buffer.Length)) != 0)
+ {
+ deflater.Write(buffer, 0, n);
+ }
+ }
+ }
+ }
+
+
+
+
+
+ Indicates whether the stream supports Seek operations.
+
+
+ Always returns false.
+
+
+
+
+ Indicates whether the stream supports Read operations.
+
+
+ Always returns false.
+
+
+
+
+ Indicates whether the stream supports Write operations.
+
+
+ Returns true if the provided stream is writable.
+
+
+
+
+ Reading this property always throws a NotSupportedException.
+
+
+
+
+ Returns the current position of the output stream.
+
+
+
+ Because the output gets written by a background thread,
+ the value may change asynchronously. Setting this
+ property always throws a NotSupportedException.
+
+
+
+
+
+ This method always throws a NotSupportedException.
+
+
+ The buffer into which data would be read, IF THIS METHOD
+ ACTUALLY DID ANYTHING.
+
+
+ The offset within that data array at which to insert the
+ data that is read, IF THIS METHOD ACTUALLY DID
+ ANYTHING.
+
+
+ The number of bytes to write, IF THIS METHOD ACTUALLY DID
+ ANYTHING.
+
+ nothing.
+
+
+
+ This method always throws a NotSupportedException.
+
+
+ The offset to seek to....
+ IF THIS METHOD ACTUALLY DID ANYTHING.
+
+
+ The reference specifying how to apply the offset.... IF
+ THIS METHOD ACTUALLY DID ANYTHING.
+
+ nothing. It always throws.
+
+
+
+ This method always throws a NotSupportedException.
+
+
+ The new value for the stream length.... IF
+ THIS METHOD ACTUALLY DID ANYTHING.
+
+
+
+
+ Map from a distance to a distance code.
+
+
+ No side effects. _dist_code[256] and _dist_code[257] are never used.
+
+
+
+
+ Describes how to flush the current deflate operation.
+
+
+ The different FlushType values are useful when using a Deflate in a streaming application.
+
+
+
+ No flush at all.
+
+
+ Closes the current block, but doesn't flush it to
+ the output. Used internally only in hypothetical
+ scenarios. This was supposed to be removed by Zlib, but it is
+ still in use in some edge cases.
+
+
+
+
+ Use this during compression to specify that all pending output should be
+ flushed to the output buffer and the output should be aligned on a byte
+ boundary. You might use this in a streaming communication scenario, so that
+ the decompressor can get all input data available so far. When using this
+ with a ZlibCodec, AvailableBytesIn will be zero after the call if
+ enough output space has been provided before the call. Flushing will
+ degrade compression and so it should be used only when necessary.
+
+
+
+
+ Use this during compression to specify that all output should be flushed, as
+ with FlushType.Sync , but also, the compression state should be reset
+ so that decompression can restart from this point if previous compressed
+ data has been damaged or if random access is desired. Using
+ FlushType.Full too often can significantly degrade the compression.
+
+
+
+ Signals the end of the compression/decompression stream.
+
+
+
+ The compression level to be used when using a DeflateStream or ZlibStream with CompressionMode.Compress.
+
+
+
+
+ None means that the data will be simply stored, with no change at all.
+ If you are producing ZIPs for use on Mac OSX, be aware that archives produced with CompressionLevel.None
+ cannot be opened with the default zip reader. Use a different CompressionLevel.
+
+
+
+
+ Same as None.
+
+
+
+
+ The fastest but least effective compression.
+
+
+
+
+ A synonym for BestSpeed.
+
+
+
+
+ A little slower, but better, than level 1.
+
+
+
+
+ A little slower, but better, than level 2.
+
+
+
+
+ A little slower, but better, than level 3.
+
+
+
+
+ A little slower than level 4, but with better compression.
+
+
+
+
+ The default compression level, with a good balance of speed and compression efficiency.
+
+
+
+
+ A synonym for Default.
+
+
+
+
+ Pretty good compression!
+
+
+
+
+ Better compression than Level7!
+
+
+
+
+ The "best" compression, where best means greatest reduction in size of the input data stream.
+ This is also the slowest compression.
+
+
+
+
+ A synonym for BestCompression.
+
+
+
+
+ Describes options for how the compression algorithm is executed. Different strategies
+ work better on different sorts of data. The strategy parameter can affect the compression
+ ratio and the speed of compression but not the correctness of the compresssion.
+
+
+
+
+ The default strategy is probably the best for normal data.
+
+
+
+
+ The Filtered strategy is intended to be used most effectively with data produced by a
+ filter or predictor. By this definition, filtered data consists mostly of small
+ values with a somewhat random distribution. In this case, the compression algorithm
+ is tuned to compress them better. The effect of Filtered is to force more Huffman
+ coding and less string matching; it is a half-step between Default and HuffmanOnly .
+
+
+
+
+ Using HuffmanOnly will force the compressor to do Huffman encoding only, with no
+ string matching.
+
+
+
+
+ An enum to specify the direction of transcoding - whether to compress or decompress.
+
+
+
+
+ Used to specify that the stream should compress the data.
+
+
+
+
+ Used to specify that the stream should decompress the data.
+
+
+
+
+ A general purpose exception class for exceptions in the Zlib library.
+
+
+
+
+ The ZlibException class captures exception information generated
+ by the Zlib library.
+
+
+
+
+ This ctor collects a message attached to the exception.
+
+ the message for the exception.
+
+
+
+ Performs an unsigned bitwise right shift with the specified number
+
+ Number to operate on
+ Ammount of bits to shift
+ The resulting number from the shift operation
+
+
+
+ Reads a number of characters from the current source TextReader and writes
+ the data to the target array at the specified index.
+
+
+ The source TextReader to read from
+ Contains the array of characteres read from the source TextReader.
+ The starting index of the target array.
+ The maximum number of characters to read from the source TextReader.
+
+
+ The number of characters read. The number will be less than or equal to
+ count depending on the data available in the source TextReader. Returns -1
+ if the end of the stream is reached.
+
+
+
+
+ Computes an Adler-32 checksum.
+
+
+ The Adler checksum is similar to a CRC checksum, but faster to compute, though less
+ reliable. It is used in producing RFC1950 compressed streams. The Adler checksum
+ is a required part of the "ZLIB" standard. Applications will almost never need to
+ use this class directly.
+
+
+
+
+
+
+ Calculates the Adler32 checksum.
+
+
+
+ This is used within ZLIB. You probably don't need to use this directly.
+
+
+
+ To compute an Adler32 checksum on a byte array:
+
+ var adler = Adler.Adler32(0, null, 0, 0);
+ adler = Adler.Adler32(adler, buffer, index, length);
+
+
+
+
+
+ Encoder and Decoder for ZLIB and DEFLATE (IETF RFC1950 and RFC1951).
+
+
+
+ This class compresses and decompresses data according to the Deflate algorithm
+ and optionally, the ZLIB format, as documented in RFC 1950 - ZLIB and RFC 1951 - DEFLATE .
+
+
+
+
+ The buffer from which data is taken.
+
+
+
+
+ An index into the InputBuffer array, indicating where to start reading.
+
+
+
+
+ The number of bytes available in the InputBuffer, starting at NextIn.
+
+
+ Generally you should set this to InputBuffer.Length before the first Inflate() or Deflate() call.
+ The class will update this number as calls to Inflate/Deflate are made.
+
+
+
+
+ Total number of bytes read so far, through all calls to Inflate()/Deflate().
+
+
+
+
+ Buffer to store output data.
+
+
+
+
+ An index into the OutputBuffer array, indicating where to start writing.
+
+
+
+
+ The number of bytes available in the OutputBuffer, starting at NextOut.
+
+
+ Generally you should set this to OutputBuffer.Length before the first Inflate() or Deflate() call.
+ The class will update this number as calls to Inflate/Deflate are made.
+
+
+
+
+ Total number of bytes written to the output so far, through all calls to Inflate()/Deflate().
+
+
+
+
+ used for diagnostics, when something goes wrong!
+
+
+
+
+ The compression level to use in this codec. Useful only in compression mode.
+
+
+
+
+ The number of Window Bits to use.
+
+
+ This gauges the size of the sliding window, and hence the
+ compression effectiveness as well as memory consumption. It's best to just leave this
+ setting alone if you don't know what it is. The maximum value is 15 bits, which implies
+ a 32k window.
+
+
+
+
+ The compression strategy to use.
+
+
+ This is only effective in compression. The theory offered by ZLIB is that different
+ strategies could potentially produce significant differences in compression behavior
+ for different data sets. Unfortunately I don't have any good recommendations for how
+ to set it differently. When I tested changing the strategy I got minimally different
+ compression performance. It's best to leave this property alone if you don't have a
+ good feel for it. Or, you may want to produce a test harness that runs through the
+ different strategy options and evaluates them on different file types. If you do that,
+ let me know your results.
+
+
+
+
+ The Adler32 checksum on the data transferred through the codec so far. You probably don't need to look at this.
+
+
+
+
+ Create a ZlibCodec.
+
+
+ If you use this default constructor, you will later have to explicitly call
+ InitializeInflate() or InitializeDeflate() before using the ZlibCodec to compress
+ or decompress.
+
+
+
+
+ Create a ZlibCodec that either compresses or decompresses.
+
+
+ Indicates whether the codec should compress (deflate) or decompress (inflate).
+
+
+
+
+ Initialize the inflation state.
+
+
+ It is not necessary to call this before using the ZlibCodec to inflate data;
+ It is implicitly called when you call the constructor.
+
+ Z_OK if everything goes well.
+
+
+
+ Initialize the inflation state with an explicit flag to
+ govern the handling of RFC1950 header bytes.
+
+
+
+ By default, the ZLIB header defined in RFC 1950 is expected. If
+ you want to read a zlib stream you should specify true for
+ expectRfc1950Header. If you have a deflate stream, you will want to specify
+ false. It is only necessary to invoke this initializer explicitly if you
+ want to specify false.
+
+
+ whether to expect an RFC1950 header byte
+ pair when reading the stream of data to be inflated.
+
+ Z_OK if everything goes well.
+
+
+
+ Initialize the ZlibCodec for inflation, with the specified number of window bits.
+
+ The number of window bits to use. If you need to ask what that is,
+ then you shouldn't be calling this initializer.
+ Z_OK if all goes well.
+
+
+
+ Initialize the inflation state with an explicit flag to govern the handling of
+ RFC1950 header bytes.
+
+
+
+ If you want to read a zlib stream you should specify true for
+ expectRfc1950Header. In this case, the library will expect to find a ZLIB
+ header, as defined in RFC
+ 1950 , in the compressed stream. If you will be reading a DEFLATE or
+ GZIP stream, which does not have such a header, you will want to specify
+ false.
+
+
+ whether to expect an RFC1950 header byte pair when reading
+ the stream of data to be inflated.
+ The number of window bits to use. If you need to ask what that is,
+ then you shouldn't be calling this initializer.
+ Z_OK if everything goes well.
+
+
+
+ Inflate the data in the InputBuffer, placing the result in the OutputBuffer.
+
+
+ You must have set InputBuffer and OutputBuffer, NextIn and NextOut, and AvailableBytesIn and
+ AvailableBytesOut before calling this method.
+
+
+
+ private void InflateBuffer()
+ {
+ int bufferSize = 1024;
+ byte[] buffer = new byte[bufferSize];
+ ZlibCodec decompressor = new ZlibCodec();
+
+ Console.WriteLine("\n============================================");
+ Console.WriteLine("Size of Buffer to Inflate: {0} bytes.", CompressedBytes.Length);
+ MemoryStream ms = new MemoryStream(DecompressedBytes);
+
+ int rc = decompressor.InitializeInflate();
+
+ decompressor.InputBuffer = CompressedBytes;
+ decompressor.NextIn = 0;
+ decompressor.AvailableBytesIn = CompressedBytes.Length;
+
+ decompressor.OutputBuffer = buffer;
+
+ // pass 1: inflate
+ do
+ {
+ decompressor.NextOut = 0;
+ decompressor.AvailableBytesOut = buffer.Length;
+ rc = decompressor.Inflate(FlushType.None);
+
+ if (rc != ZlibConstants.Z_OK && rc != ZlibConstants.Z_STREAM_END)
+ throw new Exception("inflating: " + decompressor.Message);
+
+ ms.Write(decompressor.OutputBuffer, 0, buffer.Length - decompressor.AvailableBytesOut);
+ }
+ while (decompressor.AvailableBytesIn > 0 || decompressor.AvailableBytesOut == 0);
+
+ // pass 2: finish and flush
+ do
+ {
+ decompressor.NextOut = 0;
+ decompressor.AvailableBytesOut = buffer.Length;
+ rc = decompressor.Inflate(FlushType.Finish);
+
+ if (rc != ZlibConstants.Z_STREAM_END && rc != ZlibConstants.Z_OK)
+ throw new Exception("inflating: " + decompressor.Message);
+
+ if (buffer.Length - decompressor.AvailableBytesOut > 0)
+ ms.Write(buffer, 0, buffer.Length - decompressor.AvailableBytesOut);
+ }
+ while (decompressor.AvailableBytesIn > 0 || decompressor.AvailableBytesOut == 0);
+
+ decompressor.EndInflate();
+ }
+
+
+
+ The flush to use when inflating.
+ Z_OK if everything goes well.
+
+
+
+ Ends an inflation session.
+
+
+ Call this after successively calling Inflate(). This will cause all buffers to be flushed.
+ After calling this you cannot call Inflate() without a intervening call to one of the
+ InitializeInflate() overloads.
+
+ Z_OK if everything goes well.
+
+
+
+ I don't know what this does!
+
+ Z_OK if everything goes well.
+
+
+
+ Initialize the ZlibCodec for deflation operation.
+
+
+ The codec will use the MAX window bits and the default level of compression.
+
+
+
+ int bufferSize = 40000;
+ byte[] CompressedBytes = new byte[bufferSize];
+ byte[] DecompressedBytes = new byte[bufferSize];
+
+ ZlibCodec compressor = new ZlibCodec();
+
+ compressor.InitializeDeflate(CompressionLevel.Default);
+
+ compressor.InputBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(TextToCompress);
+ compressor.NextIn = 0;
+ compressor.AvailableBytesIn = compressor.InputBuffer.Length;
+
+ compressor.OutputBuffer = CompressedBytes;
+ compressor.NextOut = 0;
+ compressor.AvailableBytesOut = CompressedBytes.Length;
+
+ while (compressor.TotalBytesIn != TextToCompress.Length && compressor.TotalBytesOut < bufferSize)
+ {
+ compressor.Deflate(FlushType.None);
+ }
+
+ while (true)
+ {
+ int rc= compressor.Deflate(FlushType.Finish);
+ if (rc == ZlibConstants.Z_STREAM_END) break;
+ }
+
+ compressor.EndDeflate();
+
+
+
+ Z_OK if all goes well. You generally don't need to check the return code.
+
+
+
+ Initialize the ZlibCodec for deflation operation, using the specified CompressionLevel.
+
+
+ The codec will use the maximum window bits (15) and the specified
+ CompressionLevel. It will emit a ZLIB stream as it compresses.
+
+ The compression level for the codec.
+ Z_OK if all goes well.
+
+
+
+ Initialize the ZlibCodec for deflation operation, using the specified CompressionLevel,
+ and the explicit flag governing whether to emit an RFC1950 header byte pair.
+
+
+ The codec will use the maximum window bits (15) and the specified CompressionLevel.
+ If you want to generate a zlib stream, you should specify true for
+ wantRfc1950Header. In this case, the library will emit a ZLIB
+ header, as defined in RFC
+ 1950 , in the compressed stream.
+
+ The compression level for the codec.
+ whether to emit an initial RFC1950 byte pair in the compressed stream.
+ Z_OK if all goes well.
+
+
+
+ Initialize the ZlibCodec for deflation operation, using the specified CompressionLevel,
+ and the specified number of window bits.
+
+
+ The codec will use the specified number of window bits and the specified CompressionLevel.
+
+ The compression level for the codec.
+ the number of window bits to use. If you don't know what this means, don't use this method.
+ Z_OK if all goes well.
+
+
+
+ Initialize the ZlibCodec for deflation operation, using the specified
+ CompressionLevel, the specified number of window bits, and the explicit flag
+ governing whether to emit an RFC1950 header byte pair.
+
+
+ The compression level for the codec.
+ whether to emit an initial RFC1950 byte pair in the compressed stream.
+ the number of window bits to use. If you don't know what this means, don't use this method.
+ Z_OK if all goes well.
+
+
+
+ Deflate one batch of data.
+
+
+ You must have set InputBuffer and OutputBuffer before calling this method.
+
+
+
+ private void DeflateBuffer(CompressionLevel level)
+ {
+ int bufferSize = 1024;
+ byte[] buffer = new byte[bufferSize];
+ ZlibCodec compressor = new ZlibCodec();
+
+ Console.WriteLine("\n============================================");
+ Console.WriteLine("Size of Buffer to Deflate: {0} bytes.", UncompressedBytes.Length);
+ MemoryStream ms = new MemoryStream();
+
+ int rc = compressor.InitializeDeflate(level);
+
+ compressor.InputBuffer = UncompressedBytes;
+ compressor.NextIn = 0;
+ compressor.AvailableBytesIn = UncompressedBytes.Length;
+
+ compressor.OutputBuffer = buffer;
+
+ // pass 1: deflate
+ do
+ {
+ compressor.NextOut = 0;
+ compressor.AvailableBytesOut = buffer.Length;
+ rc = compressor.Deflate(FlushType.None);
+
+ if (rc != ZlibConstants.Z_OK && rc != ZlibConstants.Z_STREAM_END)
+ throw new Exception("deflating: " + compressor.Message);
+
+ ms.Write(compressor.OutputBuffer, 0, buffer.Length - compressor.AvailableBytesOut);
+ }
+ while (compressor.AvailableBytesIn > 0 || compressor.AvailableBytesOut == 0);
+
+ // pass 2: finish and flush
+ do
+ {
+ compressor.NextOut = 0;
+ compressor.AvailableBytesOut = buffer.Length;
+ rc = compressor.Deflate(FlushType.Finish);
+
+ if (rc != ZlibConstants.Z_STREAM_END && rc != ZlibConstants.Z_OK)
+ throw new Exception("deflating: " + compressor.Message);
+
+ if (buffer.Length - compressor.AvailableBytesOut > 0)
+ ms.Write(buffer, 0, buffer.Length - compressor.AvailableBytesOut);
+ }
+ while (compressor.AvailableBytesIn > 0 || compressor.AvailableBytesOut == 0);
+
+ compressor.EndDeflate();
+
+ ms.Seek(0, SeekOrigin.Begin);
+ CompressedBytes = new byte[compressor.TotalBytesOut];
+ ms.Read(CompressedBytes, 0, CompressedBytes.Length);
+ }
+
+
+ whether to flush all data as you deflate. Generally you will want to
+ use Z_NO_FLUSH here, in a series of calls to Deflate(), and then call EndDeflate() to
+ flush everything.
+
+ Z_OK if all goes well.
+
+
+
+ End a deflation session.
+
+
+ Call this after making a series of one or more calls to Deflate(). All buffers are flushed.
+
+ Z_OK if all goes well.
+
+
+
+ Reset a codec for another deflation session.
+
+
+ Call this to reset the deflation state. For example if a thread is deflating
+ non-consecutive blocks, you can call Reset() after the Deflate(Sync) of the first
+ block and before the next Deflate(None) of the second block.
+
+ Z_OK if all goes well.
+
+
+
+ Set the CompressionStrategy and CompressionLevel for a deflation session.
+
+ the level of compression to use.
+ the strategy to use for compression.
+ Z_OK if all goes well.
+
+
+
+ Set the dictionary to be used for either Inflation or Deflation.
+
+ The dictionary bytes to use.
+ Z_OK if all goes well.
+
+
+
+ A bunch of constants used in the Zlib interface.
+
+
+
+
+ The maximum number of window bits for the Deflate algorithm.
+
+
+
+
+ The default number of window bits for the Deflate algorithm.
+
+
+
+
+ indicates everything is A-OK
+
+
+
+
+ Indicates that the last operation reached the end of the stream.
+
+
+
+
+ The operation ended in need of a dictionary.
+
+
+
+
+ There was an error with the stream - not enough data, not open and readable, etc.
+
+
+
+
+ There was an error with the data - not enough data, bad data, etc.
+
+
+
+
+ There was an error with the working buffer.
+
+
+
+
+ The size of the working buffer used in the ZlibCodec class. Defaults to 8192 bytes.
+
+
+
+
+ The minimum size of the working buffer used in the ZlibCodec class. Currently it is 128 bytes.
+
+
+
+
+ Represents a Zlib stream for compression or decompression.
+
+
+
+
+ The ZlibStream is a Decorator on a . It adds ZLIB compression or decompression to any
+ stream.
+
+
+ Using this stream, applications can compress or decompress data via
+ stream Read() and Write() operations. Either compresssion or
+ decompression can occur through either reading or writing. The compression
+ format used is ZLIB, which is documented in IETF RFC 1950 , "ZLIB Compressed
+ Data Format Specification version 3.3". This implementation of ZLIB always uses
+ DEFLATE as the compression method. (see IETF RFC 1951 , "DEFLATE
+ Compressed Data Format Specification version 1.3.")
+
+
+ The ZLIB format allows for varying compression methods, window sizes, and dictionaries.
+ This implementation always uses the DEFLATE compression method, a preset dictionary,
+ and 15 window bits by default.
+
+
+
+ This class is similar to , except that it adds the
+ RFC1950 header and trailer bytes to a compressed stream when compressing, or expects
+ the RFC1950 header and trailer bytes when decompressing. It is also similar to the
+ .
+
+
+
+
+
+
+
+ Create a ZlibStream using the specified CompressionMode .
+
+
+
+
+ When mode is CompressionMode.Compress , the ZlibStream
+ will use the default compression level. The "captive" stream will be
+ closed when the ZlibStream is closed.
+
+
+
+
+
+ This example uses a ZlibStream to compress a file, and writes the
+ compressed data to another file.
+
+ using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress))
+ {
+ using (var raw = System.IO.File.Create(fileToCompress + ".zlib"))
+ {
+ using (Stream compressor = new ZlibStream(raw, CompressionMode.Compress))
+ {
+ byte[] buffer = new byte[WORKING_BUFFER_SIZE];
+ int n;
+ while ((n= input.Read(buffer, 0, buffer.Length)) != 0)
+ {
+ compressor.Write(buffer, 0, n);
+ }
+ }
+ }
+ }
+
+
+ Using input As Stream = File.OpenRead(fileToCompress)
+ Using raw As FileStream = File.Create(fileToCompress & ".zlib")
+ Using compressor As Stream = New ZlibStream(raw, CompressionMode.Compress)
+ Dim buffer As Byte() = New Byte(4096) {}
+ Dim n As Integer = -1
+ Do While (n <> 0)
+ If (n > 0) Then
+ compressor.Write(buffer, 0, n)
+ End If
+ n = input.Read(buffer, 0, buffer.Length)
+ Loop
+ End Using
+ End Using
+ End Using
+
+
+
+ The stream which will be read or written.
+ Indicates whether the ZlibStream will compress or decompress.
+
+
+
+ Create a ZlibStream using the specified CompressionMode and
+ the specified CompressionLevel .
+
+
+
+
+
+ When mode is CompressionMode.Decompress , the level parameter is ignored.
+ The "captive" stream will be closed when the ZlibStream is closed.
+
+
+
+
+
+ This example uses a ZlibStream to compress data from a file, and writes the
+ compressed data to another file.
+
+
+ using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress))
+ {
+ using (var raw = System.IO.File.Create(fileToCompress + ".zlib"))
+ {
+ using (Stream compressor = new ZlibStream(raw,
+ CompressionMode.Compress,
+ CompressionLevel.BestCompression))
+ {
+ byte[] buffer = new byte[WORKING_BUFFER_SIZE];
+ int n;
+ while ((n= input.Read(buffer, 0, buffer.Length)) != 0)
+ {
+ compressor.Write(buffer, 0, n);
+ }
+ }
+ }
+ }
+
+
+
+ Using input As Stream = File.OpenRead(fileToCompress)
+ Using raw As FileStream = File.Create(fileToCompress & ".zlib")
+ Using compressor As Stream = New ZlibStream(raw, CompressionMode.Compress, CompressionLevel.BestCompression)
+ Dim buffer As Byte() = New Byte(4096) {}
+ Dim n As Integer = -1
+ Do While (n <> 0)
+ If (n > 0) Then
+ compressor.Write(buffer, 0, n)
+ End If
+ n = input.Read(buffer, 0, buffer.Length)
+ Loop
+ End Using
+ End Using
+ End Using
+
+
+
+ The stream to be read or written while deflating or inflating.
+ Indicates whether the ZlibStream will compress or decompress.
+ A tuning knob to trade speed for effectiveness.
+
+
+
+ Create a ZlibStream using the specified CompressionMode , and
+ explicitly specify whether the captive stream should be left open after
+ Deflation or Inflation.
+
+
+
+
+
+ When mode is CompressionMode.Compress , the ZlibStream will use
+ the default compression level.
+
+
+
+ This constructor allows the application to request that the captive stream
+ remain open after the deflation or inflation occurs. By default, after
+ Close() is called on the stream, the captive stream is also
+ closed. In some cases this is not desired, for example if the stream is a
+ that will be re-read after
+ compression. Specify true for the parameter to leave the stream
+ open.
+
+
+
+ See the other overloads of this constructor for example code.
+
+
+
+
+ The stream which will be read or written. This is called the
+ "captive" stream in other places in this documentation.
+ Indicates whether the ZlibStream will compress or decompress.
+ true if the application would like the stream to remain
+ open after inflation/deflation.
+
+
+
+ Create a ZlibStream using the specified CompressionMode
+ and the specified CompressionLevel , and explicitly specify
+ whether the stream should be left open after Deflation or Inflation.
+
+
+
+
+
+ This constructor allows the application to request that the captive
+ stream remain open after the deflation or inflation occurs. By
+ default, after Close() is called on the stream, the captive
+ stream is also closed. In some cases this is not desired, for example
+ if the stream is a that will be
+ re-read after compression. Specify true for the parameter to leave the stream open.
+
+
+
+ When mode is CompressionMode.Decompress , the level parameter is
+ ignored.
+
+
+
+
+
+
+ This example shows how to use a ZlibStream to compress the data from a file,
+ and store the result into another file. The filestream remains open to allow
+ additional data to be written to it.
+
+
+ using (var output = System.IO.File.Create(fileToCompress + ".zlib"))
+ {
+ using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress))
+ {
+ using (Stream compressor = new ZlibStream(output, CompressionMode.Compress, CompressionLevel.BestCompression, true))
+ {
+ byte[] buffer = new byte[WORKING_BUFFER_SIZE];
+ int n;
+ while ((n= input.Read(buffer, 0, buffer.Length)) != 0)
+ {
+ compressor.Write(buffer, 0, n);
+ }
+ }
+ }
+ // can write additional data to the output stream here
+ }
+
+
+ Using output As FileStream = File.Create(fileToCompress & ".zlib")
+ Using input As Stream = File.OpenRead(fileToCompress)
+ Using compressor As Stream = New ZlibStream(output, CompressionMode.Compress, CompressionLevel.BestCompression, True)
+ Dim buffer As Byte() = New Byte(4096) {}
+ Dim n As Integer = -1
+ Do While (n <> 0)
+ If (n > 0) Then
+ compressor.Write(buffer, 0, n)
+ End If
+ n = input.Read(buffer, 0, buffer.Length)
+ Loop
+ End Using
+ End Using
+ ' can write additional data to the output stream here.
+ End Using
+
+
+
+ The stream which will be read or written.
+
+ Indicates whether the ZlibStream will compress or decompress.
+
+
+ true if the application would like the stream to remain open after
+ inflation/deflation.
+
+
+
+ A tuning knob to trade speed for effectiveness. This parameter is
+ effective only when mode is CompressionMode.Compress .
+
+
+
+
+ This property sets the flush behavior on the stream.
+ Sorry, though, not sure exactly how to describe all the various settings.
+
+
+
+
+ The size of the working buffer for the compression codec.
+
+
+
+
+ The working buffer is used for all stream operations. The default size is
+ 1024 bytes. The minimum size is 128 bytes. You may get better performance
+ with a larger buffer. Then again, you might not. You would have to test
+ it.
+
+
+
+ Set this before the first call to Read() or Write() on the
+ stream. If you try to set it afterwards, it will throw.
+
+
+
+
+ Returns the total number of bytes input so far.
+
+
+ Returns the total number of bytes output so far.
+
+
+
+ Dispose the stream.
+
+
+
+ This may or may not result in a Close() call on the captive
+ stream. See the constructors that have a leaveOpen parameter
+ for more information.
+
+
+ This method may be invoked in two distinct scenarios. If disposing
+ == true, the method has been called directly or indirectly by a
+ user's code, for example via the public Dispose() method. In this
+ case, both managed and unmanaged resources can be referenced and
+ disposed. If disposing == false, the method has been called by the
+ runtime from inside the object finalizer and this method should not
+ reference other objects; in that case only unmanaged resources must
+ be referenced or disposed.
+
+
+
+ indicates whether the Dispose method was invoked by user code.
+
+
+
+
+ Indicates whether the stream can be read.
+
+
+ The return value depends on whether the captive stream supports reading.
+
+
+
+
+ Indicates whether the stream supports Seek operations.
+
+
+ Always returns false.
+
+
+
+
+ Indicates whether the stream can be written.
+
+
+ The return value depends on whether the captive stream supports writing.
+
+
+
+
+ Flush the stream.
+
+
+
+
+ Reading this property always throws a .
+
+
+
+
+ The position of the stream pointer.
+
+
+
+ Setting this property always throws a . Reading will return the total bytes
+ written out, if used in writing, or the total bytes read in, if used in
+ reading. The count may refer to compressed bytes or uncompressed bytes,
+ depending on how you've used the stream.
+
+
+
+
+ Read data from the stream.
+
+
+
+
+
+ If you wish to use the ZlibStream to compress data while reading,
+ you can create a ZlibStream with CompressionMode.Compress ,
+ providing an uncompressed data stream. Then call Read() on that
+ ZlibStream , and the data read will be compressed. If you wish to
+ use the ZlibStream to decompress data while reading, you can create
+ a ZlibStream with CompressionMode.Decompress , providing a
+ readable compressed data stream. Then call Read() on that
+ ZlibStream , and the data will be decompressed as it is read.
+
+
+
+ A ZlibStream can be used for Read() or Write() , but
+ not both.
+
+
+
+
+
+ The buffer into which the read data should be placed.
+
+
+ the offset within that data array to put the first byte read.
+
+ the number of bytes to read.
+
+ the number of bytes read
+
+
+
+ Calling this method always throws a .
+
+
+ The offset to seek to....
+ IF THIS METHOD ACTUALLY DID ANYTHING.
+
+
+ The reference specifying how to apply the offset.... IF
+ THIS METHOD ACTUALLY DID ANYTHING.
+
+
+ nothing. This method always throws.
+
+
+
+ Calling this method always throws a .
+
+
+ The new value for the stream length.... IF
+ THIS METHOD ACTUALLY DID ANYTHING.
+
+
+
+
+ Write data to the stream.
+
+
+
+
+
+ If you wish to use the ZlibStream to compress data while writing,
+ you can create a ZlibStream with CompressionMode.Compress ,
+ and a writable output stream. Then call Write() on that
+ ZlibStream , providing uncompressed data as input. The data sent to
+ the output stream will be the compressed form of the data written. If you
+ wish to use the ZlibStream to decompress data while writing, you
+ can create a ZlibStream with CompressionMode.Decompress , and a
+ writable output stream. Then call Write() on that stream,
+ providing previously compressed data. The data sent to the output stream
+ will be the decompressed form of the data written.
+
+
+
+ A ZlibStream can be used for Read() or Write() , but not both.
+
+
+ The buffer holding data to write to the stream.
+ the offset within that data array to find the first byte to write.
+ the number of bytes to write.
+
+
+
+ Compress a string into a byte array using ZLIB.
+
+
+
+ Uncompress it with .
+
+
+
+
+
+
+
+ A string to compress. The string will first be encoded
+ using UTF8, then compressed.
+
+
+ The string in compressed form
+
+
+
+ Compress a byte array into a new byte array using ZLIB.
+
+
+
+ Uncompress it with .
+
+
+
+
+
+
+ A buffer to compress.
+
+
+ The data in compressed form
+
+
+
+ Uncompress a ZLIB-compressed byte array into a single string.
+
+
+
+
+
+
+ A buffer containing ZLIB-compressed data.
+
+
+ The uncompressed string
+
+
+
+ Uncompress a ZLIB-compressed byte array into a byte array.
+
+
+
+
+
+
+ A buffer containing ZLIB-compressed data.
+
+
+ The data in uncompressed form
+
+
+
+ Provides a text encoder for the iso-8859-1 encoding, aka Latin1 encoding,
+ for platforms that do not support it, for example on Silverlight or some
+ Compact Framework platforms.
+
+
+
+
+ Gets the name registered with the
+ Internet Assigned Numbers Authority (IANA) for the current encoding.
+
+
+ Always returns "iso-8859-1".
+
+
+
+
+ Encodes a set of characters from a character array into
+ a byte array.
+
+
+ The actual number of bytes written into .
+
+ The character array containing the set of characters to encode.
+ The index of the first character to encode.
+ The number of characters to encode.
+ The byte array to contain the resulting sequence of bytes.
+ The index at which to start writing the resulting sequence of bytes.
+
+
+
+
+ Decodes a sequence of bytes from the specified byte array into the specified character array.
+
+
+ The actual number of characters written into .
+
+ The byte array containing the sequence of bytes to decode.
+ The index of the first byte to decode.
+ The number of bytes to decode.
+ The character array to contain the resulting set of characters.
+ The index at which to start writing the resulting set of characters.
+
+
+
+
+ Calculates the number of bytes produced by encoding a set of characters
+ from the specified character array.
+
+
+ The number of bytes produced by encoding the specified characters. This class
+ alwas returns the value of .
+
+
+
+
+ Calculates the number of characters produced by decoding a sequence
+ of bytes from the specified byte array.
+
+
+ The number of characters produced by decoding the specified sequence of bytes. This class
+ alwas returns the value of .
+
+
+
+
+ Calculates the maximum number of bytes produced by encoding the specified number of characters.
+
+
+ The maximum number of bytes produced by encoding the specified number of characters. This
+ class alwas returns the value of .
+
+ The number of characters to encode.
+
+
+
+
+ Calculates the maximum number of characters produced by decoding the specified number of bytes.
+
+
+ The maximum number of characters produced by decoding the specified number of bytes. This class
+ alwas returns the value of .
+
+ The number of bytes to decode.
+
+
+
+ Gets the number of characters that are supported by this encoding.
+ This property returns a maximum value of 256, as the encoding class
+ only supports single byte encodings (1 byte == 256 possible values).
+
+
+
+ Provides a platform-specific character used to separate directory levels in a path string that reflects a hierarchical file system organization.
+ 1
+
+
+ Provides a platform-specific alternate character used to separate directory levels in a path string that reflects a hierarchical file system organization.
+ 1
+
+
+ Provides a platform-specific volume separator character.
+ 1
+
+
+ Provides a platform-specific array of characters that cannot be specified in path string arguments passed to members of the class.
+ A character array of invalid path characters for the current platform.
+ 1
+
+
+ A platform-specific separator character used to separate path strings in environment variables.
+ 1
+
+
+
diff --git a/build/approot/packages/jQuery/1.6.4/Content/Scripts/jquery-1.6.4-vsdoc.js b/build/approot/packages/jQuery/1.6.4/Content/Scripts/jquery-1.6.4-vsdoc.js
new file mode 100644
index 00000000..f9e47c82
--- /dev/null
+++ b/build/approot/packages/jQuery/1.6.4/Content/Scripts/jquery-1.6.4-vsdoc.js
@@ -0,0 +1,7024 @@
+/*
+* This file has been generated to support Visual Studio IntelliSense.
+* You should not use this file at runtime inside the browser--it is only
+* intended to be used only for design-time IntelliSense. Please use the
+* standard jQuery library for all production use.
+*
+* Comment version: 1.6.4
+*/
+
+/*!
+* jQuery JavaScript Library v1.6.4
+* http://jquery.com/
+*
+* Distributed in whole under the terms of the MIT
+*
+* Copyright 2010, John Resig
+*
+* Permission is hereby granted, free of charge, to any person obtaining
+* a copy of this software and associated documentation files (the
+* "Software"), to deal in the Software without restriction, including
+* without limitation the rights to use, copy, modify, merge, publish,
+* distribute, sublicense, and/or sell copies of the Software, and to
+* permit persons to whom the Software is furnished to do so, subject to
+* the following conditions:
+*
+* The above copyright notice and this permission notice shall be
+* included in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*
+* Includes Sizzle.js
+* http://sizzlejs.com/
+* Copyright 2010, The Dojo Foundation
+* Released under the MIT and BSD Licenses.
+*/
+
+(function ( window, undefined ) {
+var jQuery = function( selector, context ) {
+///
+/// 1: Accepts a string containing a CSS selector which is then used to match a set of elements.
+///
1.1 - $(selector, context)
+///
1.2 - $(element)
+///
1.3 - $(elementArray)
+///
1.4 - $(jQuery object)
+///
1.5 - $()
+///
2: Creates DOM elements on the fly from the provided string of raw HTML.
+///
2.1 - $(html, ownerDocument)
+///
2.2 - $(html, props)
+///
3: Binds a function to be executed when the DOM has finished loading.
+///
3.1 - $(callback)
+///
+///
+/// A string containing a selector expression
+///
+///
+/// A DOM Element, Document, or jQuery to use as context
+///
+///
+
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context, rootjQuery );
+ };
+jQuery.Deferred = function( func ) {
+
+ var deferred = jQuery._Deferred(),
+ failDeferred = jQuery._Deferred(),
+ promise;
+ // Add errorDeferred methods, then and promise
+ jQuery.extend( deferred, {
+ then: function( doneCallbacks, failCallbacks ) {
+ deferred.done( doneCallbacks ).fail( failCallbacks );
+ return this;
+ },
+ always: function() {
+ return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments );
+ },
+ fail: failDeferred.done,
+ rejectWith: failDeferred.resolveWith,
+ reject: failDeferred.resolve,
+ isRejected: failDeferred.isResolved,
+ pipe: function( fnDone, fnFail ) {
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( {
+ done: [ fnDone, "resolve" ],
+ fail: [ fnFail, "reject" ]
+ }, function( handler, data ) {
+ var fn = data[ 0 ],
+ action = data[ 1 ],
+ returned;
+ if ( jQuery.isFunction( fn ) ) {
+ deferred[ handler ](function() {
+ returned = fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise().then( newDefer.resolve, newDefer.reject );
+ } else {
+ newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+ }
+ });
+ } else {
+ deferred[ handler ]( newDefer[ action ] );
+ }
+ });
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ if ( obj == null ) {
+ if ( promise ) {
+ return promise;
+ }
+ promise = obj = {};
+ }
+ var i = promiseMethods.length;
+ while( i-- ) {
+ obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];
+ }
+ return obj;
+ }
+ });
+ // Make sure only one callback list will be used
+ deferred.done( failDeferred.cancel ).fail( deferred.cancel );
+ // Unexpose cancel
+ delete deferred.cancel;
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+ return deferred;
+ };
+jQuery.Event = function( src, props ) {
+
+ // Allow instantiation without the 'new' keyword
+ if ( !this.preventDefault ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
+ src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // timeStamp is buggy for some events on Firefox(#3843)
+ // So we won't rely on the native value
+ this.timeStamp = jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+jQuery._Deferred = function() {
+
+ var // callbacks list
+ callbacks = [],
+ // stored [ context , args ]
+ fired,
+ // to avoid firing when already doing so
+ firing,
+ // flag to know if the deferred has been cancelled
+ cancelled,
+ // the deferred itself
+ deferred = {
+
+ // done( f1, f2, ...)
+ done: function() {
+ if ( !cancelled ) {
+ var args = arguments,
+ i,
+ length,
+ elem,
+ type,
+ _fired;
+ if ( fired ) {
+ _fired = fired;
+ fired = 0;
+ }
+ for ( i = 0, length = args.length; i < length; i++ ) {
+ elem = args[ i ];
+ type = jQuery.type( elem );
+ if ( type === "array" ) {
+ deferred.done.apply( deferred, elem );
+ } else if ( type === "function" ) {
+ callbacks.push( elem );
+ }
+ }
+ if ( _fired ) {
+ deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] );
+ }
+ }
+ return this;
+ },
+
+ // resolve with given context and args
+ resolveWith: function( context, args ) {
+ if ( !cancelled && !fired && !firing ) {
+ // make sure args are available (#8421)
+ args = args || [];
+ firing = 1;
+ try {
+ while( callbacks[ 0 ] ) {
+ callbacks.shift().apply( context, args );
+ }
+ }
+ finally {
+ fired = [ context, args ];
+ firing = 0;
+ }
+ }
+ return this;
+ },
+
+ // resolve with this as context and given arguments
+ resolve: function() {
+ deferred.resolveWith( this, arguments );
+ return this;
+ },
+
+ // Has this deferred been resolved?
+ isResolved: function() {
+ return !!( firing || fired );
+ },
+
+ // Cancel
+ cancel: function() {
+ cancelled = 1;
+ callbacks = [];
+ return this;
+ }
+ };
+
+ return deferred;
+ };
+jQuery._data = function( elem, name, data ) {
+
+ return jQuery.data( elem, name, data, true );
+ };
+jQuery._mark = function( elem, type ) {
+
+ if ( elem ) {
+ type = (type || "fx") + "mark";
+ jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
+ }
+ };
+jQuery._unmark = function( force, elem, type ) {
+
+ if ( force !== true ) {
+ type = elem;
+ elem = force;
+ force = false;
+ }
+ if ( elem ) {
+ type = type || "fx";
+ var key = type + "mark",
+ count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
+ if ( count ) {
+ jQuery.data( elem, key, count, true );
+ } else {
+ jQuery.removeData( elem, key, true );
+ handleQueueMarkDefer( elem, type, "mark" );
+ }
+ }
+ };
+jQuery.acceptData = function( elem ) {
+
+ if ( elem.nodeName ) {
+ var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ if ( match ) {
+ return !(match === true || elem.getAttribute("classid") !== match);
+ }
+ }
+
+ return true;
+ };
+jQuery.access = function( elems, key, value, exec, fn, pass ) {
+
+ var length = elems.length;
+
+ // Setting many attributes
+ if ( typeof key === "object" ) {
+ for ( var k in key ) {
+ jQuery.access( elems, k, key[k], exec, fn, value );
+ }
+ return elems;
+ }
+
+ // Setting one attribute
+ if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = !pass && exec && jQuery.isFunction(value);
+
+ for ( var i = 0; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+
+ return elems;
+ }
+
+ // Getting an attribute
+ return length ? fn( elems[0], key ) : undefined;
+ };
+jQuery.active = 0;
+jQuery.ajax = function( url, options ) {
+///
+/// Perform an asynchronous HTTP (Ajax) request.
+///
1 - jQuery.ajax(url, settings)
+///
2 - jQuery.ajax(settings)
+///
+///
+/// A string containing the URL to which the request is sent.
+///
+///
+/// A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) below for a complete list of all settings.
+///
+
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events
+ // It's the callbackContext if one was provided in the options
+ // and if it's a DOM node or a jQuery collection
+ globalEventContext = callbackContext !== s &&
+ ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
+ jQuery( callbackContext ) : jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery._Deferred(),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // ifModified key
+ ifModifiedKey,
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // Response headers
+ responseHeadersString,
+ responseHeaders,
+ // transport
+ transport,
+ // timeout handle
+ timeoutTimer,
+ // Cross-domain detection vars
+ parts,
+ // The jqXHR state
+ state = 0,
+ // To know if global events are to be dispatched
+ fireGlobals,
+ // Loop variable
+ i,
+ // Fake xhr
+ jqXHR = {
+
+ readyState: 0,
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ if ( !state ) {
+ var lname = name.toLowerCase();
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while( ( match = rheaders.exec( responseHeadersString ) ) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match === undefined ? null : match;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ statusText = statusText || "abort";
+ if ( transport ) {
+ transport.abort( statusText );
+ }
+ done( 0, statusText );
+ return this;
+ }
+ };
+
+ // Callback for when everything is done
+ // It is defined here because jslint complains if it is declared
+ // at the end of the function (which would be more logical and readable)
+ function done( status, nativeStatusText, responses, headers ) {
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ var isSuccess,
+ success,
+ error,
+ statusText = nativeStatusText,
+ response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
+ lastModified,
+ etag;
+
+ // If successful, handle type chaining
+ if ( status >= 200 && status < 300 || status === 304 ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+
+ if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
+ jQuery.lastModified[ ifModifiedKey ] = lastModified;
+ }
+ if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
+ jQuery.etag[ ifModifiedKey ] = etag;
+ }
+ }
+
+ // If not modified
+ if ( status === 304 ) {
+
+ statusText = "notmodified";
+ isSuccess = true;
+
+ // If we have data
+ } else {
+
+ try {
+ success = ajaxConvert( s, response );
+ statusText = "success";
+ isSuccess = true;
+ } catch(e) {
+ // We have a parsererror
+ statusText = "parsererror";
+ error = e;
+ }
+ }
+ } else {
+ // We extract error from statusText
+ // then normalize statusText and status for non-aborts
+ error = statusText;
+ if( !statusText || status ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = "" + ( nativeStatusText || statusText );
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger( "ajaxStop" );
+ }
+ }
+ }
+
+ // Attach deferreds
+ deferred.promise( jqXHR );
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+ jqXHR.complete = completeDeferred.done;
+
+ // Status-dependent callbacks
+ jqXHR.statusCode = function( map ) {
+ if ( map ) {
+ var tmp;
+ if ( state < 2 ) {
+ for( tmp in map ) {
+ statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
+ }
+ } else {
+ tmp = map[ jqXHR.status ];
+ jqXHR.then( tmp, tmp );
+ }
+ }
+ return this;
+ };
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
+
+ // Determine if a cross-domain request is in order
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefiler, stop there
+ if ( state === 2 ) {
+ return false;
+ }
+
+ // We can fire global events as of now if asked to
+ fireGlobals = s.global;
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger( "ajaxStart" );
+ }
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Get ifModifiedKey before adding the anti-cache parameter
+ ifModifiedKey = s.url;
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+
+ var ts = jQuery.now(),
+ // try replacing _= if it is there
+ ret = s.url.replace( rts, "$1_=" + ts );
+
+ // if nothing was replaced, add timestamp to the end
+ s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ ifModifiedKey = ifModifiedKey || s.url;
+ if ( jQuery.lastModified[ ifModifiedKey ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
+ }
+ if ( jQuery.etag[ ifModifiedKey ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
+ }
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already
+ jqXHR.abort();
+ return false;
+
+ }
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout( function(){
+ jqXHR.abort( "timeout" );
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch (e) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ jQuery.error( e );
+ }
+ }
+ }
+
+ return jqXHR;
+ };
+jQuery.ajaxPrefilter = function( dataTypeExpression, func ) {
+///
+/// Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
+///
+///
+/// An optional string containing one or more space-separated dataTypes
+///
+///
+/// A handler to set default values for future Ajax requests.
+///
+///
+
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ if ( jQuery.isFunction( func ) ) {
+ var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
+ i = 0,
+ length = dataTypes.length,
+ dataType,
+ list,
+ placeBefore;
+
+ // For each dataType in the dataTypeExpression
+ for(; i < length; i++ ) {
+ dataType = dataTypes[ i ];
+ // We control if we're asked to add before
+ // any existing element
+ placeBefore = /^\+/.test( dataType );
+ if ( placeBefore ) {
+ dataType = dataType.substr( 1 ) || "*";
+ }
+ list = structure[ dataType ] = structure[ dataType ] || [];
+ // then we add to the structure accordingly
+ list[ placeBefore ? "unshift" : "push" ]( func );
+ }
+ }
+ };
+jQuery.ajaxSettings = { "url": 'http://localhost:25813/',
+"isLocal": false,
+"global": true,
+"type": 'GET',
+"contentType": 'application/x-www-form-urlencoded',
+"processData": true,
+"async": true,
+"accepts": {},
+"contents": {},
+"responseFields": {},
+"converters": {},
+"flatOptions": {},
+"jsonp": 'callback' };
+jQuery.ajaxSetup = function( target, settings ) {
+///
+/// Set default values for future Ajax requests.
+///
+///
+/// A set of key/value pairs that configure the default Ajax request. All options are optional.
+///
+
+ if ( settings ) {
+ // Building a settings object
+ ajaxExtend( target, jQuery.ajaxSettings );
+ } else {
+ // Extending ajaxSettings
+ settings = target;
+ target = jQuery.ajaxSettings;
+ }
+ ajaxExtend( target, settings );
+ return target;
+ };
+jQuery.ajaxTransport = function( dataTypeExpression, func ) {
+
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ if ( jQuery.isFunction( func ) ) {
+ var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
+ i = 0,
+ length = dataTypes.length,
+ dataType,
+ list,
+ placeBefore;
+
+ // For each dataType in the dataTypeExpression
+ for(; i < length; i++ ) {
+ dataType = dataTypes[ i ];
+ // We control if we're asked to add before
+ // any existing element
+ placeBefore = /^\+/.test( dataType );
+ if ( placeBefore ) {
+ dataType = dataType.substr( 1 ) || "*";
+ }
+ list = structure[ dataType ] = structure[ dataType ] || [];
+ // then we add to the structure accordingly
+ list[ placeBefore ? "unshift" : "push" ]( func );
+ }
+ }
+ };
+jQuery.attr = function( elem, name, value, pass ) {
+
+ var nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return undefined;
+ }
+
+ if ( pass && name in jQuery.attrFn ) {
+ return jQuery( elem )[ name ]( value );
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( !("getAttribute" in elem) ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ var ret, hooks,
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ // Normalize the name if needed
+ if ( notxml ) {
+ name = jQuery.attrFix[ name ] || name;
+
+ hooks = jQuery.attrHooks[ name ];
+
+ if ( !hooks ) {
+ // Use boolHook for boolean attributes
+ if ( rboolean.test( name ) ) {
+ hooks = boolHook;
+
+ // Use nodeHook if available( IE6/7 )
+ } else if ( nodeHook ) {
+ hooks = nodeHook;
+ }
+ }
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+ return undefined;
+
+ } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, "" + value );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+
+ ret = elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret === null ?
+ undefined :
+ ret;
+ }
+ };
+jQuery.attrFix = { "tabindex": 'tabIndex' };
+jQuery.attrFn = { "val": true,
+"css": true,
+"html": true,
+"text": true,
+"data": true,
+"width": true,
+"height": true,
+"offset": true,
+"blur": true,
+"focus": true,
+"focusin": true,
+"focusout": true,
+"load": true,
+"resize": true,
+"scroll": true,
+"unload": true,
+"click": true,
+"dblclick": true,
+"mousedown": true,
+"mouseup": true,
+"mousemove": true,
+"mouseover": true,
+"mouseout": true,
+"mouseenter": true,
+"mouseleave": true,
+"change": true,
+"select": true,
+"submit": true,
+"keydown": true,
+"keypress": true,
+"keyup": true,
+"error": true };
+jQuery.attrHooks = { "type": {},
+"value": {},
+"tabIndex": {} };
+jQuery.bindReady = function() {
+
+ if ( readyList ) {
+ return;
+ }
+
+ readyList = jQuery._Deferred();
+
+ // Catch cases where $(document).ready() is called after the
+ // browser event has already occurred.
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var toplevel = false;
+
+ try {
+ toplevel = window.frameElement == null;
+ } catch(e) {}
+
+ if ( document.documentElement.doScroll && toplevel ) {
+ doScrollCheck();
+ }
+ }
+ };
+jQuery.boxModel = true;
+jQuery.browser = { "msie": true,
+"version": '9.0' };
+jQuery.buildFragment = function( args, nodes, scripts ) {
+
+ var fragment, cacheable, cacheresults, doc;
+
+ // nodes may contain either an explicit document object,
+ // a jQuery collection or context object.
+ // If nodes[0] contains a valid object to assign to doc
+ if ( nodes && nodes[0] ) {
+ doc = nodes[0].ownerDocument || nodes[0];
+ }
+
+ // Ensure that an attr object doesn't incorrectly stand in as a document object
+ // Chrome and Firefox seem to allow this to occur and will throw exception
+ // Fixes #8950
+ if ( !doc.createDocumentFragment ) {
+ doc = document;
+ }
+
+ // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+ // Cloning options loses the selected state, so don't cache them
+ // IE 6 doesn't like it when you put or elements in a fragment
+ // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+ if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
+ args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
+
+ cacheable = true;
+
+ cacheresults = jQuery.fragments[ args[0] ];
+ if ( cacheresults && cacheresults !== 1 ) {
+ fragment = cacheresults;
+ }
+ }
+
+ if ( !fragment ) {
+ fragment = doc.createDocumentFragment();
+ jQuery.clean( args, doc, fragment, scripts );
+ }
+
+ if ( cacheable ) {
+ jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
+ }
+
+ return { fragment: fragment, cacheable: cacheable };
+};
+jQuery.cache = {};
+jQuery.camelCase = function( string ) {
+
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ };
+jQuery.clean = function( elems, context, fragment, scripts ) {
+
+ var checkScriptType;
+
+ context = context || document;
+
+ // !context.createElement fails in IE with an error but returns typeof 'object'
+ if ( typeof context.createElement === "undefined" ) {
+ context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+ }
+
+ var ret = [], j;
+
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ if ( typeof elem === "number" ) {
+ elem += "";
+ }
+
+ if ( !elem ) {
+ continue;
+ }
+
+ // Convert html string into DOM nodes
+ if ( typeof elem === "string" ) {
+ if ( !rhtml.test( elem ) ) {
+ elem = context.createTextNode( elem );
+ } else {
+ // Fix "XHTML"-style tags in all browsers
+ elem = elem.replace(rxhtmlTag, "<$1>$2>");
+
+ // Trim whitespace, otherwise indexOf won't work as expected
+ var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
+ wrap = wrapMap[ tag ] || wrapMap._default,
+ depth = wrap[0],
+ div = context.createElement("div");
+
+ // Go to html and back, then peel off extra wrappers
+ div.innerHTML = wrap[1] + elem + wrap[2];
+
+ // Move to the right depth
+ while ( depth-- ) {
+ div = div.lastChild;
+ }
+
+ // Remove IE's autoinserted from table fragments
+ if ( !jQuery.support.tbody ) {
+
+ // String was a , *may* have spurious
+ var hasBody = rtbody.test(elem),
+ tbody = tag === "table" && !hasBody ?
+ div.firstChild && div.firstChild.childNodes :
+
+ // String was a bare or
+ wrap[1] === ""),o.push(a.join("\n"));continue}e=r[--n]}o.push(e)}return o.join("\n")},{parse:t}};if(e.tables){var r=s();return r.parse(t)}return t}),n.subParser("unescapeSpecialChars",function(t){"use strict";return t=t.replace(/~E(\d+)E/g,function(t,e){var i=parseInt(e);return String.fromCharCode(i)})});var l=this;"undefined"!=typeof module&&module.exports?module.exports=n:"function"==typeof define&&define.amd?define("showdown",function(){"use strict";return n}):l.showdown=n}.call(this),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.toMarkdown=t()}}(function(){return function t(e,i,n){function s(o,a){if(!i[o]){if(!e[o]){var l="function"==typeof require&&require;if(!a&&l)return l(o,!0);if(r)return r(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[o]={exports:{}};e[o][0].call(c.exports,function(t){var i=e[o][1][t];return s(i?i:t)},c,c.exports,t,e,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o-1?e.documentElement.innerHTML=t:e.body.innerHTML=t,e},t}function l(t){var e=(new T).parseFromString(t,"text/html");return w(e,s),e}function u(t){for(var e,i,n,s=[t],r=[];s.length>0;)for(e=s.shift(),r.push(e),i=e.childNodes,n=0;n<",">"+e+"<")}function d(t,e){if("string"==typeof e)return e===t.nodeName.toLowerCase();if(Array.isArray(e))return-1!==e.indexOf(t.nodeName.toLowerCase());if("function"==typeof e)return e.call(m,t);throw new TypeError("`filter` needs to be a string, array, or function")}function p(t,e){var i,n,r;return"left"===t?(i=e.previousSibling,n=/ $/):(i=e.nextSibling,n=/^ /),i&&(3===i.nodeType?r=n.test(i.nodeValue):1!==i.nodeType||s(i)||(r=n.test(i.textContent))),r}function f(t){var e="",i="";if(!s(t)){var n=/^[ \r\n\t]/.test(t.innerHTML),r=/[ \r\n\t]$/.test(t.innerHTML);n&&!p("left",t)&&(e=" "),r&&!p("right",t)&&(i=" ")}return{leading:e,trailing:i}}function g(t){var e,i=c(t);if(!r(t)&&!/A/.test(t.nodeName)&&/^\s*$/i.test(i))return void(t._replacement="");for(var s=0;s=0;r--)g(s[r]);return i=c(n),i.replace(/^[\t\r\n]+|[\t\r\n\s]+$/g,"").replace(/\n\s+\n/g,"\n\n").replace(/\n{3,}/g,"\n\n")},m.isBlock=s,m.isVoid=r,m.trim=n,m.outer=h,e.exports=m},{"./lib/gfm-converters":2,"./lib/md-converters":3,"collapse-whitespace":4,jsdom:7}],2:[function(t,e,i){"use strict";function n(t,e){var i=Array.prototype.indexOf.call(e.parentNode.childNodes,e),n=" ";return 0===i&&(n="| "),n+t+" |"}var s=/highlight highlight-(\S+)/;e.exports=[{filter:"br",replacement:function(){return"\n"}},{filter:["del","s","strike"],replacement:function(t){return"~~"+t+"~~"}},{filter:function(t){return"checkbox"===t.type&&"LI"===t.parentNode.nodeName},replacement:function(t,e){return(e.checked?"[x]":"[ ]")+" "}},{filter:["th","td"],replacement:function(t,e){return n(t,e)}},{filter:"tr",replacement:function(t,e){var i="",s={left:":--",right:"--:",center:":-:"};if("THEAD"===e.parentNode.nodeName)for(var r=0;rs;s++)n+="#";return"\n\n"+n+" "+t+"\n\n"}},{filter:"hr",replacement:function(){return"\n\n* * *\n\n"}},{filter:["em","i"],replacement:function(t){return"_"+t+"_"}},{filter:["strong","b"],replacement:function(t){return"**"+t+"**"}},{filter:["s"],replacement:function(t){return"~~"+t+"~~"}},{filter:function(t){var e=t.previousSibling||t.nextSibling,i="PRE"===t.parentNode.nodeName&&!e;return"CODE"===t.nodeName&&!i},replacement:function(t){return"`"+t+"`"}},{filter:function(t){return"A"===t.nodeName&&t.getAttribute("href")},replacement:function(t,e){var i=e.title?' "'+e.title+'"':"";return"["+t+"]("+e.getAttribute("href")+i+")"}},{filter:"video",replacement:function(t,e){for(var i,n=e.getAttribute("alt")||"",s=0;s "),"\n\n"+t+"\n\n"}},{filter:"li",replacement:function(t,e){t=t.replace(/^\s+/,"").replace(/\n/gm,"\n ");var i="* ",n=e.parentNode,s=Array.prototype.indexOf.call(n.children,e)+1;return i=/ol/i.test(n.nodeName)?s+". ":"* ",i+t}},{filter:["ul","ol"],replacement:function(t,e){for(var i=[],n=0;n -1) {
+ newDoc.documentElement.innerHTML = string;
+ }
+ else {
+ newDoc.body.innerHTML = string;
+ }
+ return newDoc;
+ };
+ return Parser;
+}
+
+var HtmlParser = canParseHtml() ? _window.DOMParser : createHtmlParser();
+
+function htmlToDom(string) {
+ var tree = new HtmlParser().parseFromString(string, 'text/html');
+ collapse(tree, isBlock);
+ return tree;
+}
+
+/*
+ * Flattens DOM tree into single array
+ */
+
+function bfsOrder(node) {
+ var inqueue = [node],
+ outqueue = [],
+ elem, children, i;
+
+ while (inqueue.length > 0) {
+ elem = inqueue.shift();
+ outqueue.push(elem);
+ children = elem.childNodes;
+ for (i = 0 ; i < children.length; i++) {
+ if (children[i].nodeType === 1) { inqueue.push(children[i]); }
+ }
+ }
+ outqueue.shift();
+ return outqueue;
+}
+
+/*
+ * Contructs a Markdown string of replacement text for a given node
+ */
+
+function getContent(node) {
+ var text = '';
+ for (var i = 0; i < node.childNodes.length; i++) {
+ if (node.childNodes[i].nodeType === 1) {
+ text += node.childNodes[i]._replacement;
+ }
+ else if (node.childNodes[i].nodeType === 3) {
+ text += node.childNodes[i].data;
+ }
+ else { continue; }
+ }
+ return text;
+}
+
+/*
+ * Returns the HTML string of an element with its contents converted
+ */
+
+function outer(node, content) {
+ return node.cloneNode(false).outerHTML.replace('><', '>'+ content +'<');
+}
+
+function canConvert(node, filter) {
+ if (typeof filter === 'string') {
+ return filter === node.nodeName.toLowerCase();
+ }
+ if (Array.isArray(filter)) {
+ return filter.indexOf(node.nodeName.toLowerCase()) !== -1;
+ }
+ else if (typeof filter === 'function') {
+ return filter.call(toMarkdown, node);
+ }
+ else {
+ throw new TypeError('`filter` needs to be a string, array, or function');
+ }
+}
+
+function isFlankedByWhitespace(side, node) {
+ var sibling, regExp, isFlanked;
+
+ if (side === 'left') {
+ sibling = node.previousSibling;
+ regExp = / $/;
+ }
+ else {
+ sibling = node.nextSibling;
+ regExp = /^ /;
+ }
+
+ if (sibling) {
+ if (sibling.nodeType === 3) {
+ isFlanked = regExp.test(sibling.nodeValue);
+ }
+ else if(sibling.nodeType === 1 && !isBlock(sibling)) {
+ isFlanked = regExp.test(sibling.textContent);
+ }
+ }
+ return isFlanked;
+}
+
+function flankingWhitespace(node) {
+ var leading = '', trailing = '';
+
+ if (!isBlock(node)) {
+ var hasLeading = /^[ \r\n\t]/.test(node.innerHTML),
+ hasTrailing = /[ \r\n\t]$/.test(node.innerHTML);
+
+ if (hasLeading && !isFlankedByWhitespace('left', node)) {
+ leading = ' ';
+ }
+ if (hasTrailing && !isFlankedByWhitespace('right', node)) {
+ trailing = ' ';
+ }
+ }
+
+ return { leading: leading, trailing: trailing };
+}
+
+/*
+ * Finds a Markdown converter, gets the replacement, and sets it on
+ * `_replacement`
+ */
+
+function process(node) {
+ var replacement, content = getContent(node);
+
+ // Remove blank nodes
+ if (!isVoid(node) && !/A/.test(node.nodeName) && /^\s*$/i.test(content)) {
+ node._replacement = '';
+ return;
+ }
+
+ for (var i = 0; i < converters.length; i++) {
+ var converter = converters[i];
+
+ if (canConvert(node, converter.filter)) {
+ if (typeof converter.replacement !== 'function') {
+ throw new TypeError(
+ '`replacement` needs to be a function that returns a string'
+ );
+ }
+
+ var whitespace = flankingWhitespace(node);
+
+ if (whitespace.leading || whitespace.trailing) {
+ content = trim(content);
+ }
+ replacement = whitespace.leading +
+ converter.replacement.call(toMarkdown, content, node) +
+ whitespace.trailing;
+ break;
+ }
+ }
+
+ node._replacement = replacement;
+}
+
+toMarkdown = function (input, options) {
+ options = options || {};
+
+ if (typeof input !== 'string') {
+ throw new TypeError(input + ' is not a string');
+ }
+
+ // Escape potential ol triggers
+ input = input.replace(/(\d+)\. /g, '$1\\. ');
+
+ var clone = htmlToDom(input).body,
+ nodes = bfsOrder(clone),
+ output;
+
+ converters = mdConverters.slice(0);
+ if (options.gfm) {
+ converters = gfmConverters.concat(converters);
+ }
+
+ if (options.converters) {
+ converters = options.converters.concat(converters);
+ }
+
+ // Process through nodes in reverse (so deepest child elements are first).
+ for (var i = nodes.length - 1; i >= 0; i--) {
+ process(nodes[i]);
+ }
+ output = getContent(clone);
+
+ return output.replace(/^[\t\r\n]+|[\t\r\n\s]+$/g, '')
+ .replace(/\n\s+\n/g, '\n\n')
+ .replace(/\n{3,}/g, '\n\n');
+};
+
+toMarkdown.isBlock = isBlock;
+toMarkdown.isVoid = isVoid;
+toMarkdown.trim = trim;
+toMarkdown.outer = outer;
+
+module.exports = toMarkdown;
+
+},{"./lib/gfm-converters":2,"./lib/md-converters":3,"collapse-whitespace":4,"jsdom":7}],2:[function(require,module,exports){
+'use strict';
+
+function cell(content, node) {
+ var index = Array.prototype.indexOf.call(node.parentNode.childNodes, node);
+ var prefix = ' ';
+ if (index === 0) { prefix = '| '; }
+ return prefix + content + ' |';
+}
+
+var highlightRegEx = /highlight highlight-(\S+)/;
+
+module.exports = [
+ {
+ filter: 'br',
+ replacement: function () {
+ return '\n';
+ }
+ },
+ {
+ filter: ['del', 's', 'strike'],
+ replacement: function (content) {
+ return '~~' + content + '~~';
+ }
+ },
+
+ {
+ filter: function (node) {
+ return node.type === 'checkbox' && node.parentNode.nodeName === 'LI';
+ },
+ replacement: function (content, node) {
+ return (node.checked ? '[x]' : '[ ]') + ' ';
+ }
+ },
+
+ {
+ filter: ['th', 'td'],
+ replacement: function (content, node) {
+ return cell(content, node);
+ }
+ },
+
+ {
+ filter: 'tr',
+ replacement: function (content, node) {
+ var borderCells = '';
+ var alignMap = { left: ':--', right: '--:', center: ':-:' };
+
+ if (node.parentNode.nodeName === 'THEAD') {
+ for (var i = 0; i < node.childNodes.length; i++) {
+ var align = node.childNodes[i].attributes.align;
+ var border = '---';
+
+ if (align) { border = alignMap[align.value] || border; }
+
+ borderCells += cell(border, node.childNodes[i]);
+ }
+ }
+ return '\n' + content + (borderCells ? '\n' + borderCells : '');
+ }
+ },
+
+ {
+ filter: 'table',
+ replacement: function (content) {
+ return '\n\n' + content + '\n\n';
+ }
+ },
+
+ {
+ filter: ['thead', 'tbody', 'tfoot'],
+ replacement: function (content) {
+ return content;
+ }
+ },
+
+ // Fenced code blocks
+ {
+ filter: function (node) {
+ return node.nodeName === 'PRE' &&
+ node.firstChild &&
+ node.firstChild.nodeName === 'CODE';
+ },
+ replacement: function(content, node) {
+ return '\n\n```\n' + node.firstChild.textContent + '\n```\n\n';
+ }
+ },
+
+ // Syntax-highlighted code blocks
+ {
+ filter: function (node) {
+ return node.nodeName === 'PRE' &&
+ node.parentNode.nodeName === 'DIV' &&
+ highlightRegEx.test(node.parentNode.className);
+ },
+ replacement: function (content, node) {
+ var language = node.parentNode.className.match(highlightRegEx)[1];
+ return '\n\n```' + language + '\n' + node.textContent + '\n```\n\n';
+ }
+ },
+
+ {
+ filter: function (node) {
+ return node.nodeName === 'DIV' &&
+ highlightRegEx.test(node.className);
+ },
+ replacement: function (content) {
+ return '\n\n' + content + '\n\n';
+ }
+ }
+];
+
+},{}],3:[function(require,module,exports){
+'use strict';
+
+module.exports = [
+ {
+ filter: 'p',
+ replacement: function (content) {
+ return '\n\n' + content + '\n\n';
+ }
+ },
+ {
+ filter: 'div',
+ replacement: function (content) {
+ return '\n\n' + content + '\n\n';
+ }
+ },
+ {
+ filter: 'br',
+ replacement: function () {
+ return ' \n';
+ }
+ },
+
+ {
+ filter: ['h1', 'h2', 'h3', 'h4','h5', 'h6'],
+ replacement: function(content, node) {
+ var hLevel = node.nodeName.charAt(1);
+ var hPrefix = '';
+ for(var i = 0; i < hLevel; i++) {
+ hPrefix += '#';
+ }
+ return '\n\n' + hPrefix + ' ' + content + '\n\n';
+ }
+ },
+
+ {
+ filter: 'hr',
+ replacement: function () {
+ return '\n\n* * *\n\n';
+ }
+ },
+
+ {
+ filter: ['em', 'i'],
+ replacement: function (content) {
+ return '_' + content + '_';
+ }
+ },
+
+ {
+ filter: ['strong', 'b'],
+ replacement: function (content) {
+ return '**' + content + '**';
+ }
+ },
+
+ {
+ filter: ['s'],
+ replacement: function (content) {
+ return '~~' + content + '~~';
+ }
+ },
+ // Inline code
+ {
+ filter: function (node) {
+ var hasSiblings = node.previousSibling || node.nextSibling;
+ var isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings;
+
+ return node.nodeName === 'CODE' && !isCodeBlock;
+ },
+ replacement: function(content) {
+ return '`' + content + '`';
+ }
+ },
+ {
+ filter: function (node) {
+ return node.nodeName === 'A' && node.getAttribute('href');
+ },
+ replacement: function(content, node) {
+ var titlePart = node.title ? ' "'+ node.title +'"' : '';
+ return '[' + content + '](' + node.getAttribute('href') + titlePart + ')';
+ }
+ },
+
+ {
+ filter: 'video',
+ replacement: function(content, node) {
+ var alt = node.getAttribute("alt") || '';
+ var src ;
+ for (var i = 0; i < node.childNodes.length; i++)
+ {
+ if (node.childNodes[i].localName == 'source') {
+ src = node.childNodes[i].getAttribute('src') ;
+ break;
+ }
+ }
+ var title = node.title || '';
+ var titlePart = title ? ' "'+ title +'"' : '';
+ return src ? '![video:' + alt + ']' + '(' + src + titlePart + ')' : '';
+ }
+ },
+
+ {
+ filter: 'audio',
+ replacement: function(content, node) {
+ var alt = node.getAttribute("alt") || '';
+ var src = node.getAttribute('src') || '';
+ if (!src)
+ for (var i = 0; i < node.childNodes.length; i++)
+ {
+ if (node.childNodes[i].localName == 'source') {
+ src = node.childNodes[i].getAttribute('src') ;
+ break;
+ }
+ }
+ var title = node.title || '';
+ var titlePart = title ? ' "'+ title +'"' : '';
+ return src ? '![audio:' + alt + ']' + '(' + src + titlePart + ')' : '';
+ }
+ },
+ {
+ filter: 'img',
+ replacement: function(content, node) {
+ var alt = node.getAttribute("alt") || '';
+ var src = node.getAttribute('src') || '';
+ var title = node.getAttribute('title') || '';
+ var titlePart = title ? ' "'+ title +'"' : '';
+ return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : '';
+ }
+ },
+
+ // Code blocks
+ {
+ filter: function (node) {
+ return node.nodeName === 'PRE' && node.firstChild.nodeName === 'CODE';
+ },
+ replacement: function(content, node) {
+ return '\n\n ' + node.firstChild.textContent.replace(/\n/g, '\n ') + '\n\n';
+ }
+ },
+
+ {
+ filter: 'blockquote',
+ replacement: function (content) {
+ content = this.trim(content);
+ content = content.replace(/\n{3,}/g, '\n\n');
+ content = content.replace(/^/gm, '> ');
+ return '\n\n' + content + '\n\n';
+ }
+ },
+
+ {
+ filter: 'li',
+ replacement: function (content, node) {
+ content = content.replace(/^\s+/, '').replace(/\n/gm, '\n ');
+ var prefix = '* ';
+ var parent = node.parentNode;
+ var index = Array.prototype.indexOf.call(parent.children, node) + 1;
+
+ prefix = /ol/i.test(parent.nodeName) ? index + '. ' : '* ';
+ return prefix + content;
+ }
+ },
+
+ {
+ filter: ['ul', 'ol'],
+ replacement: function (content, node) {
+ var strings = [];
+ for (var i = 0; i < node.childNodes.length; i++) {
+ strings.push(node.childNodes[i]._replacement);
+ }
+
+ if (/li/i.test(node.parentNode.nodeName)) {
+ return '\n' + strings.join('\n');
+ }
+ return '\n\n' + strings.join('\n') + '\n\n';
+ }
+ },
+
+ {
+ filter: function (node) {
+ return this.isBlock(node);
+ },
+ replacement: function (content, node) {
+ return '\n\n' + this.outer(node, content) + '\n\n';
+ }
+ },
+
+ // Anything else!
+ {
+ filter: function () {
+ return true;
+ },
+ replacement: function (content, node) {
+ return this.outer(node, content);
+ }
+ }
+];
+
+},{}],4:[function(require,module,exports){
+'use strict';
+
+var voidElements = require('void-elements');
+Object.keys(voidElements).forEach(function (name) {
+ voidElements[name.toUpperCase()] = 1;
+});
+
+var blockElements = {};
+require('block-elements').forEach(function (name) {
+ blockElements[name.toUpperCase()] = 1;
+});
+
+/**
+ * isBlockElem(node) determines if the given node is a block element.
+ *
+ * @param {Node} node
+ * @return {Boolean}
+ */
+function isBlockElem(node) {
+ return !!(node && blockElements[node.nodeName]);
+}
+
+/**
+ * isVoid(node) determines if the given node is a void element.
+ *
+ * @param {Node} node
+ * @return {Boolean}
+ */
+function isVoid(node) {
+ return !!(node && voidElements[node.nodeName]);
+}
+
+/**
+ * whitespace(elem [, isBlock]) removes extraneous whitespace from an
+ * the given element. The function isBlock may optionally be passed in
+ * to determine whether or not an element is a block element; if none
+ * is provided, defaults to using the list of block elements provided
+ * by the `block-elements` module.
+ *
+ * @param {Node} elem
+ * @param {Function} blockTest
+ */
+function collapseWhitespace(elem, isBlock) {
+ if (!elem.firstChild || elem.nodeName === 'PRE') return;
+
+ if (typeof isBlock !== 'function') {
+ isBlock = isBlockElem;
+ }
+
+ var prevText = null;
+ var prevVoid = false;
+
+ var prev = null;
+ var node = next(prev, elem);
+
+ while (node !== elem) {
+ if (node.nodeType === 3) {
+ // Node.TEXT_NODE
+ var text = node.data.replace(/[ \r\n\t]+/g, ' ');
+
+ if ((!prevText || / $/.test(prevText.data)) && !prevVoid && text[0] === ' ') {
+ text = text.substr(1);
+ }
+
+ // `text` might be empty at this point.
+ if (!text) {
+ node = remove(node);
+ continue;
+ }
+
+ node.data = text;
+ prevText = node;
+ } else if (node.nodeType === 1) {
+ // Node.ELEMENT_NODE
+ if (isBlock(node) || node.nodeName === 'BR') {
+ if (prevText) {
+ prevText.data = prevText.data.replace(/ $/, '');
+ }
+
+ prevText = null;
+ prevVoid = false;
+ } else if (isVoid(node)) {
+ // Avoid trimming space around non-block, non-BR void elements.
+ prevText = null;
+ prevVoid = true;
+ }
+ } else {
+ node = remove(node);
+ continue;
+ }
+
+ var nextNode = next(prev, node);
+ prev = node;
+ node = nextNode;
+ }
+
+ if (prevText) {
+ prevText.data = prevText.data.replace(/ $/, '');
+ if (!prevText.data) {
+ remove(prevText);
+ }
+ }
+}
+
+/**
+ * remove(node) removes the given node from the DOM and returns the
+ * next node in the sequence.
+ *
+ * @param {Node} node
+ * @return {Node} node
+ */
+function remove(node) {
+ var next = node.nextSibling || node.parentNode;
+
+ node.parentNode.removeChild(node);
+
+ return next;
+}
+
+/**
+ * next(prev, current) returns the next node in the sequence, given the
+ * current and previous nodes.
+ *
+ * @param {Node} prev
+ * @param {Node} current
+ * @return {Node}
+ */
+function next(prev, current) {
+ if (prev && prev.parentNode === current || current.nodeName === 'PRE') {
+ return current.nextSibling || current.parentNode;
+ }
+
+ return current.firstChild || current.nextSibling || current.parentNode;
+}
+
+module.exports = collapseWhitespace;
+
+},{"block-elements":5,"void-elements":6}],5:[function(require,module,exports){
+/**
+ * This file automatically generated from `build.js`.
+ * Do not manually edit.
+ */
+
+module.exports = [
+ "address",
+ "article",
+ "aside",
+ "audio",
+ "blockquote",
+ "canvas",
+ "dd",
+ "div",
+ "dl",
+ "fieldset",
+ "figcaption",
+ "figure",
+ "footer",
+ "form",
+ "h1",
+ "h2",
+ "h3",
+ "h4",
+ "h5",
+ "h6",
+ "header",
+ "hgroup",
+ "hr",
+ "main",
+ "nav",
+ "noscript",
+ "ol",
+ "output",
+ "p",
+ "pre",
+ "section",
+ "table",
+ "tfoot",
+ "ul",
+ "video"
+];
+
+},{}],6:[function(require,module,exports){
+/**
+ * This file automatically generated from `pre-publish.js`.
+ * Do not manually edit.
+ */
+
+module.exports = {
+ "area": true,
+ "base": true,
+ "br": true,
+ "col": true,
+ "embed": true,
+ "hr": true,
+ "img": true,
+ "input": true,
+ "keygen": true,
+ "link": true,
+ "menuitem": true,
+ "meta": true,
+ "param": true,
+ "source": true,
+ "track": true,
+ "wbr": true
+};
+
+},{}],7:[function(require,module,exports){
+
+},{}]},{},[1])(1)
+});
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ar.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ar.min.js
new file mode 100644
index 00000000..ece41af7
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ar.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.ar={days:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد"],daysShort:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت","أحد"],daysMin:["ح","ن","ث","ع","خ","ج","س","ح"],months:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],monthsShort:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],today:"هذا اليوم",rtl:!0}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.az.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.az.min.js
new file mode 100644
index 00000000..56bedf84
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.az.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.az={days:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],daysShort:["B.","B.e","Ç.a","Ç.","C.a","C.","Ş."],daysMin:["B.","B.e","Ç.a","Ç.","C.a","C.","Ş."],months:["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],monthsShort:["Yan","Fev","Mar","Apr","May","İyun","İyul","Avq","Sen","Okt","Noy","Dek"],today:"Bu gün",weekStart:1}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.bg.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.bg.min.js
new file mode 100644
index 00000000..28e8b22d
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.bg.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.bg={days:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"],daysShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб"],daysMin:["Н","П","В","С","Ч","П","С"],months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Ян","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],today:"днес"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.bs.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.bs.min.js
new file mode 100644
index 00000000..cfb06fde
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.bs.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.bs={days:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"],daysShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],daysMin:["N","Po","U","Sr","Č","Pe","Su"],months:["Januar","Februar","Mart","April","Maj","Juni","Juli","August","Septembar","Oktobar","Novembar","Decembar"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Danas",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ca.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ca.min.js
new file mode 100644
index 00000000..ac107894
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ca.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.ca={days:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"],daysShort:["Diu","Dil","Dmt","Dmc","Dij","Div","Dis"],daysMin:["dg","dl","dt","dc","dj","dv","ds"],months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],monthsShort:["Gen","Feb","Mar","Abr","Mai","Jun","Jul","Ago","Set","Oct","Nov","Des"],today:"Avui",monthsTitle:"Mesos",clear:"Esborrar",weekStart:1,format:"dd/mm/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.cs.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.cs.min.js
new file mode 100644
index 00000000..8b711e1b
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.cs.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.cs={days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota"],daysShort:["Ned","Pon","Úte","Stř","Čtv","Pát","Sob"],daysMin:["Ne","Po","Út","St","Čt","Pá","So"],months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],monthsShort:["Led","Úno","Bře","Dub","Kvě","Čer","Čnc","Srp","Zář","Říj","Lis","Pro"],today:"Dnes",clear:"Vymazat",weekStart:1,format:"dd.m.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.cy.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.cy.min.js
new file mode 100644
index 00000000..f85ea031
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.cy.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.cy={days:["Sul","Llun","Mawrth","Mercher","Iau","Gwener","Sadwrn"],daysShort:["Sul","Llu","Maw","Mer","Iau","Gwe","Sad"],daysMin:["Su","Ll","Ma","Me","Ia","Gwe","Sa"],months:["Ionawr","Chewfror","Mawrth","Ebrill","Mai","Mehefin","Gorfennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"],monthsShort:["Ion","Chw","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rha"],today:"Heddiw"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.da.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.da.min.js
new file mode 100644
index 00000000..53935bcd
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.da.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.da={days:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],daysShort:["søn","man","tir","ons","tor","fre","lør"],daysMin:["sø","ma","ti","on","to","fr","lø"],months:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],monthsShort:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],today:"I Dag",clear:"Nulstil"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.de.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.de.min.js
new file mode 100644
index 00000000..1b5d6a24
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.de.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",monthsTitle:"Monate",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.el.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.el.min.js
new file mode 100644
index 00000000..046e9eb5
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.el.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.el={days:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],daysShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],daysMin:["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],monthsShort:["Ιαν","Φεβ","Μαρ","Απρ","Μάι","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],today:"Σήμερα",clear:"Καθαρισμός",weekStart:1,format:"d/m/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.en-AU.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.en-AU.min.js
new file mode 100644
index 00000000..b8d5f41c
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.en-AU.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates["en-AU"]={days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",monthsTitle:"Months",clear:"Clear",weekStart:1,format:"d/mm/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.en-GB.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.en-GB.min.js
new file mode 100644
index 00000000..2966f541
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.en-GB.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates["en-GB"]={days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",monthsTitle:"Months",clear:"Clear",weekStart:1,format:"dd/mm/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.eo.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.eo.min.js
new file mode 100644
index 00000000..736db021
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.eo.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.eo={days:["dimanĉo","lundo","mardo","merkredo","ĵaŭdo","vendredo","sabato"],daysShort:["dim.","lun.","mar.","mer.","ĵaŭ.","ven.","sam."],daysMin:["d","l","ma","me","ĵ","v","s"],months:["januaro","februaro","marto","aprilo","majo","junio","julio","aŭgusto","septembro","oktobro","novembro","decembro"],monthsShort:["jan.","feb.","mar.","apr.","majo","jun.","jul.","aŭg.","sep.","okt.","nov.","dec."],today:"Hodiaŭ",clear:"Nuligi",weekStart:1,format:"yyyy-mm-dd"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.es.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.es.min.js
new file mode 100644
index 00000000..f3cef5d2
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.es.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy",monthsTitle:"Meses",clear:"Borrar",weekStart:1,format:"dd/mm/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.et.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.et.min.js
new file mode 100644
index 00000000..34cd9c60
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.et.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.et={days:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"],daysShort:["Pühap","Esmasp","Teisip","Kolmap","Neljap","Reede","Laup"],daysMin:["P","E","T","K","N","R","L"],months:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],monthsShort:["Jaan","Veebr","Märts","Apr","Mai","Juuni","Juuli","Aug","Sept","Okt","Nov","Dets"],today:"Täna",clear:"Tühjenda",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.eu.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.eu.min.js
new file mode 100644
index 00000000..af278540
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.eu.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.eu={days:["Igandea","Astelehena","Asteartea","Asteazkena","Osteguna","Ostirala","Larunbata"],daysShort:["Ig","Al","Ar","Az","Og","Ol","Lr"],daysMin:["Ig","Al","Ar","Az","Og","Ol","Lr"],months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],monthsShort:["Urt","Ots","Mar","Api","Mai","Eka","Uzt","Abu","Ira","Urr","Aza","Abe"],today:"Gaur"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fa.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fa.min.js
new file mode 100644
index 00000000..8575237a
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fa.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.fa={days:["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه","یکشنبه"],daysShort:["یک","دو","سه","چهار","پنج","جمعه","شنبه","یک"],daysMin:["ی","د","س","چ","پ","ج","ش","ی"],months:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],monthsShort:["ژان","فور","مار","آور","مه","ژون","ژوی","اوت","سپت","اکت","نوا","دسا"],today:"امروز",clear:"پاک کن",weekStart:1,format:"yyyy/mm/dd"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fi.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fi.min.js
new file mode 100644
index 00000000..239dfb79
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fi.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.fi={days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],daysShort:["sun","maa","tii","kes","tor","per","lau"],daysMin:["su","ma","ti","ke","to","pe","la"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","mar","jou"],today:"tänään",clear:"Tyhjennä",weekStart:1,format:"d.m.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fo.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fo.min.js
new file mode 100644
index 00000000..fa24e3a1
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fo.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.fo={days:["Sunnudagur","Mánadagur","Týsdagur","Mikudagur","Hósdagur","Fríggjadagur","Leygardagur"],daysShort:["Sun","Mán","Týs","Mik","Hós","Frí","Ley"],daysMin:["Su","Má","Tý","Mi","Hó","Fr","Le"],months:["Januar","Februar","Marts","Apríl","Mei","Juni","Juli","August","Septembur","Oktobur","Novembur","Desembur"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"Í Dag",clear:"Reinsa"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fr-CH.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fr-CH.min.js
new file mode 100644
index 00000000..1c6bcdcb
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fr-CH.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],daysMin:["D","L","Ma","Me","J","V","S"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",monthsTitle:"Mois",clear:"Effacer",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fr.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fr.min.js
new file mode 100644
index 00000000..244cfba8
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.fr.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.fr={days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],daysShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],daysMin:["d","l","ma","me","j","v","s"],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthsShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],today:"Aujourd'hui",monthsTitle:"Mois",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.gl.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.gl.min.js
new file mode 100644
index 00000000..3d92606b
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.gl.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.gl={days:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"],daysShort:["Dom","Lun","Mar","Mér","Xov","Ven","Sáb"],daysMin:["Do","Lu","Ma","Me","Xo","Ve","Sa"],months:["Xaneiro","Febreiro","Marzo","Abril","Maio","Xuño","Xullo","Agosto","Setembro","Outubro","Novembro","Decembro"],monthsShort:["Xan","Feb","Mar","Abr","Mai","Xun","Xul","Ago","Sep","Out","Nov","Dec"],today:"Hoxe",clear:"Limpar",weekStart:1,format:"dd/mm/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.he.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.he.min.js
new file mode 100644
index 00000000..191cb453
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.he.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.he={days:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת","ראשון"],daysShort:["א","ב","ג","ד","ה","ו","ש","א"],daysMin:["א","ב","ג","ד","ה","ו","ש","א"],months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],monthsShort:["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ"],today:"היום",rtl:!0}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.hr.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.hr.min.js
new file mode 100644
index 00000000..8b34bce0
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.hr.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.hr={days:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"],daysShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],daysMin:["Ne","Po","Ut","Sr","Če","Pe","Su"],months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],monthsShort:["Sij","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro"],today:"Danas"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.hu.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.hu.min.js
new file mode 100644
index 00000000..f9decf9a
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.hu.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.hu={days:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],daysShort:["vas","hét","ked","sze","csü","pén","szo"],daysMin:["V","H","K","Sze","Cs","P","Szo"],months:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],monthsShort:["jan","feb","már","ápr","máj","jún","júl","aug","sze","okt","nov","dec"],today:"ma",weekStart:1,clear:"töröl",titleFormat:"yyyy. MM",format:"yyyy.mm.dd"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.hy.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.hy.min.js
new file mode 100644
index 00000000..819fb9e5
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.hy.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.hy={days:["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","Ուրբաթ","Շաբաթ"],daysShort:["Կրկ","Երկ","Երք","Չրք","Հնգ","Ուր","Շբթ"],daysMin:["Կրկ","Երկ","Երք","Չրք","Հնգ","Ուր","Շբթ"],months:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"],monthsShort:["Հուն","Փետ","Մար","Ապր","Մայ","Հնս","Հլս","Օգս","Սեպ","Հոկ","Նմբ","Դեկ"],today:"Այսօր",clear:"Ջնջել",format:"dd.mm.yyyy",weekStart:1}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.id.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.id.min.js
new file mode 100644
index 00000000..7c3220a6
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.id.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.id={days:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],daysShort:["Mgu","Sen","Sel","Rab","Kam","Jum","Sab"],daysMin:["Mg","Sn","Sl","Ra","Ka","Ju","Sa"],months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],today:"Hari Ini",clear:"Kosongkan"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.is.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.is.min.js
new file mode 100644
index 00000000..f49bd18c
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.is.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.is={days:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"],daysShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau"],daysMin:["Su","Má","Þr","Mi","Fi","Fö","La"],months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],today:"Í Dag"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.it-CH.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.it-CH.min.js
new file mode 100644
index 00000000..7e1adbb9
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.it-CH.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.it.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.it.min.js
new file mode 100644
index 00000000..cc30766f
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.it.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",monthsTitle:"Mesi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ja.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ja.min.js
new file mode 100644
index 00000000..e321f04f
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ja.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.ja={days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜"],daysShort:["日","月","火","水","木","金","土"],daysMin:["日","月","火","水","木","金","土"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",format:"yyyy/mm/dd",titleFormat:"yyyy年mm月",clear:"クリア"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ka.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ka.min.js
new file mode 100644
index 00000000..db247aad
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ka.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.ka={days:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],daysShort:["კვი","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],daysMin:["კვ","ორ","სა","ოთ","ხუ","პა","შა"],months:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომები","ნოემბერი","დეკემბერი"],monthsShort:["იან","თებ","მარ","აპრ","მაი","ივნ","ივლ","აგვ","სექ","ოქტ","ნოე","დეკ"],today:"დღეს",clear:"გასუფთავება",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.kh.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.kh.min.js
new file mode 100644
index 00000000..cc41e1ac
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.kh.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.kh={days:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស្បតិ៍","សុក្រ","សៅរ៍","អាទិត្យ"],daysShort:["អា.ទិ","ចន្ទ","អង្គារ","ពុធ","ព្រ.ហ","សុក្រ","សៅរ៍","អា.ទិ"],daysMin:["អា.ទិ","ចន្ទ","អង្គារ","ពុធ","ព្រ.ហ","សុក្រ","សៅរ៍","អា.ទិ"],months:["មករា","កុម្ភះ","មិនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],monthsShort:["មករា","កុម្ភះ","មិនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],today:"ថ្ងៃនេះ",clear:"សំអាត"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.kk.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.kk.min.js
new file mode 100644
index 00000000..0b1c123a
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.kk.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.kk={days:["Жексенбі","Дүйсенбі","Сейсенбі","Сәрсенбі","Бейсенбі","Жұма","Сенбі"],daysShort:["Жек","Дүй","Сей","Сәр","Бей","Жұм","Сен"],daysMin:["Жк","Дс","Сс","Ср","Бс","Жм","Сн"],months:["Қаңтар","Ақпан","Наурыз","Сәуір","Мамыр","Маусым","Шілде","Тамыз","Қыркүйек","Қазан","Қараша","Желтоқсан"],monthsShort:["Қаң","Ақп","Нау","Сәу","Мамыр","Мау","Шлд","Тмз","Қыр","Қзн","Қар","Жел"],today:"Бүгін",weekStart:1}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ko.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ko.min.js
new file mode 100644
index 00000000..9751ee5c
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ko.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.ko={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],daysShort:["일","월","화","수","목","금","토"],daysMin:["일","월","화","수","목","금","토"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],today:"오늘",clear:"삭제",format:"yyyy-mm-dd",titleFormat:"yyyy년mm월",weekStart:0}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.kr.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.kr.min.js
new file mode 100644
index 00000000..fbc3ddf9
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.kr.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.kr={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],daysShort:["일","월","화","수","목","금","토"],daysMin:["일","월","화","수","목","금","토"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.lt.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.lt.min.js
new file mode 100644
index 00000000..da78ea85
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.lt.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis"],daysShort:["S","Pr","A","T","K","Pn","Š"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",monthsTitle:"Mėnesiai",clear:"Išvalyti",weekStart:1,format:"yyyy-mm-dd"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.lv.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.lv.min.js
new file mode 100644
index 00000000..5383880c
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.lv.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.lv={days:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena"],daysShort:["Sv","P","O","T","C","Pk","S"],daysMin:["Sv","Pr","Ot","Tr","Ce","Pk","Se"],months:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],today:"Šodien",weekStart:1}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.me.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.me.min.js
new file mode 100644
index 00000000..c65a8916
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.me.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.me={days:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"],daysShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],daysMin:["Ne","Po","Ut","Sr","Če","Pe","Su"],months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danas",weekStart:1,clear:"Izbriši",format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.mk.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.mk.min.js
new file mode 100644
index 00000000..46423f75
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.mk.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.mk={days:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"],daysShort:["Нед","Пон","Вто","Сре","Чет","Пет","Саб"],daysMin:["Не","По","Вт","Ср","Че","Пе","Са"],months:["Јануари","Февруари","Март","Април","Мај","Јуни","Јули","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Јан","Фев","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Ное","Дек"],today:"Денес",format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.mn.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.mn.min.js
new file mode 100644
index 00000000..6ebaec9d
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.mn.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.mn={days:["Ням","Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба"],daysShort:["Ням","Дав","Мяг","Лха","Пүр","Баа","Бям"],daysMin:["Ня","Да","Мя","Лх","Пү","Ба","Бя"],months:["Хулгана","Үхэр","Бар","Туулай","Луу","Могой","Морь","Хонь","Бич","Тахиа","Нохой","Гахай"],monthsShort:["Хул","Үхэ","Бар","Туу","Луу","Мог","Мор","Хон","Бич","Тах","Нох","Гах"],today:"Өнөөдөр",clear:"Тодорхой",format:"yyyy.mm.dd",weekStart:1}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ms.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ms.min.js
new file mode 100644
index 00000000..47efafdc
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ms.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.ms={days:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],daysShort:["Aha","Isn","Sel","Rab","Kha","Jum","Sab"],daysMin:["Ah","Is","Se","Ra","Kh","Ju","Sa"],months:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],today:"Hari Ini",clear:"Bersihkan"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.nb.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.nb.min.js
new file mode 100644
index 00000000..3903b056
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.nb.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.nb={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I Dag",format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.nl-BE.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.nl-BE.min.js
new file mode 100644
index 00000000..85d3146d
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.nl-BE.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates["nl-BE"]={days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],daysShort:["zo","ma","di","wo","do","vr","za"],daysMin:["zo","ma","di","wo","do","vr","za"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthsShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],today:"Vandaag",monthsTitle:"Maanden",clear:"Leegmaken",weekStart:1,format:"dd/mm/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.nl.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.nl.min.js
new file mode 100644
index 00000000..af977b71
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.nl.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.nl={days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],daysShort:["zo","ma","di","wo","do","vr","za"],daysMin:["zo","ma","di","wo","do","vr","za"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthsShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],today:"Vandaag",monthsTitle:"Maanden",clear:"Wissen",weekStart:1,format:"dd-mm-yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.no.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.no.min.js
new file mode 100644
index 00000000..a606e7ef
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.no.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.no={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I dag",clear:"Nullstill",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.pl.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.pl.min.js
new file mode 100644
index 00000000..7cea53a3
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.pl.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.pl={days:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],daysShort:["niedz.","pon.","wt.","śr.","czw.","piąt.","sob."],daysMin:["ndz.","pn.","wt.","śr.","czw.","pt.","sob."],months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],monthsShort:["sty.","lut.","mar.","kwi.","maj","cze.","lip.","sie.","wrz.","paź.","lis.","gru."],today:"dzisiaj",weekStart:1,clear:"wyczyść",format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.pt-BR.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.pt-BR.min.js
new file mode 100644
index 00000000..2d3f8afd
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.pt-BR.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",monthsTitle:"Meses",clear:"Limpar",format:"dd/mm/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.pt.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.pt.min.js
new file mode 100644
index 00000000..e2b4e64d
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.pt.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",monthsTitle:"Meses",clear:"Limpar",format:"dd/mm/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ro.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ro.min.js
new file mode 100644
index 00000000..731b21b8
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ro.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.ro={days:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"],daysShort:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm"],daysMin:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],months:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],monthsShort:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],today:"Astăzi",clear:"Șterge",weekStart:1}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.rs-latin.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.rs-latin.min.js
new file mode 100644
index 00000000..b0285f4b
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.rs-latin.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates["rs-latin"]={days:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"],daysShort:["Ned","Pon","Uto","Sre","Čet","Pet","Sub"],daysMin:["N","Po","U","Sr","Č","Pe","Su"],months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danas",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.rs.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.rs.min.js
new file mode 100644
index 00000000..050f1ca4
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.rs.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.rs={days:["Недеља","Понедељак","Уторак","Среда","Четвртак","Петак","Субота"],daysShort:["Нед","Пон","Уто","Сре","Чет","Пет","Суб"],daysMin:["Н","По","У","Ср","Ч","Пе","Су"],months:["Јануар","Фебруар","Март","Април","Мај","Јун","Јул","Август","Септембар","Октобар","Новембар","Децембар"],monthsShort:["Јан","Феб","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Нов","Дец"],today:"Данас",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ru.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ru.min.js
new file mode 100644
index 00000000..1bcbcb78
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.ru.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",clear:"Очистить",format:"dd.mm.yyyy",weekStart:1}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sk.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sk.min.js
new file mode 100644
index 00000000..79a9267f
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sk.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.sk={days:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"],daysShort:["Ned","Pon","Uto","Str","Štv","Pia","Sob"],daysMin:["Ne","Po","Ut","St","Št","Pia","So"],months:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Máj","Jún","Júl","Aug","Sep","Okt","Nov","Dec"],today:"Dnes",clear:"Vymazať",weekStart:1,format:"d.m.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sl.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sl.min.js
new file mode 100644
index 00000000..d54d20b1
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sl.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.sl={days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"],daysShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],daysMin:["Ne","Po","To","Sr","Če","Pe","So"],months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danes"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sq.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sq.min.js
new file mode 100644
index 00000000..40f3e1f5
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sq.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.sq={days:["E Diel","E Hënë","E Martē","E Mërkurë","E Enjte","E Premte","E Shtunë"],daysShort:["Die","Hën","Mar","Mër","Enj","Pre","Shtu"],daysMin:["Di","Hë","Ma","Më","En","Pr","Sht"],months:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"],monthsShort:["Jan","Shk","Mar","Pri","Maj","Qer","Korr","Gu","Sht","Tet","Nën","Dhjet"],today:"Sot"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sr-latin.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sr-latin.min.js
new file mode 100644
index 00000000..c6b7001a
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sr-latin.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates["sr-latin"]={days:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"],daysShort:["Ned","Pon","Uto","Sre","Čet","Pet","Sub"],daysMin:["N","Po","U","Sr","Č","Pe","Su"],months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danas",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sr.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sr.min.js
new file mode 100644
index 00000000..4e46dbf6
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sr.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.sr={days:["Недеља","Понедељак","Уторак","Среда","Четвртак","Петак","Субота"],daysShort:["Нед","Пон","Уто","Сре","Чет","Пет","Суб"],daysMin:["Н","По","У","Ср","Ч","Пе","Су"],months:["Јануар","Фебруар","Март","Април","Мај","Јун","Јул","Август","Септембар","Октобар","Новембар","Децембар"],monthsShort:["Јан","Феб","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Нов","Дец"],today:"Данас",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sv.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sv.min.js
new file mode 100644
index 00000000..f088f82f
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sv.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Idag",format:"yyyy-mm-dd",weekStart:1,clear:"Rensa"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sw.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sw.min.js
new file mode 100644
index 00000000..454d3053
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.sw.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.sw={days:["Jumapili","Jumatatu","Jumanne","Jumatano","Alhamisi","Ijumaa","Jumamosi"],daysShort:["J2","J3","J4","J5","Alh","Ij","J1"],daysMin:["2","3","4","5","A","I","1"],months:["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Desemba"],monthsShort:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Des"],today:"Leo"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.th.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.th.min.js
new file mode 100644
index 00000000..1e398ba8
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.th.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],today:"วันนี้"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.tr.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.tr.min.js
new file mode 100644
index 00000000..7889b113
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.tr.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.tr={days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],daysShort:["Pz","Pzt","Sal","Çrş","Prş","Cu","Cts"],daysMin:["Pz","Pzt","Sa","Çr","Pr","Cu","Ct"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],today:"Bugün",clear:"Temizle",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.uk.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.uk.min.js
new file mode 100644
index 00000000..41b02e6b
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.uk.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.uk={days:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"],daysShort:["Нед","Пнд","Втр","Срд","Чтв","Птн","Суб"],daysMin:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],months:["Cічень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],monthsShort:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],today:"Сьогодні",clear:"Очистити",format:"dd.mm.yyyy",weekStart:1}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.vi.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.vi.min.js
new file mode 100644
index 00000000..3311d23f
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.vi.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates.vi={days:["Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy"],daysShort:["CN","Thứ 2","Thứ 3","Thứ 4","Thứ 5","Thứ 6","Thứ 7"],daysMin:["CN","T2","T3","T4","T5","T6","T7"],months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],monthsShort:["Th1","Th2","Th3","Th4","Th5","Th6","Th7","Th8","Th9","Th10","Th11","Th12"],today:"Hôm nay",clear:"Xóa",format:"dd/mm/yyyy"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.zh-CN.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.zh-CN.min.js
new file mode 100644
index 00000000..12791764
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.zh-CN.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],daysShort:["周日","周一","周二","周三","周四","周五","周六"],daysMin:["日","一","二","三","四","五","六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",clear:"清除",format:"yyyy年mm月dd日",titleFormat:"yyyy年mm月",weekStart:1}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.zh-TW.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.zh-TW.min.js
new file mode 100644
index 00000000..e309c1d7
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker-locales/bootstrap-datepicker.zh-TW.min.js
@@ -0,0 +1 @@
+!function(a){a.fn.datepicker.dates["zh-TW"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],daysShort:["週日","週一","週二","週三","週四","週五","週六"],daysMin:["日","一","二","三","四","五","六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今天",format:"yyyy年mm月dd日",weekStart:1,clear:"清除"}}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker.js
new file mode 100644
index 00000000..b0a1219f
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker.js
@@ -0,0 +1,2125 @@
+/*!
+ * Datepicker for Bootstrap v1.6.0 (https://github.com/eternicode/bootstrap-datepicker)
+ *
+ * Copyright 2012 Stefan Petre
+ * Improvements by Andrew Rowls
+ * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
+ */(function(factory){
+ if (typeof define === "function" && define.amd) {
+ define(["jquery"], factory);
+ } else if (typeof exports === 'object') {
+ factory(require('jquery'));
+ } else {
+ factory(jQuery);
+ }
+}(function($, undefined){
+
+ function UTCDate(){
+ return new Date(Date.UTC.apply(Date, arguments));
+ }
+ function UTCToday(){
+ var today = new Date();
+ return UTCDate(today.getFullYear(), today.getMonth(), today.getDate());
+ }
+ function isUTCEquals(date1, date2) {
+ return (
+ date1.getUTCFullYear() === date2.getUTCFullYear() &&
+ date1.getUTCMonth() === date2.getUTCMonth() &&
+ date1.getUTCDate() === date2.getUTCDate()
+ );
+ }
+ function alias(method){
+ return function(){
+ return this[method].apply(this, arguments);
+ };
+ }
+ function isValidDate(d) {
+ return d && !isNaN(d.getTime());
+ }
+
+ var DateArray = (function(){
+ var extras = {
+ get: function(i){
+ return this.slice(i)[0];
+ },
+ contains: function(d){
+ // Array.indexOf is not cross-browser;
+ // $.inArray doesn't work with Dates
+ var val = d && d.valueOf();
+ for (var i=0, l=this.length; i < l; i++)
+ if (this[i].valueOf() === val)
+ return i;
+ return -1;
+ },
+ remove: function(i){
+ this.splice(i,1);
+ },
+ replace: function(new_array){
+ if (!new_array)
+ return;
+ if (!$.isArray(new_array))
+ new_array = [new_array];
+ this.clear();
+ this.push.apply(this, new_array);
+ },
+ clear: function(){
+ this.length = 0;
+ },
+ copy: function(){
+ var a = new DateArray();
+ a.replace(this);
+ return a;
+ }
+ };
+
+ return function(){
+ var a = [];
+ a.push.apply(a, arguments);
+ $.extend(a, extras);
+ return a;
+ };
+ })();
+
+
+ // Picker object
+
+ var Datepicker = function(element, options){
+ $(element).data('datepicker', this);
+ this._process_options(options);
+
+ this.dates = new DateArray();
+ this.viewDate = this.o.defaultViewDate;
+ this.focusDate = null;
+
+ this.element = $(element);
+ this.isInline = false;
+ this.isInput = this.element.is('input');
+ this.component = this.element.hasClass('date') ? this.element.find('.add-on, .input-group-addon, .btn') : false;
+ this.hasInput = this.component && this.element.find('input').length;
+ if (this.component && this.component.length === 0)
+ this.component = false;
+
+ this.picker = $(DPGlobal.template);
+
+ // Checking templates and inserting
+ if (this._check_template(this.o.templates.leftArrow)) {
+ this.picker.find('.prev').html(this.o.templates.leftArrow);
+ }
+ if (this._check_template(this.o.templates.rightArrow)) {
+ this.picker.find('.next').html(this.o.templates.rightArrow);
+ }
+
+ this._buildEvents();
+ this._attachEvents();
+
+ if (this.isInline){
+ this.picker.addClass('datepicker-inline').appendTo(this.element);
+ }
+ else {
+ this.picker.addClass('datepicker-dropdown dropdown-menu');
+ }
+
+ if (this.o.rtl){
+ this.picker.addClass('datepicker-rtl');
+ }
+
+ this.viewMode = this.o.startView;
+
+ if (this.o.calendarWeeks)
+ this.picker.find('thead .datepicker-title, tfoot .today, tfoot .clear')
+ .attr('colspan', function(i, val){
+ return parseInt(val) + 1;
+ });
+
+ this._allow_update = false;
+
+ this.setStartDate(this._o.startDate);
+ this.setEndDate(this._o.endDate);
+ this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);
+ this.setDaysOfWeekHighlighted(this.o.daysOfWeekHighlighted);
+ this.setDatesDisabled(this.o.datesDisabled);
+
+ this.fillDow();
+ this.fillMonths();
+
+ this._allow_update = true;
+
+ this.update();
+ this.showMode();
+
+ if (this.isInline){
+ this.show();
+ }
+ };
+
+ Datepicker.prototype = {
+ constructor: Datepicker,
+
+ _resolveViewName: function(view, default_value){
+ if (view === 0 || view === 'days' || view === 'month') {
+ return 0;
+ }
+ if (view === 1 || view === 'months' || view === 'year') {
+ return 1;
+ }
+ if (view === 2 || view === 'years' || view === 'decade') {
+ return 2;
+ }
+ if (view === 3 || view === 'decades' || view === 'century') {
+ return 3;
+ }
+ if (view === 4 || view === 'centuries' || view === 'millennium') {
+ return 4;
+ }
+ return default_value === undefined ? false : default_value;
+ },
+
+ _check_template: function(tmp){
+ try {
+ // If empty
+ if (tmp === undefined || tmp === "") {
+ return false;
+ }
+ // If no html, everything ok
+ if ((tmp.match(/[<>]/g) || []).length <= 0) {
+ return true;
+ }
+ // Checking if html is fine
+ var jDom = $(tmp);
+ return jDom.length > 0;
+ }
+ catch (ex) {
+ return false;
+ }
+ },
+
+ _process_options: function(opts){
+ // Store raw options for reference
+ this._o = $.extend({}, this._o, opts);
+ // Processed options
+ var o = this.o = $.extend({}, this._o);
+
+ // Check if "de-DE" style date is available, if not language should
+ // fallback to 2 letter code eg "de"
+ var lang = o.language;
+ if (!dates[lang]){
+ lang = lang.split('-')[0];
+ if (!dates[lang])
+ lang = defaults.language;
+ }
+ o.language = lang;
+
+ // Retrieve view index from any aliases
+ o.startView = this._resolveViewName(o.startView, 0);
+ o.minViewMode = this._resolveViewName(o.minViewMode, 0);
+ o.maxViewMode = this._resolveViewName(o.maxViewMode, 4);
+
+ // Check that the start view is between min and max
+ o.startView = Math.min(o.startView, o.maxViewMode);
+ o.startView = Math.max(o.startView, o.minViewMode);
+
+ // true, false, or Number > 0
+ if (o.multidate !== true){
+ o.multidate = Number(o.multidate) || false;
+ if (o.multidate !== false)
+ o.multidate = Math.max(0, o.multidate);
+ }
+ o.multidateSeparator = String(o.multidateSeparator);
+
+ o.weekStart %= 7;
+ o.weekEnd = (o.weekStart + 6) % 7;
+
+ var format = DPGlobal.parseFormat(o.format);
+ if (o.startDate !== -Infinity){
+ if (!!o.startDate){
+ if (o.startDate instanceof Date)
+ o.startDate = this._local_to_utc(this._zero_time(o.startDate));
+ else
+ o.startDate = DPGlobal.parseDate(o.startDate, format, o.language, o.assumeNearbyYear);
+ }
+ else {
+ o.startDate = -Infinity;
+ }
+ }
+ if (o.endDate !== Infinity){
+ if (!!o.endDate){
+ if (o.endDate instanceof Date)
+ o.endDate = this._local_to_utc(this._zero_time(o.endDate));
+ else
+ o.endDate = DPGlobal.parseDate(o.endDate, format, o.language, o.assumeNearbyYear);
+ }
+ else {
+ o.endDate = Infinity;
+ }
+ }
+
+ o.daysOfWeekDisabled = o.daysOfWeekDisabled||[];
+ if (!$.isArray(o.daysOfWeekDisabled))
+ o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/);
+ o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function(d){
+ return parseInt(d, 10);
+ });
+
+ o.daysOfWeekHighlighted = o.daysOfWeekHighlighted||[];
+ if (!$.isArray(o.daysOfWeekHighlighted))
+ o.daysOfWeekHighlighted = o.daysOfWeekHighlighted.split(/[,\s]*/);
+ o.daysOfWeekHighlighted = $.map(o.daysOfWeekHighlighted, function(d){
+ return parseInt(d, 10);
+ });
+
+ o.datesDisabled = o.datesDisabled||[];
+ if (!$.isArray(o.datesDisabled)) {
+ var datesDisabled = [];
+ datesDisabled.push(DPGlobal.parseDate(o.datesDisabled, format, o.language, o.assumeNearbyYear));
+ o.datesDisabled = datesDisabled;
+ }
+ o.datesDisabled = $.map(o.datesDisabled,function(d){
+ return DPGlobal.parseDate(d, format, o.language, o.assumeNearbyYear);
+ });
+
+ var plc = String(o.orientation).toLowerCase().split(/\s+/g),
+ _plc = o.orientation.toLowerCase();
+ plc = $.grep(plc, function(word){
+ return /^auto|left|right|top|bottom$/.test(word);
+ });
+ o.orientation = {x: 'auto', y: 'auto'};
+ if (!_plc || _plc === 'auto')
+ ; // no action
+ else if (plc.length === 1){
+ switch (plc[0]){
+ case 'top':
+ case 'bottom':
+ o.orientation.y = plc[0];
+ break;
+ case 'left':
+ case 'right':
+ o.orientation.x = plc[0];
+ break;
+ }
+ }
+ else {
+ _plc = $.grep(plc, function(word){
+ return /^left|right$/.test(word);
+ });
+ o.orientation.x = _plc[0] || 'auto';
+
+ _plc = $.grep(plc, function(word){
+ return /^top|bottom$/.test(word);
+ });
+ o.orientation.y = _plc[0] || 'auto';
+ }
+ if (o.defaultViewDate) {
+ var year = o.defaultViewDate.year || new Date().getFullYear();
+ var month = o.defaultViewDate.month || 0;
+ var day = o.defaultViewDate.day || 1;
+ o.defaultViewDate = UTCDate(year, month, day);
+ } else {
+ o.defaultViewDate = UTCToday();
+ }
+ },
+ _events: [],
+ _secondaryEvents: [],
+ _applyEvents: function(evs){
+ for (var i=0, el, ch, ev; i < evs.length; i++){
+ el = evs[i][0];
+ if (evs[i].length === 2){
+ ch = undefined;
+ ev = evs[i][1];
+ }
+ else if (evs[i].length === 3){
+ ch = evs[i][1];
+ ev = evs[i][2];
+ }
+ el.on(ev, ch);
+ }
+ },
+ _unapplyEvents: function(evs){
+ for (var i=0, el, ev, ch; i < evs.length; i++){
+ el = evs[i][0];
+ if (evs[i].length === 2){
+ ch = undefined;
+ ev = evs[i][1];
+ }
+ else if (evs[i].length === 3){
+ ch = evs[i][1];
+ ev = evs[i][2];
+ }
+ el.off(ev, ch);
+ }
+ },
+ _buildEvents: function(){
+ var events = {
+ keyup: $.proxy(function(e){
+ if ($.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) === -1)
+ this.update();
+ }, this),
+ keydown: $.proxy(this.keydown, this),
+ paste: $.proxy(this.paste, this)
+ };
+
+ if (this.o.showOnFocus === true) {
+ events.focus = $.proxy(this.show, this);
+ }
+
+ if (this.isInput) { // single input
+ this._events = [
+ [this.element, events]
+ ];
+ }
+ else if (this.component && this.hasInput) { // component: input + button
+ this._events = [
+ // For components that are not readonly, allow keyboard nav
+ [this.element.find('input'), events],
+ [this.component, {
+ click: $.proxy(this.show, this)
+ }]
+ ];
+ }
+ else if (this.element.is('div')){ // inline datepicker
+ this.isInline = true;
+ }
+ else {
+ this._events = [
+ [this.element, {
+ click: $.proxy(this.show, this)
+ }]
+ ];
+ }
+ this._events.push(
+ // Component: listen for blur on element descendants
+ [this.element, '*', {
+ blur: $.proxy(function(e){
+ this._focused_from = e.target;
+ }, this)
+ }],
+ // Input: listen for blur on element
+ [this.element, {
+ blur: $.proxy(function(e){
+ this._focused_from = e.target;
+ }, this)
+ }]
+ );
+
+ if (this.o.immediateUpdates) {
+ // Trigger input updates immediately on changed year/month
+ this._events.push([this.element, {
+ 'changeYear changeMonth': $.proxy(function(e){
+ this.update(e.date);
+ }, this)
+ }]);
+ }
+
+ this._secondaryEvents = [
+ [this.picker, {
+ click: $.proxy(this.click, this)
+ }],
+ [$(window), {
+ resize: $.proxy(this.place, this)
+ }],
+ [$(document), {
+ mousedown: $.proxy(function(e){
+ // Clicked outside the datepicker, hide it
+ if (!(
+ this.element.is(e.target) ||
+ this.element.find(e.target).length ||
+ this.picker.is(e.target) ||
+ this.picker.find(e.target).length ||
+ this.picker.hasClass('datepicker-inline')
+ )){
+ this.hide();
+ }
+ }, this)
+ }]
+ ];
+ },
+ _attachEvents: function(){
+ this._detachEvents();
+ this._applyEvents(this._events);
+ },
+ _detachEvents: function(){
+ this._unapplyEvents(this._events);
+ },
+ _attachSecondaryEvents: function(){
+ this._detachSecondaryEvents();
+ this._applyEvents(this._secondaryEvents);
+ },
+ _detachSecondaryEvents: function(){
+ this._unapplyEvents(this._secondaryEvents);
+ },
+ _trigger: function(event, altdate){
+ var date = altdate || this.dates.get(-1),
+ local_date = this._utc_to_local(date);
+
+ this.element.trigger({
+ type: event,
+ date: local_date,
+ dates: $.map(this.dates, this._utc_to_local),
+ format: $.proxy(function(ix, format){
+ if (arguments.length === 0){
+ ix = this.dates.length - 1;
+ format = this.o.format;
+ }
+ else if (typeof ix === 'string'){
+ format = ix;
+ ix = this.dates.length - 1;
+ }
+ format = format || this.o.format;
+ var date = this.dates.get(ix);
+ return DPGlobal.formatDate(date, format, this.o.language);
+ }, this)
+ });
+ },
+
+ show: function(){
+ var element = this.component ? this.element.find('input') : this.element;
+ if (element.attr('readonly') && this.o.enableOnReadonly === false)
+ return;
+ if (!this.isInline)
+ this.picker.appendTo(this.o.container);
+ this.place();
+ this.picker.show();
+ this._attachSecondaryEvents();
+ this._trigger('show');
+ if ((window.navigator.msMaxTouchPoints || 'ontouchstart' in document) && this.o.disableTouchKeyboard) {
+ $(this.element).blur();
+ }
+ return this;
+ },
+
+ hide: function(){
+ if (this.isInline)
+ return this;
+ if (!this.picker.is(':visible'))
+ return this;
+ this.focusDate = null;
+ this.picker.hide().detach();
+ this._detachSecondaryEvents();
+ this.viewMode = this.o.startView;
+ this.showMode();
+
+ if (
+ this.o.forceParse &&
+ (
+ this.isInput && this.element.val() ||
+ this.hasInput && this.element.find('input').val()
+ )
+ )
+ this.setValue();
+ this._trigger('hide');
+ return this;
+ },
+
+ destroy: function(){
+ this.hide();
+ this._detachEvents();
+ this._detachSecondaryEvents();
+ this.picker.remove();
+ delete this.element.data().datepicker;
+ if (!this.isInput){
+ delete this.element.data().date;
+ }
+ return this;
+ },
+
+ paste: function(evt){
+ var dateString;
+ if (evt.originalEvent.clipboardData && evt.originalEvent.clipboardData.types
+ && $.inArray('text/plain', evt.originalEvent.clipboardData.types) !== -1) {
+ dateString = evt.originalEvent.clipboardData.getData('text/plain');
+ }
+ else if (window.clipboardData) {
+ dateString = window.clipboardData.getData('Text');
+ }
+ else {
+ return;
+ }
+ this.setDate(dateString);
+ this.update();
+ evt.preventDefault();
+ },
+
+ _utc_to_local: function(utc){
+ return utc && new Date(utc.getTime() + (utc.getTimezoneOffset()*60000));
+ },
+ _local_to_utc: function(local){
+ return local && new Date(local.getTime() - (local.getTimezoneOffset()*60000));
+ },
+ _zero_time: function(local){
+ return local && new Date(local.getFullYear(), local.getMonth(), local.getDate());
+ },
+ _zero_utc_time: function(utc){
+ return utc && new Date(Date.UTC(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate()));
+ },
+
+ getDates: function(){
+ return $.map(this.dates, this._utc_to_local);
+ },
+
+ getUTCDates: function(){
+ return $.map(this.dates, function(d){
+ return new Date(d);
+ });
+ },
+
+ getDate: function(){
+ return this._utc_to_local(this.getUTCDate());
+ },
+
+ getUTCDate: function(){
+ var selected_date = this.dates.get(-1);
+ if (typeof selected_date !== 'undefined') {
+ return new Date(selected_date);
+ } else {
+ return null;
+ }
+ },
+
+ clearDates: function(){
+ var element;
+ if (this.isInput) {
+ element = this.element;
+ } else if (this.component) {
+ element = this.element.find('input');
+ }
+
+ if (element) {
+ element.val('');
+ }
+
+ this.update();
+ this._trigger('changeDate');
+
+ if (this.o.autoclose) {
+ this.hide();
+ }
+ },
+ setDates: function(){
+ var args = $.isArray(arguments[0]) ? arguments[0] : arguments;
+ this.update.apply(this, args);
+ this._trigger('changeDate');
+ this.setValue();
+ return this;
+ },
+
+ setUTCDates: function(){
+ var args = $.isArray(arguments[0]) ? arguments[0] : arguments;
+ this.update.apply(this, $.map(args, this._utc_to_local));
+ this._trigger('changeDate');
+ this.setValue();
+ return this;
+ },
+
+ setDate: alias('setDates'),
+ setUTCDate: alias('setUTCDates'),
+ remove: alias('destroy'),
+
+ setValue: function(){
+ var formatted = this.getFormattedDate();
+ if (!this.isInput){
+ if (this.component){
+ this.element.find('input').val(formatted);
+ }
+ }
+ else {
+ this.element.val(formatted);
+ }
+ return this;
+ },
+
+ getFormattedDate: function(format){
+ if (format === undefined)
+ format = this.o.format;
+
+ var lang = this.o.language;
+ return $.map(this.dates, function(d){
+ return DPGlobal.formatDate(d, format, lang);
+ }).join(this.o.multidateSeparator);
+ },
+
+ getStartDate: function(){
+ return this.o.startDate;
+ },
+
+ setStartDate: function(startDate){
+ this._process_options({startDate: startDate});
+ this.update();
+ this.updateNavArrows();
+ return this;
+ },
+
+ getEndDate: function(){
+ return this.o.endDate;
+ },
+
+ setEndDate: function(endDate){
+ this._process_options({endDate: endDate});
+ this.update();
+ this.updateNavArrows();
+ return this;
+ },
+
+ setDaysOfWeekDisabled: function(daysOfWeekDisabled){
+ this._process_options({daysOfWeekDisabled: daysOfWeekDisabled});
+ this.update();
+ this.updateNavArrows();
+ return this;
+ },
+
+ setDaysOfWeekHighlighted: function(daysOfWeekHighlighted){
+ this._process_options({daysOfWeekHighlighted: daysOfWeekHighlighted});
+ this.update();
+ return this;
+ },
+
+ setDatesDisabled: function(datesDisabled){
+ this._process_options({datesDisabled: datesDisabled});
+ this.update();
+ this.updateNavArrows();
+ },
+
+ place: function(){
+ if (this.isInline)
+ return this;
+ var calendarWidth = this.picker.outerWidth(),
+ calendarHeight = this.picker.outerHeight(),
+ visualPadding = 10,
+ container = $(this.o.container),
+ windowWidth = container.width(),
+ scrollTop = this.o.container === 'body' ? $(document).scrollTop() : container.scrollTop(),
+ appendOffset = container.offset();
+
+ var parentsZindex = [];
+ this.element.parents().each(function(){
+ var itemZIndex = $(this).css('z-index');
+ if (itemZIndex !== 'auto' && itemZIndex !== 0) parentsZindex.push(parseInt(itemZIndex));
+ });
+ var zIndex = Math.max.apply(Math, parentsZindex) + this.o.zIndexOffset;
+ var offset = this.component ? this.component.parent().offset() : this.element.offset();
+ var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false);
+ var width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false);
+ var left = offset.left - appendOffset.left,
+ top = offset.top - appendOffset.top;
+
+ if (this.o.container !== 'body') {
+ top += scrollTop;
+ }
+
+ this.picker.removeClass(
+ 'datepicker-orient-top datepicker-orient-bottom '+
+ 'datepicker-orient-right datepicker-orient-left'
+ );
+
+ if (this.o.orientation.x !== 'auto'){
+ this.picker.addClass('datepicker-orient-' + this.o.orientation.x);
+ if (this.o.orientation.x === 'right')
+ left -= calendarWidth - width;
+ }
+ // auto x orientation is best-placement: if it crosses a window
+ // edge, fudge it sideways
+ else {
+ if (offset.left < 0) {
+ // component is outside the window on the left side. Move it into visible range
+ this.picker.addClass('datepicker-orient-left');
+ left -= offset.left - visualPadding;
+ } else if (left + calendarWidth > windowWidth) {
+ // the calendar passes the widow right edge. Align it to component right side
+ this.picker.addClass('datepicker-orient-right');
+ left += width - calendarWidth;
+ } else {
+ // Default to left
+ this.picker.addClass('datepicker-orient-left');
+ }
+ }
+
+ // auto y orientation is best-situation: top or bottom, no fudging,
+ // decision based on which shows more of the calendar
+ var yorient = this.o.orientation.y,
+ top_overflow;
+ if (yorient === 'auto'){
+ top_overflow = -scrollTop + top - calendarHeight;
+ yorient = top_overflow < 0 ? 'bottom' : 'top';
+ }
+
+ this.picker.addClass('datepicker-orient-' + yorient);
+ if (yorient === 'top')
+ top -= calendarHeight + parseInt(this.picker.css('padding-top'));
+ else
+ top += height;
+
+ if (this.o.rtl) {
+ var right = windowWidth - (left + width);
+ this.picker.css({
+ top: top,
+ right: right,
+ zIndex: zIndex
+ });
+ } else {
+ this.picker.css({
+ top: top,
+ left: left,
+ zIndex: zIndex
+ });
+ }
+ return this;
+ },
+
+ _allow_update: true,
+ update: function(){
+ if (!this._allow_update)
+ return this;
+
+ var oldDates = this.dates.copy(),
+ dates = [],
+ fromArgs = false;
+ if (arguments.length){
+ $.each(arguments, $.proxy(function(i, date){
+ if (date instanceof Date)
+ date = this._local_to_utc(date);
+ dates.push(date);
+ }, this));
+ fromArgs = true;
+ }
+ else {
+ dates = this.isInput
+ ? this.element.val()
+ : this.element.data('date') || this.element.find('input').val();
+ if (dates && this.o.multidate)
+ dates = dates.split(this.o.multidateSeparator);
+ else
+ dates = [dates];
+ delete this.element.data().date;
+ }
+
+ dates = $.map(dates, $.proxy(function(date){
+ return DPGlobal.parseDate(date, this.o.format, this.o.language, this.o.assumeNearbyYear);
+ }, this));
+ dates = $.grep(dates, $.proxy(function(date){
+ return (
+ !this.dateWithinRange(date) ||
+ !date
+ );
+ }, this), true);
+ this.dates.replace(dates);
+
+ if (this.dates.length)
+ this.viewDate = new Date(this.dates.get(-1));
+ else if (this.viewDate < this.o.startDate)
+ this.viewDate = new Date(this.o.startDate);
+ else if (this.viewDate > this.o.endDate)
+ this.viewDate = new Date(this.o.endDate);
+ else
+ this.viewDate = this.o.defaultViewDate;
+
+ if (fromArgs){
+ // setting date by clicking
+ this.setValue();
+ }
+ else if (dates.length){
+ // setting date by typing
+ if (String(oldDates) !== String(this.dates))
+ this._trigger('changeDate');
+ }
+ if (!this.dates.length && oldDates.length)
+ this._trigger('clearDate');
+
+ this.fill();
+ this.element.change();
+ return this;
+ },
+
+ fillDow: function(){
+ var dowCnt = this.o.weekStart,
+ html = '';
+ if (this.o.calendarWeeks){
+ this.picker.find('.datepicker-days .datepicker-switch')
+ .attr('colspan', function(i, val){
+ return parseInt(val) + 1;
+ });
+ html += ' ';
+ }
+ while (dowCnt < this.o.weekStart + 7){
+ html += ''+dates[this.o.language].daysMin[(dowCnt++)%7]+' ';
+ }
+ html += ' ';
+ this.picker.find('.datepicker-days thead').append(html);
+ },
+
+ fillMonths: function(){
+ var localDate = this._utc_to_local(this.viewDate);
+ var html = '',
+ i = 0;
+ while (i < 12){
+ var focused = localDate && localDate.getMonth() === i ? ' focused' : '';
+ html += '' + dates[this.o.language].monthsShort[i++]+' ';
+ }
+ this.picker.find('.datepicker-months td').html(html);
+ },
+
+ setRange: function(range){
+ if (!range || !range.length)
+ delete this.range;
+ else
+ this.range = $.map(range, function(d){
+ return d.valueOf();
+ });
+ this.fill();
+ },
+
+ getClassNames: function(date){
+ var cls = [],
+ year = this.viewDate.getUTCFullYear(),
+ month = this.viewDate.getUTCMonth(),
+ today = new Date();
+ if (date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month)){
+ cls.push('old');
+ }
+ else if (date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month)){
+ cls.push('new');
+ }
+ if (this.focusDate && date.valueOf() === this.focusDate.valueOf())
+ cls.push('focused');
+ // Compare internal UTC date with local today, not UTC today
+ if (this.o.todayHighlight &&
+ date.getUTCFullYear() === today.getFullYear() &&
+ date.getUTCMonth() === today.getMonth() &&
+ date.getUTCDate() === today.getDate()){
+ cls.push('today');
+ }
+ if (this.dates.contains(date) !== -1)
+ cls.push('active');
+ if (!this.dateWithinRange(date) || this.dateIsDisabled(date)){
+ cls.push('disabled');
+ }
+ if ($.inArray(date.getUTCDay(), this.o.daysOfWeekHighlighted) !== -1){
+ cls.push('highlighted');
+ }
+
+ if (this.range){
+ if (date > this.range[0] && date < this.range[this.range.length-1]){
+ cls.push('range');
+ }
+ if ($.inArray(date.valueOf(), this.range) !== -1){
+ cls.push('selected');
+ }
+ if (date.valueOf() === this.range[0]){
+ cls.push('range-start');
+ }
+ if (date.valueOf() === this.range[this.range.length-1]){
+ cls.push('range-end');
+ }
+ }
+ return cls;
+ },
+
+ _fill_yearsView: function(selector, cssClass, factor, step, currentYear, startYear, endYear, callback){
+ var html, view, year, steps, startStep, endStep, thisYear, i, classes, tooltip, before;
+
+ html = '';
+ view = this.picker.find(selector);
+ year = parseInt(currentYear / factor, 10) * factor;
+ startStep = parseInt(startYear / step, 10) * step;
+ endStep = parseInt(endYear / step, 10) * step;
+ steps = $.map(this.dates, function(d){
+ return parseInt(d.getUTCFullYear() / step, 10) * step;
+ });
+
+ view.find('.datepicker-switch').text(year + '-' + (year + step * 9));
+
+ thisYear = year - step;
+ for (i = -1; i < 11; i += 1) {
+ classes = [cssClass];
+ tooltip = null;
+
+ if (i === -1) {
+ classes.push('old');
+ } else if (i === 10) {
+ classes.push('new');
+ }
+ if ($.inArray(thisYear, steps) !== -1) {
+ classes.push('active');
+ }
+ if (thisYear < startStep || thisYear > endStep) {
+ classes.push('disabled');
+ }
+ if (thisYear === this.viewDate.getFullYear()) {
+ classes.push('focused');
+ }
+
+ if (callback !== $.noop) {
+ before = callback(new Date(thisYear, 0, 1));
+ if (before === undefined) {
+ before = {};
+ } else if (typeof(before) === 'boolean') {
+ before = {enabled: before};
+ } else if (typeof(before) === 'string') {
+ before = {classes: before};
+ }
+ if (before.enabled === false) {
+ classes.push('disabled');
+ }
+ if (before.classes) {
+ classes = classes.concat(before.classes.split(/\s+/));
+ }
+ if (before.tooltip) {
+ tooltip = before.tooltip;
+ }
+ }
+
+ html += '' + thisYear + ' ';
+ thisYear += step;
+ }
+ view.find('td').html(html);
+ },
+
+ fill: function(){
+ var d = new Date(this.viewDate),
+ year = d.getUTCFullYear(),
+ month = d.getUTCMonth(),
+ startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity,
+ startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity,
+ endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity,
+ endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity,
+ todaytxt = dates[this.o.language].today || dates['en'].today || '',
+ cleartxt = dates[this.o.language].clear || dates['en'].clear || '',
+ titleFormat = dates[this.o.language].titleFormat || dates['en'].titleFormat,
+ tooltip,
+ before;
+ if (isNaN(year) || isNaN(month))
+ return;
+ this.picker.find('.datepicker-days .datepicker-switch')
+ .text(DPGlobal.formatDate(d, titleFormat, this.o.language));
+ this.picker.find('tfoot .today')
+ .text(todaytxt)
+ .toggle(this.o.todayBtn !== false);
+ this.picker.find('tfoot .clear')
+ .text(cleartxt)
+ .toggle(this.o.clearBtn !== false);
+ this.picker.find('thead .datepicker-title')
+ .text(this.o.title)
+ .toggle(this.o.title !== '');
+ this.updateNavArrows();
+ this.fillMonths();
+ var prevMonth = UTCDate(year, month-1, 28),
+ day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth());
+ prevMonth.setUTCDate(day);
+ prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7);
+ var nextMonth = new Date(prevMonth);
+ if (prevMonth.getUTCFullYear() < 100){
+ nextMonth.setUTCFullYear(prevMonth.getUTCFullYear());
+ }
+ nextMonth.setUTCDate(nextMonth.getUTCDate() + 42);
+ nextMonth = nextMonth.valueOf();
+ var html = [];
+ var clsName;
+ while (prevMonth.valueOf() < nextMonth){
+ if (prevMonth.getUTCDay() === this.o.weekStart){
+ html.push('');
+ if (this.o.calendarWeeks){
+ // ISO 8601: First week contains first thursday.
+ // ISO also states week starts on Monday, but we can be more abstract here.
+ var
+ // Start of current week: based on weekstart/current date
+ ws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5),
+ // Thursday of this week
+ th = new Date(Number(ws) + (7 + 4 - ws.getUTCDay()) % 7 * 864e5),
+ // First Thursday of year, year from thursday
+ yth = new Date(Number(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5),
+ // Calendar week: ms between thursdays, div ms per day, div 7 days
+ calWeek = (th - yth) / 864e5 / 7 + 1;
+ html.push(''+ calWeek +' ');
+
+ }
+ }
+ clsName = this.getClassNames(prevMonth);
+ clsName.push('day');
+
+ if (this.o.beforeShowDay !== $.noop){
+ before = this.o.beforeShowDay(this._utc_to_local(prevMonth));
+ if (before === undefined)
+ before = {};
+ else if (typeof(before) === 'boolean')
+ before = {enabled: before};
+ else if (typeof(before) === 'string')
+ before = {classes: before};
+ if (before.enabled === false)
+ clsName.push('disabled');
+ if (before.classes)
+ clsName = clsName.concat(before.classes.split(/\s+/));
+ if (before.tooltip)
+ tooltip = before.tooltip;
+ }
+
+ clsName = $.unique(clsName);
+ html.push(''+prevMonth.getUTCDate() + ' ');
+ tooltip = null;
+ if (prevMonth.getUTCDay() === this.o.weekEnd){
+ html.push(' ');
+ }
+ prevMonth.setUTCDate(prevMonth.getUTCDate()+1);
+ }
+ this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
+
+ var monthsTitle = dates[this.o.language].monthsTitle || dates['en'].monthsTitle || 'Months';
+ var months = this.picker.find('.datepicker-months')
+ .find('.datepicker-switch')
+ .text(this.o.maxViewMode < 2 ? monthsTitle : year)
+ .end()
+ .find('span').removeClass('active');
+
+ $.each(this.dates, function(i, d){
+ if (d.getUTCFullYear() === year)
+ months.eq(d.getUTCMonth()).addClass('active');
+ });
+
+ if (year < startYear || year > endYear){
+ months.addClass('disabled');
+ }
+ if (year === startYear){
+ months.slice(0, startMonth).addClass('disabled');
+ }
+ if (year === endYear){
+ months.slice(endMonth+1).addClass('disabled');
+ }
+
+ if (this.o.beforeShowMonth !== $.noop){
+ var that = this;
+ $.each(months, function(i, month){
+ var moDate = new Date(year, i, 1);
+ var before = that.o.beforeShowMonth(moDate);
+ if (before === undefined)
+ before = {};
+ else if (typeof(before) === 'boolean')
+ before = {enabled: before};
+ else if (typeof(before) === 'string')
+ before = {classes: before};
+ if (before.enabled === false && !$(month).hasClass('disabled'))
+ $(month).addClass('disabled');
+ if (before.classes)
+ $(month).addClass(before.classes);
+ if (before.tooltip)
+ $(month).prop('title', before.tooltip);
+ });
+ }
+
+ // Generating decade/years picker
+ this._fill_yearsView(
+ '.datepicker-years',
+ 'year',
+ 10,
+ 1,
+ year,
+ startYear,
+ endYear,
+ this.o.beforeShowYear
+ );
+
+ // Generating century/decades picker
+ this._fill_yearsView(
+ '.datepicker-decades',
+ 'decade',
+ 100,
+ 10,
+ year,
+ startYear,
+ endYear,
+ this.o.beforeShowDecade
+ );
+
+ // Generating millennium/centuries picker
+ this._fill_yearsView(
+ '.datepicker-centuries',
+ 'century',
+ 1000,
+ 100,
+ year,
+ startYear,
+ endYear,
+ this.o.beforeShowCentury
+ );
+ },
+
+ updateNavArrows: function(){
+ if (!this._allow_update)
+ return;
+
+ var d = new Date(this.viewDate),
+ year = d.getUTCFullYear(),
+ month = d.getUTCMonth();
+ switch (this.viewMode){
+ case 0:
+ if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()){
+ this.picker.find('.prev').css({visibility: 'hidden'});
+ }
+ else {
+ this.picker.find('.prev').css({visibility: 'visible'});
+ }
+ if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()){
+ this.picker.find('.next').css({visibility: 'hidden'});
+ }
+ else {
+ this.picker.find('.next').css({visibility: 'visible'});
+ }
+ break;
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() || this.o.maxViewMode < 2){
+ this.picker.find('.prev').css({visibility: 'hidden'});
+ }
+ else {
+ this.picker.find('.prev').css({visibility: 'visible'});
+ }
+ if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() || this.o.maxViewMode < 2){
+ this.picker.find('.next').css({visibility: 'hidden'});
+ }
+ else {
+ this.picker.find('.next').css({visibility: 'visible'});
+ }
+ break;
+ }
+ },
+
+ click: function(e){
+ e.preventDefault();
+ e.stopPropagation();
+
+ var target, dir, day, year, month, monthChanged, yearChanged;
+ target = $(e.target);
+
+ // Clicked on the switch
+ if (target.hasClass('datepicker-switch')){
+ this.showMode(1);
+ }
+
+ // Clicked on prev or next
+ var navArrow = target.closest('.prev, .next');
+ if (navArrow.length > 0) {
+ dir = DPGlobal.modes[this.viewMode].navStep * (navArrow.hasClass('prev') ? -1 : 1);
+ if (this.viewMode === 0){
+ this.viewDate = this.moveMonth(this.viewDate, dir);
+ this._trigger('changeMonth', this.viewDate);
+ } else {
+ this.viewDate = this.moveYear(this.viewDate, dir);
+ if (this.viewMode === 1){
+ this._trigger('changeYear', this.viewDate);
+ }
+ }
+ this.fill();
+ }
+
+ // Clicked on today button
+ if (target.hasClass('today')){
+ this.showMode(-2);
+ this._setDate(UTCToday(), this.o.todayBtn === 'linked' ? null : 'view');
+ }
+
+ // Clicked on clear button
+ if (target.hasClass('clear')){
+ this.clearDates();
+ }
+
+ if (!target.hasClass('disabled')){
+ // Clicked on a day
+ if (target.hasClass('day')){
+ day = parseInt(target.text(), 10) || 1;
+ year = this.viewDate.getUTCFullYear();
+ month = this.viewDate.getUTCMonth();
+
+ // From last month
+ if (target.hasClass('old')){
+ if (month === 0) {
+ month = 11;
+ year = year - 1;
+ monthChanged = true;
+ yearChanged = true;
+ } else {
+ month = month - 1;
+ monthChanged = true;
+ }
+ }
+
+ // From next month
+ if (target.hasClass('new')) {
+ if (month === 11){
+ month = 0;
+ year = year + 1;
+ monthChanged = true;
+ yearChanged = true;
+ } else {
+ month = month + 1;
+ monthChanged = true;
+ }
+ }
+ this._setDate(UTCDate(year, month, day));
+ if (yearChanged) {
+ this._trigger('changeYear', this.viewDate);
+ }
+ if (monthChanged) {
+ this._trigger('changeMonth', this.viewDate);
+ }
+ }
+
+ // Clicked on a month
+ if (target.hasClass('month')) {
+ this.viewDate.setUTCDate(1);
+ day = 1;
+ month = target.parent().find('span').index(target);
+ year = this.viewDate.getUTCFullYear();
+ this.viewDate.setUTCMonth(month);
+ this._trigger('changeMonth', this.viewDate);
+ if (this.o.minViewMode === 1){
+ this._setDate(UTCDate(year, month, day));
+ this.showMode();
+ } else {
+ this.showMode(-1);
+ }
+ this.fill();
+ }
+
+ // Clicked on a year
+ if (target.hasClass('year')
+ || target.hasClass('decade')
+ || target.hasClass('century')) {
+ this.viewDate.setUTCDate(1);
+
+ day = 1;
+ month = 0;
+ year = parseInt(target.text(), 10)||0;
+ this.viewDate.setUTCFullYear(year);
+
+ if (target.hasClass('year')){
+ this._trigger('changeYear', this.viewDate);
+ if (this.o.minViewMode === 2){
+ this._setDate(UTCDate(year, month, day));
+ }
+ }
+ if (target.hasClass('decade')){
+ this._trigger('changeDecade', this.viewDate);
+ if (this.o.minViewMode === 3){
+ this._setDate(UTCDate(year, month, day));
+ }
+ }
+ if (target.hasClass('century')){
+ this._trigger('changeCentury', this.viewDate);
+ if (this.o.minViewMode === 4){
+ this._setDate(UTCDate(year, month, day));
+ }
+ }
+
+ this.showMode(-1);
+ this.fill();
+ }
+ }
+
+ if (this.picker.is(':visible') && this._focused_from){
+ $(this._focused_from).focus();
+ }
+ delete this._focused_from;
+ },
+
+ _toggle_multidate: function(date){
+ var ix = this.dates.contains(date);
+ if (!date){
+ this.dates.clear();
+ }
+
+ if (ix !== -1){
+ if (this.o.multidate === true || this.o.multidate > 1 || this.o.toggleActive){
+ this.dates.remove(ix);
+ }
+ } else if (this.o.multidate === false) {
+ this.dates.clear();
+ this.dates.push(date);
+ }
+ else {
+ this.dates.push(date);
+ }
+
+ if (typeof this.o.multidate === 'number')
+ while (this.dates.length > this.o.multidate)
+ this.dates.remove(0);
+ },
+
+ _setDate: function(date, which){
+ if (!which || which === 'date')
+ this._toggle_multidate(date && new Date(date));
+ if (!which || which === 'view')
+ this.viewDate = date && new Date(date);
+
+ this.fill();
+ this.setValue();
+ if (!which || which !== 'view') {
+ this._trigger('changeDate');
+ }
+ var element;
+ if (this.isInput){
+ element = this.element;
+ }
+ else if (this.component){
+ element = this.element.find('input');
+ }
+ if (element){
+ element.change();
+ }
+ if (this.o.autoclose && (!which || which === 'date')){
+ this.hide();
+ }
+ },
+
+ moveDay: function(date, dir){
+ var newDate = new Date(date);
+ newDate.setUTCDate(date.getUTCDate() + dir);
+
+ return newDate;
+ },
+
+ moveWeek: function(date, dir){
+ return this.moveDay(date, dir * 7);
+ },
+
+ moveMonth: function(date, dir){
+ if (!isValidDate(date))
+ return this.o.defaultViewDate;
+ if (!dir)
+ return date;
+ var new_date = new Date(date.valueOf()),
+ day = new_date.getUTCDate(),
+ month = new_date.getUTCMonth(),
+ mag = Math.abs(dir),
+ new_month, test;
+ dir = dir > 0 ? 1 : -1;
+ if (mag === 1){
+ test = dir === -1
+ // If going back one month, make sure month is not current month
+ // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02)
+ ? function(){
+ return new_date.getUTCMonth() === month;
+ }
+ // If going forward one month, make sure month is as expected
+ // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02)
+ : function(){
+ return new_date.getUTCMonth() !== new_month;
+ };
+ new_month = month + dir;
+ new_date.setUTCMonth(new_month);
+ // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11
+ if (new_month < 0 || new_month > 11)
+ new_month = (new_month + 12) % 12;
+ }
+ else {
+ // For magnitudes >1, move one month at a time...
+ for (var i=0; i < mag; i++)
+ // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)...
+ new_date = this.moveMonth(new_date, dir);
+ // ...then reset the day, keeping it in the new month
+ new_month = new_date.getUTCMonth();
+ new_date.setUTCDate(day);
+ test = function(){
+ return new_month !== new_date.getUTCMonth();
+ };
+ }
+ // Common date-resetting loop -- if date is beyond end of month, make it
+ // end of month
+ while (test()){
+ new_date.setUTCDate(--day);
+ new_date.setUTCMonth(new_month);
+ }
+ return new_date;
+ },
+
+ moveYear: function(date, dir){
+ return this.moveMonth(date, dir*12);
+ },
+
+ moveAvailableDate: function(date, dir, fn){
+ do {
+ date = this[fn](date, dir);
+
+ if (!this.dateWithinRange(date))
+ return false;
+
+ fn = 'moveDay';
+ }
+ while (this.dateIsDisabled(date));
+
+ return date;
+ },
+
+ weekOfDateIsDisabled: function(date){
+ return $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1;
+ },
+
+ dateIsDisabled: function(date){
+ return (
+ this.weekOfDateIsDisabled(date) ||
+ $.grep(this.o.datesDisabled, function(d){
+ return isUTCEquals(date, d);
+ }).length > 0
+ );
+ },
+
+ dateWithinRange: function(date){
+ return date >= this.o.startDate && date <= this.o.endDate;
+ },
+
+ keydown: function(e){
+ if (!this.picker.is(':visible')){
+ if (e.keyCode === 40 || e.keyCode === 27) { // allow down to re-show picker
+ this.show();
+ e.stopPropagation();
+ }
+ return;
+ }
+ var dateChanged = false,
+ dir, newViewDate,
+ focusDate = this.focusDate || this.viewDate;
+ switch (e.keyCode){
+ case 27: // escape
+ if (this.focusDate){
+ this.focusDate = null;
+ this.viewDate = this.dates.get(-1) || this.viewDate;
+ this.fill();
+ }
+ else
+ this.hide();
+ e.preventDefault();
+ e.stopPropagation();
+ break;
+ case 37: // left
+ case 38: // up
+ case 39: // right
+ case 40: // down
+ if (!this.o.keyboardNavigation || this.o.daysOfWeekDisabled.length === 7)
+ break;
+ dir = e.keyCode === 37 || e.keyCode === 38 ? -1 : 1;
+ if (this.viewMode === 0) {
+ if (e.ctrlKey){
+ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveYear');
+
+ if (newViewDate)
+ this._trigger('changeYear', this.viewDate);
+ }
+ else if (e.shiftKey){
+ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveMonth');
+
+ if (newViewDate)
+ this._trigger('changeMonth', this.viewDate);
+ }
+ else if (e.keyCode === 37 || e.keyCode === 39){
+ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveDay');
+ }
+ else if (!this.weekOfDateIsDisabled(focusDate)){
+ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveWeek');
+ }
+ } else if (this.viewMode === 1) {
+ if (e.keyCode === 38 || e.keyCode === 40) {
+ dir = dir * 4;
+ }
+ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveMonth');
+ } else if (this.viewMode === 2) {
+ if (e.keyCode === 38 || e.keyCode === 40) {
+ dir = dir * 4;
+ }
+ newViewDate = this.moveAvailableDate(focusDate, dir, 'moveYear');
+ }
+ if (newViewDate){
+ this.focusDate = this.viewDate = newViewDate;
+ this.setValue();
+ this.fill();
+ e.preventDefault();
+ }
+ break;
+ case 13: // enter
+ if (!this.o.forceParse)
+ break;
+ focusDate = this.focusDate || this.dates.get(-1) || this.viewDate;
+ if (this.o.keyboardNavigation) {
+ this._toggle_multidate(focusDate);
+ dateChanged = true;
+ }
+ this.focusDate = null;
+ this.viewDate = this.dates.get(-1) || this.viewDate;
+ this.setValue();
+ this.fill();
+ if (this.picker.is(':visible')){
+ e.preventDefault();
+ e.stopPropagation();
+ if (this.o.autoclose)
+ this.hide();
+ }
+ break;
+ case 9: // tab
+ this.focusDate = null;
+ this.viewDate = this.dates.get(-1) || this.viewDate;
+ this.fill();
+ this.hide();
+ break;
+ }
+ if (dateChanged){
+ if (this.dates.length)
+ this._trigger('changeDate');
+ else
+ this._trigger('clearDate');
+ var element;
+ if (this.isInput){
+ element = this.element;
+ }
+ else if (this.component){
+ element = this.element.find('input');
+ }
+ if (element){
+ element.change();
+ }
+ }
+ },
+
+ showMode: function(dir){
+ if (dir){
+ this.viewMode = Math.max(this.o.minViewMode, Math.min(this.o.maxViewMode, this.viewMode + dir));
+ }
+ this.picker
+ .children('div')
+ .hide()
+ .filter('.datepicker-' + DPGlobal.modes[this.viewMode].clsName)
+ .show();
+ this.updateNavArrows();
+ }
+ };
+
+ var DateRangePicker = function(element, options){
+ $(element).data('datepicker', this);
+ this.element = $(element);
+ this.inputs = $.map(options.inputs, function(i){
+ return i.jquery ? i[0] : i;
+ });
+ delete options.inputs;
+
+ datepickerPlugin.call($(this.inputs), options)
+ .on('changeDate', $.proxy(this.dateUpdated, this));
+
+ this.pickers = $.map(this.inputs, function(i){
+ return $(i).data('datepicker');
+ });
+ this.updateDates();
+ };
+ DateRangePicker.prototype = {
+ updateDates: function(){
+ this.dates = $.map(this.pickers, function(i){
+ return i.getUTCDate();
+ });
+ this.updateRanges();
+ },
+ updateRanges: function(){
+ var range = $.map(this.dates, function(d){
+ return d.valueOf();
+ });
+ $.each(this.pickers, function(i, p){
+ p.setRange(range);
+ });
+ },
+ dateUpdated: function(e){
+ // `this.updating` is a workaround for preventing infinite recursion
+ // between `changeDate` triggering and `setUTCDate` calling. Until
+ // there is a better mechanism.
+ if (this.updating)
+ return;
+ this.updating = true;
+
+ var dp = $(e.target).data('datepicker');
+
+ if (typeof(dp) === "undefined") {
+ return;
+ }
+
+ var new_date = dp.getUTCDate(),
+ i = $.inArray(e.target, this.inputs),
+ j = i - 1,
+ k = i + 1,
+ l = this.inputs.length;
+ if (i === -1)
+ return;
+
+ $.each(this.pickers, function(i, p){
+ if (!p.getUTCDate())
+ p.setUTCDate(new_date);
+ });
+
+ if (new_date < this.dates[j]){
+ // Date being moved earlier/left
+ while (j >= 0 && new_date < this.dates[j]){
+ this.pickers[j--].setUTCDate(new_date);
+ }
+ }
+ else if (new_date > this.dates[k]){
+ // Date being moved later/right
+ while (k < l && new_date > this.dates[k]){
+ this.pickers[k++].setUTCDate(new_date);
+ }
+ }
+ this.updateDates();
+
+ delete this.updating;
+ },
+ remove: function(){
+ $.map(this.pickers, function(p){ p.remove(); });
+ delete this.element.data().datepicker;
+ }
+ };
+
+ function opts_from_el(el, prefix){
+ // Derive options from element data-attrs
+ var data = $(el).data(),
+ out = {}, inkey,
+ replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])');
+ prefix = new RegExp('^' + prefix.toLowerCase());
+ function re_lower(_,a){
+ return a.toLowerCase();
+ }
+ for (var key in data)
+ if (prefix.test(key)){
+ inkey = key.replace(replace, re_lower);
+ out[inkey] = data[key];
+ }
+ return out;
+ }
+
+ function opts_from_locale(lang){
+ // Derive options from locale plugins
+ var out = {};
+ // Check if "de-DE" style date is available, if not language should
+ // fallback to 2 letter code eg "de"
+ if (!dates[lang]){
+ lang = lang.split('-')[0];
+ if (!dates[lang])
+ return;
+ }
+ var d = dates[lang];
+ $.each(locale_opts, function(i,k){
+ if (k in d)
+ out[k] = d[k];
+ });
+ return out;
+ }
+
+ var old = $.fn.datepicker;
+ var datepickerPlugin = function(option){
+ var args = Array.apply(null, arguments);
+ args.shift();
+ var internal_return;
+ this.each(function(){
+ var $this = $(this),
+ data = $this.data('datepicker'),
+ options = typeof option === 'object' && option;
+ if (!data){
+ var elopts = opts_from_el(this, 'date'),
+ // Preliminary otions
+ xopts = $.extend({}, defaults, elopts, options),
+ locopts = opts_from_locale(xopts.language),
+ // Options priority: js args, data-attrs, locales, defaults
+ opts = $.extend({}, defaults, locopts, elopts, options);
+ if ($this.hasClass('input-daterange') || opts.inputs){
+ $.extend(opts, {
+ inputs: opts.inputs || $this.find('input').toArray()
+ });
+ data = new DateRangePicker(this, opts);
+ }
+ else {
+ data = new Datepicker(this, opts);
+ }
+ $this.data('datepicker', data);
+ }
+ if (typeof option === 'string' && typeof data[option] === 'function'){
+ internal_return = data[option].apply(data, args);
+ }
+ });
+
+ if (
+ internal_return === undefined ||
+ internal_return instanceof Datepicker ||
+ internal_return instanceof DateRangePicker
+ )
+ return this;
+
+ if (this.length > 1)
+ throw new Error('Using only allowed for the collection of a single element (' + option + ' function)');
+ else
+ return internal_return;
+ };
+ $.fn.datepicker = datepickerPlugin;
+
+ var defaults = $.fn.datepicker.defaults = {
+ assumeNearbyYear: false,
+ autoclose: false,
+ beforeShowDay: $.noop,
+ beforeShowMonth: $.noop,
+ beforeShowYear: $.noop,
+ beforeShowDecade: $.noop,
+ beforeShowCentury: $.noop,
+ calendarWeeks: false,
+ clearBtn: false,
+ toggleActive: false,
+ daysOfWeekDisabled: [],
+ daysOfWeekHighlighted: [],
+ datesDisabled: [],
+ endDate: Infinity,
+ forceParse: true,
+ format: 'mm/dd/yyyy',
+ keyboardNavigation: true,
+ language: 'en',
+ minViewMode: 0,
+ maxViewMode: 4,
+ multidate: false,
+ multidateSeparator: ',',
+ orientation: "auto",
+ rtl: false,
+ startDate: -Infinity,
+ startView: 0,
+ todayBtn: false,
+ todayHighlight: false,
+ weekStart: 0,
+ disableTouchKeyboard: false,
+ enableOnReadonly: true,
+ showOnFocus: true,
+ zIndexOffset: 10,
+ container: 'body',
+ immediateUpdates: false,
+ title: '',
+ templates: {
+ leftArrow: '«',
+ rightArrow: '»'
+ }
+ };
+ var locale_opts = $.fn.datepicker.locale_opts = [
+ 'format',
+ 'rtl',
+ 'weekStart'
+ ];
+ $.fn.datepicker.Constructor = Datepicker;
+ var dates = $.fn.datepicker.dates = {
+ en: {
+ days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
+ daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
+ daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
+ months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
+ monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
+ today: "Today",
+ clear: "Clear",
+ titleFormat: "MM yyyy"
+ }
+ };
+
+ var DPGlobal = {
+ modes: [
+ {
+ clsName: 'days',
+ navFnc: 'Month',
+ navStep: 1
+ },
+ {
+ clsName: 'months',
+ navFnc: 'FullYear',
+ navStep: 1
+ },
+ {
+ clsName: 'years',
+ navFnc: 'FullYear',
+ navStep: 10
+ },
+ {
+ clsName: 'decades',
+ navFnc: 'FullDecade',
+ navStep: 100
+ },
+ {
+ clsName: 'centuries',
+ navFnc: 'FullCentury',
+ navStep: 1000
+ }],
+ isLeapYear: function(year){
+ return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0));
+ },
+ getDaysInMonth: function(year, month){
+ return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
+ },
+ validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g,
+ nonpunctuation: /[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,
+ parseFormat: function(format){
+ if (typeof format.toValue === 'function' && typeof format.toDisplay === 'function')
+ return format;
+ // IE treats \0 as a string end in inputs (truncating the value),
+ // so it's a bad format delimiter, anyway
+ var separators = format.replace(this.validParts, '\0').split('\0'),
+ parts = format.match(this.validParts);
+ if (!separators || !separators.length || !parts || parts.length === 0){
+ throw new Error("Invalid date format.");
+ }
+ return {separators: separators, parts: parts};
+ },
+ parseDate: function(date, format, language, assumeNearby){
+ if (!date)
+ return undefined;
+ if (date instanceof Date)
+ return date;
+ if (typeof format === 'string')
+ format = DPGlobal.parseFormat(format);
+ if (format.toValue)
+ return format.toValue(date, format, language);
+ var part_re = /([\-+]\d+)([dmwy])/,
+ parts = date.match(/([\-+]\d+)([dmwy])/g),
+ fn_map = {
+ d: 'moveDay',
+ m: 'moveMonth',
+ w: 'moveWeek',
+ y: 'moveYear'
+ },
+ dateAliases = {
+ yesterday: '-1d',
+ today: '+0d',
+ tomorrow: '+1d'
+ },
+ part, dir, i, fn;
+ if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)){
+ date = new Date();
+ for (i=0; i < parts.length; i++){
+ part = part_re.exec(parts[i]);
+ dir = parseInt(part[1]);
+ fn = fn_map[part[2]];
+ date = Datepicker.prototype[fn](date, dir);
+ }
+ return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
+ }
+
+ if (typeof dateAliases[date] !== 'undefined') {
+ date = dateAliases[date];
+ parts = date.match(/([\-+]\d+)([dmwy])/g);
+
+ if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)){
+ date = new Date();
+ for (i=0; i < parts.length; i++){
+ part = part_re.exec(parts[i]);
+ dir = parseInt(part[1]);
+ fn = fn_map[part[2]];
+ date = Datepicker.prototype[fn](date, dir);
+ }
+
+ return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
+ }
+ }
+
+ parts = date && date.match(this.nonpunctuation) || [];
+ date = new Date();
+
+ function applyNearbyYear(year, threshold){
+ if (threshold === true)
+ threshold = 10;
+
+ // if year is 2 digits or less, than the user most likely is trying to get a recent century
+ if (year < 100){
+ year += 2000;
+ // if the new year is more than threshold years in advance, use last century
+ if (year > ((new Date()).getFullYear()+threshold)){
+ year -= 100;
+ }
+ }
+
+ return year;
+ }
+
+ var parsed = {},
+ setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'],
+ setters_map = {
+ yyyy: function(d,v){
+ return d.setUTCFullYear(assumeNearby ? applyNearbyYear(v, assumeNearby) : v);
+ },
+ yy: function(d,v){
+ return d.setUTCFullYear(assumeNearby ? applyNearbyYear(v, assumeNearby) : v);
+ },
+ m: function(d,v){
+ if (isNaN(d))
+ return d;
+ v -= 1;
+ while (v < 0) v += 12;
+ v %= 12;
+ d.setUTCMonth(v);
+ while (d.getUTCMonth() !== v)
+ d.setUTCDate(d.getUTCDate()-1);
+ return d;
+ },
+ d: function(d,v){
+ return d.setUTCDate(v);
+ }
+ },
+ val, filtered;
+ setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m'];
+ setters_map['dd'] = setters_map['d'];
+ date = UTCToday();
+ var fparts = format.parts.slice();
+ // Remove noop parts
+ if (parts.length !== fparts.length){
+ fparts = $(fparts).filter(function(i,p){
+ return $.inArray(p, setters_order) !== -1;
+ }).toArray();
+ }
+ // Process remainder
+ function match_part(){
+ var m = this.slice(0, parts[i].length),
+ p = parts[i].slice(0, m.length);
+ return m.toLowerCase() === p.toLowerCase();
+ }
+ if (parts.length === fparts.length){
+ var cnt;
+ for (i=0, cnt = fparts.length; i < cnt; i++){
+ val = parseInt(parts[i], 10);
+ part = fparts[i];
+ if (isNaN(val)){
+ switch (part){
+ case 'MM':
+ filtered = $(dates[language].months).filter(match_part);
+ val = $.inArray(filtered[0], dates[language].months) + 1;
+ break;
+ case 'M':
+ filtered = $(dates[language].monthsShort).filter(match_part);
+ val = $.inArray(filtered[0], dates[language].monthsShort) + 1;
+ break;
+ }
+ }
+ parsed[part] = val;
+ }
+ var _date, s;
+ for (i=0; i < setters_order.length; i++){
+ s = setters_order[i];
+ if (s in parsed && !isNaN(parsed[s])){
+ _date = new Date(date);
+ setters_map[s](_date, parsed[s]);
+ if (!isNaN(_date))
+ date = _date;
+ }
+ }
+ }
+ return date;
+ },
+ formatDate: function(date, format, language){
+ if (!date)
+ return '';
+ if (typeof format === 'string')
+ format = DPGlobal.parseFormat(format);
+ if (format.toDisplay)
+ return format.toDisplay(date, format, language);
+ var val = {
+ d: date.getUTCDate(),
+ D: dates[language].daysShort[date.getUTCDay()],
+ DD: dates[language].days[date.getUTCDay()],
+ m: date.getUTCMonth() + 1,
+ M: dates[language].monthsShort[date.getUTCMonth()],
+ MM: dates[language].months[date.getUTCMonth()],
+ yy: date.getUTCFullYear().toString().substring(2),
+ yyyy: date.getUTCFullYear()
+ };
+ val.dd = (val.d < 10 ? '0' : '') + val.d;
+ val.mm = (val.m < 10 ? '0' : '') + val.m;
+ date = [];
+ var seps = $.extend([], format.separators);
+ for (var i=0, cnt = format.parts.length; i <= cnt; i++){
+ if (seps.length)
+ date.push(seps.shift());
+ date.push(val[format.parts[i]]);
+ }
+ return date.join('');
+ },
+ headTemplate: ''+
+ ''+
+ ' '+
+ ' '+
+ ''+
+ '« '+
+ ' '+
+ '» '+
+ ' '+
+ ' ',
+ contTemplate: ' ',
+ footTemplate: ''+
+ ''+
+ ' '+
+ ' '+
+ ''+
+ ' '+
+ ' '+
+ ' '
+ };
+ DPGlobal.template = ''+
+ '
'+
+ '
'+
+ DPGlobal.headTemplate+
+ ' '+
+ DPGlobal.footTemplate+
+ '
'+
+ '
'+
+ '
'+
+ '
'+
+ DPGlobal.headTemplate+
+ DPGlobal.contTemplate+
+ DPGlobal.footTemplate+
+ '
'+
+ '
'+
+ '
'+
+ '
'+
+ DPGlobal.headTemplate+
+ DPGlobal.contTemplate+
+ DPGlobal.footTemplate+
+ '
'+
+ '
'+
+ '
'+
+ '
'+
+ DPGlobal.headTemplate+
+ DPGlobal.contTemplate+
+ DPGlobal.footTemplate+
+ '
'+
+ '
'+
+ '
'+
+ '
'+
+ DPGlobal.headTemplate+
+ DPGlobal.contTemplate+
+ DPGlobal.footTemplate+
+ '
'+
+ '
'+
+ '
';
+
+ $.fn.datepicker.DPGlobal = DPGlobal;
+
+
+ /* DATEPICKER NO CONFLICT
+ * =================== */
+
+ $.fn.datepicker.noConflict = function(){
+ $.fn.datepicker = old;
+ return this;
+ };
+
+ /* DATEPICKER VERSION
+ * =================== */
+ $.fn.datepicker.version = '1.6.0';
+
+ /* DATEPICKER DATA-API
+ * ================== */
+
+ $(document).on(
+ 'focus.datepicker.data-api click.datepicker.data-api',
+ '[data-provide="datepicker"]',
+ function(e){
+ var $this = $(this);
+ if ($this.data('datepicker'))
+ return;
+ e.preventDefault();
+ // component click requires us to explicitly show it
+ datepickerPlugin.call($this, 'show');
+ }
+ );
+ $(function(){
+ datepickerPlugin.call($('[data-provide="datepicker-inline"]'));
+ });
+
+}));
diff --git a/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker.min.js b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker.min.js
new file mode 100644
index 00000000..fc5e35be
--- /dev/null
+++ b/build/wwwroot/lib/bootstrap-datepicker/bootstrap-datepicker.min.js
@@ -0,0 +1,9 @@
+/*!
+ * Datepicker for Bootstrap v1.6.0 (https://github.com/eternicode/bootstrap-datepicker)
+ *
+ * Copyright 2012 Stefan Petre
+ * Improvements by Andrew Rowls
+ * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
+ */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a,b){return a.getUTCFullYear()===b.getUTCFullYear()&&a.getUTCMonth()===b.getUTCMonth()&&a.getUTCDate()===b.getUTCDate()}function f(a){return function(){return this[a].apply(this,arguments)}}function g(a){return a&&!isNaN(a.getTime())}function h(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function i(b){var c={};if(q[b]||(b=b.split("-")[0],q[b])){var d=q[b];return a.each(p,function(a,b){b in d&&(c[b]=d[b])}),c}}var j=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;d>c;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.length=0},copy:function(){var a=new j;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),k=function(b,c){a(b).data("datepicker",this),this._process_options(c),this.dates=new j,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.hasClass("date")?this.element.find(".add-on, .input-group-addon, .btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(r.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.setDaysOfWeekHighlighted(this.o.daysOfWeekHighlighted),this.setDatesDisabled(this.o.datesDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};k.prototype={constructor:k,_resolveViewName:function(a,c){return 0===a||"days"===a||"month"===a?0:1===a||"months"===a||"year"===a?1:2===a||"years"===a||"decade"===a?2:3===a||"decades"===a||"century"===a?3:4===a||"centuries"===a||"millennium"===a?4:c===b?!1:c},_check_template:function(c){try{if(c===b||""===c)return!1;if((c.match(/[<>]/g)||[]).length<=0)return!0;var d=a(c);return d.length>0}catch(e){return!1}},_process_options:function(b){this._o=a.extend({},this._o,b);var e=this.o=a.extend({},this._o),f=e.language;q[f]||(f=f.split("-")[0],q[f]||(f=o.language)),e.language=f,e.startView=this._resolveViewName(e.startView,0),e.minViewMode=this._resolveViewName(e.minViewMode,0),e.maxViewMode=this._resolveViewName(e.maxViewMode,4),e.startView=Math.min(e.startView,e.maxViewMode),e.startView=Math.max(e.startView,e.minViewMode),e.multidate!==!0&&(e.multidate=Number(e.multidate)||!1,e.multidate!==!1&&(e.multidate=Math.max(0,e.multidate))),e.multidateSeparator=String(e.multidateSeparator),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;var g=r.parseFormat(e.format);if(e.startDate!==-(1/0)&&(e.startDate?e.startDate instanceof Date?e.startDate=this._local_to_utc(this._zero_time(e.startDate)):e.startDate=r.parseDate(e.startDate,g,e.language,e.assumeNearbyYear):e.startDate=-(1/0)),e.endDate!==1/0&&(e.endDate?e.endDate instanceof Date?e.endDate=this._local_to_utc(this._zero_time(e.endDate)):e.endDate=r.parseDate(e.endDate,g,e.language,e.assumeNearbyYear):e.endDate=1/0),e.daysOfWeekDisabled=e.daysOfWeekDisabled||[],a.isArray(e.daysOfWeekDisabled)||(e.daysOfWeekDisabled=e.daysOfWeekDisabled.split(/[,\s]*/)),e.daysOfWeekDisabled=a.map(e.daysOfWeekDisabled,function(a){return parseInt(a,10)}),e.daysOfWeekHighlighted=e.daysOfWeekHighlighted||[],a.isArray(e.daysOfWeekHighlighted)||(e.daysOfWeekHighlighted=e.daysOfWeekHighlighted.split(/[,\s]*/)),e.daysOfWeekHighlighted=a.map(e.daysOfWeekHighlighted,function(a){return parseInt(a,10)}),e.datesDisabled=e.datesDisabled||[],!a.isArray(e.datesDisabled)){var h=[];h.push(r.parseDate(e.datesDisabled,g,e.language,e.assumeNearbyYear)),e.datesDisabled=h}e.datesDisabled=a.map(e.datesDisabled,function(a){return r.parseDate(a,g,e.language,e.assumeNearbyYear)});var i=String(e.orientation).toLowerCase().split(/\s+/g),j=e.orientation.toLowerCase();if(i=a.grep(i,function(a){return/^auto|left|right|top|bottom$/.test(a)}),e.orientation={x:"auto",y:"auto"},j&&"auto"!==j)if(1===i.length)switch(i[0]){case"top":case"bottom":e.orientation.y=i[0];break;case"left":case"right":e.orientation.x=i[0]}else j=a.grep(i,function(a){return/^left|right$/.test(a)}),e.orientation.x=j[0]||"auto",j=a.grep(i,function(a){return/^top|bottom$/.test(a)}),e.orientation.y=j[0]||"auto";else;if(e.defaultViewDate){var k=e.defaultViewDate.year||(new Date).getFullYear(),l=e.defaultViewDate.month||0,m=e.defaultViewDate.day||1;e.defaultViewDate=c(k,l,m)}else e.defaultViewDate=d()},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var c,d,e,f=0;ff?(this.picker.addClass("datepicker-orient-right"),n+=m-b):this.picker.addClass("datepicker-orient-left");var p,q=this.o.orientation.y;if("auto"===q&&(p=-g+o-c,q=0>p?"bottom":"top"),this.picker.addClass("datepicker-orient-"+q),"top"===q?o-=c+parseInt(this.picker.css("padding-top")):o+=l,this.o.rtl){var r=f-(n+m);this.picker.css({top:o,right:r,zIndex:j})}else this.picker.css({top:o,left:n,zIndex:j});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var b=this.dates.copy(),c=[],d=!1;return arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return r.parseDate(a,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),c=a.grep(c,a.proxy(function(a){return!this.dateWithinRange(a)||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDatethis.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate,d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill(),this.element.change(),this},fillDow:function(){var b=this.o.weekStart,c="";for(this.o.calendarWeeks&&(this.picker.find(".datepicker-days .datepicker-switch").attr("colspan",function(a,b){return parseInt(b)+1}),c+=' ');b'+q[this.o.language].daysMin[b++%7]+"";c+=" ",this.picker.find(".datepicker-days thead").append(c)},fillMonths:function(){for(var a=this._utc_to_local(this.viewDate),b="",c=0;12>c;){var d=a&&a.getMonth()===c?" focused":"";b+=''+q[this.o.language].monthsShort[c++]+" "}this.picker.find(".datepicker-months td").html(b)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=new Date;return b.getUTCFullYear()d||b.getUTCFullYear()===d&&b.getUTCMonth()>e)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===f.getFullYear()&&b.getUTCMonth()===f.getMonth()&&b.getUTCDate()===f.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(!this.dateWithinRange(b)||this.dateIsDisabled(b))&&c.push("disabled"),-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekHighlighted)&&c.push("highlighted"),this.range&&(b>this.range[0]&&br;r+=1)s=[d],t=null,-1===r?s.push("old"):10===r&&s.push("new"),-1!==a.inArray(q,n)&&s.push("active"),(o>q||q>p)&&s.push("disabled"),q===this.viewDate.getFullYear()&&s.push("focused"),j!==a.noop&&(u=j(new Date(q,0,1)),u===b?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),u.enabled===!1&&s.push("disabled"),u.classes&&(s=s.concat(u.classes.split(/\s+/))),u.tooltip&&(t=u.tooltip)),k+='"+q+" ",q+=f;l.find("td").html(k)},fill:function(){var d,e,f=new Date(this.viewDate),g=f.getUTCFullYear(),h=f.getUTCMonth(),i=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),j=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),k=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,m=q[this.o.language].today||q.en.today||"",n=q[this.o.language].clear||q.en.clear||"",o=q[this.o.language].titleFormat||q.en.titleFormat;if(!isNaN(g)&&!isNaN(h)){this.picker.find(".datepicker-days .datepicker-switch").text(r.formatDate(f,o,this.o.language)),this.picker.find("tfoot .today").text(m).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot .clear").text(n).toggle(this.o.clearBtn!==!1),this.picker.find("thead .datepicker-title").text(this.o.title).toggle(""!==this.o.title),this.updateNavArrows(),this.fillMonths();var p=c(g,h-1,28),s=r.getDaysInMonth(p.getUTCFullYear(),p.getUTCMonth());p.setUTCDate(s),p.setUTCDate(s-(p.getUTCDay()-this.o.weekStart+7)%7);var t=new Date(p);p.getUTCFullYear()<100&&t.setUTCFullYear(p.getUTCFullYear()),t.setUTCDate(t.getUTCDate()+42),t=t.valueOf();for(var u,v=[];p.valueOf()"),this.o.calendarWeeks)){var w=new Date(+p+(this.o.weekStart-p.getUTCDay()-7)%7*864e5),x=new Date(Number(w)+(11-w.getUTCDay())%7*864e5),y=new Date(Number(y=c(x.getUTCFullYear(),0,1))+(11-y.getUTCDay())%7*864e5),z=(x-y)/864e5/7+1;v.push(''+z+" ")}u=this.getClassNames(p),u.push("day"),this.o.beforeShowDay!==a.noop&&(e=this.o.beforeShowDay(this._utc_to_local(p)),e===b?e={}:"boolean"==typeof e?e={enabled:e}:"string"==typeof e&&(e={classes:e}),e.enabled===!1&&u.push("disabled"),e.classes&&(u=u.concat(e.classes.split(/\s+/))),e.tooltip&&(d=e.tooltip)),u=a.unique(u),v.push('"+p.getUTCDate()+" "),d=null,p.getUTCDay()===this.o.weekEnd&&v.push(""),p.setUTCDate(p.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(v.join(""));var A=q[this.o.language].monthsTitle||q.en.monthsTitle||"Months",B=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?A:g).end().find("span").removeClass("active");if(a.each(this.dates,function(a,b){b.getUTCFullYear()===g&&B.eq(b.getUTCMonth()).addClass("active")}),(i>g||g>k)&&B.addClass("disabled"),g===i&&B.slice(0,j).addClass("disabled"),g===k&&B.slice(l+1).addClass("disabled"),this.o.beforeShowMonth!==a.noop){var C=this;a.each(B,function(c,d){var e=new Date(g,c,1),f=C.o.beforeShowMonth(e);f===b?f={}:"boolean"==typeof f?f={enabled:f}:"string"==typeof f&&(f={classes:f}),f.enabled!==!1||a(d).hasClass("disabled")||a(d).addClass("disabled"),f.classes&&a(d).addClass(f.classes),f.tooltip&&a(d).prop("title",f.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,1,g,i,k,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,10,g,i,k,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,100,g,i,k,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-(1/0)&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:case 3:case 4:this.o.startDate!==-(1/0)&&b<=this.o.startDate.getUTCFullYear()||this.o.maxViewMode<2?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()||this.o.maxViewMode<2?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(b){b.preventDefault(),b.stopPropagation();var e,f,g,h,i,j,k;e=a(b.target),e.hasClass("datepicker-switch")&&this.showMode(1);var l=e.closest(".prev, .next");l.length>0&&(f=r.modes[this.viewMode].navStep*(l.hasClass("prev")?-1:1),0===this.viewMode?(this.viewDate=this.moveMonth(this.viewDate,f),this._trigger("changeMonth",this.viewDate)):(this.viewDate=this.moveYear(this.viewDate,f),1===this.viewMode&&this._trigger("changeYear",this.viewDate)),this.fill()),e.hasClass("today")&&(this.showMode(-2),this._setDate(d(),"linked"===this.o.todayBtn?null:"view")),e.hasClass("clear")&&this.clearDates(),e.hasClass("disabled")||(e.hasClass("day")&&(g=parseInt(e.text(),10)||1,h=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),e.hasClass("old")&&(0===i?(i=11,h-=1,j=!0,k=!0):(i-=1,j=!0)),e.hasClass("new")&&(11===i?(i=0,h+=1,j=!0,k=!0):(i+=1,j=!0)),this._setDate(c(h,i,g)),k&&this._trigger("changeYear",this.viewDate),j&&this._trigger("changeMonth",this.viewDate)),e.hasClass("month")&&(this.viewDate.setUTCDate(1),g=1,i=e.parent().find("span").index(e),h=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(i),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode?(this._setDate(c(h,i,g)),this.showMode()):this.showMode(-1),this.fill()),(e.hasClass("year")||e.hasClass("decade")||e.hasClass("century"))&&(this.viewDate.setUTCDate(1),g=1,i=0,h=parseInt(e.text(),10)||0,this.viewDate.setUTCFullYear(h),e.hasClass("year")&&(this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(h,i,g))),e.hasClass("decade")&&(this._trigger("changeDecade",this.viewDate),3===this.o.minViewMode&&this._setDate(c(h,i,g))),e.hasClass("century")&&(this._trigger("changeCentury",this.viewDate),4===this.o.minViewMode&&this._setDate(c(h,i,g))),this.showMode(-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a||this.dates.clear(),-1!==b?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(b):this.o.multidate===!1?(this.dates.clear(),this.dates.push(a)):this.dates.push(a),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),b&&"view"===b||this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveDay:function(a,b){var c=new Date(a);return c.setUTCDate(a.getUTCDate()+b),c},moveWeek:function(a,b){return this.moveDay(a,7*b)},moveMonth:function(a,b){if(!g(a))return this.o.defaultViewDate;if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),h=e.getUTCMonth(),i=Math.abs(b);if(b=b>0?1:-1,1===i)d=-1===b?function(){return e.getUTCMonth()===h}:function(){return e.getUTCMonth()!==c},c=h+b,e.setUTCMonth(c),(0>c||c>11)&&(c=(c+12)%12);else{for(var j=0;i>j;j++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!==e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e},moveYear:function(a,b){return this.moveMonth(a,12*b)},moveAvailableDate:function(a,b,c){do{if(a=this[c](a,b),!this.dateWithinRange(a))return!1;c="moveDay"}while(this.dateIsDisabled(a));return a},weekOfDateIsDisabled:function(b){return-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(b){return this.weekOfDateIsDisabled(b)||a.grep(this.o.datesDisabled,function(a){return e(b,a)}).length>0},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(!this.picker.is(":visible"))return void((40===a.keyCode||27===a.keyCode)&&(this.show(),a.stopPropagation()));var b,c,d=!1,e=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault(),a.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;b=37===a.keyCode||38===a.keyCode?-1:1,0===this.viewMode?a.ctrlKey?(c=this.moveAvailableDate(e,b,"moveYear"),c&&this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveAvailableDate(e,b,"moveMonth"),c&&this._trigger("changeMonth",this.viewDate)):37===a.keyCode||39===a.keyCode?c=this.moveAvailableDate(e,b,"moveDay"):this.weekOfDateIsDisabled(e)||(c=this.moveAvailableDate(e,b,"moveWeek")):1===this.viewMode?((38===a.keyCode||40===a.keyCode)&&(b=4*b),c=this.moveAvailableDate(e,b,"moveMonth")):2===this.viewMode&&((38===a.keyCode||40===a.keyCode)&&(b=4*b),c=this.moveAvailableDate(e,b,"moveYear")),c&&(this.focusDate=this.viewDate=c,this.setValue(),this.fill(),a.preventDefault());break;case 13:if(!this.o.forceParse)break;e=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(e),d=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),a.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(d){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var f;this.isInput?f=this.element:this.component&&(f=this.element.find("input")),f&&f.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,this.viewMode+a))),this.picker.children("div").hide().filter(".datepicker-"+r.modes[this.viewMode].clsName).show(),this.updateNavArrows()}};var l=function(b,c){a(b).data("datepicker",this),this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,n.call(a(this.inputs),c).on("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("datepicker")}),this.updateDates()};l.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("datepicker");if("undefined"!=typeof c){var d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=e-1,g=e+1,h=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d=0&&dthis.dates[g])for(;h>g&&d>this.dates[g];)this.pickers[g++].setUTCDate(d);this.updateDates(),delete this.updating}}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().datepicker}};var m=a.fn.datepicker,n=function(c){var d=Array.apply(null,arguments);d.shift();var e;if(this.each(function(){var b=a(this),f=b.data("datepicker"),g="object"==typeof c&&c;if(!f){var j=h(this,"date"),m=a.extend({},o,j,g),n=i(m.language),p=a.extend({},o,n,j,g);b.hasClass("input-daterange")||p.inputs?(a.extend(p,{inputs:p.inputs||b.find("input").toArray()}),f=new l(this,p)):f=new k(this,p),b.data("datepicker",f)}"string"==typeof c&&"function"==typeof f[c]&&(e=f[c].apply(f,d))}),e===b||e instanceof k||e instanceof l)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+c+" function)");return e};a.fn.datepicker=n;var o=a.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:a.noop,beforeShowMonth:a.noop,beforeShowYear:a.noop,beforeShowDecade:a.noop,beforeShowCentury:a.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-(1/0),startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"}},p=a.fn.datepicker.locale_opts=["format","rtl","weekStart"];a.fn.datepicker.Constructor=k;var q=a.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},r={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10},{clsName:"decades",navFnc:"FullDecade",navStep:100},{clsName:"centuries",navFnc:"FullCentury",navStep:1e3}],isLeapYear:function(a){return a%4===0&&a%100!==0||a%400===0},getDaysInMonth:function(a,b){return[31,r.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(a){if("function"==typeof a.toValue&&"function"==typeof a.toDisplay)return a;var b=a.replace(this.validParts,"\x00").split("\x00"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(e,f,g,h){function i(a,b){return b===!0&&(b=10),100>a&&(a+=2e3,a>(new Date).getFullYear()+b&&(a-=100)),a}function j(){var a=this.slice(0,s[n].length),b=s[n].slice(0,a.length);return a.toLowerCase()===b.toLowerCase()}if(!e)return b;if(e instanceof Date)return e;if("string"==typeof f&&(f=r.parseFormat(f)),f.toValue)return f.toValue(e,f,g);var l,m,n,o,p=/([\-+]\d+)([dmwy])/,s=e.match(/([\-+]\d+)([dmwy])/g),t={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},u={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(e)){for(e=new Date,n=0;nb;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};z.M=z.MM=z.mm=z.m,z.dd=z.d,e=d();var A=f.parts.slice();if(s.length!==A.length&&(A=a(A).filter(function(b,c){return-1!==a.inArray(c,y)}).toArray()),s.length===A.length){var B;for(n=0,B=A.length;B>n;n++){if(v=parseInt(s[n],10),l=A[n],isNaN(v))switch(l){case"MM":w=a(q[g].months).filter(j),v=a.inArray(w[0],q[g].months)+1;break;case"M":w=a(q[g].monthsShort).filter(j),v=a.inArray(w[0],q[g].monthsShort)+1;
+}x[l]=v}var C,D;for(n=0;n=g;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'« » ',contTemplate:' ',footTemplate:' '};r.template=''+r.headTemplate+" "+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+"
",a.fn.datepicker.DPGlobal=r,a.fn.datepicker.noConflict=function(){return a.fn.datepicker=m,this},a.fn.datepicker.version="1.6.0",a(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(b){var c=a(this);c.data("datepicker")||(b.preventDefault(),n.call(c,"show"))}),a(function(){n.call(a('[data-provide="datepicker-inline"]'))})});
\ No newline at end of file
diff --git a/build/wwwroot/lib/dropzone/basic.min.css b/build/wwwroot/lib/dropzone/basic.min.css
new file mode 100644
index 00000000..5238d5ca
--- /dev/null
+++ b/build/wwwroot/lib/dropzone/basic.min.css
@@ -0,0 +1 @@
+.dropzone,.dropzone *{box-sizing:border-box}.dropzone{position:relative}.dropzone .dz-preview{position:relative;display:inline-block;width:120px;margin:0.5em}.dropzone .dz-preview .dz-progress{display:block;height:15px;border:1px solid #aaa}.dropzone .dz-preview .dz-progress .dz-upload{display:block;height:100%;width:0;background:green}.dropzone .dz-preview .dz-error-message{color:red;display:none}.dropzone .dz-preview.dz-error .dz-error-message,.dropzone .dz-preview.dz-error .dz-error-mark{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{display:block}.dropzone .dz-preview .dz-error-mark,.dropzone .dz-preview .dz-success-mark{position:absolute;display:none;left:30px;top:30px;width:54px;height:58px;left:50%;margin-left:-27px}
diff --git a/build/wwwroot/lib/dropzone/dropzone-amd-module.min.js b/build/wwwroot/lib/dropzone/dropzone-amd-module.min.js
new file mode 100644
index 00000000..5d5d66c5
--- /dev/null
+++ b/build/wwwroot/lib/dropzone/dropzone-amd-module.min.js
@@ -0,0 +1,2 @@
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){var b={exports:{}};return function(){var c,d,e,f,g,h,i,j,k=[].slice,l={}.hasOwnProperty,m=function(a,b){function c(){this.constructor=a}for(var d in b)l.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};i=function(){},d=function(){function a(){}return a.prototype.addEventListener=a.prototype.on,a.prototype.on=function(a,b){return this._callbacks=this._callbacks||{},this._callbacks[a]||(this._callbacks[a]=[]),this._callbacks[a].push(b),this},a.prototype.emit=function(){var a,b,c,d,e,f;if(d=arguments[0],a=2<=arguments.length?k.call(arguments,1):[],this._callbacks=this._callbacks||{},c=this._callbacks[d])for(e=0,f=c.length;f>e;e++)b=c[e],b.apply(this,a);return this},a.prototype.removeListener=a.prototype.off,a.prototype.removeAllListeners=a.prototype.off,a.prototype.removeEventListener=a.prototype.off,a.prototype.off=function(a,b){var c,d,e,f,g;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(d=this._callbacks[a],!d)return this;if(1===arguments.length)return delete this._callbacks[a],this;for(e=f=0,g=d.length;g>f;e=++f)if(c=d[e],c===b){d.splice(e,1);break}return this},a}(),c=function(a){function b(a,d){var e,f,g;if(this.element=a,this.version=b.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(b.instances.push(this),this.element.dropzone=this,e=null!=(g=b.optionsForElement(this.element))?g:{},this.options=c({},this.defaultOptions,e,null!=d?d:{}),this.options.forceFallback||!b.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(f=this.getExistingFallback())&&f.parentNode&&f.parentNode.removeChild(f),this.options.previewsContainer!==!1&&(this.previewsContainer=this.options.previewsContainer?b.getElement(this.options.previewsContainer,"previewsContainer"):this.element),this.options.clickable&&(this.clickableElements=this.options.clickable===!0?[this.element]:b.getElements(this.options.clickable,"clickable")),this.init()}var c,e;return m(b,a),b.prototype.Emitter=d,b.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],b.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(a,b){return b()},init:function(){return i},forceFallback:!1,fallback:function(){var a,c,d,e,f,g;for(this.element.className=""+this.element.className+" dz-browser-not-supported",g=this.element.getElementsByTagName("div"),e=0,f=g.length;f>e;e++)a=g[e],/(^| )dz-message($| )/.test(a.className)&&(c=a,a.className="dz-message");return c||(c=b.createElement('
'),this.element.appendChild(c)),d=c.getElementsByTagName("span")[0],d&&(null!=d.textContent?d.textContent=this.options.dictFallbackMessage:null!=d.innerText&&(d.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(a){var b,c,d;return b={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},c=a.width/a.height,b.optWidth=this.options.thumbnailWidth,b.optHeight=this.options.thumbnailHeight,null==b.optWidth&&null==b.optHeight?(b.optWidth=b.srcWidth,b.optHeight=b.srcHeight):null==b.optWidth?b.optWidth=c*b.optHeight:null==b.optHeight&&(b.optHeight=1/c*b.optWidth),d=b.optWidth/b.optHeight,a.heightd?(b.srcHeight=a.height,b.srcWidth=b.srcHeight*d):(b.srcWidth=a.width,b.srcHeight=b.srcWidth/d),b.srcX=(a.width-b.srcWidth)/2,b.srcY=(a.height-b.srcHeight)/2,b},drop:function(){return this.element.classList.remove("dz-drag-hover")},dragstart:i,dragend:function(){return this.element.classList.remove("dz-drag-hover")},dragenter:function(){return this.element.classList.add("dz-drag-hover")},dragover:function(){return this.element.classList.add("dz-drag-hover")},dragleave:function(){return this.element.classList.remove("dz-drag-hover")},paste:i,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(a){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(a.previewElement=b.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement),l=a.previewElement.querySelectorAll("[data-dz-name]"),f=0,i=l.length;i>f;f++)c=l[f],c.textContent=this._renameFilename(a.name);for(m=a.previewElement.querySelectorAll("[data-dz-size]"),g=0,j=m.length;j>g;g++)c=m[g],c.innerHTML=this.filesize(a.size);for(this.options.addRemoveLinks&&(a._removeLink=b.createElement(''+this.options.dictRemoveFile+" "),a.previewElement.appendChild(a._removeLink)),d=function(c){return function(d){return d.preventDefault(),d.stopPropagation(),a.status===b.UPLOADING?b.confirm(c.options.dictCancelUploadConfirmation,function(){return c.removeFile(a)}):c.options.dictRemoveFileConfirmation?b.confirm(c.options.dictRemoveFileConfirmation,function(){return c.removeFile(a)}):c.removeFile(a)}}(this),n=a.previewElement.querySelectorAll("[data-dz-remove]"),o=[],h=0,k=n.length;k>h;h++)e=n[h],o.push(e.addEventListener("click",d));return o}},removedfile:function(a){var b;return a.previewElement&&null!=(b=a.previewElement)&&b.parentNode.removeChild(a.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(a,b){var c,d,e,f;if(a.previewElement){for(a.previewElement.classList.remove("dz-file-preview"),f=a.previewElement.querySelectorAll("[data-dz-thumbnail]"),d=0,e=f.length;e>d;d++)c=f[d],c.alt=a.name,c.src=b;return setTimeout(function(){return function(){return a.previewElement.classList.add("dz-image-preview")}}(this),1)}},error:function(a,b){var c,d,e,f,g;if(a.previewElement){for(a.previewElement.classList.add("dz-error"),"String"!=typeof b&&b.error&&(b=b.error),f=a.previewElement.querySelectorAll("[data-dz-errormessage]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.textContent=b);return g}},errormultiple:i,processing:function(a){return a.previewElement&&(a.previewElement.classList.add("dz-processing"),a._removeLink)?a._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:i,uploadprogress:function(a,b){var c,d,e,f,g;if(a.previewElement){for(f=a.previewElement.querySelectorAll("[data-dz-uploadprogress]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push("PROGRESS"===c.nodeName?c.value=b:c.style.width=""+b+"%");return g}},totaluploadprogress:i,sending:i,sendingmultiple:i,success:function(a){return a.previewElement?a.previewElement.classList.add("dz-success"):void 0},successmultiple:i,canceled:function(a){return this.emit("error",a,"Upload canceled.")},canceledmultiple:i,complete:function(a){return a._removeLink&&(a._removeLink.textContent=this.options.dictRemoveFile),a.previewElement?a.previewElement.classList.add("dz-complete"):void 0},completemultiple:i,maxfilesexceeded:i,maxfilesreached:i,queuecomplete:i,addedfiles:i,previewTemplate:'\n
\n
\n
\n
\n
\n
\n Check \n \n \n \n \n \n
\n
\n
\n Error \n \n \n \n \n \n \n \n
\n
'},c=function(){var a,b,c,d,e,f,g;for(d=arguments[0],c=2<=arguments.length?k.call(arguments,1):[],f=0,g=c.length;g>f;f++){b=c[f];for(a in b)e=b[a],d[a]=e}return d},b.prototype.getAcceptedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted&&e.push(a);return e},b.prototype.getRejectedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted||e.push(a);return e},b.prototype.getFilesWithStatus=function(a){var b,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.status===a&&f.push(b);return f},b.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(b.QUEUED)},b.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(b.UPLOADING)},b.prototype.getAddedFiles=function(){return this.getFilesWithStatus(b.ADDED)},b.prototype.getActiveFiles=function(){var a,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)a=e[c],(a.status===b.UPLOADING||a.status===b.QUEUED)&&f.push(a);return f},b.prototype.init=function(){var a,c,d,e,f,g,h;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(b.createElement(''+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&(d=function(a){return function(){return a.hiddenFileInput&&a.hiddenFileInput.parentNode.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null==a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute("multiple","multiple"),a.hiddenFileInput.className="dz-hidden-input",null!=a.options.acceptedFiles&&a.hiddenFileInput.setAttribute("accept",a.options.acceptedFiles),null!=a.options.capture&&a.hiddenFileInput.setAttribute("capture",a.options.capture),a.hiddenFileInput.style.visibility="hidden",a.hiddenFileInput.style.position="absolute",a.hiddenFileInput.style.top="0",a.hiddenFileInput.style.left="0",a.hiddenFileInput.style.height="0",a.hiddenFileInput.style.width="0",document.querySelector(a.options.hiddenInputContainer).appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener("change",function(){var b,c,e,f;if(c=a.hiddenFileInput.files,c.length)for(e=0,f=c.length;f>e;e++)b=c[e],a.addFile(b);return a.emit("addedfiles",c),d()})}}(this))(),this.URL=null!=(g=window.URL)?g:window.webkitURL,h=this.events,e=0,f=h.length;f>e;e++)a=h[e],this.on(a,this.options[a]);return this.on("uploadprogress",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("canceled",function(a){return function(b){return a.emit("complete",b)}}(this)),this.on("complete",function(a){return function(){return 0===a.getAddedFiles().length&&0===a.getUploadingFiles().length&&0===a.getQueuedFiles().length?setTimeout(function(){return a.emit("queuecomplete")},0):void 0}}(this)),c=function(a){return a.stopPropagation(),a.preventDefault?a.preventDefault():a.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(a){return function(b){return a.emit("dragstart",b)}}(this),dragenter:function(a){return function(b){return c(b),a.emit("dragenter",b)}}(this),dragover:function(a){return function(b){var d;try{d=b.dataTransfer.effectAllowed}catch(e){}return b.dataTransfer.dropEffect="move"===d||"linkMove"===d?"move":"copy",c(b),a.emit("dragover",b)}}(this),dragleave:function(a){return function(b){return a.emit("dragleave",b)}}(this),drop:function(a){return function(b){return c(b),a.drop(b)}}(this),dragend:function(a){return function(b){return a.emit("dragend",b)}}(this)}}],this.clickableElements.forEach(function(a){return function(c){return a.listeners.push({element:c,events:{click:function(d){return(c!==a.element||d.target===a.element||b.elementInside(d.target,a.element.querySelector(".dz-message")))&&a.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},b.prototype.destroy=function(){var a;return this.disable(),this.removeAllFiles(!0),(null!=(a=this.hiddenFileInput)?a.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,b.instances.splice(b.instances.indexOf(this),1)},b.prototype.updateTotalUploadProgress=function(){var a,b,c,d,e,f,g,h;if(d=0,c=0,a=this.getActiveFiles(),a.length){for(h=this.getActiveFiles(),f=0,g=h.length;g>f;f++)b=h[f],d+=b.upload.bytesSent,c+=b.upload.total;e=100*d/c}else e=100;return this.emit("totaluploadprogress",e,c,d)},b.prototype._getParamName=function(a){return"function"==typeof this.options.paramName?this.options.paramName(a):""+this.options.paramName+(this.options.uploadMultiple?"["+a+"]":"")},b.prototype._renameFilename=function(a){return"function"!=typeof this.options.renameFilename?a:this.options.renameFilename(a)},b.prototype.getFallbackForm=function(){var a,c,d,e;return(a=this.getExistingFallback())?a:(d='',c=b.createElement(d),"FORM"!==this.element.tagName?(e=b.createElement(' '),e.appendChild(c)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:c)},b.prototype.getExistingFallback=function(){var a,b,c,d,e,f;for(b=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)if(b=a[c],/(^| )fallback($| )/.test(b.className))return b},f=["div","form"],d=0,e=f.length;e>d;d++)if(c=f[d],a=b(this.element.getElementsByTagName(c)))return a},b.prototype.setupEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.addEventListener(b,c,!1));return e}());return g},b.prototype.removeEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.removeEventListener(b,c,!1));return e}());return g},b.prototype.disable=function(){var a,b,c,d,e;for(this.clickableElements.forEach(function(a){return a.classList.remove("dz-clickable")}),this.removeEventListeners(),d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(this.cancelUpload(a));return e},b.prototype.enable=function(){return this.clickableElements.forEach(function(a){return a.classList.add("dz-clickable")}),this.setupEventListeners()},b.prototype.filesize=function(a){var b,c,d,e,f,g,h,i;if(d=0,e="b",a>0){for(g=["TB","GB","MB","KB","b"],c=h=0,i=g.length;i>h;c=++h)if(f=g[c],b=Math.pow(this.options.filesizeBase,4-c)/10,a>=b){d=a/Math.pow(this.options.filesizeBase,4-c),e=f;break}d=Math.round(10*d)/10}return""+d+" "+e},b.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},b.prototype.drop=function(a){var b,c;a.dataTransfer&&(this.emit("drop",a),b=a.dataTransfer.files,this.emit("addedfiles",b),b.length&&(c=a.dataTransfer.items,c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)))},b.prototype.paste=function(a){var b,c;if(null!=(null!=a&&null!=(c=a.clipboardData)?c.items:void 0))return this.emit("paste",a),b=a.clipboardData.items,b.length?this._addFilesFromItems(b):void 0},b.prototype.handleFiles=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.addFile(b));return e},b.prototype._addFilesFromItems=function(a){var b,c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],f.push(null!=c.webkitGetAsEntry&&(b=c.webkitGetAsEntry())?b.isFile?this.addFile(c.getAsFile()):b.isDirectory?this._addFilesFromDirectory(b,b.name):void 0:null!=c.getAsFile?null==c.kind||"file"===c.kind?this.addFile(c.getAsFile()):void 0:void 0);return f},b.prototype._addFilesFromDirectory=function(a,b){var c,d,e;return c=a.createReader(),d=function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(a):void 0},(e=function(a){return function(){return c.readEntries(function(c){var d,f,g;if(c.length>0){for(f=0,g=c.length;g>f;f++)d=c[f],d.isFile?d.file(function(c){return a.options.ignoreHiddenFiles&&"."===c.name.substring(0,1)?void 0:(c.fullPath=""+b+"/"+c.name,a.addFile(c))}):d.isDirectory&&a._addFilesFromDirectory(d,""+b+"/"+d.name);e()}return null},d)}}(this))()},b.prototype.accept=function(a,c){return a.size>1024*this.options.maxFilesize*1024?c(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):b.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(c(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",a)):this.options.accept.call(this,a,c):c(this.options.dictInvalidFileType)},b.prototype.addFile=function(a){return a.upload={progress:0,total:a.size,bytesSent:0},this.files.push(a),a.status=b.ADDED,this.emit("addedfile",a),this._enqueueThumbnail(a),this.accept(a,function(b){return function(c){return c?(a.accepted=!1,b._errorProcessing([a],c)):(a.accepted=!0,b.options.autoQueue&&b.enqueueFile(a)),b._updateMaxFilesReachedClass()}}(this))},b.prototype.enqueueFiles=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)b=a[c],this.enqueueFile(b);return null},b.prototype.enqueueFile=function(a){if(a.status!==b.ADDED||a.accepted!==!0)throw new Error("This file can't be queued because it has already been processed or was rejected.");return a.status=b.QUEUED,this.options.autoProcessQueue?setTimeout(function(a){return function(){return a.processQueue()}}(this),0):void 0},b.prototype._thumbnailQueue=[],b.prototype._processingThumbnail=!1,b.prototype._enqueueThumbnail=function(a){return this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=1024*this.options.maxThumbnailFilesize*1024?(this._thumbnailQueue.push(a),setTimeout(function(a){return function(){return a._processThumbnailQueue()}}(this),0)):void 0},b.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(a){return function(){return a._processingThumbnail=!1,a._processThumbnailQueue()}}(this)))},b.prototype.removeFile=function(a){return a.status===b.UPLOADING&&this.cancelUpload(a),this.files=j(this.files,a),this.emit("removedfile",a),0===this.files.length?this.emit("reset"):void 0},b.prototype.removeAllFiles=function(a){var c,d,e,f;for(null==a&&(a=!1),f=this.files.slice(),d=0,e=f.length;e>d;d++)c=f[d],(c.status!==b.UPLOADING||a)&&this.removeFile(c);return null},b.prototype.createThumbnail=function(a,b){var c;return c=new FileReader,c.onload=function(d){return function(){return"image/svg+xml"===a.type?(d.emit("thumbnail",a,c.result),void(null!=b&&b())):d.createThumbnailFromUrl(a,c.result,b)}}(this),c.readAsDataURL(a)},b.prototype.createThumbnailFromUrl=function(a,b,c,d){var e;return e=document.createElement("img"),d&&(e.crossOrigin=d),e.onload=function(b){return function(){var d,f,g,i,j,k,l,m;return a.width=e.width,a.height=e.height,g=b.options.resize.call(b,a),null==g.trgWidth&&(g.trgWidth=g.optWidth),null==g.trgHeight&&(g.trgHeight=g.optHeight),d=document.createElement("canvas"),f=d.getContext("2d"),d.width=g.trgWidth,d.height=g.trgHeight,h(f,e,null!=(j=g.srcX)?j:0,null!=(k=g.srcY)?k:0,g.srcWidth,g.srcHeight,null!=(l=g.trgX)?l:0,null!=(m=g.trgY)?m:0,g.trgWidth,g.trgHeight),i=d.toDataURL("image/png"),b.emit("thumbnail",a,i),null!=c?c():void 0}}(this),null!=c&&(e.onerror=c),e.src=b},b.prototype.processQueue=function(){var a,b,c,d;if(b=this.options.parallelUploads,c=this.getUploadingFiles().length,a=c,!(c>=b)&&(d=this.getQueuedFiles(),d.length>0)){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,b-c));for(;b>a;){if(!d.length)return;this.processFile(d.shift()),a++}}},b.prototype.processFile=function(a){return this.processFiles([a])},b.prototype.processFiles=function(a){var c,d,e;for(d=0,e=a.length;e>d;d++)c=a[d],c.processing=!0,c.status=b.UPLOADING,this.emit("processing",c);return this.options.uploadMultiple&&this.emit("processingmultiple",a),this.uploadFiles(a)},b.prototype._getFilesWithXhr=function(a){var b,c;return c=function(){var c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.xhr===a&&f.push(b);return f}.call(this)},b.prototype.cancelUpload=function(a){var c,d,e,f,g,h,i;if(a.status===b.UPLOADING){for(d=this._getFilesWithXhr(a.xhr),e=0,g=d.length;g>e;e++)c=d[e],c.status=b.CANCELED;for(a.xhr.abort(),f=0,h=d.length;h>f;f++)c=d[f],this.emit("canceled",c);this.options.uploadMultiple&&this.emit("canceledmultiple",d)}else((i=a.status)===b.ADDED||i===b.QUEUED)&&(a.status=b.CANCELED,this.emit("canceled",a),this.options.uploadMultiple&&this.emit("canceledmultiple",[a]));return this.options.autoProcessQueue?this.processQueue():void 0},e=function(){var a,b;return b=arguments[0],a=2<=arguments.length?k.call(arguments,1):[],"function"==typeof b?b.apply(this,a):b},b.prototype.uploadFile=function(a){return this.uploadFiles([a])},b.prototype.uploadFiles=function(a){var d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L;for(w=new XMLHttpRequest,x=0,B=a.length;B>x;x++)d=a[x],d.xhr=w;p=e(this.options.method,a),u=e(this.options.url,a),w.open(p,u,!0),w.withCredentials=!!this.options.withCredentials,s=null,g=function(b){return function(){var c,e,f;for(f=[],c=0,e=a.length;e>c;c++)d=a[c],f.push(b._errorProcessing(a,s||b.options.dictResponseError.replace("{{statusCode}}",w.status),w));return f}}(this),t=function(b){return function(c){var e,f,g,h,i,j,k,l,m;if(null!=c)for(f=100*c.loaded/c.total,g=0,j=a.length;j>g;g++)d=a[g],d.upload={progress:f,total:c.total,bytesSent:c.loaded};else{for(e=!0,f=100,h=0,k=a.length;k>h;h++)d=a[h],(100!==d.upload.progress||d.upload.bytesSent!==d.upload.total)&&(e=!1),d.upload.progress=f,d.upload.bytesSent=d.upload.total;if(e)return}for(m=[],i=0,l=a.length;l>i;i++)d=a[i],m.push(b.emit("uploadprogress",d,f,d.upload.bytesSent));return m}}(this),w.onload=function(c){return function(d){var e;if(a[0].status!==b.CANCELED&&4===w.readyState){if(s=w.responseText,w.getResponseHeader("content-type")&&~w.getResponseHeader("content-type").indexOf("application/json"))try{s=JSON.parse(s)}catch(f){d=f,s="Invalid JSON response from server."}return t(),200<=(e=w.status)&&300>e?c._finished(a,s,d):g()}}}(this),w.onerror=function(){return function(){return a[0].status!==b.CANCELED?g():void 0}}(this),r=null!=(G=w.upload)?G:w,r.onprogress=t,j={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&c(j,this.options.headers);for(h in j)i=j[h],i&&w.setRequestHeader(h,i);if(f=new FormData,this.options.params){H=this.options.params;for(o in H)v=H[o],f.append(o,v)}for(y=0,C=a.length;C>y;y++)d=a[y],this.emit("sending",d,w,f);if(this.options.uploadMultiple&&this.emit("sendingmultiple",a,w,f),"FORM"===this.element.tagName)for(I=this.element.querySelectorAll("input, textarea, select, button"),z=0,D=I.length;D>z;z++)if(l=I[z],m=l.getAttribute("name"),n=l.getAttribute("type"),"SELECT"===l.tagName&&l.hasAttribute("multiple"))for(J=l.options,A=0,E=J.length;E>A;A++)q=J[A],q.selected&&f.append(m,q.value);else(!n||"checkbox"!==(K=n.toLowerCase())&&"radio"!==K||l.checked)&&f.append(m,l.value);for(k=F=0,L=a.length-1;L>=0?L>=F:F>=L;k=L>=0?++F:--F)f.append(this._getParamName(k),a[k],this._renameFilename(a[k].name));return this.submitRequest(w,f,a)},b.prototype.submitRequest=function(a,b){return a.send(b)},b.prototype._finished=function(a,c,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=b.SUCCESS,this.emit("success",e,c,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("successmultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},b.prototype._errorProcessing=function(a,c,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=b.ERROR,this.emit("error",e,c,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("errormultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},b}(d),c.version="4.3.0",c.options={},c.optionsForElement=function(a){return a.getAttribute("id")?c.options[e(a.getAttribute("id"))]:void 0},c.instances=[],c.forElement=function(a){if("string"==typeof a&&(a=document.querySelector(a)),null==(null!=a?a.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return a.dropzone},c.autoDiscover=!0,c.discover=function(){var a,b,d,e,f,g;for(document.querySelectorAll?d=document.querySelectorAll(".dropzone"):(d=[],a=function(a){var b,c,e,f;for(f=[],c=0,e=a.length;e>c;c++)b=a[c],f.push(/(^| )dropzone($| )/.test(b.className)?d.push(b):void 0);return f},a(document.getElementsByTagName("div")),a(document.getElementsByTagName("form"))),g=[],e=0,f=d.length;f>e;e++)b=d[e],g.push(c.optionsForElement(b)!==!1?new c(b):void 0);return g},c.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],c.isBrowserSupported=function(){var a,b,d,e,f;if(a=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(f=c.blacklistedBrowsers,d=0,e=f.length;e>d;d++)b=f[d],b.test(navigator.userAgent)&&(a=!1);else a=!1;else a=!1;return a},j=function(a,b){var c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],c!==b&&f.push(c);return f},e=function(a){return a.replace(/[\-_](\w)/g,function(a){return a.charAt(1).toUpperCase()})},c.createElement=function(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.childNodes[0]},c.elementInside=function(a,b){if(a===b)return!0;for(;a=a.parentNode;)if(a===b)return!0;return!1},c.getElement=function(a,b){var c;if("string"==typeof a?c=document.querySelector(a):null!=a.nodeType&&(c=a),null==c)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector or a plain HTML element.");return c},c.getElements=function(a,b){var c,d,e,f,g,h,i,j;if(a instanceof Array){e=[];try{for(f=0,h=a.length;h>f;f++)d=a[f],e.push(this.getElement(d,b))}catch(k){c=k,e=null}}else if("string"==typeof a)for(e=[],j=document.querySelectorAll(a),g=0,i=j.length;i>g;g++)d=j[g],e.push(d);else null!=a.nodeType&&(e=[a]);if(null==e||!e.length)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return e},c.confirm=function(a,b,c){return window.confirm(a)?b():null!=c?c():void 0},c.isValidFile=function(a,b){var c,d,e,f,g;if(!b)return!0;for(b=b.split(","),d=a.type,c=d.replace(/\/.*$/,""),f=0,g=b.length;g>f;f++)if(e=b[f],e=e.trim(),"."===e.charAt(0)){if(-1!==a.name.toLowerCase().indexOf(e.toLowerCase(),a.name.length-e.length))return!0
+}else if(/\/\*$/.test(e)){if(c===e.replace(/\/.*$/,""))return!0}else if(d===e)return!0;return!1},"undefined"!=typeof a&&null!==a&&(a.fn.dropzone=function(a){return this.each(function(){return new c(this,a)})}),"undefined"!=typeof b&&null!==b?b.exports=c:window.Dropzone=c,c.ADDED="added",c.QUEUED="queued",c.ACCEPTED=c.QUEUED,c.UPLOADING="uploading",c.PROCESSING=c.UPLOADING,c.CANCELED="canceled",c.ERROR="error",c.SUCCESS="success",g=function(a){var b,c,d,e,f,g,h,i,j,k;for(h=a.naturalWidth,g=a.naturalHeight,c=document.createElement("canvas"),c.width=1,c.height=g,d=c.getContext("2d"),d.drawImage(a,0,0),e=d.getImageData(0,0,1,g).data,k=0,f=g,i=g;i>k;)b=e[4*(i-1)+3],0===b?f=i:k=i,i=f+k>>1;return j=i/g,0===j?1:j},h=function(a,b,c,d,e,f,h,i,j,k){var l;return l=g(b),a.drawImage(b,c,d,e,f,h,i,j,k/l)},f=function(a,b){var c,d,e,f,g,h,i,j,k;if(e=!1,k=!0,d=a.document,j=d.documentElement,c=d.addEventListener?"addEventListener":"attachEvent",i=d.addEventListener?"removeEventListener":"detachEvent",h=d.addEventListener?"":"on",f=function(c){return"readystatechange"!==c.type||"complete"===d.readyState?(("load"===c.type?a:d)[i](h+c.type,f,!1),!e&&(e=!0)?b.call(a,c.type||c):void 0):void 0},g=function(){var a;try{j.doScroll("left")}catch(b){return a=b,void setTimeout(g,50)}return f("poll")},"complete"!==d.readyState){if(d.createEventObject&&j.doScroll){try{k=!a.frameElement}catch(l){}k&&g()}return d[c](h+"DOMContentLoaded",f,!1),d[c](h+"readystatechange",f,!1),a[c](h+"load",f,!1)}},c._autoDiscoverFunction=function(){return c.autoDiscover?c.discover():void 0},f(window,c._autoDiscoverFunction)}.call(this),b.exports});
\ No newline at end of file
diff --git a/build/wwwroot/lib/dropzone/dropzone.min.css b/build/wwwroot/lib/dropzone/dropzone.min.css
new file mode 100644
index 00000000..d04515e2
--- /dev/null
+++ b/build/wwwroot/lib/dropzone/dropzone.min.css
@@ -0,0 +1 @@
+@-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-moz-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@-moz-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:2px solid rgba(0,0,0,0.3);background:white;padding:20px 20px}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone.dz-started .dz-message{display:none}.dropzone.dz-drag-hover{border-style:solid}.dropzone.dz-drag-hover .dz-message{opacity:0.5}.dropzone .dz-message{text-align:center;margin:2em 0}.dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:16px;min-height:100px}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:linear-gradient(to bottom, #eee, #ddd)}.dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.dropzone .dz-preview.dz-image-preview{background:white}.dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;-ms-transition:opacity 0.2s linear;-o-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.dropzone .dz-preview .dz-remove{font-size:14px;text-align:center;display:block;cursor:pointer;border:none}.dropzone .dz-preview .dz-remove:hover{text-decoration:underline}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview .dz-details{z-index:20;position:absolute;top:0;left:0;opacity:0;font-size:13px;min-width:100%;max-width:100%;padding:2em 1em;text-align:center;color:rgba(0,0,0,0.9);line-height:150%}.dropzone .dz-preview .dz-details .dz-size{margin-bottom:1em;font-size:16px}.dropzone .dz-preview .dz-details .dz-filename{white-space:nowrap}.dropzone .dz-preview .dz-details .dz-filename:hover span{border:1px solid rgba(200,200,200,0.8);background-color:rgba(255,255,255,0.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){overflow:hidden;text-overflow:ellipsis}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:rgba(255,255,255,0.4);padding:0 0.4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05, 1.05);-moz-transform:scale(1.05, 1.05);-ms-transform:scale(1.05, 1.05);-o-transform:scale(1.05, 1.05);transform:scale(1.05, 1.05);-webkit-filter:blur(8px);filter:blur(8px)}.dropzone .dz-preview .dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-moz-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-ms-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-o-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-moz-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-ms-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-o-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}.dropzone .dz-preview .dz-success-mark svg,.dropzone .dz-preview .dz-error-mark svg{display:block;width:54px;height:54px}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-ms-transition:all 0.2s linear;-o-transition:all 0.2s linear;transition:all 0.2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity 0.4s ease-in;-moz-transition:opacity 0.4s ease-in;-ms-transition:opacity 0.4s ease-in;-o-transition:opacity 0.4s ease-in;transition:opacity 0.4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:pulse 6s ease infinite;-moz-animation:pulse 6s ease infinite;-ms-animation:pulse 6s ease infinite;-o-animation:pulse 6s ease infinite;animation:pulse 6s ease infinite}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:16px;left:50%;top:50%;margin-top:-8px;width:80px;margin-left:-40px;background:rgba(255,255,255,0.9);-webkit-transform:scale(1);border-radius:8px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#333;background:linear-gradient(to bottom, #666, #444);position:absolute;top:0;left:0;bottom:0;width:0;-webkit-transition:width 300ms ease-in-out;-moz-transition:width 300ms ease-in-out;-ms-transition:width 300ms ease-in-out;-o-transition:width 300ms ease-in-out;transition:width 300ms ease-in-out}.dropzone .dz-preview.dz-error .dz-error-message{display:block}.dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:block;display:none;opacity:0;-webkit-transition:opacity 0.3s ease;-moz-transition:opacity 0.3s ease;-ms-transition:opacity 0.3s ease;-o-transition:opacity 0.3s ease;transition:opacity 0.3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#be2626;background:linear-gradient(to bottom, #be2626, #a92222);padding:0.5em 1.2em;color:white}.dropzone .dz-preview .dz-error-message:after{content:'';position:absolute;top:-6px;left:64px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #be2626}
diff --git a/build/wwwroot/lib/dropzone/dropzone.min.js b/build/wwwroot/lib/dropzone/dropzone.min.js
new file mode 100644
index 00000000..2d5dbca7
--- /dev/null
+++ b/build/wwwroot/lib/dropzone/dropzone.min.js
@@ -0,0 +1,2 @@
+(function(){var a,b,c,d,e,f,g,h,i=[].slice,j={}.hasOwnProperty,k=function(a,b){function c(){this.constructor=a}for(var d in b)j.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};g=function(){},b=function(){function a(){}return a.prototype.addEventListener=a.prototype.on,a.prototype.on=function(a,b){return this._callbacks=this._callbacks||{},this._callbacks[a]||(this._callbacks[a]=[]),this._callbacks[a].push(b),this},a.prototype.emit=function(){var a,b,c,d,e,f;if(d=arguments[0],a=2<=arguments.length?i.call(arguments,1):[],this._callbacks=this._callbacks||{},c=this._callbacks[d])for(e=0,f=c.length;f>e;e++)b=c[e],b.apply(this,a);return this},a.prototype.removeListener=a.prototype.off,a.prototype.removeAllListeners=a.prototype.off,a.prototype.removeEventListener=a.prototype.off,a.prototype.off=function(a,b){var c,d,e,f,g;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(d=this._callbacks[a],!d)return this;if(1===arguments.length)return delete this._callbacks[a],this;for(e=f=0,g=d.length;g>f;e=++f)if(c=d[e],c===b){d.splice(e,1);break}return this},a}(),a=function(a){function c(a,b){var e,f,g;if(this.element=a,this.version=c.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(c.instances.push(this),this.element.dropzone=this,e=null!=(g=c.optionsForElement(this.element))?g:{},this.options=d({},this.defaultOptions,e,null!=b?b:{}),this.options.forceFallback||!c.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(f=this.getExistingFallback())&&f.parentNode&&f.parentNode.removeChild(f),this.options.previewsContainer!==!1&&(this.previewsContainer=this.options.previewsContainer?c.getElement(this.options.previewsContainer,"previewsContainer"):this.element),this.options.clickable&&(this.clickableElements=this.options.clickable===!0?[this.element]:c.getElements(this.options.clickable,"clickable")),this.init()}var d,e;return k(c,a),c.prototype.Emitter=b,c.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],c.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(a,b){return b()},init:function(){return g},forceFallback:!1,fallback:function(){var a,b,d,e,f,g;for(this.element.className=""+this.element.className+" dz-browser-not-supported",g=this.element.getElementsByTagName("div"),e=0,f=g.length;f>e;e++)a=g[e],/(^| )dz-message($| )/.test(a.className)&&(b=a,a.className="dz-message");return b||(b=c.createElement('
'),this.element.appendChild(b)),d=b.getElementsByTagName("span")[0],d&&(null!=d.textContent?d.textContent=this.options.dictFallbackMessage:null!=d.innerText&&(d.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(a){var b,c,d;return b={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},c=a.width/a.height,b.optWidth=this.options.thumbnailWidth,b.optHeight=this.options.thumbnailHeight,null==b.optWidth&&null==b.optHeight?(b.optWidth=b.srcWidth,b.optHeight=b.srcHeight):null==b.optWidth?b.optWidth=c*b.optHeight:null==b.optHeight&&(b.optHeight=1/c*b.optWidth),d=b.optWidth/b.optHeight,a.heightd?(b.srcHeight=a.height,b.srcWidth=b.srcHeight*d):(b.srcWidth=a.width,b.srcHeight=b.srcWidth/d),b.srcX=(a.width-b.srcWidth)/2,b.srcY=(a.height-b.srcHeight)/2,b},drop:function(){return this.element.classList.remove("dz-drag-hover")},dragstart:g,dragend:function(){return this.element.classList.remove("dz-drag-hover")},dragenter:function(){return this.element.classList.add("dz-drag-hover")},dragover:function(){return this.element.classList.add("dz-drag-hover")},dragleave:function(){return this.element.classList.remove("dz-drag-hover")},paste:g,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(a){var b,d,e,f,g,h,i,j,k,l,m,n,o;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(a.previewElement=c.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement),l=a.previewElement.querySelectorAll("[data-dz-name]"),f=0,i=l.length;i>f;f++)b=l[f],b.textContent=this._renameFilename(a.name);for(m=a.previewElement.querySelectorAll("[data-dz-size]"),g=0,j=m.length;j>g;g++)b=m[g],b.innerHTML=this.filesize(a.size);for(this.options.addRemoveLinks&&(a._removeLink=c.createElement(''+this.options.dictRemoveFile+" "),a.previewElement.appendChild(a._removeLink)),d=function(b){return function(d){return d.preventDefault(),d.stopPropagation(),a.status===c.UPLOADING?c.confirm(b.options.dictCancelUploadConfirmation,function(){return b.removeFile(a)}):b.options.dictRemoveFileConfirmation?c.confirm(b.options.dictRemoveFileConfirmation,function(){return b.removeFile(a)}):b.removeFile(a)}}(this),n=a.previewElement.querySelectorAll("[data-dz-remove]"),o=[],h=0,k=n.length;k>h;h++)e=n[h],o.push(e.addEventListener("click",d));return o}},removedfile:function(a){var b;return a.previewElement&&null!=(b=a.previewElement)&&b.parentNode.removeChild(a.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(a,b){var c,d,e,f;if(a.previewElement){for(a.previewElement.classList.remove("dz-file-preview"),f=a.previewElement.querySelectorAll("[data-dz-thumbnail]"),d=0,e=f.length;e>d;d++)c=f[d],c.alt=a.name,c.src=b;return setTimeout(function(){return function(){return a.previewElement.classList.add("dz-image-preview")}}(this),1)}},error:function(a,b){var c,d,e,f,g;if(a.previewElement){for(a.previewElement.classList.add("dz-error"),"String"!=typeof b&&b.error&&(b=b.error),f=a.previewElement.querySelectorAll("[data-dz-errormessage]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.textContent=b);return g}},errormultiple:g,processing:function(a){return a.previewElement&&(a.previewElement.classList.add("dz-processing"),a._removeLink)?a._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:g,uploadprogress:function(a,b){var c,d,e,f,g;if(a.previewElement){for(f=a.previewElement.querySelectorAll("[data-dz-uploadprogress]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push("PROGRESS"===c.nodeName?c.value=b:c.style.width=""+b+"%");return g}},totaluploadprogress:g,sending:g,sendingmultiple:g,success:function(a){return a.previewElement?a.previewElement.classList.add("dz-success"):void 0},successmultiple:g,canceled:function(a){return this.emit("error",a,"Upload canceled.")},canceledmultiple:g,complete:function(a){return a._removeLink&&(a._removeLink.textContent=this.options.dictRemoveFile),a.previewElement?a.previewElement.classList.add("dz-complete"):void 0},completemultiple:g,maxfilesexceeded:g,maxfilesreached:g,queuecomplete:g,addedfiles:g,previewTemplate:'\n
\n
\n
\n
\n
\n
\n Check \n \n \n \n \n \n
\n
\n
\n Error \n \n \n \n \n \n \n \n
\n
'},d=function(){var a,b,c,d,e,f,g;for(d=arguments[0],c=2<=arguments.length?i.call(arguments,1):[],f=0,g=c.length;g>f;f++){b=c[f];for(a in b)e=b[a],d[a]=e}return d},c.prototype.getAcceptedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted&&e.push(a);return e},c.prototype.getRejectedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted||e.push(a);return e},c.prototype.getFilesWithStatus=function(a){var b,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.status===a&&f.push(b);return f},c.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(c.QUEUED)},c.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(c.UPLOADING)},c.prototype.getAddedFiles=function(){return this.getFilesWithStatus(c.ADDED)},c.prototype.getActiveFiles=function(){var a,b,d,e,f;for(e=this.files,f=[],b=0,d=e.length;d>b;b++)a=e[b],(a.status===c.UPLOADING||a.status===c.QUEUED)&&f.push(a);return f},c.prototype.init=function(){var a,b,d,e,f,g,h;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(c.createElement(''+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&(d=function(a){return function(){return a.hiddenFileInput&&a.hiddenFileInput.parentNode.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null==a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute("multiple","multiple"),a.hiddenFileInput.className="dz-hidden-input",null!=a.options.acceptedFiles&&a.hiddenFileInput.setAttribute("accept",a.options.acceptedFiles),null!=a.options.capture&&a.hiddenFileInput.setAttribute("capture",a.options.capture),a.hiddenFileInput.style.visibility="hidden",a.hiddenFileInput.style.position="absolute",a.hiddenFileInput.style.top="0",a.hiddenFileInput.style.left="0",a.hiddenFileInput.style.height="0",a.hiddenFileInput.style.width="0",document.querySelector(a.options.hiddenInputContainer).appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener("change",function(){var b,c,e,f;if(c=a.hiddenFileInput.files,c.length)for(e=0,f=c.length;f>e;e++)b=c[e],a.addFile(b);return a.emit("addedfiles",c),d()})}}(this))(),this.URL=null!=(g=window.URL)?g:window.webkitURL,h=this.events,e=0,f=h.length;f>e;e++)a=h[e],this.on(a,this.options[a]);return this.on("uploadprogress",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("canceled",function(a){return function(b){return a.emit("complete",b)}}(this)),this.on("complete",function(a){return function(){return 0===a.getAddedFiles().length&&0===a.getUploadingFiles().length&&0===a.getQueuedFiles().length?setTimeout(function(){return a.emit("queuecomplete")},0):void 0}}(this)),b=function(a){return a.stopPropagation(),a.preventDefault?a.preventDefault():a.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(a){return function(b){return a.emit("dragstart",b)}}(this),dragenter:function(a){return function(c){return b(c),a.emit("dragenter",c)}}(this),dragover:function(a){return function(c){var d;try{d=c.dataTransfer.effectAllowed}catch(e){}return c.dataTransfer.dropEffect="move"===d||"linkMove"===d?"move":"copy",b(c),a.emit("dragover",c)}}(this),dragleave:function(a){return function(b){return a.emit("dragleave",b)}}(this),drop:function(a){return function(c){return b(c),a.drop(c)}}(this),dragend:function(a){return function(b){return a.emit("dragend",b)}}(this)}}],this.clickableElements.forEach(function(a){return function(b){return a.listeners.push({element:b,events:{click:function(d){return(b!==a.element||d.target===a.element||c.elementInside(d.target,a.element.querySelector(".dz-message")))&&a.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},c.prototype.destroy=function(){var a;return this.disable(),this.removeAllFiles(!0),(null!=(a=this.hiddenFileInput)?a.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,c.instances.splice(c.instances.indexOf(this),1)},c.prototype.updateTotalUploadProgress=function(){var a,b,c,d,e,f,g,h;if(d=0,c=0,a=this.getActiveFiles(),a.length){for(h=this.getActiveFiles(),f=0,g=h.length;g>f;f++)b=h[f],d+=b.upload.bytesSent,c+=b.upload.total;e=100*d/c}else e=100;return this.emit("totaluploadprogress",e,c,d)},c.prototype._getParamName=function(a){return"function"==typeof this.options.paramName?this.options.paramName(a):""+this.options.paramName+(this.options.uploadMultiple?"["+a+"]":"")},c.prototype._renameFilename=function(a){return"function"!=typeof this.options.renameFilename?a:this.options.renameFilename(a)},c.prototype.getFallbackForm=function(){var a,b,d,e;return(a=this.getExistingFallback())?a:(d='',b=c.createElement(d),"FORM"!==this.element.tagName?(e=c.createElement(' '),e.appendChild(b)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:b)},c.prototype.getExistingFallback=function(){var a,b,c,d,e,f;for(b=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)if(b=a[c],/(^| )fallback($| )/.test(b.className))return b},f=["div","form"],d=0,e=f.length;e>d;d++)if(c=f[d],a=b(this.element.getElementsByTagName(c)))return a},c.prototype.setupEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.addEventListener(b,c,!1));return e}());return g},c.prototype.removeEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.removeEventListener(b,c,!1));return e}());return g},c.prototype.disable=function(){var a,b,c,d,e;for(this.clickableElements.forEach(function(a){return a.classList.remove("dz-clickable")}),this.removeEventListeners(),d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(this.cancelUpload(a));return e},c.prototype.enable=function(){return this.clickableElements.forEach(function(a){return a.classList.add("dz-clickable")}),this.setupEventListeners()},c.prototype.filesize=function(a){var b,c,d,e,f,g,h,i;if(d=0,e="b",a>0){for(g=["TB","GB","MB","KB","b"],c=h=0,i=g.length;i>h;c=++h)if(f=g[c],b=Math.pow(this.options.filesizeBase,4-c)/10,a>=b){d=a/Math.pow(this.options.filesizeBase,4-c),e=f;break}d=Math.round(10*d)/10}return""+d+" "+e},c.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},c.prototype.drop=function(a){var b,c;a.dataTransfer&&(this.emit("drop",a),b=a.dataTransfer.files,this.emit("addedfiles",b),b.length&&(c=a.dataTransfer.items,c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)))},c.prototype.paste=function(a){var b,c;if(null!=(null!=a&&null!=(c=a.clipboardData)?c.items:void 0))return this.emit("paste",a),b=a.clipboardData.items,b.length?this._addFilesFromItems(b):void 0},c.prototype.handleFiles=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.addFile(b));return e},c.prototype._addFilesFromItems=function(a){var b,c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],f.push(null!=c.webkitGetAsEntry&&(b=c.webkitGetAsEntry())?b.isFile?this.addFile(c.getAsFile()):b.isDirectory?this._addFilesFromDirectory(b,b.name):void 0:null!=c.getAsFile?null==c.kind||"file"===c.kind?this.addFile(c.getAsFile()):void 0:void 0);return f},c.prototype._addFilesFromDirectory=function(a,b){var c,d,e;return c=a.createReader(),d=function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(a):void 0},(e=function(a){return function(){return c.readEntries(function(c){var d,f,g;if(c.length>0){for(f=0,g=c.length;g>f;f++)d=c[f],d.isFile?d.file(function(c){return a.options.ignoreHiddenFiles&&"."===c.name.substring(0,1)?void 0:(c.fullPath=""+b+"/"+c.name,a.addFile(c))}):d.isDirectory&&a._addFilesFromDirectory(d,""+b+"/"+d.name);e()}return null},d)}}(this))()},c.prototype.accept=function(a,b){return a.size>1024*this.options.maxFilesize*1024?b(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):c.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(b(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",a)):this.options.accept.call(this,a,b):b(this.options.dictInvalidFileType)},c.prototype.addFile=function(a){return a.upload={progress:0,total:a.size,bytesSent:0},this.files.push(a),a.status=c.ADDED,this.emit("addedfile",a),this._enqueueThumbnail(a),this.accept(a,function(b){return function(c){return c?(a.accepted=!1,b._errorProcessing([a],c)):(a.accepted=!0,b.options.autoQueue&&b.enqueueFile(a)),b._updateMaxFilesReachedClass()}}(this))},c.prototype.enqueueFiles=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)b=a[c],this.enqueueFile(b);return null},c.prototype.enqueueFile=function(a){if(a.status!==c.ADDED||a.accepted!==!0)throw new Error("This file can't be queued because it has already been processed or was rejected.");return a.status=c.QUEUED,this.options.autoProcessQueue?setTimeout(function(a){return function(){return a.processQueue()}}(this),0):void 0},c.prototype._thumbnailQueue=[],c.prototype._processingThumbnail=!1,c.prototype._enqueueThumbnail=function(a){return this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=1024*this.options.maxThumbnailFilesize*1024?(this._thumbnailQueue.push(a),setTimeout(function(a){return function(){return a._processThumbnailQueue()}}(this),0)):void 0},c.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(a){return function(){return a._processingThumbnail=!1,a._processThumbnailQueue()}}(this)))},c.prototype.removeFile=function(a){return a.status===c.UPLOADING&&this.cancelUpload(a),this.files=h(this.files,a),this.emit("removedfile",a),0===this.files.length?this.emit("reset"):void 0},c.prototype.removeAllFiles=function(a){var b,d,e,f;for(null==a&&(a=!1),f=this.files.slice(),d=0,e=f.length;e>d;d++)b=f[d],(b.status!==c.UPLOADING||a)&&this.removeFile(b);return null},c.prototype.createThumbnail=function(a,b){var c;return c=new FileReader,c.onload=function(d){return function(){return"image/svg+xml"===a.type?(d.emit("thumbnail",a,c.result),void(null!=b&&b())):d.createThumbnailFromUrl(a,c.result,b)}}(this),c.readAsDataURL(a)},c.prototype.createThumbnailFromUrl=function(a,b,c,d){var e;return e=document.createElement("img"),d&&(e.crossOrigin=d),e.onload=function(b){return function(){var d,g,h,i,j,k,l,m;return a.width=e.width,a.height=e.height,h=b.options.resize.call(b,a),null==h.trgWidth&&(h.trgWidth=h.optWidth),null==h.trgHeight&&(h.trgHeight=h.optHeight),d=document.createElement("canvas"),g=d.getContext("2d"),d.width=h.trgWidth,d.height=h.trgHeight,f(g,e,null!=(j=h.srcX)?j:0,null!=(k=h.srcY)?k:0,h.srcWidth,h.srcHeight,null!=(l=h.trgX)?l:0,null!=(m=h.trgY)?m:0,h.trgWidth,h.trgHeight),i=d.toDataURL("image/png"),b.emit("thumbnail",a,i),null!=c?c():void 0}}(this),null!=c&&(e.onerror=c),e.src=b},c.prototype.processQueue=function(){var a,b,c,d;if(b=this.options.parallelUploads,c=this.getUploadingFiles().length,a=c,!(c>=b)&&(d=this.getQueuedFiles(),d.length>0)){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,b-c));for(;b>a;){if(!d.length)return;this.processFile(d.shift()),a++}}},c.prototype.processFile=function(a){return this.processFiles([a])},c.prototype.processFiles=function(a){var b,d,e;for(d=0,e=a.length;e>d;d++)b=a[d],b.processing=!0,b.status=c.UPLOADING,this.emit("processing",b);return this.options.uploadMultiple&&this.emit("processingmultiple",a),this.uploadFiles(a)},c.prototype._getFilesWithXhr=function(a){var b,c;return c=function(){var c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.xhr===a&&f.push(b);return f}.call(this)},c.prototype.cancelUpload=function(a){var b,d,e,f,g,h,i;if(a.status===c.UPLOADING){for(d=this._getFilesWithXhr(a.xhr),e=0,g=d.length;g>e;e++)b=d[e],b.status=c.CANCELED;for(a.xhr.abort(),f=0,h=d.length;h>f;f++)b=d[f],this.emit("canceled",b);this.options.uploadMultiple&&this.emit("canceledmultiple",d)}else((i=a.status)===c.ADDED||i===c.QUEUED)&&(a.status=c.CANCELED,this.emit("canceled",a),this.options.uploadMultiple&&this.emit("canceledmultiple",[a]));return this.options.autoProcessQueue?this.processQueue():void 0},e=function(){var a,b;return b=arguments[0],a=2<=arguments.length?i.call(arguments,1):[],"function"==typeof b?b.apply(this,a):b},c.prototype.uploadFile=function(a){return this.uploadFiles([a])},c.prototype.uploadFiles=function(a){var b,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L;for(w=new XMLHttpRequest,x=0,B=a.length;B>x;x++)b=a[x],b.xhr=w;p=e(this.options.method,a),u=e(this.options.url,a),w.open(p,u,!0),w.withCredentials=!!this.options.withCredentials,s=null,g=function(c){return function(){var d,e,f;for(f=[],d=0,e=a.length;e>d;d++)b=a[d],f.push(c._errorProcessing(a,s||c.options.dictResponseError.replace("{{statusCode}}",w.status),w));return f}}(this),t=function(c){return function(d){var e,f,g,h,i,j,k,l,m;if(null!=d)for(f=100*d.loaded/d.total,g=0,j=a.length;j>g;g++)b=a[g],b.upload={progress:f,total:d.total,bytesSent:d.loaded};else{for(e=!0,f=100,h=0,k=a.length;k>h;h++)b=a[h],(100!==b.upload.progress||b.upload.bytesSent!==b.upload.total)&&(e=!1),b.upload.progress=f,b.upload.bytesSent=b.upload.total;if(e)return}for(m=[],i=0,l=a.length;l>i;i++)b=a[i],m.push(c.emit("uploadprogress",b,f,b.upload.bytesSent));return m}}(this),w.onload=function(b){return function(d){var e;if(a[0].status!==c.CANCELED&&4===w.readyState){if(s=w.responseText,w.getResponseHeader("content-type")&&~w.getResponseHeader("content-type").indexOf("application/json"))try{s=JSON.parse(s)}catch(f){d=f,s="Invalid JSON response from server."}return t(),200<=(e=w.status)&&300>e?b._finished(a,s,d):g()}}}(this),w.onerror=function(){return function(){return a[0].status!==c.CANCELED?g():void 0}}(this),r=null!=(G=w.upload)?G:w,r.onprogress=t,j={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&d(j,this.options.headers);for(h in j)i=j[h],i&&w.setRequestHeader(h,i);if(f=new FormData,this.options.params){H=this.options.params;for(o in H)v=H[o],f.append(o,v)}for(y=0,C=a.length;C>y;y++)b=a[y],this.emit("sending",b,w,f);if(this.options.uploadMultiple&&this.emit("sendingmultiple",a,w,f),"FORM"===this.element.tagName)for(I=this.element.querySelectorAll("input, textarea, select, button"),z=0,D=I.length;D>z;z++)if(l=I[z],m=l.getAttribute("name"),n=l.getAttribute("type"),"SELECT"===l.tagName&&l.hasAttribute("multiple"))for(J=l.options,A=0,E=J.length;E>A;A++)q=J[A],q.selected&&f.append(m,q.value);else(!n||"checkbox"!==(K=n.toLowerCase())&&"radio"!==K||l.checked)&&f.append(m,l.value);for(k=F=0,L=a.length-1;L>=0?L>=F:F>=L;k=L>=0?++F:--F)f.append(this._getParamName(k),a[k],this._renameFilename(a[k].name));return this.submitRequest(w,f,a)},c.prototype.submitRequest=function(a,b){return a.send(b)},c.prototype._finished=function(a,b,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=c.SUCCESS,this.emit("success",e,b,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("successmultiple",a,b,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},c.prototype._errorProcessing=function(a,b,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=c.ERROR,this.emit("error",e,b,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("errormultiple",a,b,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},c}(b),a.version="4.3.0",a.options={},a.optionsForElement=function(b){return b.getAttribute("id")?a.options[c(b.getAttribute("id"))]:void 0},a.instances=[],a.forElement=function(a){if("string"==typeof a&&(a=document.querySelector(a)),null==(null!=a?a.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return a.dropzone},a.autoDiscover=!0,a.discover=function(){var b,c,d,e,f,g;for(document.querySelectorAll?d=document.querySelectorAll(".dropzone"):(d=[],b=function(a){var b,c,e,f;for(f=[],c=0,e=a.length;e>c;c++)b=a[c],f.push(/(^| )dropzone($| )/.test(b.className)?d.push(b):void 0);return f},b(document.getElementsByTagName("div")),b(document.getElementsByTagName("form"))),g=[],e=0,f=d.length;f>e;e++)c=d[e],g.push(a.optionsForElement(c)!==!1?new a(c):void 0);return g},a.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],a.isBrowserSupported=function(){var b,c,d,e,f;if(b=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(f=a.blacklistedBrowsers,d=0,e=f.length;e>d;d++)c=f[d],c.test(navigator.userAgent)&&(b=!1);else b=!1;else b=!1;return b},h=function(a,b){var c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],c!==b&&f.push(c);return f},c=function(a){return a.replace(/[\-_](\w)/g,function(a){return a.charAt(1).toUpperCase()})},a.createElement=function(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.childNodes[0]},a.elementInside=function(a,b){if(a===b)return!0;for(;a=a.parentNode;)if(a===b)return!0;return!1},a.getElement=function(a,b){var c;if("string"==typeof a?c=document.querySelector(a):null!=a.nodeType&&(c=a),null==c)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector or a plain HTML element.");return c},a.getElements=function(a,b){var c,d,e,f,g,h,i,j;if(a instanceof Array){e=[];try{for(f=0,h=a.length;h>f;f++)d=a[f],e.push(this.getElement(d,b))}catch(k){c=k,e=null}}else if("string"==typeof a)for(e=[],j=document.querySelectorAll(a),g=0,i=j.length;i>g;g++)d=j[g],e.push(d);else null!=a.nodeType&&(e=[a]);if(null==e||!e.length)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return e},a.confirm=function(a,b,c){return window.confirm(a)?b():null!=c?c():void 0},a.isValidFile=function(a,b){var c,d,e,f,g;if(!b)return!0;for(b=b.split(","),d=a.type,c=d.replace(/\/.*$/,""),f=0,g=b.length;g>f;f++)if(e=b[f],e=e.trim(),"."===e.charAt(0)){if(-1!==a.name.toLowerCase().indexOf(e.toLowerCase(),a.name.length-e.length))return!0}else if(/\/\*$/.test(e)){if(c===e.replace(/\/.*$/,""))return!0
+}else if(d===e)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(b){return this.each(function(){return new a(this,b)})}),"undefined"!=typeof module&&null!==module?module.exports=a:window.Dropzone=a,a.ADDED="added",a.QUEUED="queued",a.ACCEPTED=a.QUEUED,a.UPLOADING="uploading",a.PROCESSING=a.UPLOADING,a.CANCELED="canceled",a.ERROR="error",a.SUCCESS="success",e=function(a){var b,c,d,e,f,g,h,i,j,k;for(h=a.naturalWidth,g=a.naturalHeight,c=document.createElement("canvas"),c.width=1,c.height=g,d=c.getContext("2d"),d.drawImage(a,0,0),e=d.getImageData(0,0,1,g).data,k=0,f=g,i=g;i>k;)b=e[4*(i-1)+3],0===b?f=i:k=i,i=f+k>>1;return j=i/g,0===j?1:j},f=function(a,b,c,d,f,g,h,i,j,k){var l;return l=e(b),a.drawImage(b,c,d,f,g,h,i,j,k/l)},d=function(a,b){var c,d,e,f,g,h,i,j,k;if(e=!1,k=!0,d=a.document,j=d.documentElement,c=d.addEventListener?"addEventListener":"attachEvent",i=d.addEventListener?"removeEventListener":"detachEvent",h=d.addEventListener?"":"on",f=function(c){return"readystatechange"!==c.type||"complete"===d.readyState?(("load"===c.type?a:d)[i](h+c.type,f,!1),!e&&(e=!0)?b.call(a,c.type||c):void 0):void 0},g=function(){var a;try{j.doScroll("left")}catch(b){return a=b,void setTimeout(g,50)}return f("poll")},"complete"!==d.readyState){if(d.createEventObject&&j.doScroll){try{k=!a.frameElement}catch(l){}k&&g()}return d[c](h+"DOMContentLoaded",f,!1),d[c](h+"readystatechange",f,!1),a[c](h+"load",f,!1)}},a._autoDiscoverFunction=function(){return a.autoDiscover?a.discover():void 0},d(window,a._autoDiscoverFunction)}).call(this);
\ No newline at end of file
diff --git a/build/wwwroot/lib/google.geocode.js b/build/wwwroot/lib/google.geocode.js
new file mode 100644
index 00000000..bc632c8f
--- /dev/null
+++ b/build/wwwroot/lib/google.geocode.js
@@ -0,0 +1,111 @@
+(function() {
+ (function(jQuery) {
+ return jQuery.widget('Yavsc.geocode', {
+ geocoder:null,
+ gmap:null,
+ combo:null,
+ inputLatitude:null,
+ inputLongitude:null,
+ marker:null,
+ options: {
+ disabled: false,
+ map: 'map',
+ start: { lat: -34.397, lng: 150.644 },
+ zoom: 16,
+ btngeoloc: null,
+ combo: 'Location_combo',
+ inputLatitude: 'Location_Longitude',
+ inputLongitude: 'Location_Latitude',
+ onValidated: null,
+ onProposalClicked: null
+ },
+ onBlur: function()
+ {
+ this.geocodeAddress();
+ },
+ geocodeAddress: function () {
+ var validation = this.options.onValidated;
+ var _this = this;
+ var $input = $(this.element);
+ var address = $input.val();
+ $input.data("isRequesting", true);
+ $input.data("validPlaceId", false);
+ _this.geocoder.geocode({'address': address}, function(results, status) {
+ if (status === google.maps.GeocoderStatus.OK) {
+ var firstres = results[0];
+ var pos = firstres.geometry.location;
+ if (_this.combo) {
+ var $combo = $(_this.combo);
+ $combo.html("");
+ if (results.length>1) {
+ results.forEach(function(element) {
+ $(''+element.formatted_address+' ')
+ .click( function() {
+ $(_this.element).val($(this).text());
+ if (_this.options.onProposalClicked)
+ _this.options.onProposalClicked();
+ } )
+ .appendTo($combo);
+ },this);
+ }
+ }
+ if (_this.marker) {
+ _this.marker.setMap(null);
+ _this.marker = null;
+ }
+ if (results.length==1) {
+ $(_this.element).val(firstres.formatted_address);
+ _this.gmap.setCenter(pos);
+ _this.marker = new google.maps.Marker({
+ map: _this.gmap,
+ draggable: true,
+ animation: google.maps.Animation.DROP,
+ position: pos
+ });
+
+ if (_this.inputLatitude) _this.inputLatitude.value=pos.lat;
+ if (_this.inputLongitude) _this.inputLongitude.value = pos.lng;
+ if (validation) validation({results:results,success:true});
+ $input.data("validPlaceId", true);
+ $input.data("isRequesting", false);
+ if (validation) validation({success:true,status: status});
+ return;
+ } }
+ if (validation) validation({success:false,status: status});
+ $input.data("isRequesting", false);
+ } );
+ },
+ _create: function() {
+ var _this = this;
+ var $input = $(this.element);
+ if (!_this.options.disabled) {
+ _this.combo = document.getElementById(this.options.combo);
+ _this.gmap = new google.maps.Map(document.getElementById(_this.options.map), {
+ zoom: _this.options.zoom,
+ center: _this.options.start
+ });
+ if (_this.options.inputLatitude)
+ _this.inputLatitude = document.getElementById(_this.options.inputLatitude);
+ if (_this.options.inputLongitude)
+ _this.inputLongitude = document.getElementById(_this.options.inputLongitude);
+
+ this.geocoder = new google.maps.Geocoder();
+ var btn = document.getElementById(_this.options.btngeoloc);
+ if (btn) {
+ btn.click( function() {
+ _this.geocodeAddress();
+ });
+ btn.disabled = false;
+ }
+ $input.on('blur',function() {_this.onBlur(); });
+ }},
+ getDistance: function(lat1,lon1,lat2,lon2){
+ var R = 6371; // Earth's radius in Km
+ return Math.acos(Math.sin(lat1)*Math.sin(lat2) +
+ Math.cos(lat1)*Math.cos(lat2) *
+ Math.cos(lon2-lon1)) * R;
+}
+ });
+ })(jQuery);
+
+}).call(this);
diff --git a/build/wwwroot/lib/jquery-validation-unobtrusive/.bower.json b/build/wwwroot/lib/jquery-validation-unobtrusive/.bower.json
new file mode 100644
index 00000000..4dea09d9
--- /dev/null
+++ b/build/wwwroot/lib/jquery-validation-unobtrusive/.bower.json
@@ -0,0 +1,44 @@
+{
+ "name": "jquery-validation-unobtrusive",
+ "version": "3.2.4",
+ "homepage": "https://github.com/aspnet/jquery-validation-unobtrusive",
+ "description": "Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.",
+ "main": [
+ "jquery.validate.unobtrusive.js"
+ ],
+ "ignore": [
+ "**/.*",
+ "*.json",
+ "*.md",
+ "*.txt",
+ "gulpfile.js"
+ ],
+ "keywords": [
+ "jquery",
+ "asp.net",
+ "mvc",
+ "validation",
+ "unobtrusive"
+ ],
+ "authors": [
+ "Microsoft"
+ ],
+ "license": "http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/aspnet/jquery-validation-unobtrusive.git"
+ },
+ "dependencies": {
+ "jquery-validation": ">=1.8",
+ "jquery": ">=1.8"
+ },
+ "_release": "3.2.4",
+ "_resolution": {
+ "type": "version",
+ "tag": "v3.2.4",
+ "commit": "13386cd1b5947d8a5d23a12b531ce3960be1eba7"
+ },
+ "_source": "git://github.com/aspnet/jquery-validation-unobtrusive.git",
+ "_target": "3.2.4",
+ "_originalSource": "jquery-validation-unobtrusive"
+}
\ No newline at end of file
diff --git a/build/wwwroot/lib/jquery-validation-unobtrusive/bower.json b/build/wwwroot/lib/jquery-validation-unobtrusive/bower.json
new file mode 100644
index 00000000..677fe1bf
--- /dev/null
+++ b/build/wwwroot/lib/jquery-validation-unobtrusive/bower.json
@@ -0,0 +1,35 @@
+{
+ "name": "jquery-validation-unobtrusive",
+ "version": "3.2.4",
+ "homepage": "https://github.com/aspnet/jquery-validation-unobtrusive",
+ "description": "Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.",
+ "main": [
+ "jquery.validate.unobtrusive.js"
+ ],
+ "ignore": [
+ "**/.*",
+ "*.json",
+ "*.md",
+ "*.txt",
+ "gulpfile.js"
+ ],
+ "keywords": [
+ "jquery",
+ "asp.net",
+ "mvc",
+ "validation",
+ "unobtrusive"
+ ],
+ "authors": [
+ "Microsoft"
+ ],
+ "license": "http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/aspnet/jquery-validation-unobtrusive.git"
+ },
+ "dependencies": {
+ "jquery-validation": ">=1.8",
+ "jquery": ">=1.8"
+ }
+}
diff --git a/build/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js b/build/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js
new file mode 100644
index 00000000..1b0de124
--- /dev/null
+++ b/build/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js
@@ -0,0 +1,416 @@
+/*!
+** Unobtrusive validation support library for jQuery and jQuery Validate
+** Copyright (C) Microsoft Corporation. All rights reserved.
+*/
+
+/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
+/*global document: false, jQuery: false */
+
+(function ($) {
+ var $jQval = $.validator,
+ adapters,
+ data_validation = "unobtrusiveValidation";
+
+ function setValidationValues(options, ruleName, value) {
+ options.rules[ruleName] = value;
+ if (options.message) {
+ options.messages[ruleName] = options.message;
+ }
+ }
+
+ function splitAndTrim(value) {
+ return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g);
+ }
+
+ function escapeAttributeValue(value) {
+ // As mentioned on http://api.jquery.com/category/selectors/
+ return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
+ }
+
+ function getModelPrefix(fieldName) {
+ return fieldName.substr(0, fieldName.lastIndexOf(".") + 1);
+ }
+
+ function appendModelPrefix(value, prefix) {
+ if (value.indexOf("*.") === 0) {
+ value = value.replace("*.", prefix);
+ }
+ return value;
+ }
+
+ function onError(error, inputElement) { // 'this' is the form element
+ var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"),
+ replaceAttrValue = container.attr("data-valmsg-replace"),
+ replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) !== false : null;
+
+ container.removeClass("field-validation-valid").addClass("field-validation-error");
+ error.data("unobtrusiveContainer", container);
+
+ if (replace) {
+ container.empty();
+ error.removeClass("input-validation-error").appendTo(container);
+ }
+ else {
+ error.hide();
+ }
+ }
+
+ function onErrors(event, validator) { // 'this' is the form element
+ var container = $(this).find("[data-valmsg-summary=true]"),
+ list = container.find("ul");
+
+ if (list && list.length && validator.errorList.length) {
+ list.empty();
+ container.addClass("validation-summary-errors").removeClass("validation-summary-valid");
+
+ $.each(validator.errorList, function () {
+ $(" ").html(this.message).appendTo(list);
+ });
+ }
+ }
+
+ function onSuccess(error) { // 'this' is the form element
+ var container = error.data("unobtrusiveContainer");
+
+ if (container) {
+ var replaceAttrValue = container.attr("data-valmsg-replace"),
+ replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
+
+ container.addClass("field-validation-valid").removeClass("field-validation-error");
+ error.removeData("unobtrusiveContainer");
+
+ if (replace) {
+ container.empty();
+ }
+ }
+ }
+
+ function onReset(event) { // 'this' is the form element
+ var $form = $(this),
+ key = '__jquery_unobtrusive_validation_form_reset';
+ if ($form.data(key)) {
+ return;
+ }
+ // Set a flag that indicates we're currently resetting the form.
+ $form.data(key, true);
+ try {
+ $form.data("validator").resetForm();
+ } finally {
+ $form.removeData(key);
+ }
+
+ $form.find(".validation-summary-errors")
+ .addClass("validation-summary-valid")
+ .removeClass("validation-summary-errors");
+ $form.find(".field-validation-error")
+ .addClass("field-validation-valid")
+ .removeClass("field-validation-error")
+ .removeData("unobtrusiveContainer")
+ .find(">*") // If we were using valmsg-replace, get the underlying error
+ .removeData("unobtrusiveContainer");
+ }
+
+ function validationInfo(form) {
+ var $form = $(form),
+ result = $form.data(data_validation),
+ onResetProxy = $.proxy(onReset, form),
+ defaultOptions = $jQval.unobtrusive.options || {},
+ execInContext = function (name, args) {
+ var func = defaultOptions[name];
+ func && $.isFunction(func) && func.apply(form, args);
+ }
+
+ if (!result) {
+ result = {
+ options: { // options structure passed to jQuery Validate's validate() method
+ errorClass: defaultOptions.errorClass || "input-validation-error",
+ errorElement: defaultOptions.errorElement || "span",
+ errorPlacement: function () {
+ onError.apply(form, arguments);
+ execInContext("errorPlacement", arguments);
+ },
+ invalidHandler: function () {
+ onErrors.apply(form, arguments);
+ execInContext("invalidHandler", arguments);
+ },
+ messages: {},
+ rules: {},
+ success: function () {
+ onSuccess.apply(form, arguments);
+ execInContext("success", arguments);
+ }
+ },
+ attachValidation: function () {
+ $form
+ .off("reset." + data_validation, onResetProxy)
+ .on("reset." + data_validation, onResetProxy)
+ .validate(this.options);
+ },
+ validate: function () { // a validation function that is called by unobtrusive Ajax
+ $form.validate();
+ return $form.valid();
+ }
+ };
+ $form.data(data_validation, result);
+ }
+
+ return result;
+ }
+
+ $jQval.unobtrusive = {
+ adapters: [],
+
+ parseElement: function (element, skipAttach) {
+ ///
+ /// Parses a single HTML element for unobtrusive validation attributes.
+ ///
+ /// The HTML element to be parsed.
+ /// [Optional] true to skip attaching the
+ /// validation to the form. If parsing just this single element, you should specify true.
+ /// If parsing several elements, you should specify false, and manually attach the validation
+ /// to the form when you are finished. The default is false.
+ var $element = $(element),
+ form = $element.parents("form")[0],
+ valInfo, rules, messages;
+
+ if (!form) { // Cannot do client-side validation without a form
+ return;
+ }
+
+ valInfo = validationInfo(form);
+ valInfo.options.rules[element.name] = rules = {};
+ valInfo.options.messages[element.name] = messages = {};
+
+ $.each(this.adapters, function () {
+ var prefix = "data-val-" + this.name,
+ message = $element.attr(prefix),
+ paramValues = {};
+
+ if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy)
+ prefix += "-";
+
+ $.each(this.params, function () {
+ paramValues[this] = $element.attr(prefix + this);
+ });
+
+ this.adapt({
+ element: element,
+ form: form,
+ message: message,
+ params: paramValues,
+ rules: rules,
+ messages: messages
+ });
+ }
+ });
+
+ $.extend(rules, { "__dummy__": true });
+
+ if (!skipAttach) {
+ valInfo.attachValidation();
+ }
+ },
+
+ parse: function (selector) {
+ ///
+ /// Parses all the HTML elements in the specified selector. It looks for input elements decorated
+ /// with the [data-val=true] attribute value and enables validation according to the data-val-*
+ /// attribute values.
+ ///
+ /// Any valid jQuery selector.
+
+ // $forms includes all forms in selector's DOM hierarchy (parent, children and self) that have at least one
+ // element with data-val=true
+ var $selector = $(selector),
+ $forms = $selector.parents()
+ .addBack()
+ .filter("form")
+ .add($selector.find("form"))
+ .has("[data-val=true]");
+
+ $selector.find("[data-val=true]").each(function () {
+ $jQval.unobtrusive.parseElement(this, true);
+ });
+
+ $forms.each(function () {
+ var info = validationInfo(this);
+ if (info) {
+ info.attachValidation();
+ }
+ });
+ }
+ };
+
+ adapters = $jQval.unobtrusive.adapters;
+
+ adapters.add = function (adapterName, params, fn) {
+ /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.
+ /// The name of the adapter to be added. This matches the name used
+ /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
+ /// [Optional] An array of parameter names (strings) that will
+ /// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and
+ /// mmmm is the parameter name).
+ /// The function to call, which adapts the values from the HTML
+ /// attributes into jQuery Validate rules and/or messages.
+ ///
+ if (!fn) { // Called with no params, just a function
+ fn = params;
+ params = [];
+ }
+ this.push({ name: adapterName, params: params, adapt: fn });
+ return this;
+ };
+
+ adapters.addBool = function (adapterName, ruleName) {
+ /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
+ /// the jQuery Validate validation rule has no parameter values.
+ /// The name of the adapter to be added. This matches the name used
+ /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
+ /// [Optional] The name of the jQuery Validate rule. If not provided, the value
+ /// of adapterName will be used instead.
+ ///
+ return this.add(adapterName, function (options) {
+ setValidationValues(options, ruleName || adapterName, true);
+ });
+ };
+
+ adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {
+ /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
+ /// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and
+ /// one for min-and-max). The HTML parameters are expected to be named -min and -max.
+ /// The name of the adapter to be added. This matches the name used
+ /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
+ /// The name of the jQuery Validate rule to be used when you only
+ /// have a minimum value.
+ /// The name of the jQuery Validate rule to be used when you only
+ /// have a maximum value.
+ /// The name of the jQuery Validate rule to be used when you
+ /// have both a minimum and maximum value.
+ /// [Optional] The name of the HTML attribute that
+ /// contains the minimum value. The default is "min".
+ /// [Optional] The name of the HTML attribute that
+ /// contains the maximum value. The default is "max".
+ ///
+ return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) {
+ var min = options.params.min,
+ max = options.params.max;
+
+ if (min && max) {
+ setValidationValues(options, minMaxRuleName, [min, max]);
+ }
+ else if (min) {
+ setValidationValues(options, minRuleName, min);
+ }
+ else if (max) {
+ setValidationValues(options, maxRuleName, max);
+ }
+ });
+ };
+
+ adapters.addSingleVal = function (adapterName, attribute, ruleName) {
+ /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
+ /// the jQuery Validate validation rule has a single value.
+ /// The name of the adapter to be added. This matches the name used
+ /// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).
+ /// [Optional] The name of the HTML attribute that contains the value.
+ /// The default is "val".
+ /// [Optional] The name of the jQuery Validate rule. If not provided, the value
+ /// of adapterName will be used instead.
+ ///
+ return this.add(adapterName, [attribute || "val"], function (options) {
+ setValidationValues(options, ruleName || adapterName, options.params[attribute]);
+ });
+ };
+
+ $jQval.addMethod("__dummy__", function (value, element, params) {
+ return true;
+ });
+
+ $jQval.addMethod("regex", function (value, element, params) {
+ var match;
+ if (this.optional(element)) {
+ return true;
+ }
+
+ match = new RegExp(params).exec(value);
+ return (match && (match.index === 0) && (match[0].length === value.length));
+ });
+
+ $jQval.addMethod("nonalphamin", function (value, element, nonalphamin) {
+ var match;
+ if (nonalphamin) {
+ match = value.match(/\W/g);
+ match = match && match.length >= nonalphamin;
+ }
+ return match;
+ });
+
+ if ($jQval.methods.extension) {
+ adapters.addSingleVal("accept", "mimtype");
+ adapters.addSingleVal("extension", "extension");
+ } else {
+ // for backward compatibility, when the 'extension' validation method does not exist, such as with versions
+ // of JQuery Validation plugin prior to 1.10, we should use the 'accept' method for
+ // validating the extension, and ignore mime-type validations as they are not supported.
+ adapters.addSingleVal("extension", "extension", "accept");
+ }
+
+ adapters.addSingleVal("regex", "pattern");
+ adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");
+ adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range");
+ adapters.addMinMax("minlength", "minlength").addMinMax("maxlength", "minlength", "maxlength");
+ adapters.add("equalto", ["other"], function (options) {
+ var prefix = getModelPrefix(options.element.name),
+ other = options.params.other,
+ fullOtherName = appendModelPrefix(other, prefix),
+ element = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(fullOtherName) + "']")[0];
+
+ setValidationValues(options, "equalTo", element);
+ });
+ adapters.add("required", function (options) {
+ // jQuery Validate equates "required" with "mandatory" for checkbox elements
+ if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") {
+ setValidationValues(options, "required", true);
+ }
+ });
+ adapters.add("remote", ["url", "type", "additionalfields"], function (options) {
+ var value = {
+ url: options.params.url,
+ type: options.params.type || "GET",
+ data: {}
+ },
+ prefix = getModelPrefix(options.element.name);
+
+ $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {
+ var paramName = appendModelPrefix(fieldName, prefix);
+ value.data[paramName] = function () {
+ var field = $(options.form).find(":input").filter("[name='" + escapeAttributeValue(paramName) + "']");
+ // For checkboxes and radio buttons, only pick up values from checked fields.
+ if (field.is(":checkbox")) {
+ return field.filter(":checked").val() || field.filter(":hidden").val() || '';
+ }
+ else if (field.is(":radio")) {
+ return field.filter(":checked").val() || '';
+ }
+ return field.val();
+ };
+ });
+
+ setValidationValues(options, "remote", value);
+ });
+ adapters.add("password", ["min", "nonalphamin", "regex"], function (options) {
+ if (options.params.min) {
+ setValidationValues(options, "minlength", options.params.min);
+ }
+ if (options.params.nonalphamin) {
+ setValidationValues(options, "nonalphamin", options.params.nonalphamin);
+ }
+ if (options.params.regex) {
+ setValidationValues(options, "regex", options.params.regex);
+ }
+ });
+
+ $(function () {
+ $jQval.unobtrusive.parse(document);
+ });
+}(jQuery));
\ No newline at end of file
diff --git a/build/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js b/build/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js
new file mode 100644
index 00000000..be9a38a4
--- /dev/null
+++ b/build/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js
@@ -0,0 +1,5 @@
+/*
+** Unobtrusive validation support library for jQuery and jQuery Validate
+** Copyright (C) Microsoft Corporation. All rights reserved.
+*/
+!function(a){function e(a,e,n){a.rules[e]=n,a.message&&(a.messages[e]=a.message)}function n(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function t(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function r(a){return a.substr(0,a.lastIndexOf(".")+1)}function i(a,e){return 0===a.indexOf("*.")&&(a=a.replace("*.",e)),a}function o(e,n){var r=a(this).find("[data-valmsg-for='"+t(n[0].name)+"']"),i=r.attr("data-valmsg-replace"),o=i?a.parseJSON(i)!==!1:null;r.removeClass("field-validation-valid").addClass("field-validation-error"),e.data("unobtrusiveContainer",r),o?(r.empty(),e.removeClass("input-validation-error").appendTo(r)):e.hide()}function d(e,n){var t=a(this).find("[data-valmsg-summary=true]"),r=t.find("ul");r&&r.length&&n.errorList.length&&(r.empty(),t.addClass("validation-summary-errors").removeClass("validation-summary-valid"),a.each(n.errorList,function(){a(" ").html(this.message).appendTo(r)}))}function s(e){var n=e.data("unobtrusiveContainer");if(n){var t=n.attr("data-valmsg-replace"),r=t?a.parseJSON(t):null;n.addClass("field-validation-valid").removeClass("field-validation-error"),e.removeData("unobtrusiveContainer"),r&&n.empty()}}function l(e){var n=a(this),t="__jquery_unobtrusive_validation_form_reset";if(!n.data(t)){n.data(t,!0);try{n.data("validator").resetForm()}finally{n.removeData(t)}n.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),n.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function m(e){var n=a(e),t=n.data(v),r=a.proxy(l,e),i=p.unobtrusive.options||{},m=function(n,t){var r=i[n];r&&a.isFunction(r)&&r.apply(e,t)};return t||(t={options:{errorClass:i.errorClass||"input-validation-error",errorElement:i.errorElement||"span",errorPlacement:function(){o.apply(e,arguments),m("errorPlacement",arguments)},invalidHandler:function(){d.apply(e,arguments),m("invalidHandler",arguments)},messages:{},rules:{},success:function(){s.apply(e,arguments),m("success",arguments)}},attachValidation:function(){n.off("reset."+v,r).on("reset."+v,r).validate(this.options)},validate:function(){return n.validate(),n.valid()}},n.data(v,t)),t}var u,p=a.validator,v="unobtrusiveValidation";p.unobtrusive={adapters:[],parseElement:function(e,n){var t,r,i,o=a(e),d=o.parents("form")[0];d&&(t=m(d),t.options.rules[e.name]=r={},t.options.messages[e.name]=i={},a.each(this.adapters,function(){var n="data-val-"+this.name,t=o.attr(n),s={};void 0!==t&&(n+="-",a.each(this.params,function(){s[this]=o.attr(n+this)}),this.adapt({element:e,form:d,message:t,params:s,rules:r,messages:i}))}),a.extend(r,{__dummy__:!0}),n||t.attachValidation())},parse:function(e){var n=a(e),t=n.parents().addBack().filter("form").add(n.find("form")).has("[data-val=true]");n.find("[data-val=true]").each(function(){p.unobtrusive.parseElement(this,!0)}),t.each(function(){var a=m(this);a&&a.attachValidation()})}},u=p.unobtrusive.adapters,u.add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},u.addBool=function(a,n){return this.add(a,function(t){e(t,n||a,!0)})},u.addMinMax=function(a,n,t,r,i,o){return this.add(a,[i||"min",o||"max"],function(a){var i=a.params.min,o=a.params.max;i&&o?e(a,r,[i,o]):i?e(a,n,i):o&&e(a,t,o)})},u.addSingleVal=function(a,n,t){return this.add(a,[n||"val"],function(r){e(r,t||a,r.params[n])})},p.addMethod("__dummy__",function(a,e,n){return!0}),p.addMethod("regex",function(a,e,n){var t;return this.optional(e)?!0:(t=new RegExp(n).exec(a),t&&0===t.index&&t[0].length===a.length)}),p.addMethod("nonalphamin",function(a,e,n){var t;return n&&(t=a.match(/\W/g),t=t&&t.length>=n),t}),p.methods.extension?(u.addSingleVal("accept","mimtype"),u.addSingleVal("extension","extension")):u.addSingleVal("extension","extension","accept"),u.addSingleVal("regex","pattern"),u.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),u.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),u.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),u.add("equalto",["other"],function(n){var o=r(n.element.name),d=n.params.other,s=i(d,o),l=a(n.form).find(":input").filter("[name='"+t(s)+"']")[0];e(n,"equalTo",l)}),u.add("required",function(a){("INPUT"!==a.element.tagName.toUpperCase()||"CHECKBOX"!==a.element.type.toUpperCase())&&e(a,"required",!0)}),u.add("remote",["url","type","additionalfields"],function(o){var d={url:o.params.url,type:o.params.type||"GET",data:{}},s=r(o.element.name);a.each(n(o.params.additionalfields||o.element.name),function(e,n){var r=i(n,s);d.data[r]=function(){var e=a(o.form).find(":input").filter("[name='"+t(r)+"']");return e.is(":checkbox")?e.filter(":checked").val()||e.filter(":hidden").val()||"":e.is(":radio")?e.filter(":checked").val()||"":e.val()}}),e(o,"remote",d)}),u.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&e(a,"minlength",a.params.min),a.params.nonalphamin&&e(a,"nonalphamin",a.params.nonalphamin),a.params.regex&&e(a,"regex",a.params.regex)}),a(function(){p.unobtrusive.parse(document)})}(jQuery);
\ No newline at end of file
diff --git a/build/wwwroot/lib/jquery-validation/additional-methods.js b/build/wwwroot/lib/jquery-validation/additional-methods.js
new file mode 100644
index 00000000..a2345d88
--- /dev/null
+++ b/build/wwwroot/lib/jquery-validation/additional-methods.js
@@ -0,0 +1,999 @@
+/*!
+ * jQuery Validation Plugin v1.14.0
+ *
+ * http://jqueryvalidation.org/
+ *
+ * Copyright (c) 2015 Jörn Zaefferer
+ * Released under the MIT license
+ */
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+ define( ["jquery", "./jquery.validate"], factory );
+ } else {
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+(function() {
+
+ function stripHtml(value) {
+ // remove html tags and space chars
+ return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
+ // remove punctuation
+ .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ }
+
+ $.validator.addMethod("maxWords", function(value, element, params) {
+ return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
+ }, $.validator.format("Please enter {0} words or less."));
+
+ $.validator.addMethod("minWords", function(value, element, params) {
+ return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
+ }, $.validator.format("Please enter at least {0} words."));
+
+ $.validator.addMethod("rangeWords", function(value, element, params) {
+ var valueStripped = stripHtml(value),
+ regex = /\b\w+\b/g;
+ return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
+ }, $.validator.format("Please enter between {0} and {1} words."));
+
+}());
+
+
+// Accept a value from a file input based on a required mimetype
+$.validator.addMethod("accept", function(value, element, param) {
+ // Split mime on commas in case we have multiple types we can accept
+ var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
+ optionalValue = this.optional(element),
+ i, file;
+
+ // Element is optional
+ if (optionalValue) {
+ return optionalValue;
+ }
+
+ if ($(element).attr("type") === "file") {
+ // If we are using a wildcard, make it regex friendly
+ typeParam = typeParam.replace(/\*/g, ".*");
+
+ // Check if the element has a FileList before checking each file
+ if (element.files && element.files.length) {
+ for (i = 0; i < element.files.length; i++) {
+ file = element.files[i];
+
+ // Grab the mimetype from the loaded file, verify it matches
+ if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ return false;
+ }
+ }
+ }
+ }
+
+ // Either return true because we've validated each file, or because the
+ // browser does not support element.files and the FileList feature
+ return true;
+}, $.validator.format("Please enter a value with a valid mimetype."));
+
+$.validator.addMethod("alphanumeric", function(value, element) {
+ return this.optional(element) || /^\w+$/i.test(value);
+}, "Letters, numbers, and underscores only please");
+
+/*
+ * Dutch bank account numbers (not 'giro' numbers) have 9 digits
+ * and pass the '11 check'.
+ * We accept the notation with spaces, as that is common.
+ * acceptable: 123456789 or 12 34 56 789
+ */
+$.validator.addMethod("bankaccountNL", function(value, element) {
+ if (this.optional(element)) {
+ return true;
+ }
+ if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ return false;
+ }
+ // now '11 check'
+ var account = value.replace(/ /g, ""), // remove spaces
+ sum = 0,
+ len = account.length,
+ pos, factor, digit;
+ for ( pos = 0; pos < len; pos++ ) {
+ factor = len - pos;
+ digit = account.substring(pos, pos + 1);
+ sum = sum + factor * digit;
+ }
+ return sum % 11 === 0;
+}, "Please specify a valid bank account number");
+
+$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
+ return this.optional(element) ||
+ ($.validator.methods.bankaccountNL.call(this, value, element)) ||
+ ($.validator.methods.giroaccountNL.call(this, value, element));
+}, "Please specify a valid bank or giro account number");
+
+/**
+ * BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
+ *
+ * BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
+ *
+ * BIC definition in detail:
+ * - First 4 characters - bank code (only letters)
+ * - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
+ * - Next 2 characters - location code (letters and digits)
+ * a. shall not start with '0' or '1'
+ * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
+ */
+$.validator.addMethod("bic", function(value, element) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
+}, "Please specify a valid BIC code");
+
+/*
+ * Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
+ * Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ */
+$.validator.addMethod( "cifES", function( value ) {
+ "use strict";
+
+ var num = [],
+ controlDigit, sum, i, count, tmp, secondDigit;
+
+ value = value.toUpperCase();
+
+ // Quick format test
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ return false;
+ }
+
+ for ( i = 0; i < 9; i++ ) {
+ num[ i ] = parseInt( value.charAt( i ), 10 );
+ }
+
+ // Algorithm for checking CIF codes
+ sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
+ for ( count = 1; count < 8; count += 2 ) {
+ tmp = ( 2 * num[ count ] ).toString();
+ secondDigit = tmp.charAt( 1 );
+
+ sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
+ }
+
+ /* The first (position 1) is a letter following the following criteria:
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ */
+ if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
+ sum += "";
+ controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
+ value += controlDigit;
+ return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ }
+
+ return false;
+
+}, "Please specify a valid CIF number." );
+
+/*
+ * Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
+ * CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod("cpfBR", function(value) {
+ // Removing special characters from value
+ value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+
+ // Checking value to have 11 digits only
+ if (value.length !== 11) {
+ return false;
+ }
+
+ var sum = 0,
+ firstCN, secondCN, checkResult, i;
+
+ firstCN = parseInt(value.substring(9, 10), 10);
+ secondCN = parseInt(value.substring(10, 11), 10);
+
+ checkResult = function(sum, cn) {
+ var result = (sum * 10) % 11;
+ if ((result === 10) || (result === 11)) {result = 0;}
+ return (result === cn);
+ };
+
+ // Checking for dump data
+ if (value === "" ||
+ value === "00000000000" ||
+ value === "11111111111" ||
+ value === "22222222222" ||
+ value === "33333333333" ||
+ value === "44444444444" ||
+ value === "55555555555" ||
+ value === "66666666666" ||
+ value === "77777777777" ||
+ value === "88888888888" ||
+ value === "99999999999"
+ ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 1; i <= 9; i++ ) {
+ sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ }
+
+ // If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
+ if ( checkResult(sum, firstCN) ) {
+ sum = 0;
+ for ( i = 1; i <= 10; i++ ) {
+ sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ }
+ return checkResult(sum, secondCN);
+ }
+ return false;
+
+}, "Please specify a valid CPF number");
+
+/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
+ * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
+ */
+$.validator.addMethod("creditcardtypes", function(value, element, param) {
+ if (/[^0-9\-]+/.test(value)) {
+ return false;
+ }
+
+ value = value.replace(/\D/g, "");
+
+ var validTypes = 0x0000;
+
+ if (param.mastercard) {
+ validTypes |= 0x0001;
+ }
+ if (param.visa) {
+ validTypes |= 0x0002;
+ }
+ if (param.amex) {
+ validTypes |= 0x0004;
+ }
+ if (param.dinersclub) {
+ validTypes |= 0x0008;
+ }
+ if (param.enroute) {
+ validTypes |= 0x0010;
+ }
+ if (param.discover) {
+ validTypes |= 0x0020;
+ }
+ if (param.jcb) {
+ validTypes |= 0x0040;
+ }
+ if (param.unknown) {
+ validTypes |= 0x0080;
+ }
+ if (param.all) {
+ validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
+ }
+ if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ return value.length === 16;
+ }
+ if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ return value.length === 16;
+ }
+ if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ return value.length === 15;
+ }
+ if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ return value.length === 14;
+ }
+ if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ return value.length === 15;
+ }
+ if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ return value.length === 16;
+ }
+ if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ return value.length === 16;
+ }
+ if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ return value.length === 15;
+ }
+ if (validTypes & 0x0080) { //unknown
+ return true;
+ }
+ return false;
+}, "Please enter a valid credit card number.");
+
+/**
+ * Validates currencies with any given symbols by @jameslouiz
+ * Symbols can be optional or required. Symbols required by default
+ *
+ * Usage examples:
+ * currency: ["£", false] - Use false for soft currency validation
+ * currency: ["$", false]
+ * currency: ["RM", false] - also works with text based symbols such as "RM" - Malaysia Ringgit etc
+ *
+ *
+ *
+ * Soft symbol checking
+ * currencyInput: {
+ * currency: ["$", false]
+ * }
+ *
+ * Strict symbol checking (default)
+ * currencyInput: {
+ * currency: "$"
+ * //OR
+ * currency: ["$", true]
+ * }
+ *
+ * Multiple Symbols
+ * currencyInput: {
+ * currency: "$,£,¢"
+ * }
+ */
+$.validator.addMethod("currency", function(value, element, param) {
+ var isParamString = typeof param === "string",
+ symbol = isParamString ? param : param[0],
+ soft = isParamString ? true : param[1],
+ regex;
+
+ symbol = symbol.replace(/,/g, "");
+ symbol = soft ? symbol + "]" : symbol + "]?";
+ regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
+ regex = new RegExp(regex);
+ return this.optional(element) || regex.test(value);
+
+}, "Please specify a valid currency");
+
+$.validator.addMethod("dateFA", function(value, element) {
+ return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
+}, $.validator.messages.date);
+
+/**
+ * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
+ *
+ * @example $.validator.methods.date("01/01/1900")
+ * @result true
+ *
+ * @example $.validator.methods.date("01/13/1990")
+ * @result false
+ *
+ * @example $.validator.methods.date("01.01.1900")
+ * @result false
+ *
+ * @example
+ * @desc Declares an optional input element whose value must be a valid date.
+ *
+ * @name $.validator.methods.dateITA
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+$.validator.addMethod("dateITA", function(value, element) {
+ var check = false,
+ re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
+ adata, gg, mm, aaaa, xdata;
+ if ( re.test(value)) {
+ adata = value.split("/");
+ gg = parseInt(adata[0], 10);
+ mm = parseInt(adata[1], 10);
+ aaaa = parseInt(adata[2], 10);
+ xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ check = true;
+ } else {
+ check = false;
+ }
+ } else {
+ check = false;
+ }
+ return this.optional(element) || check;
+}, $.validator.messages.date);
+
+$.validator.addMethod("dateNL", function(value, element) {
+ return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
+}, $.validator.messages.date);
+
+// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
+$.validator.addMethod("extension", function(value, element, param) {
+ param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
+ return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
+}, $.validator.format("Please enter a value with a valid extension."));
+
+/**
+ * Dutch giro account numbers (not bank numbers) have max 7 digits
+ */
+$.validator.addMethod("giroaccountNL", function(value, element) {
+ return this.optional(element) || /^[0-9]{1,7}$/.test(value);
+}, "Please specify a valid giro account number");
+
+/**
+ * IBAN is the international bank account number.
+ * It has a country - specific format, that is checked here too
+ */
+$.validator.addMethod("iban", function(value, element) {
+ // some quick simple tests to prevent needless work
+ if (this.optional(element)) {
+ return true;
+ }
+
+ // remove spaces and to upper case
+ var iban = value.replace(/ /g, "").toUpperCase(),
+ ibancheckdigits = "",
+ leadingZeroes = true,
+ cRest = "",
+ cOperator = "",
+ countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
+
+ // check the country code and find the country specific format
+ countrycode = iban.substring(0, 2);
+ bbancountrypatterns = {
+ "AL": "\\d{8}[\\dA-Z]{16}",
+ "AD": "\\d{8}[\\dA-Z]{12}",
+ "AT": "\\d{16}",
+ "AZ": "[\\dA-Z]{4}\\d{20}",
+ "BE": "\\d{12}",
+ "BH": "[A-Z]{4}[\\dA-Z]{14}",
+ "BA": "\\d{16}",
+ "BR": "\\d{23}[A-Z][\\dA-Z]",
+ "BG": "[A-Z]{4}\\d{6}[\\dA-Z]{8}",
+ "CR": "\\d{17}",
+ "HR": "\\d{17}",
+ "CY": "\\d{8}[\\dA-Z]{16}",
+ "CZ": "\\d{20}",
+ "DK": "\\d{14}",
+ "DO": "[A-Z]{4}\\d{20}",
+ "EE": "\\d{16}",
+ "FO": "\\d{14}",
+ "FI": "\\d{14}",
+ "FR": "\\d{10}[\\dA-Z]{11}\\d{2}",
+ "GE": "[\\dA-Z]{2}\\d{16}",
+ "DE": "\\d{18}",
+ "GI": "[A-Z]{4}[\\dA-Z]{15}",
+ "GR": "\\d{7}[\\dA-Z]{16}",
+ "GL": "\\d{14}",
+ "GT": "[\\dA-Z]{4}[\\dA-Z]{20}",
+ "HU": "\\d{24}",
+ "IS": "\\d{22}",
+ "IE": "[\\dA-Z]{4}\\d{14}",
+ "IL": "\\d{19}",
+ "IT": "[A-Z]\\d{10}[\\dA-Z]{12}",
+ "KZ": "\\d{3}[\\dA-Z]{13}",
+ "KW": "[A-Z]{4}[\\dA-Z]{22}",
+ "LV": "[A-Z]{4}[\\dA-Z]{13}",
+ "LB": "\\d{4}[\\dA-Z]{20}",
+ "LI": "\\d{5}[\\dA-Z]{12}",
+ "LT": "\\d{16}",
+ "LU": "\\d{3}[\\dA-Z]{13}",
+ "MK": "\\d{3}[\\dA-Z]{10}\\d{2}",
+ "MT": "[A-Z]{4}\\d{5}[\\dA-Z]{18}",
+ "MR": "\\d{23}",
+ "MU": "[A-Z]{4}\\d{19}[A-Z]{3}",
+ "MC": "\\d{10}[\\dA-Z]{11}\\d{2}",
+ "MD": "[\\dA-Z]{2}\\d{18}",
+ "ME": "\\d{18}",
+ "NL": "[A-Z]{4}\\d{10}",
+ "NO": "\\d{11}",
+ "PK": "[\\dA-Z]{4}\\d{16}",
+ "PS": "[\\dA-Z]{4}\\d{21}",
+ "PL": "\\d{24}",
+ "PT": "\\d{21}",
+ "RO": "[A-Z]{4}[\\dA-Z]{16}",
+ "SM": "[A-Z]\\d{10}[\\dA-Z]{12}",
+ "SA": "\\d{2}[\\dA-Z]{18}",
+ "RS": "\\d{18}",
+ "SK": "\\d{20}",
+ "SI": "\\d{15}",
+ "ES": "\\d{20}",
+ "SE": "\\d{20}",
+ "CH": "\\d{5}[\\dA-Z]{12}",
+ "TN": "\\d{20}",
+ "TR": "\\d{5}[\\dA-Z]{17}",
+ "AE": "\\d{3}\\d{16}",
+ "GB": "[A-Z]{4}\\d{14}",
+ "VG": "[\\dA-Z]{4}\\d{16}"
+ };
+
+ bbanpattern = bbancountrypatterns[countrycode];
+ // As new countries will start using IBAN in the
+ // future, we only check if the countrycode is known.
+ // This prevents false negatives, while almost all
+ // false positives introduced by this, will be caught
+ // by the checksum validation below anyway.
+ // Strict checking should return FALSE for unknown
+ // countries.
+ if (typeof bbanpattern !== "undefined") {
+ ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
+ if (!(ibanregexp.test(iban))) {
+ return false; // invalid country specific format
+ }
+ }
+
+ // now check the checksum, first convert to digits
+ ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
+ for (i = 0; i < ibancheck.length; i++) {
+ charAt = ibancheck.charAt(i);
+ if (charAt !== "0") {
+ leadingZeroes = false;
+ }
+ if (!leadingZeroes) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ }
+ }
+
+ // calculate the result of: ibancheckdigits % 97
+ for (p = 0; p < ibancheckdigits.length; p++) {
+ cChar = ibancheckdigits.charAt(p);
+ cOperator = "" + cRest + "" + cChar;
+ cRest = cOperator % 97;
+ }
+ return cRest === 1;
+}, "Please specify a valid IBAN");
+
+$.validator.addMethod("integer", function(value, element) {
+ return this.optional(element) || /^-?\d+$/.test(value);
+}, "A positive or negative non-decimal number please");
+
+$.validator.addMethod("ipv4", function(value, element) {
+ return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
+}, "Please enter a valid IP v4 address.");
+
+$.validator.addMethod("ipv6", function(value, element) {
+ return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
+}, "Please enter a valid IP v6 address.");
+
+$.validator.addMethod("lettersonly", function(value, element) {
+ return this.optional(element) || /^[a-z]+$/i.test(value);
+}, "Letters only please");
+
+$.validator.addMethod("letterswithbasicpunc", function(value, element) {
+ return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
+}, "Letters or punctuation only please");
+
+$.validator.addMethod("mobileNL", function(value, element) {
+ return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
+}, "Please specify a valid mobile number");
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod("mobileUK", function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
+}, "Please specify a valid mobile number");
+
+/*
+ * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ */
+$.validator.addMethod( "nieES", function( value ) {
+ "use strict";
+
+ value = value.toUpperCase();
+
+ // Basic format test
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ return false;
+ }
+
+ // Test NIE
+ //T
+ if ( /^[T]{1}/.test( value ) ) {
+ return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
+ }
+
+ //XYZ
+ if ( /^[XYZ]{1}/.test( value ) ) {
+ return (
+ value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
+ value.replace( "X", "0" )
+ .replace( "Y", "1" )
+ .replace( "Z", "2" )
+ .substring( 0, 8 ) % 23
+ )
+ );
+ }
+
+ return false;
+
+}, "Please specify a valid NIE number." );
+
+/*
+ * The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
+ */
+$.validator.addMethod( "nifES", function( value ) {
+ "use strict";
+
+ value = value.toUpperCase();
+
+ // Basic format test
+ if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ return false;
+ }
+
+ // Test NIF
+ if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
+ return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
+ }
+ // Test specials NIF (starts with K, L or M)
+ if ( /^[KLM]{1}/.test( value ) ) {
+ return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ }
+
+ return false;
+
+}, "Please specify a valid NIF number." );
+
+jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+}, "Please enter a different value, values must not be the same." );
+
+$.validator.addMethod("nowhitespace", function(value, element) {
+ return this.optional(element) || /^\S+$/i.test(value);
+}, "No white space please");
+
+/**
+* Return true if the field value matches the given format RegExp
+*
+* @example $.validator.methods.pattern("AR1004",element,/^AR\d{4}$/)
+* @result true
+*
+* @example $.validator.methods.pattern("BR1004",element,/^AR\d{4}$/)
+* @result false
+*
+* @name $.validator.methods.pattern
+* @type Boolean
+* @cat Plugins/Validate/Methods
+*/
+$.validator.addMethod("pattern", function(value, element, param) {
+ if (this.optional(element)) {
+ return true;
+ }
+ if (typeof param === "string") {
+ param = new RegExp("^(?:" + param + ")$");
+ }
+ return param.test(value);
+}, "Invalid format.");
+
+/**
+ * Dutch phone numbers have 10 digits (or 11 and start with +31).
+ */
+$.validator.addMethod("phoneNL", function(value, element) {
+ return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
+}, "Please specify a valid phone number.");
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod("phoneUK", function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
+}, "Please specify a valid phone number");
+
+/**
+ * matches US phone number format
+ *
+ * where the area code may not start with 1 and the prefix may not start with 1
+ * allows '-' or ' ' as a separator and allows parens around area code
+ * some people may want to put a '1' in front of their number
+ *
+ * 1(212)-999-2345 or
+ * 212 999 2344 or
+ * 212-999-0983
+ *
+ * but not
+ * 111-123-5434
+ * and not
+ * 212 123 4567
+ */
+$.validator.addMethod("phoneUS", function(phone_number, element) {
+ phone_number = phone_number.replace(/\s+/g, "");
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
+}, "Please specify a valid phone number");
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod("phonesUK", function(phone_number, element) {
+ phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
+ return this.optional(element) || phone_number.length > 9 &&
+ phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
+}, "Please specify a valid uk phone number");
+
+/**
+ * Matches a valid Canadian Postal Code
+ *
+ * @example jQuery.validator.methods.postalCodeCA( "H0H 0H0", element )
+ * @result true
+ *
+ * @example jQuery.validator.methods.postalCodeCA( "H0H0H0", element )
+ * @result false
+ *
+ * @name jQuery.validator.methods.postalCodeCA
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+$.validator.addMethod( "postalCodeCA", function( value, element ) {
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
+}, "Please specify a valid postal code" );
+
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod("postalcodeBR", function(cep_value, element) {
+ return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido.");
+
+/* Matches Italian postcode (CAP) */
+$.validator.addMethod("postalcodeIT", function(value, element) {
+ return this.optional(element) || /^\d{5}$/.test(value);
+}, "Please specify a valid postal code");
+
+$.validator.addMethod("postalcodeNL", function(value, element) {
+ return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
+}, "Please specify a valid postal code");
+
+// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
+$.validator.addMethod("postcodeUK", function(value, element) {
+ return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
+}, "Please specify a valid UK postcode");
+
+/*
+ * Lets you say "at least X inputs that match selector Y must be filled."
+ *
+ * The end result is that neither of these inputs:
+ *
+ *
+ *
+ *
+ * ...will validate unless at least one of them is filled.
+ *
+ * partnumber: {require_from_group: [1,".productinfo"]},
+ * description: {require_from_group: [1,".productinfo"]}
+ *
+ * options[0]: number of fields that must be filled in the group
+ * options[1]: CSS selector that defines the group of conditionally required fields
+ */
+$.validator.addMethod("require_from_group", function(value, element, options) {
+ var $fields = $(options[1], element.form),
+ $fieldsFirst = $fields.eq(0),
+ validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
+ isValid = $fields.filter(function() {
+ return validator.elementValue(this);
+ }).length >= options[0];
+
+ // Store the cloned validator for future validation
+ $fieldsFirst.data("valid_req_grp", validator);
+
+ // If element isn't being validated, run each require_from_group field's validation rules
+ if (!$(element).data("being_validated")) {
+ $fields.data("being_validated", true);
+ $fields.each(function() {
+ validator.element(this);
+ });
+ $fields.data("being_validated", false);
+ }
+ return isValid;
+}, $.validator.format("Please fill at least {0} of these fields."));
+
+/*
+ * Lets you say "either at least X inputs that match selector Y must be filled,
+ * OR they must all be skipped (left blank)."
+ *
+ * The end result, is that none of these inputs:
+ *
+ *
+ *
+ *
+ *
+ * ...will validate unless either at least two of them are filled,
+ * OR none of them are.
+ *
+ * partnumber: {skip_or_fill_minimum: [2,".productinfo"]},
+ * description: {skip_or_fill_minimum: [2,".productinfo"]},
+ * color: {skip_or_fill_minimum: [2,".productinfo"]}
+ *
+ * options[0]: number of fields that must be filled in the group
+ * options[1]: CSS selector that defines the group of conditionally required fields
+ *
+ */
+$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
+ var $fields = $(options[1], element.form),
+ $fieldsFirst = $fields.eq(0),
+ validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
+ numberFilled = $fields.filter(function() {
+ return validator.elementValue(this);
+ }).length,
+ isValid = numberFilled === 0 || numberFilled >= options[0];
+
+ // Store the cloned validator for future validation
+ $fieldsFirst.data("valid_skip", validator);
+
+ // If element isn't being validated, run each skip_or_fill_minimum field's validation rules
+ if (!$(element).data("being_validated")) {
+ $fields.data("being_validated", true);
+ $fields.each(function() {
+ validator.element(this);
+ });
+ $fields.data("being_validated", false);
+ }
+ return isValid;
+}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+
+/* Validates US States and/or Territories by @jdforsythe
+ * Can be case insensitive or require capitalization - default is case insensitive
+ * Can include US Territories or not - default does not
+ * Can include US Military postal abbreviations (AA, AE, AP) - default does not
+ *
+ * Note: "States" always includes DC (District of Colombia)
+ *
+ * Usage examples:
+ *
+ * This is the default - case insensitive, no territories, no military zones
+ * stateInput: {
+ * caseSensitive: false,
+ * includeTerritories: false,
+ * includeMilitary: false
+ * }
+ *
+ * Only allow capital letters, no territories, no military zones
+ * stateInput: {
+ * caseSensitive: false
+ * }
+ *
+ * Case insensitive, include territories but not military zones
+ * stateInput: {
+ * includeTerritories: true
+ * }
+ *
+ * Only allow capital letters, include territories and military zones
+ * stateInput: {
+ * caseSensitive: true,
+ * includeTerritories: true,
+ * includeMilitary: true
+ * }
+ *
+ *
+ *
+ */
+
+$.validator.addMethod("stateUS", function(value, element, options) {
+ var isDefault = typeof options === "undefined",
+ caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
+ includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
+ includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
+ regex;
+
+ if (!includeTerritories && !includeMilitary) {
+ regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
+ } else if (includeTerritories && includeMilitary) {
+ regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
+ } else if (includeTerritories) {
+ regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
+ } else {
+ regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
+ }
+
+ regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
+ return this.optional(element) || regex.test(value);
+},
+"Please specify a valid state");
+
+// TODO check if value starts with <, otherwise don't try stripping anything
+$.validator.addMethod("strippedminlength", function(value, element, param) {
+ return $(value).text().length >= param;
+}, $.validator.format("Please enter at least {0} characters"));
+
+$.validator.addMethod("time", function(value, element) {
+ return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
+}, "Please enter a valid time, between 00:00 and 23:59");
+
+$.validator.addMethod("time12h", function(value, element) {
+ return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
+}, "Please enter a valid time in 12-hour am/pm format");
+
+// same as url, but TLD is optional
+$.validator.addMethod("url2", function(value, element) {
+ return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+}, $.validator.messages.url);
+
+/**
+ * Return true, if the value is a valid vehicle identification number (VIN).
+ *
+ * Works with all kind of text inputs.
+ *
+ * @example
+ * @desc Declares a required input element whose value must be a valid vehicle identification number.
+ *
+ * @name $.validator.methods.vinUS
+ * @type Boolean
+ * @cat Plugins/Validate/Methods
+ */
+$.validator.addMethod("vinUS", function(v) {
+ if (v.length !== 17) {
+ return false;
+ }
+
+ var LL = [ "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" ],
+ VL = [ 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 7, 9, 2, 3, 4, 5, 6, 7, 8, 9 ],
+ FL = [ 8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2 ],
+ rs = 0,
+ i, n, d, f, cd, cdv;
+
+ for (i = 0; i < 17; i++) {
+ f = FL[i];
+ d = v.slice(i, i + 1);
+ if (i === 8) {
+ cdv = d;
+ }
+ if (!isNaN(d)) {
+ d *= f;
+ } else {
+ for (n = 0; n < LL.length; n++) {
+ if (d.toUpperCase() === LL[n]) {
+ d = VL[n];
+ d *= f;
+ if (isNaN(cdv) && n === 8) {
+ cdv = LL[n];
+ }
+ break;
+ }
+ }
+ }
+ rs += d;
+ }
+ cd = rs % 11;
+ if (cd === 10) {
+ cd = "X";
+ }
+ if (cd === cdv) {
+ return true;
+ }
+ return false;
+}, "The specified vehicle identification number (VIN) is invalid.");
+
+$.validator.addMethod("zipcodeUS", function(value, element) {
+ return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
+}, "The specified US ZIP Code is invalid");
+
+$.validator.addMethod("ziprange", function(value, element) {
+ return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+
+}));
\ No newline at end of file
diff --git a/build/wwwroot/lib/jquery-validation/additional-methods.min.js b/build/wwwroot/lib/jquery-validation/additional-methods.min.js
new file mode 100644
index 00000000..b63c3ca1
--- /dev/null
+++ b/build/wwwroot/lib/jquery-validation/additional-methods.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):a(jQuery)}(function(a){!function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g="string"==typeof d?d.replace(/\s/g,"").replace(/,/g,"|"):"image/*",h=this.optional(c);if(h)return h;if("file"===a(c).attr("type")&&(g=g.replace(/\*/g,".*"),c.files&&c.files.length))for(e=0;ec;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number"),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number"),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a)},"Please specify a valid BIC code"),a.validator.addMethod("cifES",function(a){"use strict";var b,c,d,e,f,g,h=[];if(a=a.toUpperCase(),!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(d=0;9>d;d++)h[d]=parseInt(a.charAt(d),10);for(c=h[2]+h[4]+h[6],e=1;8>e;e+=2)f=(2*h[e]).toString(),g=f.charAt(1),c+=parseInt(f.charAt(0),10)+(""===g?0:parseInt(g,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(a)?(c+="",b=10-parseInt(c.charAt(c.length-1),10),a+=b,h[8].toString()===String.fromCharCode(64+b)||h[8].toString()===a.charAt(a.length-1)):!1},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return(10===c||11===c)&&(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;9>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;10>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:128&d?!0:!1},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=e?!0:c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d?!0:!1):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="";if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},g=h[c],"undefined"!=typeof g&&(i=new RegExp("^[A-Z]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("nieES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(a)?a[8]===/^[T]{1}[A-Z0-9]{8}$/.test(a):/^[XYZ]{1}/.test(a)?a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):/^[KLM]{1}/.test(a)?a[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),jQuery.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=e||"undefined"==typeof c.caseSensitive?!1:c.caseSensitive,g=e||"undefined"==typeof c.includeTerritories?!1:c.includeTerritories,h=e||"undefined"==typeof c.includeMilitary?!1:c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;17>b;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c " )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+ result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
+ if ( validator.submitButton ) {
+ // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ hidden.remove();
+ }
+ if ( result !== undefined ) {
+ return result;
+ }
+ return false;
+ }
+ return true;
+ }
+
+ // prevent submit for invalid forms or custom submit handlers
+ if ( validator.cancelSubmit ) {
+ validator.cancelSubmit = false;
+ return handle();
+ }
+ if ( validator.form() ) {
+ if ( validator.pendingRequest ) {
+ validator.formSubmitted = true;
+ return false;
+ }
+ return handle();
+ } else {
+ validator.focusInvalid();
+ return false;
+ }
+ });
+ }
+
+ return validator;
+ },
+ // http://jqueryvalidation.org/valid/
+ valid: function() {
+ var valid, validator, errorList;
+
+ if ( $( this[ 0 ] ).is( "form" ) ) {
+ valid = this.validate().form();
+ } else {
+ errorList = [];
+ valid = true;
+ validator = $( this[ 0 ].form ).validate();
+ this.each( function() {
+ valid = validator.element( this ) && valid;
+ errorList = errorList.concat( validator.errorList );
+ });
+ validator.errorList = errorList;
+ }
+ return valid;
+ },
+
+ // http://jqueryvalidation.org/rules/
+ rules: function( command, argument ) {
+ var element = this[ 0 ],
+ settings, staticRules, existingRules, data, param, filtered;
+
+ if ( command ) {
+ settings = $.data( element.form, "validator" ).settings;
+ staticRules = settings.rules;
+ existingRules = $.validator.staticRules( element );
+ switch ( command ) {
+ case "add":
+ $.extend( existingRules, $.validator.normalizeRule( argument ) );
+ // remove messages from rules, but allow them to be set separately
+ delete existingRules.messages;
+ staticRules[ element.name ] = existingRules;
+ if ( argument.messages ) {
+ settings.messages[ element.name ] = $.extend( settings.messages[ element.name ], argument.messages );
+ }
+ break;
+ case "remove":
+ if ( !argument ) {
+ delete staticRules[ element.name ];
+ return existingRules;
+ }
+ filtered = {};
+ $.each( argument.split( /\s/ ), function( index, method ) {
+ filtered[ method ] = existingRules[ method ];
+ delete existingRules[ method ];
+ if ( method === "required" ) {
+ $( element ).removeAttr( "aria-required" );
+ }
+ });
+ return filtered;
+ }
+ }
+
+ data = $.validator.normalizeRules(
+ $.extend(
+ {},
+ $.validator.classRules( element ),
+ $.validator.attributeRules( element ),
+ $.validator.dataRules( element ),
+ $.validator.staticRules( element )
+ ), element );
+
+ // make sure required is at front
+ if ( data.required ) {
+ param = data.required;
+ delete data.required;
+ data = $.extend( { required: param }, data );
+ $( element ).attr( "aria-required", "true" );
+ }
+
+ // make sure remote is at back
+ if ( data.remote ) {
+ param = data.remote;
+ delete data.remote;
+ data = $.extend( data, { remote: param });
+ }
+
+ return data;
+ }
+});
+
+// Custom selectors
+$.extend( $.expr[ ":" ], {
+ // http://jqueryvalidation.org/blank-selector/
+ blank: function( a ) {
+ return !$.trim( "" + $( a ).val() );
+ },
+ // http://jqueryvalidation.org/filled-selector/
+ filled: function( a ) {
+ return !!$.trim( "" + $( a ).val() );
+ },
+ // http://jqueryvalidation.org/unchecked-selector/
+ unchecked: function( a ) {
+ return !$( a ).prop( "checked" );
+ }
+});
+
+// constructor for validator
+$.validator = function( options, form ) {
+ this.settings = $.extend( true, {}, $.validator.defaults, options );
+ this.currentForm = form;
+ this.init();
+};
+
+// http://jqueryvalidation.org/jQuery.validator.format/
+$.validator.format = function( source, params ) {
+ if ( arguments.length === 1 ) {
+ return function() {
+ var args = $.makeArray( arguments );
+ args.unshift( source );
+ return $.validator.format.apply( this, args );
+ };
+ }
+ if ( arguments.length > 2 && params.constructor !== Array ) {
+ params = $.makeArray( arguments ).slice( 1 );
+ }
+ if ( params.constructor !== Array ) {
+ params = [ params ];
+ }
+ $.each( params, function( i, n ) {
+ source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
+ return n;
+ });
+ });
+ return source;
+};
+
+$.extend( $.validator, {
+
+ defaults: {
+ messages: {},
+ groups: {},
+ rules: {},
+ errorClass: "error",
+ validClass: "valid",
+ errorElement: "label",
+ focusCleanup: false,
+ focusInvalid: true,
+ errorContainer: $( [] ),
+ errorLabelContainer: $( [] ),
+ onsubmit: true,
+ ignore: ":hidden",
+ ignoreTitle: false,
+ onfocusin: function( element ) {
+ this.lastActive = element;
+
+ // Hide error label and remove error class on focus if enabled
+ if ( this.settings.focusCleanup ) {
+ if ( this.settings.unhighlight ) {
+ this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.hideThese( this.errorsFor( element ) );
+ }
+ },
+ onfocusout: function( element ) {
+ if ( !this.checkable( element ) && ( element.name in this.submitted || !this.optional( element ) ) ) {
+ this.element( element );
+ }
+ },
+ onkeyup: function( element, event ) {
+ // Avoid revalidate the field when pressing one of the following keys
+ // Shift => 16
+ // Ctrl => 17
+ // Alt => 18
+ // Caps lock => 20
+ // End => 35
+ // Home => 36
+ // Left arrow => 37
+ // Up arrow => 38
+ // Right arrow => 39
+ // Down arrow => 40
+ // Insert => 45
+ // Num lock => 144
+ // AltGr key => 225
+ var excludedKeys = [
+ 16, 17, 18, 20, 35, 36, 37,
+ 38, 39, 40, 45, 144, 225
+ ];
+
+ if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
+ return;
+ } else if ( element.name in this.submitted || element === this.lastElement ) {
+ this.element( element );
+ }
+ },
+ onclick: function( element ) {
+ // click on selects, radiobuttons and checkboxes
+ if ( element.name in this.submitted ) {
+ this.element( element );
+
+ // or option elements, check parent select in that case
+ } else if ( element.parentNode.name in this.submitted ) {
+ this.element( element.parentNode );
+ }
+ },
+ highlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName( element.name ).addClass( errorClass ).removeClass( validClass );
+ } else {
+ $( element ).addClass( errorClass ).removeClass( validClass );
+ }
+ },
+ unhighlight: function( element, errorClass, validClass ) {
+ if ( element.type === "radio" ) {
+ this.findByName( element.name ).removeClass( errorClass ).addClass( validClass );
+ } else {
+ $( element ).removeClass( errorClass ).addClass( validClass );
+ }
+ }
+ },
+
+ // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ setDefaults: function( settings ) {
+ $.extend( $.validator.defaults, settings );
+ },
+
+ messages: {
+ required: "This field is required.",
+ remote: "Please fix this field.",
+ email: "Please enter a valid email address.",
+ url: "Please enter a valid URL.",
+ date: "Please enter a valid date.",
+ dateISO: "Please enter a valid date ( ISO ).",
+ number: "Please enter a valid number.",
+ digits: "Please enter only digits.",
+ creditcard: "Please enter a valid credit card number.",
+ equalTo: "Please enter the same value again.",
+ maxlength: $.validator.format( "Please enter no more than {0} characters." ),
+ minlength: $.validator.format( "Please enter at least {0} characters." ),
+ rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
+ range: $.validator.format( "Please enter a value between {0} and {1}." ),
+ max: $.validator.format( "Please enter a value less than or equal to {0}." ),
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ },
+
+ autoCreateRanges: false,
+
+ prototype: {
+
+ init: function() {
+ this.labelContainer = $( this.settings.errorLabelContainer );
+ this.errorContext = this.labelContainer.length && this.labelContainer || $( this.currentForm );
+ this.containers = $( this.settings.errorContainer ).add( this.settings.errorLabelContainer );
+ this.submitted = {};
+ this.valueCache = {};
+ this.pendingRequest = 0;
+ this.pending = {};
+ this.invalid = {};
+ this.reset();
+
+ var groups = ( this.groups = {} ),
+ rules;
+ $.each( this.settings.groups, function( key, value ) {
+ if ( typeof value === "string" ) {
+ value = value.split( /\s/ );
+ }
+ $.each( value, function( index, name ) {
+ groups[ name ] = key;
+ });
+ });
+ rules = this.settings.rules;
+ $.each( rules, function( key, value ) {
+ rules[ key ] = $.validator.normalizeRule( value );
+ });
+
+ function delegate( event ) {
+ var validator = $.data( this.form, "validator" ),
+ eventType = "on" + event.type.replace( /^validate/, "" ),
+ settings = validator.settings;
+ if ( settings[ eventType ] && !$( this ).is( settings.ignore ) ) {
+ settings[ eventType ].call( validator, this, event );
+ }
+ }
+
+ $( this.currentForm )
+ .on( "focusin.validate focusout.validate keyup.validate",
+ ":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
+ "[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
+ "[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
+ "[type='radio'], [type='checkbox']", delegate)
+ // Support: Chrome, oldIE
+ // "select" is provided as event.target when clicking a option
+ .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+
+ if ( this.settings.invalidHandler ) {
+ $( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
+ }
+
+ // Add aria-required to any Static/Data/Class required fields before first validation
+ // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
+ $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
+ },
+
+ // http://jqueryvalidation.org/Validator.form/
+ form: function() {
+ this.checkForm();
+ $.extend( this.submitted, this.errorMap );
+ this.invalid = $.extend({}, this.errorMap );
+ if ( !this.valid() ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ }
+ this.showErrors();
+ return this.valid();
+ },
+
+ checkForm: function() {
+ this.prepareForm();
+ for ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) {
+ this.check( elements[ i ] );
+ }
+ return this.valid();
+ },
+
+ // http://jqueryvalidation.org/Validator.element/
+ element: function( element ) {
+ var cleanElement = this.clean( element ),
+ checkElement = this.validationTargetFor( cleanElement ),
+ result = true;
+
+ this.lastElement = checkElement;
+
+ if ( checkElement === undefined ) {
+ delete this.invalid[ cleanElement.name ];
+ } else {
+ this.prepareElement( checkElement );
+ this.currentElements = $( checkElement );
+
+ result = this.check( checkElement ) !== false;
+ if ( result ) {
+ delete this.invalid[ checkElement.name ];
+ } else {
+ this.invalid[ checkElement.name ] = true;
+ }
+ }
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !result );
+
+ if ( !this.numberOfInvalids() ) {
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+ return result;
+ },
+
+ // http://jqueryvalidation.org/Validator.showErrors/
+ showErrors: function( errors ) {
+ if ( errors ) {
+ // add items to error list and map
+ $.extend( this.errorMap, errors );
+ this.errorList = [];
+ for ( var name in errors ) {
+ this.errorList.push({
+ message: errors[ name ],
+ element: this.findByName( name )[ 0 ]
+ });
+ }
+ // remove items from success list
+ this.successList = $.grep( this.successList, function( element ) {
+ return !( element.name in errors );
+ });
+ }
+ if ( this.settings.showErrors ) {
+ this.settings.showErrors.call( this, this.errorMap, this.errorList );
+ } else {
+ this.defaultShowErrors();
+ }
+ },
+
+ // http://jqueryvalidation.org/Validator.resetForm/
+ resetForm: function() {
+ if ( $.fn.resetForm ) {
+ $( this.currentForm ).resetForm();
+ }
+ this.submitted = {};
+ this.lastElement = null;
+ this.prepareForm();
+ this.hideErrors();
+ var i, elements = this.elements()
+ .removeData( "previousValue" )
+ .removeAttr( "aria-invalid" );
+
+ if ( this.settings.unhighlight ) {
+ for ( i = 0; elements[ i ]; i++ ) {
+ this.settings.unhighlight.call( this, elements[ i ],
+ this.settings.errorClass, "" );
+ }
+ } else {
+ elements.removeClass( this.settings.errorClass );
+ }
+ },
+
+ numberOfInvalids: function() {
+ return this.objectLength( this.invalid );
+ },
+
+ objectLength: function( obj ) {
+ /* jshint unused: false */
+ var count = 0,
+ i;
+ for ( i in obj ) {
+ count++;
+ }
+ return count;
+ },
+
+ hideErrors: function() {
+ this.hideThese( this.toHide );
+ },
+
+ hideThese: function( errors ) {
+ errors.not( this.containers ).text( "" );
+ this.addWrapper( errors ).hide();
+ },
+
+ valid: function() {
+ return this.size() === 0;
+ },
+
+ size: function() {
+ return this.errorList.length;
+ },
+
+ focusInvalid: function() {
+ if ( this.settings.focusInvalid ) {
+ try {
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ .filter( ":visible" )
+ .focus()
+ // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focusin" );
+ } catch ( e ) {
+ // ignore IE throwing errors when focusing hidden elements
+ }
+ }
+ },
+
+ findLastActive: function() {
+ var lastActive = this.lastActive;
+ return lastActive && $.grep( this.errorList, function( n ) {
+ return n.element.name === lastActive.name;
+ }).length === 1 && lastActive;
+ },
+
+ elements: function() {
+ var validator = this,
+ rulesCache = {};
+
+ // select all valid inputs inside the form (no submit or reset buttons)
+ return $( this.currentForm )
+ .find( "input, select, textarea" )
+ .not( ":submit, :reset, :image, :disabled" )
+ .not( this.settings.ignore )
+ .filter( function() {
+ if ( !this.name && validator.settings.debug && window.console ) {
+ console.error( "%o has no name assigned", this );
+ }
+
+ // select only the first element for each name, and only those with rules specified
+ if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ return false;
+ }
+
+ rulesCache[ this.name ] = true;
+ return true;
+ });
+ },
+
+ clean: function( selector ) {
+ return $( selector )[ 0 ];
+ },
+
+ errors: function() {
+ var errorClass = this.settings.errorClass.split( " " ).join( "." );
+ return $( this.settings.errorElement + "." + errorClass, this.errorContext );
+ },
+
+ reset: function() {
+ this.successList = [];
+ this.errorList = [];
+ this.errorMap = {};
+ this.toShow = $( [] );
+ this.toHide = $( [] );
+ this.currentElements = $( [] );
+ },
+
+ prepareForm: function() {
+ this.reset();
+ this.toHide = this.errors().add( this.containers );
+ },
+
+ prepareElement: function( element ) {
+ this.reset();
+ this.toHide = this.errorsFor( element );
+ },
+
+ elementValue: function( element ) {
+ var val,
+ $element = $( element ),
+ type = element.type;
+
+ if ( type === "radio" || type === "checkbox" ) {
+ return this.findByName( element.name ).filter(":checked").val();
+ } else if ( type === "number" && typeof element.validity !== "undefined" ) {
+ return element.validity.badInput ? false : $element.val();
+ }
+
+ val = $element.val();
+ if ( typeof val === "string" ) {
+ return val.replace(/\r/g, "" );
+ }
+ return val;
+ },
+
+ check: function( element ) {
+ element = this.validationTargetFor( this.clean( element ) );
+
+ var rules = $( element ).rules(),
+ rulesCount = $.map( rules, function( n, i ) {
+ return i;
+ }).length,
+ dependencyMismatch = false,
+ val = this.elementValue( element ),
+ result, method, rule;
+
+ for ( method in rules ) {
+ rule = { method: method, parameters: rules[ method ] };
+ try {
+
+ result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
+
+ // if a method indicates that the field is optional and therefore valid,
+ // don't mark it as valid when there are no other rules
+ if ( result === "dependency-mismatch" && rulesCount === 1 ) {
+ dependencyMismatch = true;
+ continue;
+ }
+ dependencyMismatch = false;
+
+ if ( result === "pending" ) {
+ this.toHide = this.toHide.not( this.errorsFor( element ) );
+ return;
+ }
+
+ if ( !result || result === "false" ) {
+ this.formatAndAdd( element, rule );
+ return false;
+ }
+ } catch ( e ) {
+ if ( this.settings.debug && window.console ) {
+ console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e );
+ }
+ if ( e instanceof TypeError ) {
+ e.message += ". Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.";
+ }
+
+ throw e;
+ }
+ }
+ if ( dependencyMismatch ) {
+ return;
+ }
+ if ( this.objectLength( rules ) ) {
+ this.successList.push( element );
+ }
+ return true;
+ },
+
+ // return the custom message for the given element and validation method
+ // specified in the element's HTML5 data attribute
+ // return the generic message if present and no method specific message is present
+ customDataMessage: function( element, method ) {
+ return $( element ).data( "msg" + method.charAt( 0 ).toUpperCase() +
+ method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
+ },
+
+ // return the custom message for the given element name and validation method
+ customMessage: function( name, method ) {
+ var m = this.settings.messages[ name ];
+ return m && ( m.constructor === String ? m : m[ method ]);
+ },
+
+ // return the first defined argument, allowing empty strings
+ findDefined: function() {
+ for ( var i = 0; i < arguments.length; i++) {
+ if ( arguments[ i ] !== undefined ) {
+ return arguments[ i ];
+ }
+ }
+ return undefined;
+ },
+
+ defaultMessage: function( element, method ) {
+ return this.findDefined(
+ this.customMessage( element.name, method ),
+ this.customDataMessage( element, method ),
+ // title is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ method ],
+ "Warning: No message defined for " + element.name + " "
+ );
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule.method ),
+ theregex = /\$?\{(\d+)\}/g;
+ if ( typeof message === "function" ) {
+ message = message.call( this, rule.parameters, element );
+ } else if ( theregex.test( message ) ) {
+ message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
+ }
+ this.errorList.push({
+ message: message,
+ element: element,
+ method: rule.method
+ });
+
+ this.errorMap[ element.name ] = message;
+ this.submitted[ element.name ] = message;
+ },
+
+ addWrapper: function( toToggle ) {
+ if ( this.settings.wrapper ) {
+ toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
+ }
+ return toToggle;
+ },
+
+ defaultShowErrors: function() {
+ var i, elements, error;
+ for ( i = 0; this.errorList[ i ]; i++ ) {
+ error = this.errorList[ i ];
+ if ( this.settings.highlight ) {
+ this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.validClass );
+ }
+ this.showLabel( error.element, error.message );
+ }
+ if ( this.errorList.length ) {
+ this.toShow = this.toShow.add( this.containers );
+ }
+ if ( this.settings.success ) {
+ for ( i = 0; this.successList[ i ]; i++ ) {
+ this.showLabel( this.successList[ i ] );
+ }
+ }
+ if ( this.settings.unhighlight ) {
+ for ( i = 0, elements = this.validElements(); elements[ i ]; i++ ) {
+ this.settings.unhighlight.call( this, elements[ i ], this.settings.errorClass, this.settings.validClass );
+ }
+ }
+ this.toHide = this.toHide.not( this.toShow );
+ this.hideErrors();
+ this.addWrapper( this.toShow ).show();
+ },
+
+ validElements: function() {
+ return this.currentElements.not( this.invalidElements() );
+ },
+
+ invalidElements: function() {
+ return $( this.errorList ).map(function() {
+ return this.element;
+ });
+ },
+
+ showLabel: function( element, message ) {
+ var place, group, errorID,
+ error = this.errorsFor( element ),
+ elementID = this.idOrName( element ),
+ describedBy = $( element ).attr( "aria-describedby" );
+ if ( error.length ) {
+ // refresh error/success class
+ error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
+ // replace message on existing label
+ error.html( message );
+ } else {
+ // create error element
+ error = $( "<" + this.settings.errorElement + ">" )
+ .attr( "id", elementID + "-error" )
+ .addClass( this.settings.errorClass )
+ .html( message || "" );
+
+ // Maintain reference to the element to be placed into the DOM
+ place = error;
+ if ( this.settings.wrapper ) {
+ // make sure the element is visible, even in IE
+ // actually showing the wrapped element is handled elsewhere
+ place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
+ }
+ if ( this.labelContainer.length ) {
+ this.labelContainer.append( place );
+ } else if ( this.settings.errorPlacement ) {
+ this.settings.errorPlacement( place, $( element ) );
+ } else {
+ place.insertAfter( element );
+ }
+
+ // Link error back to the element
+ if ( error.is( "label" ) ) {
+ // If the error is a label, then associate using 'for'
+ error.attr( "for", elementID );
+ } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+ // If the element is not a child of an associated label, then it's necessary
+ // to explicitly apply aria-describedby
+
+ errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
+ // Respect existing non-error aria-describedby
+ if ( !describedBy ) {
+ describedBy = errorID;
+ } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ // Add to end of list if not already present
+ describedBy += " " + errorID;
+ }
+ $( element ).attr( "aria-describedby", describedBy );
+
+ // If this element is grouped, then assign to all elements in the same group
+ group = this.groups[ element.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group ) {
+ $( "[name='" + name + "']", this.currentForm )
+ .attr( "aria-describedby", error.attr( "id" ) );
+ }
+ });
+ }
+ }
+ }
+ if ( !message && this.settings.success ) {
+ error.text( "" );
+ if ( typeof this.settings.success === "string" ) {
+ error.addClass( this.settings.success );
+ } else {
+ this.settings.success( error, element );
+ }
+ }
+ this.toShow = this.toShow.add( error );
+ },
+
+ errorsFor: function( element ) {
+ var name = this.idOrName( element ),
+ describer = $( element ).attr( "aria-describedby" ),
+ selector = "label[for='" + name + "'], label[for='" + name + "'] *";
+
+ // aria-describedby should directly reference the error element
+ if ( describer ) {
+ selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ }
+ return this
+ .errors()
+ .filter( selector );
+ },
+
+ idOrName: function( element ) {
+ return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
+ },
+
+ validationTargetFor: function( element ) {
+
+ // If radio/checkbox, validate first element in group instead
+ if ( this.checkable( element ) ) {
+ element = this.findByName( element.name );
+ }
+
+ // Always apply ignore filter
+ return $( element ).not( this.settings.ignore )[ 0 ];
+ },
+
+ checkable: function( element ) {
+ return ( /radio|checkbox/i ).test( element.type );
+ },
+
+ findByName: function( name ) {
+ return $( this.currentForm ).find( "[name='" + name + "']" );
+ },
+
+ getLength: function( value, element ) {
+ switch ( element.nodeName.toLowerCase() ) {
+ case "select":
+ return $( "option:selected", element ).length;
+ case "input":
+ if ( this.checkable( element ) ) {
+ return this.findByName( element.name ).filter( ":checked" ).length;
+ }
+ }
+ return value.length;
+ },
+
+ depend: function( param, element ) {
+ return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ },
+
+ dependTypes: {
+ "boolean": function( param ) {
+ return param;
+ },
+ "string": function( param, element ) {
+ return !!$( param, element.form ).length;
+ },
+ "function": function( param, element ) {
+ return param( element );
+ }
+ },
+
+ optional: function( element ) {
+ var val = this.elementValue( element );
+ return !$.validator.methods.required.call( this, val, element ) && "dependency-mismatch";
+ },
+
+ startRequest: function( element ) {
+ if ( !this.pending[ element.name ] ) {
+ this.pendingRequest++;
+ this.pending[ element.name ] = true;
+ }
+ },
+
+ stopRequest: function( element, valid ) {
+ this.pendingRequest--;
+ // sometimes synchronization fails, make sure pendingRequest is never < 0
+ if ( this.pendingRequest < 0 ) {
+ this.pendingRequest = 0;
+ }
+ delete this.pending[ element.name ];
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
+ $( this.currentForm ).submit();
+ this.formSubmitted = false;
+ } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ this.formSubmitted = false;
+ }
+ },
+
+ previousValue: function( element ) {
+ return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
+ old: null,
+ valid: true,
+ message: this.defaultMessage( element, "remote" )
+ });
+ },
+
+ // cleans up all forms and elements, removes validator-specific events
+ destroy: function() {
+ this.resetForm();
+
+ $( this.currentForm )
+ .off( ".validate" )
+ .removeData( "validator" );
+ }
+
+ },
+
+ classRuleSettings: {
+ required: { required: true },
+ email: { email: true },
+ url: { url: true },
+ date: { date: true },
+ dateISO: { dateISO: true },
+ number: { number: true },
+ digits: { digits: true },
+ creditcard: { creditcard: true }
+ },
+
+ addClassRules: function( className, rules ) {
+ if ( className.constructor === String ) {
+ this.classRuleSettings[ className ] = rules;
+ } else {
+ $.extend( this.classRuleSettings, className );
+ }
+ },
+
+ classRules: function( element ) {
+ var rules = {},
+ classes = $( element ).attr( "class" );
+
+ if ( classes ) {
+ $.each( classes.split( " " ), function() {
+ if ( this in $.validator.classRuleSettings ) {
+ $.extend( rules, $.validator.classRuleSettings[ this ]);
+ }
+ });
+ }
+ return rules;
+ },
+
+ normalizeAttributeRule: function( rules, type, method, value ) {
+
+ // convert the value to a number for number inputs, and for text for backwards compability
+ // allows type="date" and others to be compared as strings
+ if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ value = Number( value );
+
+ // Support Opera Mini, which returns NaN for undefined minlength
+ if ( isNaN( value ) ) {
+ value = undefined;
+ }
+ }
+
+ if ( value || value === 0 ) {
+ rules[ method ] = value;
+ } else if ( type === method && type !== "range" ) {
+
+ // exception: the jquery validate 'range' method
+ // does not test for the html5 'range' type
+ rules[ method ] = true;
+ }
+ },
+
+ attributeRules: function( element ) {
+ var rules = {},
+ $element = $( element ),
+ type = element.getAttribute( "type" ),
+ method, value;
+
+ for ( method in $.validator.methods ) {
+
+ // support for in both html5 and older browsers
+ if ( method === "required" ) {
+ value = element.getAttribute( method );
+
+ // Some browsers return an empty string for the required attribute
+ // and non-HTML5 browsers might have required="" markup
+ if ( value === "" ) {
+ value = true;
+ }
+
+ // force non-HTML5 browsers to return bool
+ value = !!value;
+ } else {
+ value = $element.attr( method );
+ }
+
+ this.normalizeAttributeRule( rules, type, method, value );
+ }
+
+ // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
+ delete rules.maxlength;
+ }
+
+ return rules;
+ },
+
+ dataRules: function( element ) {
+ var rules = {},
+ $element = $( element ),
+ type = element.getAttribute( "type" ),
+ method, value;
+
+ for ( method in $.validator.methods ) {
+ value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+ this.normalizeAttributeRule( rules, type, method, value );
+ }
+ return rules;
+ },
+
+ staticRules: function( element ) {
+ var rules = {},
+ validator = $.data( element.form, "validator" );
+
+ if ( validator.settings.rules ) {
+ rules = $.validator.normalizeRule( validator.settings.rules[ element.name ] ) || {};
+ }
+ return rules;
+ },
+
+ normalizeRules: function( rules, element ) {
+ // handle dependency check
+ $.each( rules, function( prop, val ) {
+ // ignore rule when param is explicitly false, eg. required:false
+ if ( val === false ) {
+ delete rules[ prop ];
+ return;
+ }
+ if ( val.param || val.depends ) {
+ var keepRule = true;
+ switch ( typeof val.depends ) {
+ case "string":
+ keepRule = !!$( val.depends, element.form ).length;
+ break;
+ case "function":
+ keepRule = val.depends.call( element, element );
+ break;
+ }
+ if ( keepRule ) {
+ rules[ prop ] = val.param !== undefined ? val.param : true;
+ } else {
+ delete rules[ prop ];
+ }
+ }
+ });
+
+ // evaluate parameters
+ $.each( rules, function( rule, parameter ) {
+ rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
+ });
+
+ // clean number parameters
+ $.each([ "minlength", "maxlength" ], function() {
+ if ( rules[ this ] ) {
+ rules[ this ] = Number( rules[ this ] );
+ }
+ });
+ $.each([ "rangelength", "range" ], function() {
+ var parts;
+ if ( rules[ this ] ) {
+ if ( $.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ } else if ( typeof rules[ this ] === "string" ) {
+ parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ }
+ }
+ });
+
+ if ( $.validator.autoCreateRanges ) {
+ // auto-create ranges
+ if ( rules.min != null && rules.max != null ) {
+ rules.range = [ rules.min, rules.max ];
+ delete rules.min;
+ delete rules.max;
+ }
+ if ( rules.minlength != null && rules.maxlength != null ) {
+ rules.rangelength = [ rules.minlength, rules.maxlength ];
+ delete rules.minlength;
+ delete rules.maxlength;
+ }
+ }
+
+ return rules;
+ },
+
+ // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
+ normalizeRule: function( data ) {
+ if ( typeof data === "string" ) {
+ var transformed = {};
+ $.each( data.split( /\s/ ), function() {
+ transformed[ this ] = true;
+ });
+ data = transformed;
+ }
+ return data;
+ },
+
+ // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ addMethod: function( name, method, message ) {
+ $.validator.methods[ name ] = method;
+ $.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
+ if ( method.length < 3 ) {
+ $.validator.addClassRules( name, $.validator.normalizeRule( name ) );
+ }
+ },
+
+ methods: {
+
+ // http://jqueryvalidation.org/required-method/
+ required: function( value, element, param ) {
+ // check if dependency is met
+ if ( !this.depend( param, element ) ) {
+ return "dependency-mismatch"
+ }
+ if ( element.nodeName.toLowerCase() === "select" ) {
+ // could be an array for select-multiple or a string, both are fine this way
+ var val = $( element ).val();
+ return val && val.length > 0 ? "true" : "false"
+ }
+ if ( this.checkable( element ) ) {
+ return this.getLength( value, element ) > 0 ? "true" : "false"
+ }
+ return value.length > 0 ? "true" : "false"
+ },
+
+ // http://jqueryvalidation.org/email-method/
+ email: function( value, element ) {
+ // From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
+ // Retrieved 2014-01-14
+ // If you have a problem with this implementation, report a bug against the above spec
+ // Or use custom methods to implement your own email validation
+ return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
+ },
+
+ // http://jqueryvalidation.org/url-method/
+ url: function( value, element ) {
+
+ // Copyright (c) 2010-2013 Diego Perini, MIT licensed
+ // https://gist.github.com/dperini/729294
+ // see also https://mathiasbynens.be/demo/url-regex
+ // modified to allow protocol-relative URLs
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ },
+
+ // http://jqueryvalidation.org/date-method/
+ date: function( value, element ) {
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() )
+ },
+
+ // http://jqueryvalidation.org/dateISO-method/
+ dateISO: function( value, element ) {
+ return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
+ },
+
+ // http://jqueryvalidation.org/number-method/
+ number: function( value, element ) {
+ return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value )
+ },
+
+ // http://jqueryvalidation.org/digits-method/
+ digits: function( value, element ) {
+ return this.optional( element ) || /^\d+$/.test( value )
+ },
+
+ // http://jqueryvalidation.org/creditcard-method/
+ // based on http://en.wikipedia.org/wiki/Luhn_algorithm
+ creditcard: function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch"
+ }
+ // accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return "false"
+ }
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // http://developer.ean.com/general_info/Valid_Credit_Card_Types
+ if ( value.length < 13 || value.length > 19 ) {
+ return "false"
+ }
+
+ for ( n = value.length - 1; n >= 0; n--) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0? "true" : "false"
+ },
+
+ // http://jqueryvalidation.org/minlength-method/
+ minlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ return this.optional( element ) || length >= param;
+ },
+
+ // http://jqueryvalidation.org/maxlength-method/
+ maxlength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ return this.optional( element ) || length <= param;
+ },
+
+ // http://jqueryvalidation.org/rangelength-method/
+ rangelength: function( value, element, param ) {
+ var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
+ },
+
+ // http://jqueryvalidation.org/min-method/
+ min: function( value, element, param ) {
+ return this.optional( element ) || value >= param;
+ },
+
+ // http://jqueryvalidation.org/max-method/
+ max: function( value, element, param ) {
+ return this.optional( element ) || value <= param;
+ },
+
+ // http://jqueryvalidation.org/range-method/
+ range: function( value, element, param ) {
+ return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
+ },
+
+ // http://jqueryvalidation.org/equalTo-method/
+ equalTo: function( value, element, param ) {
+ // bind to the blur event of the target in order to revalidate whenever the target field is updated
+ // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+ var target = $( param );
+ if ( this.settings.onfocusout ) {
+ target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ $( element ).valid();
+ });
+ }
+ return value === target.val();
+ },
+
+ // http://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ var previous = this.previousValue( element ),
+ validator, data;
+
+ if (!this.settings.messages[ element.name ] ) {
+ this.settings.messages[ element.name ] = {};
+ }
+ previous.originalMessage = this.settings.messages[ element.name ].remote;
+ this.settings.messages[ element.name ].remote = previous.message;
+
+ param = typeof param === "string" && { url: param } || param;
+
+ if ( previous.old === value ) {
+ return previous.valid;
+ }
+
+ previous.old = value;
+ validator = this;
+ this.startRequest( element );
+ data = {};
+ data[ element.name ] = value;
+ $.ajax( $.extend( true, {
+ mode: "abort",
+ port: "validate" + element.name,
+ dataType: "json",
+ data: data,
+ context: validator.currentForm,
+ success: function( response ) {
+ var valid = response === true || response === "true",
+ errors, message, submitted;
+
+ validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ if ( valid ) {
+ submitted = validator.formSubmitted;
+ validator.prepareElement( element );
+ validator.formSubmitted = submitted;
+ validator.successList.push( element );
+ delete validator.invalid[ element.name ];
+ validator.showErrors();
+ } else {
+ errors = {};
+ message = response || validator.defaultMessage( element, "remote" );
+ errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ validator.invalid[ element.name ] = true;
+ validator.showErrors( errors );
+ }
+ previous.valid = valid;
+ validator.stopRequest( element, valid );
+ }
+ }, param ) );
+ return "pending";
+ }
+ }
+
+});
+
+// ajax mode: abort
+// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
+// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
+
+var pendingRequests = {},
+ ajax;
+// Use a prefilter if available (1.5+)
+if ( $.ajaxPrefilter ) {
+ $.ajaxPrefilter(function( settings, _, xhr ) {
+ var port = settings.port;
+ if ( settings.mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = xhr;
+ }
+ });
+} else {
+ // Proxy ajax
+ ajax = $.ajax;
+ $.ajax = function( settings ) {
+ var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
+ port = ( "port" in settings ? settings : $.ajaxSettings ).port;
+ if ( mode === "abort" ) {
+ if ( pendingRequests[port] ) {
+ pendingRequests[port].abort();
+ }
+ pendingRequests[port] = ajax.apply(this, arguments);
+ return pendingRequests[port];
+ }
+ return ajax.apply(this, arguments);
+ };
+}
+
+}));
\ No newline at end of file
diff --git a/build/wwwroot/lib/jquery-validation/jquery.validate.min.js b/build/wwwroot/lib/jquery-validation/jquery.validate.min.js
new file mode 100644
index 00000000..643837b9
--- /dev/null
+++ b/build/wwwroot/lib/jquery-validation/jquery.validate.min.js
@@ -0,0 +1,4 @@
+/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
+ * http://jqueryvalidation.org/
+ * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a(" ").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
\ No newline at end of file
diff --git a/build/wwwroot/web.config b/build/wwwroot/web.config
new file mode 100644
index 00000000..3b74d635
--- /dev/null
+++ b/build/wwwroot/web.config
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file