http://computertriksno1.blogspot.in/

Security token Key Generagor in C#

2 Aug 2013 20 comments

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace XSLT_Demo
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string TokenKey = uniqueTokenKey();
            Response.Write("Unredable : " + TokenKey + "<br />");
            Response.Write("..Redable : " + ReaduniqueTokenKey(TokenKey) + "<br />");
        }


        private string uniqueTokenKey()
        {
            Random rnd = new Random();
            byte[] bytes = new byte[32];
            rnd.NextBytes(bytes);
            string myRndID = BitConverter.ToString(bytes);
            string[] myRndIDarr = myRndID.Split('-');

            string datekey = "";
            datekey = DateTime.Now.ToString("{.1}");
            string rekey = "";
            for (int i = datekey.Length; i > 0; i--)
            {
                rekey += datekey.Substring(i - 1, 1);
            }
            string[] Keyarr = rekey.Split('-');


            string finalkey = "";
            for (int i = 0; i < Keyarr.Length; i++)
            {
                finalkey += myRndIDarr[i] + "-" + myRndIDarr[i + 1] + "-" + Keyarr[i] + "" + "-";
            }

            return finalkey.Replace("-", "");
        }


        private string ReaduniqueTokenKey(string key)
        {
            string rekey = "";
            rekey = key.Substring(42, 3) + ":" + key.Substring(36, 2) + ":" + key.Substring(12, 2) + ":" + key.Substring(18, 2) + ":" + key.Substring(24, 2) + ":" + key.Substring(30, 2) + ":" + key.Substring(4, 4);
            string readablevalue = "";

            for (int i = rekey.Length; i > 0; i--)
            {
                readablevalue += rekey.Substring(i - 1, 1);
            }

            return readablevalue;
        }

    }
}






{.1}                         fff-ss-MM-dd-hh-mm-yyyy
Share this article :

+ comments + 20 comments

23 August 2013 at 21:13

You can watch on YouTube => Click Here

!!!Demo!!! http://www.hackdonor.com/ ~ Learn Complete Hacking Tricks and Free Download Full Version Softwares.
!!!Demo!!!

Anonymous
25 July 2014 at 12:01

You can watch on YouTube => Click Here

!!!Demo!!! I have been browsing online greater than three hours lately, yet I by no means found any interesting article like
yours. It's lovely price sufficient for me. In my view, if all webmasters and bloggers
made just right content as you probably did, the web might be a lot more
useful than ever before.

Feel free to surf to my web site: money making blogs !!!Demo!!!

Anonymous
25 July 2014 at 17:38

You can watch on YouTube => Click Here

!!!Demo!!! Fascinating blog! Is your theme custom made or did you download it from somewhere?

A theme like yours with a few simple tweeks would really make my blog stand out.
Please let me know where you got your theme. Appreciate it

my weblog ... make free blog !!!Demo!!!

Anonymous
2 August 2014 at 10:23

You can watch on YouTube => Click Here

!!!Demo!!! I am genuinely glad to glance at this weblog posts which consists of plenty
of helpful facts, thanks for providing these data.


Check out my web site: make up blog !!!Demo!!!

Anonymous
13 August 2014 at 10:07

You can watch on YouTube => Click Here

!!!Demo!!! Great delivery. Sound arguments. Keep up the good work.


Also visit my blog post :: small carpet cleaner !!!Demo!!!

Anonymous
14 August 2014 at 22:44

You can watch on YouTube => Click Here

!!!Demo!!! Hello to all, how is everything, I think
every one is getting more from this web page, and your views are good in support of new
viewers.

Here is my homepage :: buy a house uk !!!Demo!!!

Anonymous
15 August 2014 at 07:52

You can watch on YouTube => Click Here

!!!Demo!!! We're a group of volunteers and opening a new scheme in our community.

Your website offered us with valuable information to work on. You've done a
formidable job and our entire community will be thankful to you.


My webpage engines work !!!Demo!!!

Anonymous
21 August 2014 at 17:50

You can watch on YouTube => Click Here

!!!Demo!!! This is the right webpage for everyone who wants to understand this topic.
You realize a whole lot its almost tough to argue with you (not
that I really will need to…HaHa). You definitely put a new spin on a subject which has been discussed for ages.
Great stuff, just great!

Here is my website: various search !!!Demo!!!

Anonymous
30 August 2014 at 20:56

