Functions | |
| bool | createSignature (const std::string &privkey, const std::string &message, const std::string &signingScheme, std::string &outSignature) |
| bool | verifyMessage (const std::string &pubkey, const std::string &message, const std::string &signingScheme, const std::string &signature) |
| bool | generateRSAKey (unsigned int bits, std::string &outPrivKey, std::string &outPubKey) |
| std::string | sha256 (const std::string &str) |
| std::string | encode64 (const std::string &str) |
| std::string | decode64 (const std::string &str) |
| bool nap::openssl::createSignature | ( | const std::string & | privkey, |
| const std::string & | message, | ||
| const std::string & | signingScheme, | ||
| std::string & | outSignature | ||
| ) |
Creates a signature for a given message using the given signing scheme and private key
| privkey | the private key to use |
| message | the message to sign |
| signingScheme | the signing scheme to use |
| outSignature | the created signature |
| std::string nap::openssl::decode64 | ( | const std::string & | str | ) |
Decodes a base64 string
| str | the string to decode |
| std::string nap::openssl::encode64 | ( | const std::string & | str | ) |
Encodes a string to base64
| str | the string to encode |
| bool nap::openssl::generateRSAKey | ( | unsigned int | bits, |
| std::string & | outPrivKey, | ||
| std::string & | outPubKey | ||
| ) |
Generates a RSA key pair
| bits | number of bits |
| outPrivKey | the private key generated |
| outPubKey | the public key generated |
| std::string nap::openssl::sha256 | ( | const std::string & | str | ) |
Generates a SHA256 hash of a string
| str | the string to hash |
| bool nap::openssl::verifyMessage | ( | const std::string & | pubkey, |
| const std::string & | message, | ||
| const std::string & | signingScheme, | ||
| const std::string & | signature | ||
| ) |
Verifies a message against a signature using the given signing scheme and public key
| pubkey | the public key to use |
| message | the message to verify |
| signingScheme | the signing scheme to use |
| signature | the signature to verify against |