Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

miscreant

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

miscreant - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

release/exceptions.js

4

package.json
{
"name": "miscreant",
"version": "0.3.1",
"version": "0.3.2",
"description": "Misuse resistant symmetric encryption library providing AES-SIV (RFC 5297), AES-PMAC-SIV, and STREAM constructions",
"homepage": "https://github.com/miscreant/miscreant/tree/master/js/",
"main": "release/index.js",
"types": "index.ts",
"types": "src/index.ts",
"author": "Tony Arcieri",

@@ -9,0 +9,0 @@ "license": "MIT",

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
/** Exceptions */
var integrity_error_1 = require("./src/exceptions/integrity_error");
exports.IntegrityError = integrity_error_1.IntegrityError;
var not_implemented_error_1 = require("./src/exceptions/not_implemented_error");
exports.NotImplementedError = not_implemented_error_1.NotImplementedError;
__export(require("./exceptions"));
/** Symmetric encryption APIs */
var aead_1 = require("./src/aead");
var aead_1 = require("./aead");
exports.AEAD = aead_1.AEAD;
var siv_1 = require("./src/siv");
var siv_1 = require("./siv");
exports.SIV = siv_1.SIV;
/** STREAM streaming encryption */
var stream_1 = require("./src/stream");
var stream_1 = require("./stream");
exports.StreamEncryptor = stream_1.StreamEncryptor;
exports.StreamDecryptor = stream_1.StreamDecryptor;
/** MAC functions */
var cmac_1 = require("./src/mac/cmac");
var cmac_1 = require("./mac/cmac");
exports.CMAC = cmac_1.CMAC;
var pmac_1 = require("./src/mac/pmac");
var pmac_1 = require("./mac/pmac");
exports.PMAC = pmac_1.PMAC;
/** Crypto providers */
var polyfill_1 = require("./src/providers/polyfill");
var polyfill_1 = require("./providers/polyfill");
exports.PolyfillCryptoProvider = polyfill_1.PolyfillCryptoProvider;
var webcrypto_1 = require("./src/providers/webcrypto");
var webcrypto_1 = require("./providers/webcrypto");
exports.WebCryptoProvider = webcrypto_1.WebCryptoProvider;

@@ -11,3 +11,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const not_implemented_error_1 = require("../exceptions/not_implemented_error");
const exceptions_1 = require("../exceptions");
const aes_1 = require("./webcrypto/aes");

@@ -32,3 +32,3 @@ const aes_ctr_1 = require("./webcrypto/aes_ctr");

if (e.message.includes("unsupported")) {
throw new not_implemented_error_1.NotImplementedError("WebCryptoProvider: AES-CTR unsupported. Use PolyfillCryptoProvider.");
throw new exceptions_1.NotImplementedError("WebCryptoProvider: AES-CTR unsupported. Use PolyfillCryptoProvider.");
}

@@ -35,0 +35,0 @@ else {

"use strict";
// Copyright (C) 2017 Dmitry Chestnykh, Tony Arcieri
// Copyright (C) 2017-2018 Dmitry Chestnykh, Tony Arcieri
// MIT License. See LICENSE file for details.

@@ -16,4 +16,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

const xor_1 = require("./internals/xor");
const integrity_error_1 = require("./exceptions/integrity_error");
const not_implemented_error_1 = require("./exceptions/not_implemented_error");
const exceptions_1 = require("./exceptions");
const block_1 = require("./internals/block");

@@ -48,3 +47,3 @@ const cmac_1 = require("./mac/cmac");

default:
throw new not_implemented_error_1.NotImplementedError(`Miscreant: algorithm not supported: ${alg}`);
throw new exceptions_1.NotImplementedError(`Miscreant: algorithm not supported: ${alg}`);
}

@@ -86,3 +85,3 @@ const ctr = yield provider.importCTRKey(encKey);

if (sealed.length < block_1.default.SIZE) {
throw new integrity_error_1.IntegrityError("AES-SIV: ciphertext is truncated");
throw new exceptions_1.IntegrityError("AES-SIV: ciphertext is truncated");
}

@@ -100,3 +99,3 @@ // Decrypt.

wipe_1.wipe(result);
throw new integrity_error_1.IntegrityError("AES-SIV: ciphertext verification failure!");
throw new exceptions_1.IntegrityError("AES-SIV: ciphertext verification failure!");
}

@@ -103,0 +102,0 @@ return result;

@@ -1,2 +0,2 @@

import { NotImplementedError } from "../exceptions/not_implemented_error";
import { NotImplementedError } from "../exceptions";
import { IBlockCipher, ICryptoProvider, ICTRLike } from "../interfaces";

@@ -3,0 +3,0 @@ import WebCryptoAes from "./webcrypto/aes";

@@ -1,2 +0,2 @@

// Copyright (C) 2017 Dmitry Chestnykh, Tony Arcieri
// Copyright (C) 2017-2018 Dmitry Chestnykh, Tony Arcieri
// MIT License. See LICENSE file for details.

@@ -8,4 +8,3 @@

import { IntegrityError } from "./exceptions/integrity_error";
import { NotImplementedError } from "./exceptions/not_implemented_error";
import { IntegrityError, NotImplementedError } from "./exceptions";
import { ICryptoProvider, ICTRLike, IMACLike, ISIVLike } from "./interfaces";

@@ -12,0 +11,0 @@ import Block from "./internals/block";

@@ -9,3 +9,3 @@ // Copyright (C) 2016 Dmitry Chestnykh

import WebCrypto = require("node-webcrypto-ossl");
import * as miscreant from "../index";
import * as miscreant from "../src/index";

@@ -12,0 +12,0 @@ @suite class PolyfillAesCmacSpec {

@@ -10,3 +10,3 @@ // Copyright (C) 2017 Tony Arcieri, Dmitry Chestnykh

import WebCrypto = require("node-webcrypto-ossl");
import * as miscreant from "../index";
import * as miscreant from "../src/index";

@@ -13,0 +13,0 @@ let expect = chai.expect;

@@ -9,3 +9,3 @@ // Copyright (C) 2016-2017 Dmitry Chestnykh, Tony Arcieri

import WebCrypto = require("node-webcrypto-ossl");
import * as miscreant from "../index";
import * as miscreant from "../src/index";

@@ -12,0 +12,0 @@

@@ -7,3 +7,3 @@ import { suite, test } from "mocha-typescript";

import WebCrypto = require("node-webcrypto-ossl");
import * as miscreant from "../index";
import * as miscreant from "../src/index";

@@ -10,0 +10,0 @@ let expect = chai.expect;

@@ -7,3 +7,3 @@ import { suite, test } from "mocha-typescript";

import WebCrypto = require("node-webcrypto-ossl");
import * as miscreant from "../index";
import * as miscreant from "../src/index";

@@ -10,0 +10,0 @@ let expect = chai.expect;

@@ -10,3 +10,3 @@ // Copyright (C) 2017 Dmitry Chestnykh

import WebCrypto = require("node-webcrypto-ossl");
import * as miscreant from "../index";
import * as miscreant from "../src/index";

@@ -13,0 +13,0 @@ let expect = chai.expect;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc