cryptographyjs
Advanced tools
Comparing version 1.0.9 to 1.0.10
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var random_1 = require("./helpers/random"); | ||
var index_1 = require("./helpers/index"); | ||
var xor_1 = require("./xor"); | ||
var caesar = new xor_1.XorCypher(index_1.latinAlphabet); | ||
var helpers_1 = require("helpers"); | ||
var caesar = new xor_1.XorCypher(helpers_1.alphabet); | ||
var rg = new random_1.RandomGenerator(); | ||
var key = rg.getRandomString(5); | ||
console.log(key); | ||
var data = caesar.encrypt("NAZAR", key); | ||
var data = caesar.encrypt("НАЗАР", key); | ||
console.log(data); | ||
@@ -12,0 +12,0 @@ var data2 = caesar.decrypt(data, key); |
declare type Alphabet = string[]; | ||
declare const latinAlphabet: Alphabet; | ||
declare const cytilicAlphabet: Alphabet; | ||
export { latinAlphabet, cytilicAlphabet, Alphabet }; | ||
declare const alphabet: Alphabet; | ||
export { alphabet, Alphabet }; | ||
//# sourceMappingURL=alphabet.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var latinAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnopqrstuvwxyz".split(''); | ||
exports.latinAlphabet = latinAlphabet; | ||
var cytilicAlphabet = "АБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЬЮЯабвгґдеєжзиіїклмнопрстуфхцчшщьюя".split(''); | ||
exports.cytilicAlphabet = cytilicAlphabet; | ||
var alphabet = "АБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЬЮЯ ,.?!:-`".split(''); | ||
exports.alphabet = alphabet; | ||
//# sourceMappingURL=alphabet.js.map |
{ | ||
"name": "cryptographyjs", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
import { RandomGenerator } from './helpers/random'; | ||
import { CaesarCipher } from "./caesar"; | ||
import { latinAlphabet } from "./helpers/index" | ||
import { TritemCipher } from "./tritem"; | ||
import { XorCypher } from "./xor"; | ||
import { alphabet } from 'helpers'; | ||
const caesar = new XorCypher(latinAlphabet); | ||
const caesar = new XorCypher(alphabet); | ||
const rg = new RandomGenerator(); | ||
@@ -12,3 +10,3 @@ | ||
console.log(key) | ||
const data = caesar.encrypt("NAZAR", key); | ||
const data = caesar.encrypt("НАЗАР", key); | ||
@@ -15,0 +13,0 @@ console.log(data) |
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
43291
480