Fix typographical errors (#5194)
This commit is contained in:
@ -50,7 +50,7 @@ library MerkleProof {
|
||||
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
|
||||
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
|
||||
* hash matches the root of the tree. When processing the proof, the pairs
|
||||
* of leafs & pre-images are assumed to be sorted.
|
||||
* of leaves & pre-images are assumed to be sorted.
|
||||
*
|
||||
* This version handles proofs in memory with the default hashing function.
|
||||
*/
|
||||
@ -83,7 +83,7 @@ library MerkleProof {
|
||||
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
|
||||
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
|
||||
* hash matches the root of the tree. When processing the proof, the pairs
|
||||
* of leafs & pre-images are assumed to be sorted.
|
||||
* of leaves & pre-images are assumed to be sorted.
|
||||
*
|
||||
* This version handles proofs in memory with a custom hashing function.
|
||||
*/
|
||||
@ -115,7 +115,7 @@ library MerkleProof {
|
||||
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
|
||||
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
|
||||
* hash matches the root of the tree. When processing the proof, the pairs
|
||||
* of leafs & pre-images are assumed to be sorted.
|
||||
* of leaves & pre-images are assumed to be sorted.
|
||||
*
|
||||
* This version handles proofs in calldata with the default hashing function.
|
||||
*/
|
||||
@ -148,7 +148,7 @@ library MerkleProof {
|
||||
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
|
||||
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
|
||||
* hash matches the root of the tree. When processing the proof, the pairs
|
||||
* of leafs & pre-images are assumed to be sorted.
|
||||
* of leaves & pre-images are assumed to be sorted.
|
||||
*
|
||||
* This version handles proofs in calldata with a custom hashing function.
|
||||
*/
|
||||
|
||||
@ -8,7 +8,7 @@ import {Math} from "../math/Math.sol";
|
||||
*
|
||||
* This library supports PKCS#1 v1.5 padding to avoid malleability via chosen plaintext attacks in practical implementations.
|
||||
* The padding follows the EMSA-PKCS1-v1_5-ENCODE encoding definition as per section 9.2 of the RFC. This padding makes
|
||||
* RSA semanticaly secure for signing messages.
|
||||
* RSA semantically secure for signing messages.
|
||||
*
|
||||
* Inspired by https://github.com/adria0/SolRsaVerify[Adrià Massanet's work]
|
||||
*/
|
||||
@ -26,7 +26,7 @@ library RSA {
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Verifies a PKCSv1.5 signature given a digest according the verification
|
||||
* @dev Verifies a PKCSv1.5 signature given a digest according to the verification
|
||||
* method described in https://datatracker.ietf.org/doc/html/rfc8017#section-8.2.2[section 8.2.2 of RFC8017].
|
||||
*
|
||||
* IMPORTANT: Although this function allows for it, using n of length 1024 bits is considered unsafe.
|
||||
@ -136,7 +136,7 @@ library RSA {
|
||||
|
||||
/// @dev Reads a bytes32 from a bytes array without bounds checking.
|
||||
function _unsafeReadBytes32(bytes memory array, uint256 offset) private pure returns (bytes32 result) {
|
||||
// Memory safetiness is guaranteed as long as the provided `array` is a Solidity-allocated bytes array
|
||||
// Memory safeness is guaranteed as long as the provided `array` is a Solidity-allocated bytes array
|
||||
// and `offset` is within bounds. This is the case for all calls to this private function from {pkcs1}.
|
||||
assembly ("memory-safe") {
|
||||
result := mload(add(add(array, 0x20), offset))
|
||||
|
||||
@ -91,7 +91,7 @@ library CircularBuffer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Length of the buffer. This is the maximum number of elements kepts in the buffer.
|
||||
* @dev Length of the buffer. This is the maximum number of elements kept in the buffer.
|
||||
*/
|
||||
function length(Bytes32CircularBuffer storage self) internal view returns (uint256) {
|
||||
return self._data.length;
|
||||
|
||||
@ -43,7 +43,7 @@ library Heap {
|
||||
using SafeCast for *;
|
||||
|
||||
/**
|
||||
* @dev Binary heap that support values of type uint256.
|
||||
* @dev Binary heap that supports values of type uint256.
|
||||
*
|
||||
* Each element of that structure uses 2 storage slots.
|
||||
*/
|
||||
@ -235,7 +235,7 @@ library Heap {
|
||||
|
||||
/**
|
||||
* @dev Perform heap maintenance on `self`, starting at position `pos` (with the `value`), using `comp` as a
|
||||
* comparator, and moving toward the leafs of the underlying tree.
|
||||
* comparator, and moving toward the leaves of the underlying tree.
|
||||
*
|
||||
* NOTE: This is a private function that is called in a trusted context with already cached parameters. `length`
|
||||
* and `value` could be extracted from `self` and `pos`, but that would require redundant storage read. These
|
||||
@ -309,7 +309,7 @@ library Heap {
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Binary heap that support values of type uint208.
|
||||
* @dev Binary heap that supports values of type uint208.
|
||||
*
|
||||
* Each element of that structure uses 1 storage slots.
|
||||
*/
|
||||
@ -501,7 +501,7 @@ library Heap {
|
||||
|
||||
/**
|
||||
* @dev Perform heap maintenance on `self`, starting at position `pos` (with the `value`), using `comp` as a
|
||||
* comparator, and moving toward the leafs of the underlying tree.
|
||||
* comparator, and moving toward the leaves of the underlying tree.
|
||||
*
|
||||
* NOTE: This is a private function that is called in a trusted context with already cached parameters. `length`
|
||||
* and `value` could be extracted from `self` and `pos`, but that would require redundant storage read. These
|
||||
|
||||
Reference in New Issue
Block a user