Algorithm-Kademlia

 view release on metacpan or  search on metacpan

CODE_OF_CONDUCT.md  view on Meta::CPAN

posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
https://github.com/sanko/Algorithm-Kademlia/discussions.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed

CONTRIBUTING.md  view on Meta::CPAN


    ```bash
    # For a new feature:
    git checkout -b feature/add-riscv-support
    # For a bug fix:
    git checkout -b fix/struct-classification-bug
    ```

4.  **Make Your Changes**: Write your code. Please adhere to the existing coding style and add comments to new or complex logic.
5.  **Test Your Changes**: A pull request is far more likely to be accepted if it includes tests. If you add new functionality, please add a corresponding test case.
6.  **Update the Changelog**: Add an entry to the `[Unreleased]` section of `CHANGELOG.md` describing your change.
7.  **Submit a Pull Request**: Push your branch to your fork and open a pull request against the `main` branch of the original repository. Please provide a clear description of your changes and link to the relevant issue (e.g., `Fixes #123`).

README.md  view on Meta::CPAN

```
say 'Routing table has ' . $rt->size . ' peers';
```

# Algorithm::Kademlia::Storage

A simple in-memory key-value store intended to hold the DHT data.

## `new( [ ttl => 86400 ] )`

Constructor. `ttl` is the time-to-live for entries in seconds.

```perl
my $storage = Algorithm::Kademlia::Storage->new( ttl => 3600 );
```

## `put( $key_bin, $value_bin, [ $publisher_id_bin ] )`

Stores a value.

```

SECURITY.md  view on Meta::CPAN

# Security Policy

Until I have the version 1.0.0 release, I'll support only the last two minor versions with security updates.

## Supported Versions

| Version    | Supported          |
| ---------- | ------------------ |
| v1.0.x     | :white_check_mark: |
| < v1.0.0   | :x:                |

# Reporting a Vulnerability

If you have any issue regarding security, please disclose the information responsibly by sending a report to https://github.com/sanko/Algorithm-Kademlia/security/advisories/new and *not* at the public issue tracker or via email.

# Vulnerability Disclosure Policy

Maintaining the security of our open-source software is paramount. This policy outlines a responsible approach to addressing vulnerabilities, balancing transparency with the need to protect users.

- Security vulnerabilities identified in the project will be assigned a unique identifier and (if applicable) a Common Vulnerabilities and Exposures (CVE) identifier.

- The project's Maintainers will be responsible for addressing the vulnerability through a standard pull request, backporting the fix to immediate prior minor release branch, and including the fix in the next stable release.

- Release notes for the patched version will include the assigned identifier and, if applicable, the CVE identifier for the vulnerability.

- A grace period will be provided for Maintainers to update the vulerable minor version and remove vulerable releases from PAUSE (nothing can be done about backpan).

  This period will be one month for non-critical vulnerabilities and three months for critical vulnerabilities.

lib/Algorithm/Kademlia.pod  view on Meta::CPAN

Returns the total number of peers across all buckets.

    say 'Routing table has ' . $rt->size . ' peers';

=head1 Algorithm::Kademlia::Storage

A simple in-memory key-value store intended to hold the DHT data.

=head2 C<new( [ ttl =E<gt> 86400 ] )>

Constructor. C<ttl> is the time-to-live for entries in seconds.

    my $storage = Algorithm::Kademlia::Storage->new( ttl => 3600 );

=head2 C<put( $key_bin, $value_bin, [ $publisher_id_bin ] )>

Stores a value.

    $storage->put($cid_bin, $data_bin, $provider_id);

=head2 C<get( $key_bin )>



( run in 0.588 second using v1.01-cache-2.11-cpan-39bf76dae61 )