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

Rsa private key, used for message signing and decryption. More...

#include <rsa_key.h>

Public Member Functions

bool Decrypt (const std::string &encrypted_message, std::string *decrypted_message)
 
bool GenerateSignature (const std::string &message, std::string *signature)
 

Static Public Member Functions

static RsaPrivateKeyCreate (const std::string &serialized_key)
 

Detailed Description

Rsa private key, used for message signing and decryption.

Definition at line 25 of file rsa_key.h.

Member Function Documentation

◆ Create()

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

Create an RsaPrivateKey object using a DER encoded PKCS#1 RSAPrivateKey.

Returns
The created RsaPrivateKey object on success, NULL otherwise.

Definition at line 78 of file rsa_key.cc.

◆ Decrypt()

bool shaka::media::RsaPrivateKey::Decrypt ( const std::string &  encrypted_message,
std::string *  decrypted_message 
)

Decrypt a message using RSA-OAEP.

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

Definition at line 118 of file rsa_key.cc.

◆ GenerateSignature()

bool shaka::media::RsaPrivateKey::GenerateSignature ( const std::string &  message,
std::string *  signature 
)

Generate RSASSA-PSS signature.

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

Definition at line 149 of file rsa_key.cc.


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