scrt-link-core
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -8,2 +8,8 @@ # Change Log | ||
## [0.1.8] - 2017-07-24 | ||
### Fixed | ||
- Missing exports | ||
## [0.1.7] - 2017-07-24 | ||
@@ -10,0 +16,0 @@ |
@@ -0,1 +1,2 @@ | ||
import { encryptMessage, decryptMessage, generateAlias, generateEncryptionKey } from "./utils"; | ||
import { CreateSecretOptions, SecretUrlFields } from "./types"; | ||
@@ -8,2 +9,3 @@ export declare const createSecret: (message: string, options?: CreateSecretOptions, baseUrl?: string) => Promise<{ | ||
export declare const retrieveSecret: (alias: string, decryptionKey: string, baseUrl?: string) => Promise<Partial<SecretUrlFields>>; | ||
export { encryptMessage, decryptMessage, generateAlias, generateEncryptionKey }; | ||
declare const _default: { | ||
@@ -10,0 +12,0 @@ createSecret: (message: string, options?: CreateSecretOptions, baseUrl?: string) => Promise<{ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.retrieveSecret = exports.createSecret = void 0; | ||
exports.generateEncryptionKey = exports.generateAlias = exports.decryptMessage = exports.encryptMessage = exports.retrieveSecret = exports.createSecret = void 0; | ||
const tslib_1 = require("tslib"); | ||
const constants_1 = require("./constants"); | ||
const utils_1 = require("./utils"); | ||
Object.defineProperty(exports, "encryptMessage", { enumerable: true, get: function () { return utils_1.encryptMessage; } }); | ||
Object.defineProperty(exports, "decryptMessage", { enumerable: true, get: function () { return utils_1.decryptMessage; } }); | ||
Object.defineProperty(exports, "generateAlias", { enumerable: true, get: function () { return utils_1.generateAlias; } }); | ||
Object.defineProperty(exports, "generateEncryptionKey", { enumerable: true, get: function () { return utils_1.generateEncryptionKey; } }); | ||
const createSecret = (message, options = {}, baseUrl = constants_1.baseUrl) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { | ||
@@ -8,0 +12,0 @@ const { alias = utils_1.generateAlias(), encryptionKey = utils_1.generateEncryptionKey(), password, secretType = "text", neogramDestructionMessage = "This message will self-destruct in…", neogramDestructionTimeout = 3, receiptEmail, receiptPhoneNumber, } = options; |
@@ -41,3 +41,2 @@ "use strict"; | ||
const hash = createHash(encryptionKey); | ||
console.log(hash); | ||
return crypto_js_1.AES.encrypt(message, hash).toString(); | ||
@@ -44,0 +43,0 @@ }; |
{ | ||
"name": "scrt-link-core", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "Core for scrt.link - a tool to securely share sensitive information online.", | ||
@@ -5,0 +5,0 @@ "author": "Chris Chiller <kingchiller@gmail.com>", |
@@ -87,2 +87,4 @@ import { baseUrl as defaultBaseUrl } from "./constants"; | ||
export { encryptMessage, decryptMessage, generateAlias, generateEncryptionKey }; | ||
export default { | ||
@@ -89,0 +91,0 @@ createSecret, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1706209
1603