1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

'v3.5.1.1'

This commit is contained in:
gnosygnu
2016-05-01 21:06:12 -04:00
parent 5ce4ea2a08
commit 96636f3161
131 changed files with 2287 additions and 928 deletions

View File

@@ -18,8 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa.files; import gplx.*; import gplx.xowa.*;
import gplx.core.consoles.*; import gplx.langs.htmls.encoders.*;
public class Xof_file_wkr_ {
public static final Gfo_url_encoder Md5_decoder = Gfo_url_encoder_.New__http_url().Init__same__many(Byte_ascii.Plus).Make();
public static byte[] Md5_fast(byte[] v) {return Bry_.new_a7(gplx.core.security.HashAlgo_.Md5.CalcHash(Console_adp_.Noop, gplx.core.ios.IoStream_.ary_(v)));}
private static final gplx.core.security.Hash_algo md5_hash = gplx.core.security.Hash_algo_.New__md5();
public static final Gfo_url_encoder Md5_decoder = Gfo_url_encoder_.New__http_url().Init__same__many(Byte_ascii.Plus).Make();
public static byte[] Md5_fast(byte[] v) {return md5_hash.Hash_bry_as_bry(v);}
public static byte[] Md5(byte[] ttl) {
ttl = Md5_decoder.Decode(Ttl_standardize(ttl));
return Xof_file_wkr_.Md5_fast(ttl); // NOTE: md5 is calculated off of url_decoded ttl; EX: A%2Cb is converted to A,b and then md5'd. note that A%2Cb still remains the title