Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit cd2c481

Browse files
author
DEWITTE Pierre-Alban
committed
[DOC] Updating doc
1 parent aa03948 commit cd2c481

File tree

1,283 files changed

+182024
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,283 files changed

+182024
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "cryptojslib",
3+
"version": "3.1.2",
4+
"main": "**/*.js",
5+
"homepage": "https://github.com/sytelus/cryptojs",
6+
"repository": {
7+
"type": "git",
8+
"url": "git://github.com/sytelus/cryptojs.git"
9+
},
10+
"dependencies": {},
11+
"devDependencies": {},
12+
"_release": "3.1.2",
13+
"_resolution": {
14+
"type": "version",
15+
"tag": "v3.1.2",
16+
"commit": "79faa50ca65a0bc302ff93518215c015b4d3004c"
17+
},
18+
"_source": "https://github.com/sytelus/CryptoJS.git",
19+
"_target": "3.1.x",
20+
"_originalSource": "cryptojslib"
21+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.sln merge=union
7+
*.csproj merge=union
8+
*.vbproj merge=union
9+
*.fsproj merge=union
10+
*.dbproj merge=union
11+
12+
# Standard to msysgit
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain
Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
#################
2+
## Eclipse
3+
#################
4+
5+
*.pydevproject
6+
.project
7+
.metadata
8+
bin/
9+
tmp/
10+
*.tmp
11+
*.bak
12+
*.swp
13+
*~.nib
14+
local.properties
15+
.classpath
16+
.settings/
17+
.loadpath
18+
19+
# External tool builders
20+
.externalToolBuilders/
21+
22+
# Locally stored "Eclipse launch configurations"
23+
*.launch
24+
25+
# CDT-specific
26+
.cproject
27+
28+
# PDT-specific
29+
.buildpath
30+
31+
32+
#################
33+
## Visual Studio
34+
#################
35+
36+
## Ignore Visual Studio temporary files, build results, and
37+
## files generated by popular Visual Studio add-ons.
38+
39+
# User-specific files
40+
*.suo
41+
*.user
42+
*.sln.docstates
43+
44+
# Build results
45+
46+
[Dd]ebug/
47+
[Rr]elease/
48+
x64/
49+
build/
50+
[Bb]in/
51+
[Oo]bj/
52+
53+
# MSTest test Results
54+
[Tt]est[Rr]esult*/
55+
[Bb]uild[Ll]og.*
56+
57+
*_i.c
58+
*_p.c
59+
*.ilk
60+
*.meta
61+
*.obj
62+
*.pch
63+
*.pdb
64+
*.pgc
65+
*.pgd
66+
*.rsp
67+
*.sbr
68+
*.tlb
69+
*.tli
70+
*.tlh
71+
*.tmp
72+
*.tmp_proj
73+
*.log
74+
*.vspscc
75+
*.vssscc
76+
.builds
77+
*.pidb
78+
*.log
79+
*.scc
80+
81+
# Visual C++ cache files
82+
ipch/
83+
*.aps
84+
*.ncb
85+
*.opensdf
86+
*.sdf
87+
*.cachefile
88+
89+
# Visual Studio profiler
90+
*.psess
91+
*.vsp
92+
*.vspx
93+
94+
# Guidance Automation Toolkit
95+
*.gpState
96+
97+
# ReSharper is a .NET coding add-in
98+
_ReSharper*/
99+
*.[Rr]e[Ss]harper
100+
101+
# TeamCity is a build add-in
102+
_TeamCity*
103+
104+
# DotCover is a Code Coverage Tool
105+
*.dotCover
106+
107+
# NCrunch
108+
*.ncrunch*
109+
.*crunch*.local.xml
110+
111+
# Installshield output folder
112+
[Ee]xpress/
113+
114+
# DocProject is a documentation generator add-in
115+
DocProject/buildhelp/
116+
DocProject/Help/*.HxT
117+
DocProject/Help/*.HxC
118+
DocProject/Help/*.hhc
119+
DocProject/Help/*.hhk
120+
DocProject/Help/*.hhp
121+
DocProject/Help/Html2
122+
DocProject/Help/html
123+
124+
# Click-Once directory
125+
publish/
126+
127+
# Publish Web Output
128+
*.Publish.xml
129+
*.pubxml
130+
131+
# NuGet Packages Directory
132+
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
133+
#packages/
134+
135+
# Windows Azure Build Output
136+
csx
137+
*.build.csdef
138+
139+
# Windows Store app package directory
140+
AppPackages/
141+
142+
# Others
143+
sql/
144+
*.Cache
145+
ClientBin/
146+
[Ss]tyle[Cc]op.*
147+
~$*
148+
*~
149+
*.dbmdl
150+
*.[Pp]ublish.xml
151+
*.pfx
152+
*.publishsettings
153+
154+
# RIA/Silverlight projects
155+
Generated_Code/
156+
157+
# Backup & report files from converting an old project file to a newer
158+
# Visual Studio version. Backup files are not needed, because we have git ;-)
159+
_UpgradeReport_Files/
160+
Backup*/
161+
UpgradeLog*.XML
162+
UpgradeLog*.htm
163+
164+
# SQL Server files
165+
App_Data/*.mdf
166+
App_Data/*.ldf
167+
168+
#############
169+
## Windows detritus
170+
#############
171+
172+
# Windows image file caches
173+
Thumbs.db
174+
ehthumbs.db
175+
176+
# Folder config file
177+
Desktop.ini
178+
179+
# Recycle Bin used on file shares
180+
$RECYCLE.BIN/
181+
182+
# Mac crap
183+
.DS_Store
184+
185+
186+
#############
187+
## Python
188+
#############
189+
190+
*.py[co]
191+
192+
# Packages
193+
*.egg
194+
*.egg-info
195+
dist/
196+
build/
197+
eggs/
198+
parts/
199+
var/
200+
sdist/
201+
develop-eggs/
202+
.installed.cfg
203+
204+
# Installer logs
205+
pip-log.txt
206+
207+
# Unit test / coverage reports
208+
.coverage
209+
.tox
210+
211+
#Translations
212+
*.mo
213+
214+
#Mr Developer
215+
.mr.developer.cfg

docs/components/cryptojslib/README.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
CryptoJS
2+
--------
3+
4+
This repo is straight unmodified-in-any-way copy of Google Code hosted CryptoJS project at https://code.google.com/p/crypto-js/ . This is hosted at github to add bower package so future updates can be managed better.
5+
6+
### Directory Structure
7+
You have two folders:
8+
* components
9+
* rollups
10+
11+
The files in rollups folder is concatenation of one or more files in components folder followed by minification. This makes files in rollups folder standalone includable in your projects without worrying about its dependencies. You can view relation between files in rollup and components here: https://code.google.com/p/crypto-js/source/browse/tags/3.1.2/builder/build.yml
12+
13+
### Install
14+
15+
If you are not using bower then just include the .js file from rollups folder for whatever algorithm you want to use. UTF8 encoder is included in each rollup js. If you need UTF16 or Base64 encoder then also add corresponding files from components folder (see following example).
16+
17+
Using Bower:
18+
19+
```
20+
bower install cryptojslib
21+
```
22+
23+
### APIs
24+
25+
You can play with below code live at http://jsbin.com/IziHAdIf/1/edit?html,console.
26+
27+
Please see the Quick Start guide at https://code.google.com/p/crypto-js/#Quick-start_Guide
28+
29+
Below are very quick examples of core usage:
30+
31+
##### MD5
32+
MD5 is a widely used hash function. It's been used in a variety of security applications and is also commonly used to check the integrity of files. Though, MD5 is not collision resistant, and it isn't suitable for applications like SSL certificates or digital signatures that rely on this property.
33+
34+
```
35+
<script src="http://<mysite>/<libs location>/cryptojs/rollups/md5.js"></script>
36+
<script src="http://<mysite>/<libs location>/cryptojs/components/enc-base64-min.js"></script>
37+
<script>
38+
//The hash algorithms accept either strings or instances of CryptoJS.lib.WordArray.
39+
//A WordArray object represents an array of 32-bit words.
40+
//When you pass a string, it's automatically converted to a WordArray encoded as UTF-8.
41+
var hash = CryptoJS.MD5("Message");
42+
alert(hash.toString(CryptoJS.enc.Base64));
43+
</script>
44+
```
45+
46+
##### SHA-3
47+
SHA-3 is the winner of a five-year competition to select a new cryptographic hash algorithm where 64 competing designs were evaluated.
48+
49+
```
50+
<script src="http://<mysite>/<libs location>/cryptojs/rollups/sha3.js"></script>
51+
<script>
52+
var hash = CryptoJS.SHA3("Message");
53+
54+
//The hash you get back isn't a string yet. It's a WordArray object.
55+
//When you use a WordArray object in a string context,
56+
//it's automatically converted to a hex string.
57+
alert(hash.toString()); //Same as hash.toString(CryptoJS.enc.Hex);
58+
</script>
59+
```
60+
61+
##### Encoding and decoding
62+
You can convert string to word arrays using various encoders. And word array in to string using decoders.
63+
64+
```
65+
<script>
66+
var wordArray = CryptoJS.enc.Utf8.parse('𤭢');
67+
var utf8 = CryptoJS.enc.Utf8.stringify(wordArray);
68+
console.log(utf8);
69+
</script>
70+
```
71+
72+
The UTF8 encoder/decoder is included in core.js and hence is available in rollup files for algorithms. However if you need UTF16 and Base64 encoder then you need to include corresponding file from components folder (see below for MD5 hash with Base64 example).
73+
74+
75+
### Using with AMD/RequireJS
76+
CryptoJS does not have built-in support for AMD/RequireJS yet. However adding shims is almost trivial. For use with RequireJS, using files in components is probably more desirable instead of files in rollups folder because you probably already have setup RequireJS optimizer or other build process. To build the shim for RequireJS follow this steps:
77+
78+
- Identify algorithms and encoder/decoders you need.
79+
- Look up relationship between components and rollups file here: https://code.google.com/p/crypto-js/source/browse/tags/3.1.2/builder/build.yml
80+
- Write a shim for this relationship.
81+
82+
Here's the example: Let's say we want to use MD5 with Base64 encoder. The shim would look like this
83+
84+
```
85+
require.config({
86+
paths: {
87+
'cryptojs.core': "path/to/cryptojs/components/core.js",
88+
'cryptojs.md5': "path/to/cryptojs/components/md5.js",
89+
'cryptojs.base64': "path/to/cryptojs/components/enc-base64.js"
90+
},
91+
shim: {
92+
'cryptojs.core': {
93+
exports: "CryptoJS"
94+
},
95+
'cryptojs.md5': {
96+
deps: ['cryptojs.core']
97+
exports: "CryptoJS" //You can also use "CryptoJS.MD5"
98+
},
99+
'cryptojs.base64': {
100+
deps: ['cryptojs.core']
101+
exports: "CryptoJS" //You can also use "CryptoJS.enc.Base64"
102+
}
103+
}
104+
});
105+
```
106+
107+
### Copyrights
108+
Please see copyrights.txt which is copy of corresponding file from Google Code project.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "cryptojslib",
3+
"version": "3.1.2",
4+
"main": "**/*.js",
5+
"homepage": "https://github.com/sytelus/cryptojs",
6+
"repository": {
7+
"type": "git",
8+
"url": "git://github.com/sytelus/cryptojs.git"
9+
},
10+
"dependencies": {
11+
},
12+
"devDependencies": {
13+
}
14+
}

docs/components/cryptojslib/components/aes-min.js

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)