Shaka Packager SDK
Public Member Functions | Static Public Member Functions | List of all members
shaka::media::RsaPublicKey Class Reference

Rsa public key, used for signature verification and encryption. More...

#include <rsa_key.h>

Public Member Functions

bool Encrypt (const std::string &clear_message, std::string *encrypted_message)
 
bool VerifySignature (const std::string &message, const std::string &signature)
 

Static Public Member Functions

static RsaPublicKeyCreate (const std::string &serialized_key)
 

Detailed Description

Rsa public key, used for signature verification and encryption.

Definition at line 57 of file rsa_key.h.

Member Function Documentation

◆ Create()

RsaPublicKey * shaka::media::RsaPublicKey::Create ( const std::string &  serialized_key)
static

Create an RsaPublicKey object using a DER encoded PKCS#1 RSAPublicKey.

Returns
The created RsaPrivateKey object on success, NULL otherwise.

Definition at line 188 of file rsa_key.cc.

◆ Encrypt()

bool shaka::media::RsaPublicKey::Encrypt ( const std::string &  clear_message,
std::string *  encrypted_message 
)

Encrypt a message using RSA-OAEP.

Parameters
encrypted_messagemust not be NULL.
Returns
true if successful, false otherwise.

Definition at line 226 of file rsa_key.cc.

◆ VerifySignature()

bool shaka::media::RsaPublicKey::VerifySignature ( const std::string &  message,
const std::string &  signature 
)

Verify RSASSA-PSS signature.

Returns
true if verification succeeds, false otherwise.

Definition at line 253 of file rsa_key.cc.


The documentation for this class was generated from the following files: