-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gcm mode für encryption eingestellt, md dateien für website erstellt
- Loading branch information
0 parents
commit 3d4904d
Showing
30 changed files
with
3,718 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
## [0.4.1] - 2018-08-02 | ||
|
||
### Fixed | ||
|
||
- Fixed inclusion of source code links to old files | ||
|
||
## [0.4.0] - 2018-08-02 | ||
|
||
### Changed | ||
|
||
- Changed class names to conform with guidelines | ||
- Added demonstrate-methods for all examples | ||
- Corrected meta format for file encryption example | ||
|
||
### Fixed | ||
|
||
- Added missing UTF-8 encoding in assymetric encryption example | ||
- Fixed file encryption not needing trim anymore | ||
- Fixed Headings according to guidlines | ||
- Fixed import statements not expclicit in file encryption example | ||
|
||
## [0.3.0] - 2018-07-18 | ||
|
||
### Changed | ||
|
||
- Changed PBKDF2 hash function to SHA-512 | ||
- Increased PBKDF2 salt size to 64 bytes (equal to SHA-512 size) | ||
- Increased PBKDF2 iterations to 10000 | ||
- Refactored variable names | ||
- Refactored main methods to call a demonstrate...-method | ||
|
||
### Fixed | ||
|
||
- Exceptions were logged including the stack trace, now only the localized message is logged | ||
|
||
## [0.2.0] - 2018-05-13 | ||
|
||
### Changed | ||
|
||
- Fixed version link in Changelog | ||
- Refactored examples | ||
- Updated class comments | ||
|
||
### Removed | ||
|
||
- Removed easy object oriented examples that used a separate class | ||
- Removed mentions of the need for unlimited policy files (unlimited is default since JDK / Java SE 9) | ||
- Removed commented out code | ||
|
||
## [0.1.1] - 2018-04-28 | ||
|
||
### Changed | ||
|
||
- fixed Changelog | ||
|
||
## [0.1.0] - 2018-04-28 | ||
|
||
### Added | ||
|
||
- added Changelog | ||
- added Asymmetric RSA String Encryption | ||
|
||
## [X.Y.Z] - XXXX-XX-XX (TEMPLATE for new versions) | ||
|
||
### Added | ||
|
||
- added something | ||
- added something else | ||
|
||
### Changed | ||
|
||
- changed something | ||
- changed something else | ||
|
||
### Deprecated | ||
|
||
- deprecated something | ||
- deprecated something else | ||
|
||
### Removed | ||
|
||
- removed something | ||
- removed something else | ||
|
||
### Fixed | ||
|
||
- fixed something | ||
- fixed something else | ||
|
||
### Security | ||
|
||
- made some security relevant changes | ||
- made other security relevant changes | ||
|
||
[Unreleased]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.4.1...HEAD | ||
[0.4.1]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.4.0...v0.4.1 | ||
[0.4.0]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.3.0...v0.4.0 | ||
[0.3.0]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.2.0...v0.3.0 | ||
[0.2.0]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.1.1...v0.2.0 | ||
[0.1.1]: https://github.com/cryptoexamples/java-crypto-examples/compare/v0.1.0...v0.1.1 | ||
[0.1.0]: https://github.com/cryptoexamples/java-crypto-examples/releases/tag/v0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
module.exports = function(grunt) { | ||
// Project configuration. | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON("package.json"), | ||
copy: { | ||
build: { | ||
cwd: "src", | ||
src: ["**"], | ||
dest: "build/es6", | ||
expand: true | ||
} | ||
}, | ||
babel: { | ||
options: { | ||
sourceMap: false, | ||
presets: ["env"] | ||
}, | ||
dist: { | ||
files: [ | ||
{ | ||
expand: true, | ||
cwd: "src/", | ||
src: ["**/*.js"], | ||
dest: "build/trans" | ||
} | ||
] | ||
} | ||
}, | ||
clean: { | ||
build: { | ||
src: ["build"] | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks("grunt-contrib-copy"); | ||
grunt.loadNpmTasks("grunt-contrib-clean"); | ||
grunt.loadNpmTasks("grunt-babel"); | ||
|
||
grunt.registerTask("build", ["clean", "copy", "babel"]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <http://unlicense.org> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Instalation | ||
|
||
- install Node.js | ||
- run "npm install" after cloning the repo | ||
|
||
## Commands | ||
|
||
- To build the the Projekt, which creates code that is Babel transpiled javascript, use "grunt build" | ||
- To run the unit tests use "npm test", this will run all files, which have tests first. | ||
- To just run one specific file use "node path/to/file/filename" |
60 changes: 60 additions & 0 deletions
60
javascript_file_encryption_symmetric_password_based_crypto.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: JavaScript Password based symmetric file encryption using Nodes native "Crypto" Library | ||
keywords: sample | ||
summary: "Password based symmetric file encryption in JavaScript" | ||
permalink: javascript_file_encryption_symmetric_password_based.html | ||
folder: JavaScript Crypto | ||
references: [ | ||
# Place a list of references used to create and/or understand this example. | ||
{ | ||
url: "https://nodejs.org/api/crypto.html", | ||
description: "Node.js Crypto", | ||
url: "https://nodejs.org/api/stream.html", | ||
description: "Node.js Stream", | ||
url: "https://nodejs.org/api/fs.html", | ||
description: "Node.js filesystem", | ||
url: "https://github.com/winstonjs/winston", | ||
description: "Winston", | ||
url: "https://babeljs.io/", | ||
description: "Babel compiler" | ||
|
||
|
||
} | ||
] | ||
authors: [ | ||
{ | ||
name: "Tobias Hirzel", | ||
url: "" | ||
} | ||
] | ||
# List all reviewers that reviewed this version of the example. When the example is updated all old reviews | ||
# must be removed from the list below and the code has to be reviewed again. The complete review process | ||
# is documented in the main repository of CryptoExamples | ||
current_reviews: [ | ||
|
||
] | ||
# Indicates when this example was last updated/created. Reviews don't change this. | ||
last_updated: "2018-08-012" | ||
tags: [JavaScript, Node.js, AES, CTR, PBKDF2, Salt, AEAD] | ||
--- | ||
|
||
## Use cases | ||
|
||
- Password based symmetric encryption of a file | ||
|
||
## node version | ||
|
||
- 8.11.2 | ||
|
||
## JavaScript Version | ||
|
||
- ECMAScript 6 | ||
- In order to run this code, one hast to build it with an ECMAScript 6 compiler like Babel. see "references". | ||
|
||
## Example Code for JavaScript Password based symmetric file encryption using AES-CTR and PBKDF2 | ||
|
||
```js | ||
{% include_relative src/allinone/crypto/ExampleFileEncryption.js %} | ||
``` | ||
|
||
{% include links.html %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Node.js JavaScript crypto with Nodes native "Crypto" Library | ||
keywords: JavaScript Crypto example | ||
toc: false | ||
permalink: javascript_landing_page.html | ||
folder: JavaScript Crypto | ||
is_landingpage: 1 | ||
--- | ||
|
||
# Available Crypto Scenarios and Use Cases | ||
|
||
| | All in One | | ||
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| 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) | | ||
| Asymmetric Encryption / Public Key Cryptography | [Asymmetric String Encryption ✔](javascript_asymmetric_string_encryption.html) | | | ||
| Key Storage | | | ||
| Hashing | [String Hash ✔](javascript_string_hash.html) | | ||
| Crypto Provider Setup | | | ||
| Digital Signatures | [String Signing ✔](javascript_string_sign.html) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
title: JavaScript Asymmetric String Encryption using Nodes native "Crypto" Library | ||
keywords: sample | ||
summary: "Asymmetric String Encryption in JavaScript" | ||
permalink: javascript_asymmetric_string_encryption.html | ||
folder: JavaScript Crypto | ||
references: [ | ||
# Place a list of references used to create and/or understand this example. | ||
{ | ||
url: "https://nodejs.org/api/crypto.html", | ||
description: "Node.js Crypto", | ||
url: "https://github.com/juliangruber/keypair", | ||
description: "Keypair", | ||
url: "https://github.com/winstonjs/winston", | ||
description: "Winston", | ||
url: "https://babeljs.io/", | ||
description: "Babel compiler" | ||
|
||
} | ||
] | ||
authors: [ | ||
{ | ||
name: "Tobias Hirzel", | ||
url: "" | ||
} | ||
] | ||
# List all reviewers that reviewed this version of the example. When the example is updated all old reviews | ||
# must be removed from the list below and the code has to be reviewed again. The complete review process | ||
# is documented in the main repository of CryptoExamples | ||
current_reviews: [ | ||
|
||
] | ||
# Indicates when this example was last updated/created. Reviews don't change this. | ||
last_updated: "2018-08-12" | ||
tags: [JavaScript, Node.js, RSA, Asymmetric, String, Encryption] | ||
--- | ||
|
||
## Use cases | ||
|
||
- Asymmetric encryption | ||
|
||
## node version | ||
|
||
- 8.11.2 | ||
|
||
## JavaScript Version | ||
|
||
- ECMAScript 6 | ||
- In order to run this code, one hast to build it with an ECMAScript 6 compiler like Babel. see "references". | ||
|
||
## Example Code for JavaScript Asymmetric String Encryption using RSA 3072 | ||
|
||
```js | ||
{% include_relative src/allinone/crypto/ExampleAsymmetricStringEncryption.js %} | ||
``` | ||
|
||
{% include links.html %} |
55 changes: 55 additions & 0 deletions
55
javascript_string_encryption_key_based_symmetric_crypto.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: Java String Encryption with key generation using Nodes native "Crypto" Library | ||
keywords: sample | ||
summary: "String encryption in JavaScript with key generation" | ||
permalink: javascript_string_encryption_key_based_symmetric.html | ||
folder: JavaScript Crypto | ||
references: [ | ||
# Place a list of references used to create and/or understand this example. | ||
{ | ||
url: "https://nodejs.org/api/crypto.html", | ||
description: "Node.js Crypto", | ||
url: "https://github.com/winstonjs/winston", | ||
description: "Winston" | ||
url: "https://babeljs.io/", | ||
description: "Babel compiler" | ||
} | ||
] | ||
authors: [ | ||
{ | ||
name: "Tobias Hirzel", | ||
url: "" | ||
} | ||
] | ||
# List all reviewers that reviewed this version of the example. When the example is updated all old reviews | ||
# must be removed from the list below and the code has to be reviewed again. The complete review process | ||
# is documented in the main repository of CryptoExamples | ||
current_reviews: [ | ||
|
||
] | ||
# Indicates when this example was last updated/created. Reviews don't change this. | ||
last_updated: "2018-08-12" | ||
tags: [JavaScript, Node.js, AES, CTR, Salt, AEAD] | ||
--- | ||
|
||
## Use cases | ||
|
||
- Random key generation | ||
- String encryption | ||
|
||
## node version | ||
|
||
- 8.11.2 | ||
|
||
## JavaScript Version | ||
|
||
- ECMAScript 6 | ||
- In order to run this code, one hast to build it with an ECMAScript 6 compiler like Babel. see "references". | ||
|
||
## Example Code for JavaScript String Encryption with key generation using AES-CTR | ||
|
||
```js | ||
{% include_relative src/allinone/crypto/ExampleStringEncryptionKeyBased.java %} | ||
``` | ||
|
||
{% include links.html %} |
Oops, something went wrong.