Skip to content

Commit

Permalink
enhanced types to make encryption libs accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
konsultaner committed Jan 11, 2019
1 parent 75449fd commit 2ef4862
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 22 additions & 1 deletion dist/secure-ls.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
export = SecureLS;

import * as LZString from 'lz-string';
import {CipherHelper, Encoder} from 'crypto-js';

declare class SecureLS {
constructor(config?: { isCompression?: boolean, encodingType?: string, encryptionSecret?: string , encryptionNamespace?: string });
getEncryptionSecret(): string;
Expand All @@ -15,6 +18,24 @@ declare class SecureLS {
processData(data: any | string, isAllKeysData: boolean): string;
setMetaData(): void;
getMetaData(): { keys: string[] };

_name: 'secure-ls';
Base64: SecureLS.Base64;
LZString: LZString.LZStringStatic;
AES: CipherHelper;
DES: CipherHelper;
RABBIT: CipherHelper;
RC4: CipherHelper;
enc: {
Latin1: Encoder;
_Utf8: Encoder;
};
}

declare namespace SecureLS{}
declare namespace SecureLS{
interface Base64 {
_keyStr: string;
encode(e: string);
decode(e: string);
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls"
},
"devDependencies": {
"@types/crypto-js": "^3.1.43",
"@types/lz-string": "^1.3.32",
"babel": "6.3.13",
"babel-core": "6.1.18",
"babel-eslint": "5.0.0",
Expand Down

0 comments on commit 2ef4862

Please sign in to comment.