Skip to content

Commit 3d4904d

Browse files
committed
gcm mode für encryption eingestellt, md dateien für website erstellt
0 parents  commit 3d4904d

30 files changed

Lines changed: 3718 additions & 0 deletions

CHANGELOG.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.4.1] - 2018-08-02
11+
12+
### Fixed
13+
14+
- Fixed inclusion of source code links to old files
15+
16+
## [0.4.0] - 2018-08-02
17+
18+
### Changed
19+
20+
- Changed class names to conform with guidelines
21+
- Added demonstrate-methods for all examples
22+
- Corrected meta format for file encryption example
23+
24+
### Fixed
25+
26+
- Added missing UTF-8 encoding in assymetric encryption example
27+
- Fixed file encryption not needing trim anymore
28+
- Fixed Headings according to guidlines
29+
- Fixed import statements not expclicit in file encryption example
30+
31+
## [0.3.0] - 2018-07-18
32+
33+
### Changed
34+
35+
- Changed PBKDF2 hash function to SHA-512
36+
- Increased PBKDF2 salt size to 64 bytes (equal to SHA-512 size)
37+
- Increased PBKDF2 iterations to 10000
38+
- Refactored variable names
39+
- Refactored main methods to call a demonstrate...-method
40+
41+
### Fixed
42+
43+
- Exceptions were logged including the stack trace, now only the localized message is logged
44+
45+
## [0.2.0] - 2018-05-13
46+
47+
### Changed
48+
49+
- Fixed version link in Changelog
50+
- Refactored examples
51+
- Updated class comments
52+
53+
### Removed
54+
55+
- Removed easy object oriented examples that used a separate class
56+
- Removed mentions of the need for unlimited policy files (unlimited is default since JDK / Java SE 9)
57+
- Removed commented out code
58+
59+
## [0.1.1] - 2018-04-28
60+
61+
### Changed
62+
63+
- fixed Changelog
64+
65+
## [0.1.0] - 2018-04-28
66+
67+
### Added
68+
69+
- added Changelog
70+
- added Asymmetric RSA String Encryption
71+
72+
## [X.Y.Z] - XXXX-XX-XX (TEMPLATE for new versions)
73+
74+
### Added
75+
76+
- added something
77+
- added something else
78+
79+
### Changed
80+
81+
- changed something
82+
- changed something else
83+
84+
### Deprecated
85+
86+
- deprecated something
87+
- deprecated something else
88+
89+
### Removed
90+
91+
- removed something
92+
- removed something else
93+
94+
### Fixed
95+
96+
- fixed something
97+
- fixed something else
98+
99+
### Security
100+
101+
- made some security relevant changes
102+
- made other security relevant changes
103+
104+
[Unreleased]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.4.1...HEAD
105+
[0.4.1]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.4.0...v0.4.1
106+
[0.4.0]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.3.0...v0.4.0
107+
[0.3.0]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.2.0...v0.3.0
108+
[0.2.0]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.1.1...v0.2.0
109+
[0.1.1]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.1.0...v0.1.1
110+
[0.1.0]: https://github.com/cryptoexamples/java-crypto-examples/releases/tag/v0.1.0

Gruntfile.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
module.exports = function(grunt) {
2+
// Project configuration.
3+
4+
grunt.initConfig({
5+
pkg: grunt.file.readJSON("package.json"),
6+
copy: {
7+
build: {
8+
cwd: "src",
9+
src: ["**"],
10+
dest: "build/es6",
11+
expand: true
12+
}
13+
},
14+
babel: {
15+
options: {
16+
sourceMap: false,
17+
presets: ["env"]
18+
},
19+
dist: {
20+
files: [
21+
{
22+
expand: true,
23+
cwd: "src/",
24+
src: ["**/*.js"],
25+
dest: "build/trans"
26+
}
27+
]
28+
}
29+
},
30+
clean: {
31+
build: {
32+
src: ["build"]
33+
}
34+
}
35+
});
36+
37+
grunt.loadNpmTasks("grunt-contrib-copy");
38+
grunt.loadNpmTasks("grunt-contrib-clean");
39+
grunt.loadNpmTasks("grunt-babel");
40+
41+
grunt.registerTask("build", ["clean", "copy", "babel"]);
42+
};

LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
This is free and unencumbered software released into the public domain.
2+
3+
Anyone is free to copy, modify, publish, use, compile, sell, or
4+
distribute this software, either in source code form or as a compiled
5+
binary, for any purpose, commercial or non-commercial, and by any
6+
means.
7+
8+
In jurisdictions that recognize copyright laws, the author or authors
9+
of this software dedicate any and all copyright interest in the
10+
software to the public domain. We make this dedication for the benefit
11+
of the public at large and to the detriment of our heirs and
12+
successors. We intend this dedication to be an overt act of
13+
relinquishment in perpetuity of all present and future rights to this
14+
software under copyright law.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.
23+
24+
For more information, please refer to <http://unlicense.org>

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Instalation
2+
3+
- install Node.js
4+
- run "npm install" after cloning the repo
5+
6+
## Commands
7+
8+
- To build the the Projekt, which creates code that is Babel transpiled javascript, use "grunt build"
9+
- To run the unit tests use "npm test", this will run all files, which have tests first.
10+
- To just run one specific file use "node path/to/file/filename"
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: JavaScript Password based symmetric file encryption using Nodes native "Crypto" Library
3+
keywords: sample
4+
summary: "Password based symmetric file encryption in JavaScript"
5+
permalink: javascript_file_encryption_symmetric_password_based.html
6+
folder: JavaScript Crypto
7+
references: [
8+
# Place a list of references used to create and/or understand this example.
9+
{
10+
url: "https://nodejs.org/api/crypto.html",
11+
description: "Node.js Crypto",
12+
url: "https://nodejs.org/api/stream.html",
13+
description: "Node.js Stream",
14+
url: "https://nodejs.org/api/fs.html",
15+
description: "Node.js filesystem",
16+
url: "https://github.com/winstonjs/winston",
17+
description: "Winston",
18+
url: "https://babeljs.io/",
19+
description: "Babel compiler"
20+
21+
22+
}
23+
]
24+
authors: [
25+
{
26+
name: "Tobias Hirzel",
27+
url: ""
28+
}
29+
]
30+
# List all reviewers that reviewed this version of the example. When the example is updated all old reviews
31+
# must be removed from the list below and the code has to be reviewed again. The complete review process
32+
# is documented in the main repository of CryptoExamples
33+
current_reviews: [
34+
35+
]
36+
# Indicates when this example was last updated/created. Reviews don't change this.
37+
last_updated: "2018-08-012"
38+
tags: [JavaScript, Node.js, AES, CTR, PBKDF2, Salt, AEAD]
39+
---
40+
41+
## Use cases
42+
43+
- Password based symmetric encryption of a file
44+
45+
## node version
46+
47+
- 8.11.2
48+
49+
## JavaScript Version
50+
51+
- ECMAScript 6
52+
- In order to run this code, one hast to build it with an ECMAScript 6 compiler like Babel. see "references".
53+
54+
## Example Code for JavaScript Password based symmetric file encryption using AES-CTR and PBKDF2
55+
56+
```js
57+
{% include_relative src/allinone/crypto/ExampleFileEncryption.js %}
58+
```
59+
60+
{% include links.html %}

