sign(data, SHA256withRSA) != sign(hash, NONEwithRSA)

Quite funny that after a few months offline I find the fun in writing a small article about an investigation which is still about security. My task was to find how I could replicate the signature performed with an old applet and a proprietary library which used a hardware token in javascript using a new api provided by a different party. The old applet just signed a hash and I had to find the way to implement this with the new api....

April 19, 2019 · len

The dark side of the force

I have been spending a lot of time lately working on a new javascript based interface. As with any js project we ended up with a lot of layers. For instance for a simple numeric input there are: the html input the kendo numerictextbox the aurelia-kendo-bridge wrapper our own wrapper to allow for some level of DRY The fun part is that we needed of course some functionality which did not existed in the kendo component (adding support for financial shortcuts: 10k => 10,000)....

December 22, 2016 · len

A few thoughts about http fetch

Fetch is the “de facto” standard now if building a new javascript code. Even if not yet supported by all browsers it is warmly recommended. There are numerous examples of usage but after reading a lot of them most of them seemed to miss the answer to my questions. These where: how to proper do error handling including having a default error handler which can be overriden how to do http POST?...

December 22, 2016 · len

Dynamic Aurelia

From someone used to developing in a “traditional” way, switching to a javascript framework is like crossing over to a different universe where the laws of physics do not really apply. They might seem similar but they’re not. Take inheritance for instance, the foundation stone of OOP and throw it down the drain. No more inheritance, everything is composition right now. Yet in time you will learn the new laws and adapt....

September 9, 2016 · len

Update NumericTextBox precision on the fly

As currency selection changed you naturally want to change the precision and format of a NumericTextBox which contains an amount in the given currency (damn JPY for not using the same precision as everyone else). At a first glance one might think this can be accomplished using computed properties and something like: <pre lang="javascript"> @bindable precision:number = 2; @computedFrom('precision') get step():number { return Math.pow(10, - this.precision); } @computedFrom('precision') get format():string { return "n" + this....

August 23, 2016 · len

Dispatch change events in custom components

This is the first post about Aurelia and the Kendo-UI-Bridge. It’s a brave new world for me. The goal was to create a custom component (which wraps a ak-combobox) and dispatch a change event in a similar way to the standard components (i.e ak-combobox, ak-datepicker, etc.). <pre lang="html"> <input ak-datepicker="k-value.two-way: model.date" k-on-change.delegate="onChange($event)"></input> For these components, the change event is dispatched after the model changes. In my component code I had initially wrapped the k-on-change from the base component and continued dispatching it....

August 10, 2016 · len

One week in JavaScript Hell

(or how one must lose all assumptions while starting to use JavaScript) For the past 8 years I’ve worked most of my time on a large ERP system. It was a lot of work and it’s a real system, a system used each day by thousands of people. Yet it is quickly becoming un-sell-able. One would think after almost 4k fixed bugs and years of improvements, the system works pretty well, it might be right, yet this argument fails in front of marketing arguments....

August 7, 2016 · len

Frame sketcher, the model

If someone had asked me some time ago about bicycle frame geometry I would have answer simply in terms of 19”, 20” for MTB or 56, 58 for a road bike. I was of course aware of basic measurements such as Top Tube length or Standover Height and have passed a few times my measurements through a fit calculator but I haven’t given much thought from a geometric, or trigonometric to be more precise, point of view....

November 18, 2012 · len

Frame sketcher, introduction

I am searching for a new bicycle. Partly as a gift to one self, partly to make sure if the current one fails I will not be under pressure to buy one fast. As such I have done a lot of research into the subject. One of the elements I have found is that I could achieve a better price/quality ration buying online especially from German based online shops. This poses a big problem on testing since frame geometry differs a lot from manufacturer to manufacturer....

November 13, 2012 · len

Enhancing a web application with jquery

I’ve decided to use jquery for the first time in order to implement in the simplest possible way the following problem The problem I wanted to use an existing search/navigation mechanism to select the value of a new input field by making as little modifications as possible to the existing code. Since searching for the item implied navigating a few pages passing information along all the submits or links was impossible without extensive changes....

February 27, 2009 · len