mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
DES crypt use standard padding mode PKCS7 (#1179)
* DES crypt use standard padding PKCS7 * add more desencode(pkcs7 padding mode) test case
This commit is contained in:
@@ -21,4 +21,14 @@ assert(desdecode(key, etext) == text)
|
||||
local etext = desencode(key, text, "pkcs7")
|
||||
assert(desdecode(key, etext, "pkcs7") == text)
|
||||
|
||||
assert(desencode(key, "","pkcs7")=="/rlZt9RkL8s=")
|
||||
assert(desencode(key, "1","pkcs7")=="g6AtgJul6q0=")
|
||||
assert(desencode(key, "12","pkcs7")=="NefFpG+m1O4=")
|
||||
assert(desencode(key, "123","pkcs7")=="LDiFUdf0iew=")
|
||||
assert(desencode(key, "1234","pkcs7")=="T9u7dzBdi+w=")
|
||||
assert(desencode(key, "12345","pkcs7")=="AGgKdx/Qic8=")
|
||||
assert(desencode(key, "123456","pkcs7")=="ED5wLgc3Mnw=")
|
||||
assert(desencode(key, "1234567","pkcs7")=="mYo+BYIT41M=")
|
||||
assert(desencode(key, "12345678","pkcs7")=="ltACiHjVjIn+uVm31GQvyw==")
|
||||
|
||||
skynet.start(skynet.exit)
|
||||
Reference in New Issue
Block a user