javascript_landing_page_crypto.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Node.js JavaScript crypto with Nodes native "Crypto" Library
3+
keywords: JavaScript Crypto example
4+
toc: false
5+
permalink: javascript_landing_page.html
6+
folder: JavaScript Crypto
7+
is_landingpage: 1
8+
---
9+
10+
# Available Crypto Scenarios and Use Cases
11+
12+
| | All in One |
13+
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
14+
| Symmetric Encryption | [Symmetric String Encryption (password based) ✔](javascript_string_encryption_password_based_symmetric.html) <br />[Symmetric String Encryption (key based) ✔](javascript_string_encryption_key_based_symmetric.html) <br />[Symmetric File Encryption ✔](javascript_file_encryption_symmetric_password_based.html) |
15+
| Asymmetric Encryption / Public Key Cryptography | [Asymmetric String Encryption ✔](javascript_asymmetric_string_encryption.html) | |
16+
| Key Storage | |
17+
| Hashing | [String Hash ✔](javascript_string_hash.html) |
18+
| Crypto Provider Setup | |
19+
| Digital Signatures | [String Signing ✔](javascript_string_sign.html) |
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: JavaScript Asymmetric String Encryption using Nodes native "Crypto" Library
3+
keywords: sample
4+
summary: "Asymmetric String Encryption in JavaScript"
5+
permalink: javascript_asymmetric_string_encryption.html
6+
folder: JavaScript Crypto
7+
references: [
8+
# Place a list of references used to create and/or understand this example.
9+
{
10+
url: "https://nodejs.org/api/crypto.html",
11+
description: "Node.js Crypto",
12+
url: "https://github.com/juliangruber/keypair",
13+
description: "Keypair",
14+
url: "https://github.com/winstonjs/winston",
15+
description: "Winston",
16+
url: "https://babeljs.io/",
17+
description: "Babel compiler"
18+
19+
}
20+
]
21+
authors: [
22+
{
23+
name: "Tobias Hirzel",
24+
url: ""
25+
}
26+
]
27+
# List all reviewers that reviewed this version of the example. When the example is updated all old reviews
28+
# must be removed from the list below and the code has to be reviewed again. The complete review process
29+
# is documented in the main repository of CryptoExamples
30+
current_reviews: [
31+
32+
]
33+
# Indicates when this example was last updated/created. Reviews don't change this.
34+
last_updated: "2018-08-12"
35+
tags: [JavaScript, Node.js, RSA, Asymmetric, String, Encryption]
36+
---
37+
38+
## Use cases
39+
40+
- Asymmetric encryption
41+
42+
## node version
43+
44+
- 8.11.2
45+
46+
## JavaScript Version
47+
48+
- ECMAScript 6
49+
- In order to run this code, one hast to build it with an ECMAScript 6 compiler like Babel. see "references".
50+
51+
## Example Code for JavaScript Asymmetric String Encryption using RSA 3072
52+
53+
```js
54+
{% include_relative src/allinone/crypto/ExampleAsymmetricStringEncryption.js %}
55+
```
56+
57+
{% include links.html %}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Java String Encryption with key generation using Nodes native "Crypto" Library
3+
keywords: sample
4+
summary: "String encryption in JavaScript with key generation"
5+
permalink: javascript_string_encryption_key_based_symmetric.html
6+
folder: JavaScript Crypto
7+
references: [
8+
# Place a list of references used to create and/or understand this example.
9+
{
10+
url: "https://nodejs.org/api/crypto.html",
11+
description: "Node.js Crypto",
12+
url: "https://github.com/winstonjs/winston",
13+
description: "Winston"
14+
url: "https://babeljs.io/",
15+
description: "Babel compiler"
16+
}
17+
]
18+
authors: [
19+
{
20+
name: "Tobias Hirzel",
21+
url: ""
22+
}
23+
]
24+
# List all reviewers that reviewed this version of the example. When the example is updated all old reviews
25+
# must be removed from the list below and the code has to be reviewed again. The complete review process
26+
# is documented in the main repository of CryptoExamples
27+
current_reviews: [
28+
29+
]
30+
# Indicates when this example was last updated/created. Reviews don't change this.
31+
last_updated: "2018-08-12"
32+
tags: [JavaScript, Node.js, AES, CTR, Salt, AEAD]
33+
---
34+
35+
## Use cases
36+
37+
- Random key generation
38+
- String encryption
39+
40+
## node version
41+
42+
- 8.11.2
43+
44+
## JavaScript Version
45+
46+
- ECMAScript 6
47+
- In order to run this code, one hast to build it with an ECMAScript 6 compiler like Babel. see "references".
48+
49+
## Example Code for JavaScript String Encryption with key generation using AES-CTR
50+
51+
```js
52+
{% include_relative src/allinone/crypto/ExampleStringEncryptionKeyBased.java %}
53+
```
54+
55+
{% include links.html %}

0 commit comments

Comments
 (0)