Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
Version 1.2-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ttwizz committed Apr 15, 2024
1 parent 45fa441 commit f226d0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pixcrypt-1.2-1.rockspec → pixcrypt-1.2-2.rockspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package = "pixcrypt"
version = "1.2-1"
version = "1.2-2"
source = {
url = "git+https://github.com/ttwizz/pixcrypt.git"
}
Expand Down
6 changes: 3 additions & 3 deletions src/pixcrypt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
]]


local pixcrypt = { Secret = 2773480762 }
local pixcrypt = {Secret = 2773480762}


function pixcrypt:Encrypt(Key, String)
assert(type(Key) == "string", "Argument 1 (Key) must be a string")
assert(type(String) == "string", "Argument 2 (String) must be a string")

local Summand = #Key + math.pi * 4.3579
local Index = 1
local Result = ""
local Index = 1

for Character in string.gmatch(Key, ".") do
Summand = Summand + string.byte(Character) / 1.8602
Expand All @@ -37,8 +37,8 @@ function pixcrypt:Decrypt(Key, String)
assert(type(String) == "string", "Argument 2 (String) must be a string")

local Summand = #Key + math.pi * 4.3579
local Index = 1
local Result = ""
local Index = 1

for Character in string.gmatch(Key, ".") do
Summand = Summand + string.byte(Character) / 1.8602
Expand Down

0 comments on commit f226d0d

Please sign in to comment.