scclib
Stable Cloud Computing C++ Library
Public Member Functions | Protected Attributes | Friends | List of all members
scc::crypto::RsaPublicKey Class Reference

RSA Public Key. More...

#include <rsa.h>

Inheritance diagram for scc::crypto::RsaPublicKey:
Inheritance graph
[legend]
Collaboration diagram for scc::crypto::RsaPublicKey:
Collaboration graph
[legend]

Public Member Functions

 RsaPublicKey (RsaPublicKey &&other)
 
RsaPublicKeyoperator= (RsaPublicKey &&other)
 
 RsaPublicKey (const RsaPublicKey &other)
 
RsaPublicKeyoperator= (const RsaPublicKey &other)
 
bool operator== (const RsaPublicKey &o) const
 
bool operator!= (const RsaPublicKey &o) const
 
void get (scc::crypto::Bignum &n, scc::crypto::Bignum &e) const
 
void set (const scc::crypto::Bignum &n, const scc::crypto::Bignum &e)
 
void clear ()
 Clear and erase all data.
 
std::string dump () const
 Output with full values.
 
std::string str (unsigned=8) const
 Output with formatted values. More...
 
int width () const
 Bit width of the key. More...
 
int width_bytes () const
 Width in bytes of this key.
 

Protected Attributes

scc::crypto::Bignum m_n
 
scc::crypto::Bignum m_e
 

Friends

class PkcsSignature
 
class PssSignature
 
class RsaOaepEncrypt
 
class RsaPrivateKey
 

Detailed Description

RSA Public Key.

A public key consists of: modulus n = p*q public exponent e (usually set to 65537 0x10001)

Definition at line 68 of file rsa.h.

Member Function Documentation

◆ str()

std::string scc::crypto::RsaPublicKey::str ( unsigned  = 8) const

Output with formatted values.

Emits a maximum number of bytes for each value.

◆ width()

int scc::crypto::RsaPublicKey::width ( ) const

Bit width of the key.

An initialized or cleared key will have width 0.


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