mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 07:21:43 +00:00
Change the API name DecryptStringHIGHT
to DecryptString
and EncryptStringHIGHT
to EncryptString
This commit is contained in:
parent
a8a13b539c
commit
5b264b64fd
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Catswords")]
|
||||
[assembly: AssemblyProduct("WelsonJS")]
|
||||
[assembly: AssemblyCopyright("Catswords OSS, C-2021-000237, Opensource licensed under GPLv3 or MS-RL")]
|
||||
[assembly: AssemblyCopyright("Catswords OSS, Opensource licensed under GPLv3")]
|
||||
[assembly: AssemblyTrademark("WelsonJS")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.2.7.31")]
|
||||
[assembly: AssemblyFileVersion("0.2.7.31")]
|
||||
[assembly: AssemblyVersion("0.2.7.49")]
|
||||
[assembly: AssemblyFileVersion("0.2.7.49")]
|
||||
|
|
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Catswords")]
|
||||
[assembly: AssemblyProduct("WelsonJS")]
|
||||
[assembly: AssemblyCopyright("Catswords OSS, C-2021-000237, Opensource licensed under GPLv3 or MS-RL")]
|
||||
[assembly: AssemblyCopyright("Catswords OSS, Opensource licensed under GPLv3")]
|
||||
[assembly: AssemblyTrademark("WelsonJS")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.2.7.26")]
|
||||
[assembly: AssemblyFileVersion("0.2.7.26")]
|
||||
[assembly: AssemblyVersion("0.2.7.49")]
|
||||
[assembly: AssemblyFileVersion("0.2.7.49")]
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* HIGHT.cs
|
||||
*
|
||||
* description:
|
||||
* HIGHT(ISO/IEC 18033-3) cryptography algorithm (ECB mode) implementation for WelsonJS
|
||||
* HIGHT(ISO/IEC 18033-3) cryptography algorithm implementation
|
||||
*
|
||||
* website:
|
||||
* - https://github.com/gnh1201/welsonjs
|
||||
|
@ -16,6 +16,7 @@
|
|||
* - Namhyeon Go <abuse@catswords.net>
|
||||
* - @chandong83 (github.com) - Original author of CryptoHIGHT.cs
|
||||
* - KISA(Korea Internet & Security Agency)
|
||||
* - Korea Unversity
|
||||
*
|
||||
* references:
|
||||
* - https://github.com/chandong83/csharp_crypto_hight_ecb_examples
|
||||
|
|
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Catswords")]
|
||||
[assembly: AssemblyProduct("WelsonJS")]
|
||||
[assembly: AssemblyCopyright("Catswords OSS, C-2021-000237, Opensource licensed under GPLv3 or MS-RL")]
|
||||
[assembly: AssemblyCopyright("Catswords OSS, Opensource licensed under GPLv3")]
|
||||
[assembly: AssemblyTrademark("WelsonJS")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.2.7.22")]
|
||||
[assembly: AssemblyFileVersion("0.2.7.22")]
|
||||
[assembly: AssemblyVersion("0.2.7.49")]
|
||||
[assembly: AssemblyFileVersion("0.2.7.49")]
|
||||
|
|
|
@ -225,7 +225,7 @@ namespace WelsonJS
|
|||
}
|
||||
|
||||
[ComVisible(true)]
|
||||
public string EncryptStringHIGHT(string key, string data)
|
||||
public string EncryptString(string key, string data)
|
||||
{
|
||||
byte[] userKey = Encoding.ASCII.GetBytes(key);
|
||||
byte[] dataIn = Encoding.UTF8.GetBytes(data);
|
||||
|
@ -235,7 +235,7 @@ namespace WelsonJS
|
|||
}
|
||||
|
||||
[ComVisible(true)]
|
||||
public string DecryptStringHIGHT(string key, string encryptedData)
|
||||
public string DecryptString(string key, string encryptedData)
|
||||
{
|
||||
byte[] userKey = Encoding.ASCII.GetBytes(key);
|
||||
byte[] dataIn = Convert.FromBase64String(encryptedData);
|
||||
|
|
4
app.js
4
app.js
|
@ -315,7 +315,7 @@ function require(pathname) {
|
|||
});
|
||||
break;
|
||||
|
||||
case ".enc": // protected script (HIGHT, ISO/IEC 18033-3)
|
||||
case ".enc": // encrypted script (require WelsonJS.Toolkit)
|
||||
T = (function(data, o) {
|
||||
try {
|
||||
var s = '', i = 0, k = 6;
|
||||
|
@ -327,7 +327,7 @@ function require(pathname) {
|
|||
i++;
|
||||
}
|
||||
if (i == k) return '';
|
||||
return o.DecryptStringHIGHT(s, data);
|
||||
return o.DecryptString(s, data);
|
||||
} catch (e) {
|
||||
console.error("Failed to load the encrypted data:", e.message);
|
||||
return '';
|
||||
|
|
|
@ -25,7 +25,7 @@ function main(args) {
|
|||
}
|
||||
|
||||
var data = FILE.readFile(filename, FILE.CdoCharset.CdoUTF_8);
|
||||
var encryptedData = Toolkit.encryptStringHIGHT(userKey, data);
|
||||
var encryptedData = Toolkit.encryptString(userKey, data);
|
||||
|
||||
var dstfile = filename + ".enc";
|
||||
FILE.writeFile(dstfile, encryptedData, FILE.CdoCharset.CdoUTF_8);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// toolkit.js
|
||||
// WelsonJS native component interface for WelsonJS framework
|
||||
// WelsonJS native toolkit interface version 0.3.7
|
||||
// Namhyeon Go <abuse@catswords.net>
|
||||
// https://github.com/gnh1201/welsonjs
|
||||
|
||||
|
@ -93,12 +93,12 @@ function closeProcess(pid) {
|
|||
return getInterface().CloseProcess(pid);
|
||||
}
|
||||
|
||||
function encryptStringHIGHT(userKey, data) {
|
||||
return getInterface().EncryptStringHIGHT(userKey, data);
|
||||
function encryptString(userKey, data) {
|
||||
return getInterface().EncryptString(userKey, data);
|
||||
}
|
||||
|
||||
function decryptStringHIGHT(userKey, encryptedData) {
|
||||
return getInterface().DecryptStringHIGHT(userKey, encryptedData);
|
||||
function decryptString(userKey, encryptedData) {
|
||||
return getInterface().DecryptString(userKey, encryptedData);
|
||||
}
|
||||
|
||||
exports.create = create;
|
||||
|
@ -112,10 +112,14 @@ exports.prompt = prompt;
|
|||
exports.NamedSharedMemory = NamedSharedMemory;
|
||||
exports.openProcess = openProcess;
|
||||
exports.closeProcess = closeProcess;
|
||||
exports.encryptStringHIGHT = encryptStringHIGHT;
|
||||
exports.decryptStringHIGHT = decryptStringHIGHT;
|
||||
exports.encryptString = encryptString;
|
||||
exports.decryptString = decryptString;
|
||||
|
||||
exports.VERSIONINFO = "WelsonJS native component interface (WelsonJS.Toolkit) version 0.3.6";
|
||||
// compatiblity (below version 0.7.48)
|
||||
exports.encryptStringHIGHT = encryptString;
|
||||
exports.decryptStringHIGHT = decryptString;
|
||||
|
||||
exports.VERSIONINFO = "WelsonJS native toolkit interface version 0.3.7";
|
||||
exports.AUTHOR = "abuse@catswords.net";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
Loading…
Reference in New Issue
Block a user