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

crypto-ts

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crypto-ts - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

bundles/crypto-ts.umd.min.js

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

!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define("crypto-ts",["exports"],factory):factory((global.ng=global.ng||{},global.ng.angularLibraryStarter={}))}(this,function(exports){"use strict";var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])};function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define("crypto-ts",["exports"],factory):factory(global.CryptoTS={})}(this,function(exports){"use strict";var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])};function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}
/**

@@ -3,0 +3,0 @@ * @license crypto-ts

{
"name": "crypto-ts",
"private": false,
"version": "1.0.1",
"version": "1.0.2",
"description": "Typescript library of crypto standards.",

@@ -14,4 +14,2 @@ "main": "./bundles/crypto-ts.umd.js",

"pack:lib": "npm run build && npm pack ./dist",
"publish:lib": "npm run build && npm publish ./dist",
"publish:lib:next": "npm run build && npm publish --tag next ./dist",
"compodoc": "compodoc -p tsconfig.json",

@@ -27,2 +25,38 @@ "compodoc:serve": "compodoc -s",

],
"analyzeCommits": {
"preset": "eslint",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"tag": "Docs",
"release": "patch"
},
{
"tag": "Fix",
"release": "patch"
},
{
"tag": "Perf",
"release": "patch"
},
{
"tag": "Refactor",
"release": "patch"
},
{
"tag": "Test",
"release": "patch"
},
{
"tag": "Feat",
"release": "minor"
}
]
},
"generateNotes": {
"preset": "eslint"
},
"publish": [

@@ -90,2 +124,3 @@ {

"codelyzer": "4.3.0",
"conventional-changelog-eslint": "^1.0.9",
"core-js": "2.5.5",

@@ -108,4 +143,6 @@ "istanbul-instrumenter-loader": "3.0.1",

"rxjs-compat": "^6.0.0",
"semantic-release": "^15.2.0",
"shelljs": "0.8.1",
"source-map-loader": "0.2.3",
"travis-deploy-once": "^5.0.0",
"ts-loader": "4.2.0",

@@ -117,6 +154,4 @@ "tslint": "5.9.1",

"webpack": "4.6.0",
"zone.js": "0.8.26",
"semantic-release": "^15.2.0",
"travis-deploy-once": "^5.0.0"
"zone.js": "0.8.26"
}
}
# crypto-ts
Typescript library of crypto standards.
Typescript library of crypto standards. Ready for AOT and treeshaking in combination with Angular and other modern typescript frameworks.

@@ -30,3 +30,3 @@ ## Node.js (Install)

var AES = require("crypto-ts").AES;
var SHA256 = require("crypto-ts/SHA256");
var SHA256 = require("crypto-ts").SHA256;
...

@@ -39,4 +39,5 @@ console.log(SHA256("Message"));

```javascript
var CryptoJS = require("crypto-js");
console.log(CryptoJS.HmacSHA1("Message", "Key"));
var CryptoTS = require("crypto-ts");
...
console.log(CryptoTS.HmacSHA1("Message", "Key"));
```

@@ -52,3 +53,3 @@

```bash
bower install crypto-js
bower install crypto-ts
```

@@ -64,4 +65,4 @@

{
name: 'crypto-js',
location: 'path-to/bower_components/crypto-js',
name: 'crypto-ts',
location: 'path-to/bower_components/crypto-ts',
main: 'index'

@@ -72,3 +73,3 @@ }

require(["crypto-js/aes", "crypto-js/sha256"], function (AES, SHA256) {
require(["crypto-ts/algo/aes", "crypto-ts/algo/sha256"], function (AES, SHA256) {
console.log(SHA256("Message"));

@@ -84,8 +85,8 @@ });

paths: {
'crypto-js': 'path-to/bower_components/crypto-js/crypto-js'
'crypto-ts': 'path-to/bower_components/crypto-ts/crypto-ts'
}
});
require(["crypto-js"], function (CryptoJS) {
console.log(CryptoJS.HmacSHA1("Message", "Key"));
require(["crypto-ts"], function (CryptoTS) {
console.log(CryptoTS.MD5("Message"));
});

@@ -97,13 +98,9 @@ ```

```html
<script type="text/javascript" src="path-to/bower_components/crypto-js/crypto-js.js"></script>
<script type="text/javascript" src="path-to/bower_components/crypto-ts/crypto-ts.js"></script>
<script type="text/javascript">
var encrypted = CryptoJS.AES(...);
var encrypted = CryptoJS.SHA256(...);
var encrypted = CryptoTS.AES(...);
var encrypted = CryptoTS.SHA256(...);
</script>
```
## API
See: https://code.google.com/p/crypto-js
### AES Encryption

@@ -114,10 +111,10 @@

```javascript
var CryptoJS = require("crypto-js");
var CryptoTS = require("crypto-ts");
// Encrypt
var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123');
var ciphertext = CryptoTS.AES.encrypt('my message', 'secret key 123');
// Decrypt
var bytes = CryptoJS.AES.decrypt(ciphertext.toString(), 'secret key 123');
var plaintext = bytes.toString(CryptoJS.enc.Utf8);
var bytes = CryptoTS.AES.decrypt(ciphertext.toString(), 'secret key 123');
var plaintext = bytes.toString(CryptoTS.enc.Utf8);

@@ -130,3 +127,3 @@ console.log(plaintext);

```javascript
var CryptoJS = require("crypto-js");
var CryptoTS = require("crypto-ts");

@@ -136,7 +133,7 @@ var data = [{id: 1}, {id: 2}]

// Encrypt
var ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), 'secret key 123');
var ciphertext = CryptoTS.AES.encrypt(JSON.stringify(data), 'secret key 123');
// Decrypt
var bytes = CryptoJS.AES.decrypt(ciphertext.toString(), 'secret key 123');
var decryptedData = JSON.parse(bytes.toString(CryptoJS.enc.Utf8));
var bytes = CryptoTS.AES.decrypt(ciphertext.toString(), 'secret key 123');
var decryptedData = JSON.parse(bytes.toString(CryptoTS.enc.Utf8));

@@ -149,69 +146,69 @@ console.log(decryptedData);

- ```crypto-js/core```
- ```crypto-js/x64-core```
- ```crypto-js/lib-typedarrays```
- ```crypto-ts/core```
- ```crypto-ts/x64-core```
- ```crypto-ts/lib-typedarrays```
---
- ```crypto-js/md5```
- ```crypto-js/sha1```
- ```crypto-js/sha256```
- ```crypto-js/sha224```
- ```crypto-js/sha512```
- ```crypto-js/sha384```
- ```crypto-js/sha3```
- ```crypto-js/ripemd160```
- ```crypto-ts/md5```
- ```crypto-ts/sha1```
- ```crypto-ts/sha256```
- ```crypto-ts/sha224```
- ```crypto-ts/sha512```
- ```crypto-ts/sha384```
- ```crypto-ts/sha3```
- ```crypto-ts/ripemd160```
---
- ```crypto-js/hmac-md5```
- ```crypto-js/hmac-sha1```
- ```crypto-js/hmac-sha256```
- ```crypto-js/hmac-sha224```
- ```crypto-js/hmac-sha512```
- ```crypto-js/hmac-sha384```
- ```crypto-js/hmac-sha3```
- ```crypto-js/hmac-ripemd160```
- ```crypto-ts/hmac-md5```
- ```crypto-ts/hmac-sha1```
- ```crypto-ts/hmac-sha256```
- ```crypto-ts/hmac-sha224```
- ```crypto-ts/hmac-sha512```
- ```crypto-ts/hmac-sha384```
- ```crypto-ts/hmac-sha3```
- ```crypto-ts/hmac-ripemd160```
---
- ```crypto-js/pbkdf2```
- ```crypto-ts/pbkdf2```
---
- ```crypto-js/aes```
- ```crypto-js/tripledes```
- ```crypto-js/rc4```
- ```crypto-js/rabbit```
- ```crypto-js/rabbit-legacy```
- ```crypto-js/evpkdf```
- ```crypto-ts/aes```
- ```crypto-ts/tripledes```
- ```crypto-ts/rc4```
- ```crypto-ts/rabbit```
- ```crypto-ts/rabbit-legacy```
- ```crypto-ts/evpkdf```
---
- ```crypto-js/format-openssl```
- ```crypto-js/format-hex```
- ```crypto-ts/format-openssl```
- ```crypto-ts/format-hex```
---
- ```crypto-js/enc-latin1```
- ```crypto-js/enc-utf8```
- ```crypto-js/enc-hex```
- ```crypto-js/enc-utf16```
- ```crypto-js/enc-base64```
- ```crypto-ts/enc-latin1```
- ```crypto-ts/enc-utf8```
- ```crypto-ts/enc-hex```
- ```crypto-ts/enc-utf16```
- ```crypto-ts/enc-base64```
---
- ```crypto-js/mode-cfb```
- ```crypto-js/mode-ctr```
- ```crypto-js/mode-ctr-gladman```
- ```crypto-js/mode-ofb```
- ```crypto-js/mode-ecb```
- ```crypto-ts/mode-cfb```
- ```crypto-ts/mode-ctr```
- ```crypto-ts/mode-ctr-gladman```
- ```crypto-ts/mode-ofb```
- ```crypto-ts/mode-ecb```
---
- ```crypto-js/pad-pkcs7```
- ```crypto-js/pad-ansix923```
- ```crypto-js/pad-iso10126```
- ```crypto-js/pad-iso97971```
- ```crypto-js/pad-zeropadding```
- ```crypto-js/pad-nopadding```
- ```crypto-ts/pad-pkcs7```
- ```crypto-ts/pad-ansix923```
- ```crypto-ts/pad-iso10126```
- ```crypto-ts/pad-iso97971```
- ```crypto-ts/pad-zeropadding```
- ```crypto-ts/pad-nopadding```

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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