中の技術日誌ブログ

C#とC++/CLIと
VBと.NETとWindowsで戯れる
 

目次

Blog 利用状況

ニュース

自己紹介

東京でソフトウェアエンジニアをやっています。
お仕事大募集中です。
記事執筆や、講師依頼とかでも何でもどうぞ(*^_^*)
似顔絵 MSMVPロゴ
MSMVP Visual C# Since 2004/04-2013/03

記事カテゴリ

書庫

日記カテゴリ

00-整理

01-MSMVP

個人情報を強力なパスワードで保護する

http://www.microsoft.com/japan/athome/security/privacy/password.mspx

パスワードをいかに長くすべきか、それが重要です。

そうもはやパスワードなんて言わずにパスフレーズというべきでしょう。

現在作成中のシステムでは

>>パスワードは、8文字以上出来るだけ長く入力してください。

というエラーメッセージを設定しています。

パスワードは長くすべきなのです。

ちなみにランダムなパスワードを生成するクラスを作ってみました。簡単だねぇ

using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography; 
   public static string GetPassword(int 桁数)
    {
      string 生成用文字列 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
      StringBuilder ReturnString = new StringBuilder();
      RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
      byte[] ランダムバイト = new byte[桁数];
      rng.GetBytes(ランダムバイト);
      foreach (byte val in ランダムバイト)
      {
        int rand = Convert.ToInt32(val);
        ReturnString.Append(生成用文字列[rand % 生成用文字列.Length ]);
      }
      return ReturnString.ToString();
    }

投稿日時 : 2006年5月10日 15:38

コメントを追加

# re: Internet Explorer 11 で、右クリックしたときに表示されるメニューで、Bingではなく、Google をデフォルトの検索エンジンとして設定するには? 2017/12/08 18:12 meadc

http://www.nfl-shop.co nfl store
http://www.nike-chaussures.fr/ Air Max TN Homme
http://www.culinar-hannover.de/ Nike Air Force
http://www.pradahandbags.co prada handbags
http://www.burberry-outletsale.us/ burberry outlet sale store
me adc12.8

タイトル
名前
URL
コメント