You can watch on YouTube => Click Here

!!!Demo!!! I got this web site from my buddy who shared with me concerning
this web site aand now this time I am visiting this website annd reading very informative content at this time.


Take a look at my web site; Las Vegas Kitchen Appliance Service !!!Demo!!!

Anonymous
6 September 2014 at 19:42

You can watch on YouTube => Click Here

!!!Demo!!! Excellent blog here! Also your site loads up very
fast! What host are you using? Can I get your affiliate link to
your host? I wish my website loaded up as fast
as yours lol

Also visit my web blog; top blogging sites !!!Demo!!!

Anonymous
7 September 2014 at 20:22

You can watch on YouTube => Click Here

!!!Demo!!! Nice post. I was checking continuously this blog and I'm
impressed! Very helpful information specially the last section :) I handle such information a lot.
I used to be looking for this particular information for
a very lengthy time. Thank you and best of luck.

My weblog :: jeux black jack estrie !!!Demo!!!

Anonymous
15 September 2014 at 05:02

You can watch on YouTube => Click Here

!!!Demo!!! I have been browsing on-line greater than three hours today,
yet I by no means found any attention-grabbing article like yours.
It's lovely price enough for me. In my view, if all site owners and bloggers made
just right content as you probably did, the net will likely be a lot more useful than ever
before.

Also visit my web site :: déménageurs !!!Demo!!!

Anonymous
15 September 2014 at 23:14

You can watch on YouTube => Click Here

!!!Demo!!! When someone writes an article he/she keeps the idea of a user in his/her mind that how a user can be aware of it.
Therefore that's why this article is perfect. Thanks!



Feel free to surf to my homepage; online blogging !!!Demo!!!

Anonymous
16 September 2014 at 03:04

You can watch on YouTube => Click Here

!!!Demo!!! great post, very informative. I wonder why the other experts
of this sector do not notice this. You must continue your writing.
I am confident, you have a great readers' base already!


Here is my homepage - otakv.Tumblr.com !!!Demo!!!

Anonymous
16 September 2014 at 13:37

You can watch on YouTube => Click Here

!!!Demo!!! I think everything typed made a great deal of
sense. However, think on this, what if you typed a catchier post title?

I ain't suggesting your information isn't good., but suppose
you added a post title to maybe get people's attention? I mean "Security token Key Generagor in C#" is kinda vanilla.
You could glance at Yahoo's front page and see how they write article titles to grab
people to click. You might add a video or a related pic or two to
get people excited about everything've written. Just my opinion,
it might bring your posts a little bit more interesting.


Also visit my homepage ... Telephone Demenagement Martin !!!Demo!!!

Anonymous
17 September 2014 at 17:39

You can watch on YouTube => Click Here

!!!Demo!!! I have read so many articles on the topic of the blogger lovers but this paragraph is genuinely
a good post, keep it up.

Also visit my homepage ... The Easy French !!!Demo!!!

Anonymous
20 September 2014 at 15:43

You can watch on YouTube => Click Here

!!!Demo!!! Great article! We are linking to this great content on our
site. Keep up the good writing.

My webpage - cie Demenagement Martin !!!Demo!!!

Anonymous
24 September 2014 at 08:32

You can watch on YouTube => Click Here

!!!Demo!!! This is very interesting, You are a very skilled blogger.
I have joined your feed and look forward to seeking more of your magnificent post.
Also, I've shared your site in my social networks!


My page; seo copywriting !!!Demo!!!

Anonymous
24 September 2014 at 13:03

You can watch on YouTube => Click Here

!!!Demo!!! I am curious to find out what blog platform you have been working with?
I'm experiencing some minor security issues with my latest blog and I would like to find something
more safeguarded. Do you have any recommendations?


Also visit my web-site - Demenagement Martin Sherbrooke !!!Demo!!!

Anonymous
26 September 2014 at 16:20

You can watch on YouTube => Click Here

!!!Demo!!! I truly love your website.. Very nice colors & theme. Did you make this website yourself?
Please reply back as I'm trying to create my own site and want to find out where you got this
from or just what the theme is called. Many thanks!


Here is my website - best reiki business !!!Demo!!!

Post a Comment

 
Support : GDDon | Creating Website | Gddon |
Copyright © 2013. Computer Tricks and Tips for System - All Rights Reserved
Template Created by Creating Website Modify by GDDon.Com
Proudly powered by Blogger