Class ReversibleShortUrl
java.lang.Object
cn.net.pap.common.datastructure.url.ReversibleShortUrl
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ReversibleShortUrl
public ReversibleShortUrl()
-
-
Method Details
-
encode
编码- Parameters:
url-- Returns:
-
decode
解码- Parameters:
shortUrl-- Returns:
-
encodeReverse
这里做一个取巧,因为原始的 Base64 编解码 的字符顺序是定义好的. 为了增加破解的难度,这里做一个字符的替换,将原始的字符进行替换为新的.- Parameters:
url-- Returns:
-
decodeReverse
-