https://github.com/m1ga/ti-crypt
Asymmetric Encryption with RSA (private/public key)
https://github.com/m1ga/ti-crypt
android encryption titanium-mobile titanium-module
Last synced: about 1 month ago
JSON representation
Asymmetric Encryption with RSA (private/public key)
- Host: GitHub
- URL: https://github.com/m1ga/ti-crypt
- Owner: m1ga
- Created: 2015-09-13T12:48:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-01-04T15:47:00.000Z (over 3 years ago)
- Last Synced: 2025-03-29T01:13:04.485Z (about 2 months ago)
- Topics: android, encryption, titanium-mobile, titanium-module
- Language: Java
- Homepage:
- Size: 107 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Asymmetric Encryption with RSA for Titanium (Android)
iOS Version: https://github.com/moritzknecht/TiRSA
## RSA Example:
```javascript
var crypt = require("miga.ticrypt");
var keypair = crypt.generateKeyPair();console.log("Pub: " + keypair.publicKey);
console.log("Priv: " + keypair.privateKey);var txt = crypt.encode({
plainText: "test text",
publicKey: keypair.publicKey
});
console.log("Encode: " + txt);var txt_decode = crypt.decode({
cipherText: txt,
privateKey: keypair.privateKey
});console.log("Decode: " + txt_decode);
$.index.open();
```
## AES Example:
```javascript
let crypt = require("miga.ticrypt");
let aesCrypto = crypt.createCryptoAES();
let aesKey = aesCrypto.generateKey();
console.log("AES key: " + aesKey);
let txt = aesCrypto.crypt(aesKey, "test text");
console.log("AES Encode: " + txt);let txt_decode = aesCrypto.decrypt(txt, aesKey);
console.log("AES Decode: " + txt_decode);
```## Contributions:
* blacktiago (https://github.com/blacktiago)