mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-23 20:19:31 +00:00
18 lines
355 B
C++
18 lines
355 B
C++
|
/*
|
||
|
Copyright (c) 2020 tevador <tevador@gmail.com>
|
||
|
All rights reserved.
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
#include "gf_poly.hpp"
|
||
|
|
||
|
class reed_solomon_code {
|
||
|
public:
|
||
|
reed_solomon_code(unsigned check_digits);
|
||
|
void encode(gf_poly& data) const;
|
||
|
bool check(const gf_poly& message) const;
|
||
|
private:
|
||
|
gf_poly get_syndrome(const gf_poly& message) const;
|
||
|
gf_poly generator;
|
||
|
};
|