|
@@ -18,6 +18,10 @@ var BSE2 = &SimpleEncrypt{Key: "TOP2017jianyu"}
|
|
|
var ESE = &SimpleEncrypt{Key: "PEjy2018topnet"}
|
|
|
var ESE2 = &SimpleEncrypt{Key: "TopnetJy2018Pe"}
|
|
|
|
|
|
+//首页
|
|
|
+var ISE = &SimpleEncrypt{Key: "Indexjy2021topnet"}
|
|
|
+var ISE2 = &SimpleEncrypt{Key: "TopnetJy2021Pe"}
|
|
|
+
|
|
|
//通用加密
|
|
|
func CommonEncodeArticle(stype string, keys ...string) (id string) {
|
|
|
switch stype {
|
|
@@ -27,7 +31,10 @@ func CommonEncodeArticle(stype string, keys ...string) (id string) {
|
|
|
id = BEncodeArticleId2ByCheck("B", BSE, BSE2, keys...)
|
|
|
case "mailprivate":
|
|
|
id = BEncodeArticleId2ByCheck("C", ESE, ESE2, keys...)
|
|
|
+ case "indexcontent":
|
|
|
+ id = BEncodeArticleId2ByCheck("D", ISE, ISE2, keys...)
|
|
|
}
|
|
|
+
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -40,6 +47,8 @@ func CommonDecodeArticle(stype string, id string) (res []string) {
|
|
|
res = BDecodeArticleId2ByCheck(id, BSE, BSE2)
|
|
|
case "mailprivate":
|
|
|
res = BDecodeArticleId2ByCheck(id, ESE, ESE2)
|
|
|
+ case "indexcontent":
|
|
|
+ res = BDecodeArticleId2ByCheck(id, ISE, ISE2)
|
|
|
}
|
|
|
return
|
|
|
}
|