1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Crypto::RSAKey</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Crypto.html" class="namespace">Poco::Crypto</a></h1>
<h1 class="symbol">class RSAKey</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Crypto<br />
<b>Package:</b> RSA<br />
<b>Header:</b> Poco/Crypto/RSAKey.h</p>
<h2>Description</h2>
<div class="description">
<p>This class stores an <a href="#303" title="RSA">RSA</a> key pair, consisting of private and public key. Storage of the private key is optional. </p>
<p>If a private key is available, the <a href="Poco.Crypto.RSAKey.html" title="class Poco::Crypto::RSAKey">RSAKey</a> can be used for decrypting data (encrypted with the public key) or computing secure digital signatures. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Crypto.RSAKey.html#300" title="Poco::Crypto::RSAKey::impl()">impl</a>, <a href="Poco.Crypto.RSAKey.html#301" title="Poco::Crypto::RSAKey::name()">name</a>, <a href="Poco.Crypto.RSAKey.html#292" title="Poco::Crypto::RSAKey::save()">save</a>, <a href="Poco.Crypto.RSAKey.html#291" title="Poco::Crypto::RSAKey::size()">size</a></p>
<h2>Enumerations</h2>
<h3><a name="274">Exponent</a></h3>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="275">EXP_SMALL</a> = 0</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="276">EXP_LARGE</a></p>
<div class="description">
<p></p>
</div>
<h3><a name="269">KeyLength</a></h3>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="270">KL_512</a> = 512</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="271">KL_1024</a> = 1024</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="272">KL_2048</a> = 2048</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="273">KL_4096</a> = 4096</p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="277">RSAKey</a></h3>
<p class="decl">explicit <a href="Poco.Crypto.RSAKey.html" title="class Poco::Crypto::RSAKey">RSAKey</a>(<br /> const <a href="Poco.Crypto.X509Certificate.html" title="class Poco::Crypto::X509Certificate">X509Certificate</a> & cert<br />);</p>
<div class="description">
<p>Extracts the <a href="#303" title="RSA">RSA</a> public key from the given certificate. </p>
</div>
<h3><a name="279">RSAKey</a></h3>
<p class="decl"><a href="Poco.Crypto.RSAKey.html" title="class Poco::Crypto::RSAKey">RSAKey</a>(<br /> <a href="Poco.Crypto.RSAKey.html#269" title="enum Poco::Crypto::RSAKey::KeyLength">KeyLength</a> keyLength,<br /> <a href="Poco.Crypto.RSAKey.html#274" title="enum Poco::Crypto::RSAKey::Exponent">Exponent</a> exp<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Crypto.RSAKey.html" title="class Poco::Crypto::RSAKey">RSAKey</a>. Creates a new public/private keypair using the given parameters. Can be used to sign data and verify signatures. </p>
</div>
<h3><a name="282">RSAKey</a></h3>
<p class="decl"><a href="Poco.Crypto.RSAKey.html" title="class Poco::Crypto::RSAKey">RSAKey</a>(<br /> const std::string & publicKeyFile,<br /> const std::string & privateKeyFile = "",<br /> const std::string & privateKeyPassphrase = ""<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Crypto.RSAKey.html" title="class Poco::Crypto::RSAKey">RSAKey</a>, by reading public and private key from the given files and using the given passphrase for the private key. Can only by used for signing if a private key is available. </p>
</div>
<h3><a name="286">RSAKey</a></h3>
<p class="decl"><a href="Poco.Crypto.RSAKey.html" title="class Poco::Crypto::RSAKey">RSAKey</a>(<br /> std::istream * pPublicKeyStream,<br /> std::istream * pPrivateKeyStream = 0,<br /> const std::string & privateKeyPassphrase = ""<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Crypto.RSAKey.html" title="class Poco::Crypto::RSAKey">RSAKey</a>. Can only by used for signing if pPrivKey is not null. If a private key file is specified, you don't need to specify a public key file. OpenSSL will auto-create it from the private key. </p>
</div>
<h2>Destructor</h2>
<h3><a name="290">~RSAKey</a></h3>
<p class="decl">~<a href="Poco.Crypto.RSAKey.html" title="class Poco::Crypto::RSAKey">RSAKey</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Crypto.RSAKey.html" title="class Poco::Crypto::RSAKey">RSAKey</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="300">impl</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Crypto.RSAKeyImpl.html#305" title="Poco::Crypto::RSAKeyImpl::Ptr">RSAKeyImpl::Ptr</a> impl();</p>
<div class="description">
<p>Returns the impl object. </p>
</div>
<h3><a name="301">name</a></h3>
<p class="decl">const std::string & name() const;</p>
<div class="description">
<p>Returns "rsa" </p>
</div>
<h3><a name="292">save</a></h3>
<p class="decl">void save(<br /> const std::string & publicKeyFile,<br /> const std::string & privateKeyFile = "",<br /> const std::string & privateKeyPassphrase = ""<br />);</p>
<div class="description">
<p>Exports the public and private keys to the given files. </p>
<p>If an empty filename is specified, the corresponding key is not exported. </p>
</div>
<h3><a name="296">save</a></h3>
<p class="decl">void save(<br /> std::ostream * pPublicKeyStream,<br /> std::ostream * pPrivateKeyStream = 0,<br /> const std::string & privateKeyPassphrase = ""<br />);</p>
<div class="description">
<p>Exports the public and private key to the given streams. </p>
<p>If a null pointer is passed for a stream, the corresponding key is not exported. </p>
</div>
<h3><a name="291">size</a></h3>
<p class="decl">int size() const;</p>
<div class="description">
<p>Returns the <a href="#303" title="RSA">RSA</a> modulus size. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright © 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>
</div>
</body>
</html>
|