From 5b264b64fd0bc1df6f67ef467d3d72acf4189ad0 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 5 Nov 2024 20:01:34 +0900 Subject: [PATCH] Change the API name `DecryptStringHIGHT` to `DecryptString` and `EncryptStringHIGHT` to `EncryptString` --- .../Properties/AssemblyInfo.cs | 6 +++--- .../Properties/AssemblyInfo.cs | 6 +++--- .../WelsonJS.Toolkit/Cryptography/HIGHT.cs | 3 ++- .../Properties/AssemblyInfo.cs | 6 +++--- WelsonJS.Toolkit/WelsonJS.Toolkit/Toolkit.cs | 4 ++-- app.js | 4 ++-- encryptor.js | 2 +- lib/toolkit.js | 20 +++++++++++-------- 8 files changed, 28 insertions(+), 23 deletions(-) diff --git a/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/AssemblyInfo.cs b/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/AssemblyInfo.cs index cc95635..39760c6 100644 --- a/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/AssemblyInfo.cs +++ b/WelsonJS.Toolkit/WelsonJS.Launcher/Properties/AssemblyInfo.cs @@ -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")] diff --git a/WelsonJS.Toolkit/WelsonJS.Service/Properties/AssemblyInfo.cs b/WelsonJS.Toolkit/WelsonJS.Service/Properties/AssemblyInfo.cs index dbda055..5319c17 100644 --- a/WelsonJS.Toolkit/WelsonJS.Service/Properties/AssemblyInfo.cs +++ b/WelsonJS.Toolkit/WelsonJS.Service/Properties/AssemblyInfo.cs @@ -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")] diff --git a/WelsonJS.Toolkit/WelsonJS.Toolkit/Cryptography/HIGHT.cs b/WelsonJS.Toolkit/WelsonJS.Toolkit/Cryptography/HIGHT.cs index ece1d05..8c1e249 100644 --- a/WelsonJS.Toolkit/WelsonJS.Toolkit/Cryptography/HIGHT.cs +++ b/WelsonJS.Toolkit/WelsonJS.Toolkit/Cryptography/HIGHT.cs @@ -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 * - @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 diff --git a/WelsonJS.Toolkit/WelsonJS.Toolkit/Properties/AssemblyInfo.cs b/WelsonJS.Toolkit/WelsonJS.Toolkit/Properties/AssemblyInfo.cs index b76835a..80e27ca 100644 --- a/WelsonJS.Toolkit/WelsonJS.Toolkit/Properties/AssemblyInfo.cs +++ b/WelsonJS.Toolkit/WelsonJS.Toolkit/Properties/AssemblyInfo.cs @@ -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")] diff --git a/WelsonJS.Toolkit/WelsonJS.Toolkit/Toolkit.cs b/WelsonJS.Toolkit/WelsonJS.Toolkit/Toolkit.cs index 7cea066..4ca03ec 100644 --- a/WelsonJS.Toolkit/WelsonJS.Toolkit/Toolkit.cs +++ b/WelsonJS.Toolkit/WelsonJS.Toolkit/Toolkit.cs @@ -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); diff --git a/app.js b/app.js index 2e2165b..0ed16d7 100644 --- a/app.js +++ b/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 ''; diff --git a/encryptor.js b/encryptor.js index e68dc05..63305f8 100644 --- a/encryptor.js +++ b/encryptor.js @@ -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); diff --git a/lib/toolkit.js b/lib/toolkit.js index 8cdcd14..b8473b4 100644 --- a/lib/toolkit.js +++ b/lib/toolkit.js @@ -1,5 +1,5 @@ // toolkit.js -// WelsonJS native component interface for WelsonJS framework +// WelsonJS native toolkit interface version 0.3.7 // Namhyeon Go // 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;