Skip to content

Commit

Permalink
inline all libraries for calls (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
nalinbhardwaj authored Oct 24, 2023
1 parent b81b1d9 commit f13149e
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 100 deletions.
192 changes: 96 additions & 96 deletions lcov.info
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
TN:
SF:src/P256.sol
FN:10,P256.verifySignatureAllowMalleability
FNDA:6,P256.verifySignatureAllowMalleability
DA:17,6
DA:18,6
DA:19,6
FNDA:0,P256.verifySignatureAllowMalleability
DA:17,0
DA:18,0
DA:19,0
BRDA:19,0,0,-
BRDA:19,0,1,-
DA:21,6
DA:21,0
FN:28,P256.verifySignature
FNDA:5,P256.verifySignature
DA:36,5
BRDA:36,1,0,4
BRDA:36,1,1,1
DA:37,1
DA:40,4
FNDA:0,P256.verifySignature
DA:36,0
BRDA:36,1,0,-
BRDA:36,1,1,-
DA:37,0
DA:40,0
FNF:2
FNH:2
FNH:0
LF:7
LH:7
LH:0
BRF:4
BRH:2
BRH:0
end_of_record
TN:
SF:src/P256Verifier.sol
Expand Down Expand Up @@ -237,98 +237,98 @@ end_of_record
TN:
SF:src/WebAuthn.sol
FN:12,WebAuthn.contains
FNDA:11,WebAuthn.contains
DA:17,11
DA:18,11
DA:20,11
DA:21,11
DA:23,11
DA:24,168
BRDA:24,0,0,167
BRDA:24,0,1,1
DA:25,1
DA:28,167
BRDA:28,1,0,165
BRDA:28,1,1,2
DA:29,2
DA:33,8
FNDA:0,WebAuthn.contains
DA:17,0
DA:18,0
DA:20,0
DA:21,0
DA:23,0
DA:24,0
BRDA:24,0,0,-
BRDA:24,0,1,-
DA:25,0
DA:28,0
BRDA:28,1,0,-
BRDA:28,1,1,-
DA:29,0
DA:33,0
FN:44,WebAuthn.checkAuthFlags
FNDA:9,WebAuthn.checkAuthFlags
DA:49,9
BRDA:49,2,0,8
BRDA:49,2,1,1
DA:50,1
DA:57,8
DA:58,2
BRDA:56,3,0,7
BRDA:56,3,1,1
DA:60,1
DA:65,7
BRDA:65,4,0,1
BRDA:65,4,1,1
DA:66,2
BRDA:66,5,0,1
BRDA:66,5,1,1
DA:67,1
DA:71,6
FNDA:0,WebAuthn.checkAuthFlags
DA:49,0
BRDA:49,2,0,-
BRDA:49,2,1,-
DA:50,0
DA:57,0
DA:58,0
BRDA:56,3,0,-
BRDA:56,3,1,-
DA:60,0
DA:65,0
BRDA:65,4,0,-
BRDA:65,4,1,-
DA:66,0
BRDA:66,5,0,-
BRDA:66,5,1,-
DA:67,0
DA:71,0
FN:124,WebAuthn.verifySignature
FNDA:10,WebAuthn.verifySignature
DA:138,10
DA:139,9
BRDA:137,6,0,6
BRDA:137,6,1,4
DA:141,4
DA:145,6
DA:146,6
BRDA:146,7,0,5
BRDA:146,7,1,1
DA:147,1
DA:151,5
DA:152,5
DA:158,5
BRDA:158,8,0,3
BRDA:158,8,1,2
DA:159,2
DA:163,3
DA:164,3
DA:168,3
FNDA:0,WebAuthn.verifySignature
DA:138,0
DA:139,0
BRDA:137,6,0,-
BRDA:137,6,1,-
DA:141,0
DA:145,0
DA:146,0
BRDA:146,7,0,-
BRDA:146,7,1,-
DA:147,0
DA:151,0
DA:152,0
DA:158,0
BRDA:158,8,0,-
BRDA:158,8,1,-
DA:159,0
DA:163,0
DA:164,0
DA:168,0
FNF:3
FNH:3
FNH:0
LF:32
LH:32
LH:0
BRF:18
BRH:18
BRH:0
end_of_record
TN:
SF:src/utils/Base64URL.sol
FN:7,Base64URL.encode
FNDA:1799,Base64URL.encode
DA:8,1799
DA:9,1799
DA:12,1799
DA:13,1799
BRDA:13,0,0,518
BRDA:13,0,1,1281
DA:14,1281
BRDA:14,1,0,1281
BRDA:14,1,1,511
DA:16,1799
DA:17,1799
DA:19,1799
DA:20,524845
BRDA:20,2,0,1248
BRDA:20,2,1,523597
DA:21,1248
DA:22,523597
BRDA:22,3,0,176191
BRDA:22,3,1,347406
DA:23,176191
DA:25,347406
DA:29,1799
FNDA:0,Base64URL.encode
DA:8,0
DA:9,0
DA:12,0
DA:13,0
BRDA:13,0,0,-
BRDA:13,0,1,-
DA:14,0
BRDA:14,1,0,-
BRDA:14,1,1,-
DA:16,0
DA:17,0
DA:19,0
DA:20,0
BRDA:20,2,0,-
BRDA:20,2,1,-
DA:21,0
DA:22,0
BRDA:22,3,0,-
BRDA:22,3,1,-
DA:23,0
DA:25,0
DA:29,0
FNF:1
FNH:1
FNH:0
LF:14
LH:14
LH:0
BRF:8
BRH:8
BRH:0
end_of_record
4 changes: 2 additions & 2 deletions src/P256.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ library P256 {
uint256 s,
uint256 x,
uint256 y
) public view returns (bool) {
) internal view returns (bool) {
bytes memory args = abi.encode(message_hash, r, s, x, y);
(bool success, bytes memory ret) = VERIFIER.staticcall(args);
assert(success); // never reverts, always returns 0 or 1
Expand All @@ -31,7 +31,7 @@ library P256 {
uint256 s,
uint256 x,
uint256 y
) public view returns (bool) {
) internal view returns (bool) {
// check for signature malleability
if (s > P256_N_DIV_2) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/WebAuthn.sol
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ library WebAuthn {
uint256 s,
uint256 x,
uint256 y
) public view returns (bool) {
) internal view returns (bool) {
// Check that authenticatorData has good flags
if (
authenticatorData.length < 32 ||
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Base64URL.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity 0.8.21;
import "openzeppelin-contracts/contracts/utils/Base64.sol";

library Base64URL {
function encode(bytes memory data) public pure returns (string memory) {
function encode(bytes memory data) internal pure returns (string memory) {
string memory strb64 = Base64.encode(data);
bytes memory b64 = bytes(strb64);

Expand Down

1 comment on commit f13149e

@Hammered72
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good guys

Please sign in to comment.