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

8
LINES

< > BotCompany Repo | #1004986 // md5OfRGBImage

JavaX fragment (include)

1  
static S md5OfRGBImage(RGBImage img) ctex {
2  
  MessageDigest m = MessageDigest.getInstance("MD5");
3  
  m.update(intToBytes(img.getWidth()));
4  
  int[] pixels = img.getPixels();
5  
  for (int i = 0; i < l(pixels); i++)
6  
    m.update(intToBytes(pixels[i]));
7  
  ret bytesToHex(m.digest());
8  
}

Author comment

Began life as a copy of #1004629

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004986
Snippet name: md5OfRGBImage
Eternal ID of this version: #1004986/1
Text MD5: 1efc10c8115d5835ddb147c3575d2b6f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-09-20 23:18:05
Source code size: 285 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 580 / 873
Referenced in: [show references]