#ifndef CONTENT_CHILD_WEBCRYPTO_CRYPTO_DATA_H_
#define CONTENT_CHILD_WEBCRYPTO_CRYPTO_DATA_H_
#include <string>
#include <vector>
#include "base/basictypes.h"
#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebVector.h"
namespace blink {
class WebArrayBuffer;
}
namespace content {
namespace webcrypto {
class CONTENT_EXPORT CryptoData {
public:
CryptoData();
CryptoData(const unsigned char* bytes, unsigned int byte_length);
explicit CryptoData(const std::vector<unsigned char>& bytes);
explicit CryptoData(const std::string& bytes);
explicit CryptoData(const blink::WebArrayBuffer& buffer);
explicit CryptoData(const blink::WebVector<unsigned char>& bytes);
const unsigned char* bytes() const { return bytes_; }
unsigned int byte_length() const { return byte_length_; }
private:
const unsigned char* const bytes_;
const unsigned int byte_length_;
DISALLOW_COPY_AND_ASSIGN(CryptoData);
};
}
}
#endif