Changeset - e2095e3881bf
[Not reviewed]
default
0 9 0
Laman - 3 years ago 2022-04-01 13:09:18

reformated with more whitespace
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/blake.js
Show inline comments
 
@@ -86,9 +86,11 @@ BLAKE2S.prototype._mix=function(arr,ia,i
 
	c=(c+d)&MASK; b=rrot(b^c,7);
 
	arr[ia]=a; arr[ib]=b; arr[ic]=c; arr[id]=d;
 
};
 

	
 
export function blake2s(data,outputLen=32,key=[]){
 
	let h=new BLAKE2S(outputLen,key);
 
	for(let i=0;i<data.length;i+=BLOCK_LEN){h.update(data.slice(i,i+BLOCK_LEN));}
 
	for (let i = 0; i < data.length; i += BLOCK_LEN) {
 
		h.update(data.slice(i, i + BLOCK_LEN));
 
	}
 
	return h.digest();
 
}
0 comments (0 inline, 0 general)