#pragma once
#include <vector>
#include <cstdint>
#include "rsa.h"

namespace netplus {

class rsa_pkcs1_sha256 {
public:
    // RSASSA-PKCS1-v1_5 sign with SHA-256 (RS256 for JWT)
    static std::vector<uint8_t> sign(netplus::rsa& key,
                                    const std::vector<uint8_t>& message);

private:
    // EMSA-PKCS1-v1_5-ENCODE (RFC 8017 Section 9.2)
    static std::vector<uint8_t> emsa_pkcs1_v15_encode(const std::vector<uint8_t>& mHash,
                                                      size_t emLen);
};

} // namespace netplus
