monotone

monotone Mtn Source Tree

Root/cryptopp/oaep.h

1#ifndef CRYPTOPP_OAEP_H
2#define CRYPTOPP_OAEP_H
3
4#include "pubkey.h"
5
6NAMESPACE_BEGIN(CryptoPP)
7
8extern byte OAEP_P_DEFAULT[];// defined in misc.cpp
9
10/// <a href="http://www.weidai.com/scan-mirror/ca.html#cem_OAEP-MGF1">EME-OAEP</a>, for use with RSAES
11template <class H, class MGF=P1363_MGF1, byte *P=OAEP_P_DEFAULT, unsigned int PLen=0>
12class OAEP : public PK_EncryptionMessageEncodingMethod, public EncryptionStandard
13{
14public:
15static std::string StaticAlgorithmName() {return std::string("OAEP-") + MGF::StaticAlgorithmName() + "(" + H::StaticAlgorithmName() + ")";}
16typedef OAEP<H, MGF, P, PLen> EncryptionMessageEncodingMethod;
17
18unsigned int MaxUnpaddedLength(unsigned int paddedLength) const;
19void Pad(RandomNumberGenerator &rng, const byte *raw, unsigned int inputLength, byte *padded, unsigned int paddedLength) const;
20DecodingResult Unpad(const byte *padded, unsigned int paddedLength, byte *raw) const;
21};
22
23NAMESPACE_END
24
25#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status