Wednesday, January 15, 2014

Working with SecureString class and passwords in .net framework

Working with apps connected to DataBases I almost always use a class to manage all connections and queries to database (avoiding saving passwords in strings). To avoid saving passwords in memory we use class SecureString [System.Security.SecureString].

A very important topic is SecureString implements CriticalFinalizerObject, this means SecureString is considered a "Constrained Execution Region - CER". Out-of-band exceptions are forbidden in CER-type regions and this way we avoid non executed code. Very important: SecureString is not managed code and is our responsability to free that resource.


Using SecureString:

In this example we use SecureString with get & set properties.



Original: http://lambdabox.blogspot.com/2011/10/securestring-almacenar-contrasenas-en.html

Friday, December 20, 2013

MDI forms in .net using C# and Visual Studio 2010 Express

There are two kinds of forms:
SDI (Single Document Interface)
MDI (Multiple Document Interface)

We are interested in MDI forms. MDI forms allow us to contain children form between.

Steps:

As 1st step, we create a new project (Windows application).

In main form, set property IsMdiContainer to True (See example)


main form, click to enlarge

Now we create our child form and it works as a form template to create multiple children form. This example tries to simulate a simple text editor and with MDI support.

We add a second form to our project.

We add a panel to our form (this panel will contain a "Save" button) and it is located at bottom. Set Dock Property to Bottom.

Set Dock property to Bottom
Now we add a 2nd panel to our form (this panel will contain a text box). Set this panel´s property Dock to Fill.


In 2nd panel set Dock property to Fill


We add a textBox inside 2dn panel and set it these properties:
Name = txtBoxContent
Multiline = True
Dock = Fill





Now we can add a button to save current working for our text editor. This button will be placed at bottom panel. And we have a form like this:

This child form works as a template form

It is time to create a menu to handle our children forms (from main form).

Notice that option "Lista ->" does not have any sub-element, this due we will create all our children windows in run time.


.

Monday, November 9, 2009

Ganadores del concurso Blogit.ms

Por fin ha salido la lista de los ganadores del concurso organizado por Microsoft "blogit.ms", para todos aquellos que seguimos el concurso de cerca, podemos ver la lista de los ganadores en el siguiente enlace:

lista de ganadores

Felicidades a los ganadores!!!!

Thursday, October 29, 2009

Implementing fingerprint readers in .net - Part one

In this post, we will see the basics for implementing a fingerprint reader to secure the access to our applications; we need a fingerprint reader (it can be Microsoft), the Griaulle Fingerprint SDK and a database.






As a first step, we need a biometric sample in a digital format (this is the fingerprint reader's job) to store into the database, lately we are going to extract the important information from this sample and get a "template".


To compare a template against another template, we can do it in two ways:


Verify: in this case, we take a template and compare it against another one (1:1), the templates can be stored in our database.


Identify: in this case, our template is compared against another ones (1:n).


Sunday, May 31, 2009

The New York Times > Technology Webslice

Visita la versión en español de esta entrada

On this post, I'm offering a Webslice for being up to date on Technology news.

Due to Security-related aspects, you can't get a suscription for the webslice from this server.

Get the webslice here.

Important: The webslice only works on Internet Explorer 8 and Mozilla Firefox with the Webchunks add-on.

Anyway, here you have the news:

Saturday, May 30, 2009

Microsoft plans to offer an anti-malware solution





The redmon guys have decided Improve even more their's OS security and (of course) improve (too) the user's experience. How are they gonna do it? offering a new profesional antivirus on their OS.

Code-named morro probably is gonna appear on the second half of 2009 and is gonna replace OneCare. Morro will be designed to work with a few resources (and that's great!!!)

Maybe the best technique is to build a secure OS from core.

The first post

This blog is about computer security and is the English version of http://topicos-seguridad.blogspot.com.


Stay in Touch