-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f1aace4
commit a90f38e
Showing
12 changed files
with
181 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
var add64 = function ( a , b ) { | ||
|
||
var t , u , c ; | ||
|
||
t = ( a[1] >>> 0 ) + ( b[1] >>> 0 ) ; | ||
u = t & 0xffffffff ; | ||
c = +( t > 0xffffffff ) ; | ||
|
||
return [ ( a[0] + b[0] + c ) & 0xffffffff , u ] ; | ||
|
||
} ; | ||
|
||
exports.add64 = add64 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
var and64 = function ( a , b ) { | ||
|
||
return [ a[0] & b[0] , a[1] & b[1] ] ; | ||
|
||
} ; | ||
|
||
exports.and64 = and64 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
var big64 = function ( a , o ) { | ||
|
||
return [ | ||
( a[o + 0] << 24 ) | ( a[o + 1] << 16 ) | ( a[o + 2] << 8 ) | a[o + 3] , | ||
( a[o + 4] << 24 ) | ( a[o + 5] << 16 ) | ( a[o + 6] << 8 ) | a[o + 7] | ||
] ; | ||
|
||
} ; | ||
|
||
exports.big64 = big64 ; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
var not64 = function ( a ) { | ||
|
||
return [ ~a[0] , ~a[1] ] ; | ||
|
||
} ; | ||
|
||
exports.not64 = not64 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
var rot64 = function ( a , s ) { | ||
|
||
if ( s < 32 ) { | ||
|
||
return [ | ||
( a[1] << ( 32 - s ) ) | ( a[0] >>> s ) , | ||
( a[0] << ( 32 - s ) ) | ( a[1] >>> s ) | ||
] ; | ||
|
||
} | ||
|
||
else { | ||
|
||
s -= 32 ; | ||
|
||
return [ | ||
( a[0] << ( 32 - s ) ) | ( a[1] >>> s ) , | ||
( a[1] << ( 32 - s ) ) | ( a[0] >>> s ) | ||
] ; | ||
|
||
} | ||
|
||
} ; | ||
|
||
exports.rot64 = rot64 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
var shr64 = function ( a , s ) { | ||
|
||
return [ a[0] >>> s , ( a[0] << ( 32 - s ) ) | ( a[1] >>> s ) ] ; | ||
|
||
} ; | ||
|
||
exports.shr64 = shr64 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
var xor64 = function ( a , b ) { | ||
|
||
return [ a[0] ^ b[0] , a[1] ^ b[1] ] ; | ||
|
||
} ; | ||
|
||
exports.xor64 = xor64 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +0,0 @@ | ||
|
||
test( "dummy" , function () { | ||
|
||
ok( false, "tests implemented" ); | ||
|
||
} ); | ||