diff options
Diffstat (limited to 'Libraries/LibCrypto/PK/RSA.h')
-rw-r--r-- | Libraries/LibCrypto/PK/RSA.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Libraries/LibCrypto/PK/RSA.h b/Libraries/LibCrypto/PK/RSA.h index 6a5f56ad1b..9d429d0b4a 100644 --- a/Libraries/LibCrypto/PK/RSA.h +++ b/Libraries/LibCrypto/PK/RSA.h @@ -160,13 +160,13 @@ public: RSA(const ByteBuffer& publicKeyPEM, const ByteBuffer& privateKeyPEM) { - import_public_key(publicKeyPEM); - import_private_key(privateKeyPEM); + import_public_key(publicKeyPEM.span()); + import_private_key(privateKeyPEM.span()); } RSA(const StringView& privKeyPEM) { - import_private_key(ByteBuffer::wrap(privKeyPEM.characters_without_null_termination(), privKeyPEM.length())); + import_private_key(privKeyPEM.bytes()); m_public_key.set(m_private_key.modulus(), m_private_key.public_exponent()); } @@ -188,8 +188,8 @@ public: virtual size_t output_size() const override { return m_public_key.length(); } - void import_public_key(const ByteBuffer& buffer, bool pem = true); - void import_private_key(const ByteBuffer& buffer, bool pem = true); + void import_public_key(ReadonlyBytes, bool pem = true); + void import_private_key(ReadonlyBytes, bool pem = true); const PrivateKeyType& private_key() const { return m_private_key; } const PublicKeyType& public_key() const { return m_public_key; } |