Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

5
LINES

< > BotCompany Repo | #1001419 // verifyMD5

JavaX fragment (include)

static void verifyMD5(S md5) {
  if (md5.length() != 32) fail("bad length for md5: " + quote(md5));
  if (!Pattern.compile("[a-f0-9]+").matcher(md5).matches())
    fail("bad md5: " + quote(md5));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001419
Snippet name: verifyMD5
Eternal ID of this version: #1001419/1
Text MD5: c2ad4b2d4af906176830e4bdd4e9583d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-15 18:34:16
Source code size: 201 bytes / 5 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 592 / 813
Referenced in: [show references]