FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pythonmonkey-crypto-js-fullstack-example/aes.js at main · Distributive-Network/pythonmonkey-crypto-js-fullstack-example · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
Distributive-Network
/
pythonmonkey-crypto-js-fullstack-example
Public
Notifications
You must be signed in to change notification settings
Fork
1
Star
3
Code
Issues
1
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
pythonmonkey-crypto-js-fullstack-example
/
aes.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (12 loc) · 315 Bytes
Breadcrumbs
pythonmonkey-crypto-js-fullstack-example
/
aes.js
Copy path
File metadata and controls
16 lines (12 loc) · 315 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const
CryptoJS
=
require
(
"crypto-js"
)
;
function
encrypt
(
message
,
key
)
{
return
CryptoJS
.
AES
.
encrypt
(
message
,
key
)
.
toString
(
)
;
}
function
decrypt
(
ciphertext
,
key
)
{
const
bytes
=
CryptoJS
.
AES
.
decrypt
(
ciphertext
,
key
)
;
return
bytes
.
toString
(
CryptoJS
.
enc
.
Utf8
)
;
}
module
.
exports
=
{
encrypt
,
decrypt
,
}
Back
|
FazBrowse Home
|
New Git URL