spl: refactor for accuracy/move into libstrat

This commit is contained in:
Michael Scire 2021-10-10 12:57:24 -07:00
parent 4758dfa933
commit d8a36e39f2
40 changed files with 1898 additions and 1732 deletions

View file

@ -15,13 +15,20 @@
*/
#pragma once
#include <stratosphere.hpp>
#include "spl_secure_monitor_manager.hpp"
namespace ams::spl {
class RandomService final {
protected:
SecureMonitorManager &m_manager;
public:
explicit RandomService(SecureMonitorManager *manager) : m_manager(*manager) { /* ... */ }
public:
/* Actual commands. */
Result GenerateRandomBytes(const sf::OutBuffer &out);
Result GenerateRandomBytes(const sf::OutBuffer &out) {
return m_manager.GenerateRandomBytes(out.GetPointer(), out.GetSize());
}
};
static_assert(spl::impl::IsIRandomInterface<RandomService>);