티스토리 뷰
using System.Security.Cryptography;
while ( true )
{
SHA1 sha = new SHA1CryptoServiceProvider();
string hashInput = Console.ReadLine();
if ( hashInput == "exit " ) break;
Console.WriteLine( "INPUT:" + hashInput );
byte[] shaSetter = Encoding.ASCII.GetBytes(hashInput);
byte[] res = sha.ComputeHash( shaSetter );
//Console.WriteLine( "OUT:" + res.ToString() );
Console.WriteLine( "Base64 Encoding : " + Convert.ToBase64String( res ) );
Console.WriteLine( "ASCII Encoding : \n" + Encoding.ASCII.GetString( res ) );
}
https://www.dotnetperls.com/convert-string-byte-array
http://www.hanbit.co.kr/network/category/category_view.html?cms_code=CMS5861764437
MDSN에도 잘 있어요 !
'C#' 카테고리의 다른 글
코루틴 (0) | 2016.12.20 |
---|---|
CSV to Json, JsonParser, logcat (0) | 2016.12.12 |
[Unity C#] 기기 로케일 가져오기 (0) | 2016.12.12 |
[C#] SHA1 MD5 암호화 기법 간단하고 강력하게 !* (0) | 2016.10.07 |
[Unity C#] Unity Inspector Customize (0) | 2016.10.07 |