Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class SHA1 : MonoBehaviour
- {
- // Use this for initialization
- void Start()
- {
- var input = "cheese";
- var result = "";
- System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
- byte[] bytes = encoding.GetBytes(input);
- var sha = new System.Security.Cryptography.SHA1CryptoServiceProvider();
- // This is one implementation of the abstract class SHA1.
- result = System.BitConverter.ToString(sha.ComputeHash(bytes));
- print(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement