...
 
Commits (2)
......@@ -8,7 +8,9 @@ Only Android is supported at this time.
`tns plugin add libsodium-nativescript`
For Android - libsodium-jni requires the following changes to your AndroidManifest.xml
For Android - libsodium-jni requires either disallowing backend or making the following changes to your AndroidManifest.xml
*Don't use backup if you are storing secret keys as they would also get backed up*
- Add `tools:replace="android:allowBackup"` as an attribute to the application tag.
- Add `xmlns:tools="http://schemas.android.com/tools"` asn an attribute to the manifest tag.
......
This diff is collapsed.
......@@ -54,12 +54,6 @@ export declare class Common {
static readonly crypto_pwhash_OPSLIMIT_SENSITIVE: number;
static readonly crypto_pwhash_SALTBYTES: number;
static readonly crypto_pwhash_STRBYTES: number;
static readonly crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE: number;
static readonly crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE: number;
static readonly crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE: number;
static readonly crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE: number;
static readonly crypto_pwhash_scryptsalsa208sha256_SALTBYTES: number;
static readonly crypto_pwhash_scryptsalsa208sha256_STRBYTES: number;
static readonly crypto_scalarmult_BYTES: number;
static readonly crypto_scalarmult_SCALARBYTES: number;
static readonly crypto_secretbox_KEYBYTES: number;
......
......@@ -103,8 +103,8 @@ export class Common {
return this.Uint8ArrayToJavaByteArray(jsBytes);
}
/** Remove excess 0 bytes from Java array. libsodium requires you to know the original message length
* when decrypting. However libsodium.js doesn't force you to know this. So we just make it extra big and
/** Remove excess 0 bytes from Java array. libsodium requires you to know the original message length
* when decrypting. However libsodium.js doesn't force you to know this. So we just make it extra big and
* trim the excess 0's. If you know a better way please let us know.
*/
private static trimJavaBytes(input: JavaBytes): JavaBytes {
......@@ -209,12 +209,6 @@ export class Common {
public static get crypto_pwhash_OPSLIMIT_SENSITIVE() { return Sodium.crypto_pwhash_opslimit_sensitive(); }
public static get crypto_pwhash_SALTBYTES() { return Sodium.crypto_pwhash_saltbytes(); }
public static get crypto_pwhash_STRBYTES() { return Sodium.crypto_pwhash_strbytes(); }
public static get crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE() { return Sodium.crypto_pwhash_scryptsalsa208sha256_memlimit_interactive(); }
public static get crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE() { return Sodium.crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive(); }
public static get crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE() { return Sodium.crypto_pwhash_scryptsalsa208sha256_opslimit_interactive(); }
public static get crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE() { return Sodium.crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive(); }
public static get crypto_pwhash_scryptsalsa208sha256_SALTBYTES() { return Sodium.crypto_pwhash_scryptsalsa208sha256_saltbytes(); }
public static get crypto_pwhash_scryptsalsa208sha256_STRBYTES() { return Sodium.crypto_pwhash_scryptsalsa208sha256_strbytes(); }
public static get crypto_scalarmult_BYTES() { return Sodium.crypto_scalarmult_bytes(); }
public static get crypto_scalarmult_SCALARBYTES() { return Sodium.crypto_scalarmult_scalarbytes(); }
public static get crypto_secretbox_KEYBYTES() { return Sodium.crypto_secretbox_keybytes(); }
......
{
"name": "nativescript-libsodium",
"version": "1.0.1",
"version": "1.0.3",
"description": "Use libsodium in Nativescript with libsodium.js like wrappers.",
"main": "libsodium",
"typings": "index.d.ts",
......