-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from vusion/task-2817277092559616-cw_cryptojs_…
…library-hanshijie-240301 feat: 新增sjcl库版本的base64算法
- Loading branch information
Showing
6 changed files
with
32 additions
and
6 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,8 @@ | ||
## 1.0.2 | ||
|
||
Associated Task: [#281727](https://projectmanage.netease-official.lcap.163yun.com/dashboard/TaskDetail?id=2817277092559616) | ||
|
||
### ✨Features | ||
|
||
- [bbaa239](https://github.com/vusion/cloud-ui-materials/commit/bbaa23939f08ec7397ff463caf9736cf63c3a291) Thanks [ncqwer](https://github.com/ncqwer) ! - 新增sjcl库版本的base64算法 | ||
|
5 changes: 5 additions & 0 deletions
5
packages/cw/cw_cryptojs_library/logics/base64Withsjcl/api.yaml
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,5 @@ | ||
- name: base64Withsjcl | ||
description: 使用sjcl库完成utf8的base64 | ||
type: both | ||
belong: logic | ||
labels: [Runtime] |
10 changes: 10 additions & 0 deletions
10
packages/cw/cw_cryptojs_library/logics/base64Withsjcl/index.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,10 @@ | ||
import sjcl from 'sjcl'; | ||
|
||
// doc: https://github.com/bitwiseshiftleft/sjcl | ||
/** | ||
* @param {string} string <true> 原始字符串 | ||
* @returns {string} 加密后结果 | ||
*/ | ||
export default (string) => { | ||
return sjcl.codec.base64url.fromBits(sjcl.codec.utf8String.toBits(string)); | ||
}; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Plugin-Version: 1.0.0 | ||
Library-Type: Frontend | ||
Metadata-File: usage.json | ||
packages/extension/[email protected].1/dist-theme/demo.html: dist-theme/demo.html | ||
packages/extension/[email protected].1/dist-theme/index.js: dist-theme/index.js | ||
packages/extension/[email protected].1/dist-theme/index.js.map: dist-theme/index.js.map | ||
packages/extension/[email protected].2/dist-theme/demo.html: dist-theme/demo.html | ||
packages/extension/[email protected].2/dist-theme/index.js: dist-theme/index.js | ||
packages/extension/[email protected].2/dist-theme/index.js.map: dist-theme/index.js.map |
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