-
-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
103 additions
and
11 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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 @@ | ||
all: | ||
echo aaa | ||
|
||
aaa: | ||
cat \ | ||
lib/header.js \ | ||
../min/nodeutil-1.0.min.js \ | ||
lib/footer.js \ | ||
> lib/jsrsasign-util.js | ||
|
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,26 @@ | ||
jsrsasign-util | ||
========= | ||
|
||
This package provides supplementary functions for 'jsrsasign' such like file I/O utilities. | ||
|
||
Public page is http://kjur.github.com/jsrsasign . | ||
|
||
[github TOP](http://kjur.github.io/jsrsasign/)|[API doc](http://kjur.github.io/jsrsasign/api/)|[Wiki](https://github.com/kjur/jsrsasign/wiki)|[Node sample](https://github.com/kjur/jsrsasign/tree/master/sample_node) | ||
|
||
AVAILABLE FUNCTIONS | ||
----------------------------- | ||
|
||
- [readFile](http://kjur.github.io/jsrsasign/api/symbols/global__.html#readFile) : read file as binary string | ||
- [readFileHexByBin](http://kjur.github.io/jsrsasign/api/symbols/global__.html#readFileHexByBin) : read file as binary then convert it to hexadecimal string | ||
- [readFileUTF8](http://kjur.github.io/jsrsasign/api/symbols/global__.html#readFileUTF8) : read file as UTF-8 string | ||
- [saveFile](http://kjur.github.io/jsrsasign/api/symbols/global__.html#saveFile) : save file as binary string | ||
- [saveFileBinByHex](http://kjur.github.io/jsrsasign/api/symbols/global__.html#saveFileBinByHex) : convert a hexadecimal string to raw string then save it as file. | ||
|
||
EXAMPLE(1) SIGNATURE | ||
-------------------- | ||
|
||
> var rsu = require('jsrsasign-util'); | ||
> var rawString = rsu.readFile("bar.bin"); | ||
> rsu.saveFileBinByHex("foo.bin", "30143abb..."); | ||
|
||
|
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,7 @@ | ||
|
||
exports.readFileUTF8 = readFileUTF8; | ||
exports.readFileHexByBin = readFileHexByBin; | ||
exports.readFile = readFile; | ||
exports.saveFile = saveFile; | ||
exports.saveFileBinByHex = saveFileBinByHex; | ||
|
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,2 @@ | ||
/*! jsrsasign-util-1.0.0 (c) 2016 Kenji Urushima | kjur.github.com/jsrsasign/license | ||
*/ |
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,11 @@ | ||
/*! jsrsasign-util-1.0.0 (c) 2016 Kenji Urushima | kjur.github.com/jsrsasign/license | ||
*/ | ||
/*! nodeutil-1.0.0 (c) 2015 Kenji Urushima | kjur.github.com/jsrsasign/license | ||
*/ | ||
function readFileUTF8(a){return require("fs").readFileSync(a,"utf8")}function readFileHexByBin(c){var b=require("jsrsasign");var a=require("fs");return b.rstrtohex(a.readFileSync(c,"binary"))}function readFile(b){var a=require("fs");return a.readFileSync(b,"binary")}function saveFile(c,b){var a=require("fs");a.writeFileSync(c,b,"binary")}function saveFileBinByHex(e,b){var a=require("fs");var c=require("jsrsasign");var d=c.hextorstr(b);a.writeFileSync(e,d,"binary")}; | ||
exports.readFileUTF8 = readFileUTF8; | ||
exports.readFileHexByBin = readFileHexByBin; | ||
exports.readFile = readFile; | ||
exports.saveFile = saveFile; | ||
exports.saveFileBinByHex = saveFileBinByHex; | ||
|
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,28 @@ | ||
{ | ||
"name": "jsrsasign-util", | ||
"version": "1.0.0", | ||
"description": "utilities for jsrsasign (kjur.github.io/jsrsasign) such like file utilities", | ||
"main": "lib/jsrsasign-util.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/kjur/jsrsasign.git" | ||
}, | ||
"keywords": [ | ||
"jsrsasign", "utilities", "file" | ||
], | ||
"author": "Kenji Urushima", | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://raw.github.com/kjur/jsrsasign/master/LICENSE.txt" | ||
} | ||
], | ||
"bugs": { | ||
"url": "https://github.com/kjur/jsrsasign/issues" | ||
}, | ||
"dependencies": { | ||
} | ||
} |