Skip to content

This is Cipher Libraries in Unity, include the AESCipher and RSACipher.

License

Notifications You must be signed in to change notification settings

TakuKobayashi/UnityCipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Test

UnityCipher

This is Cipher Libraries in Unity, include the AESCipher and RSACipher.

What is UnityCipher?

UnityCipher can be implemented AES encryption(Exactly, Rijndael cipher, not AES cryptography) and RSA encryption simply and high secure, in Unity(C#).

Install

  • If you want to download a unitypackage, you can download from Releases.

  • If you want use the UPM, you add below to Packages/manifest.json.

{
  "dependencies": {
    "net.taptappun.taku.kobayashi.unitycipher": "https://github.com/TakuKobayashi/UnityCipher.git?path=/Assets/UnityCipher",
    ...
  }
}

or input the url https://github.com/TakuKobayashi/UnityCipher.git?path=/Assets/UnityCipher to Add package from git URL (Window -> PackageManager like this.)

windowbar

packageManager

packageFromGitURL

giturl

Usage

For detail, look to UnityCipher/Examples/ And also, add using UnityCipher, you can use UnityCipher.

Use AES encryption

Encryption

You can encrypt it by calling the following method.

string encrypted = RijndaelEncryption.Encrypt(plainText, passwordText);

plainText can also use byte[] as well as string. If you use byte[], give the encritpted byte[], like this.

byte[] encrypted = RijndaelEncryption.Encrypt(plainBinary, passwordText);

Decryption

You can decrypt it by calling the following method.

string plainText = RijndaelEncryption.Decrypt(encryptedText, passwordText);

If you can successfully decrypt the encrypted one, you can get the decrypted one. plainText can also use byte[] as well as string. If you use byte[], give the decrypted byte[], like this.

byte[] plainBinary = RijndaelEncryption.Decrypt(encryptedBinary, passwordText);

About

This is Cipher Libraries in Unity, include the AESCipher and RSACipher.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages