activemq-cpp-3.9.5
MessageDigestSpi.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef _DECAF_SECURITY_MESSAGEDIGESTSPI_H_
19#define _DECAF_SECURITY_MESSAGEDIGESTSPI_H_
20
21#include <decaf/util/Config.h>
22
25
26#include <vector>
27
28namespace decaf {
29namespace security {
30
31 class MessageDigest;
32
47 class DECAF_API MessageDigestSpi : public SecuritySpi {
48 public:
49
51
53
60 virtual bool isCloneable() const;
61
71
72 protected:
73
79 virtual int engineGetDigestLength() = 0;
80
87 virtual void engineUpdate(unsigned char input) = 0;
88
103 virtual void engineUpdate(const unsigned char* input, int size, int offset, int length) = 0;
104
108 virtual void engineReset() = 0;
109
116 virtual void engineUpdate(const std::vector<unsigned char>& input) = 0;
117
126 virtual void engineUpdate(decaf::nio::ByteBuffer& input) = 0;
127
135 virtual std::vector<unsigned char> engineDigest() = 0;
136
162 virtual int engineDigest(unsigned char* buffer, int size, int offset, int length) = 0;
163
164 private:
165
166 friend class MessageDigest;
167
168 };
169
170}}
171
172#endif /* _DECAF_SECURITY_MESSAGEDIGESTSPI_H_ */
This class defines six categories of operations upon byte buffers:
Definition ByteBuffer.h:98
This MessageDigest class provides applications the functionality of a message digest algorithm,...
Definition MessageDigest.h:71
virtual void engineReset()=0
Resets the digest for further use.
virtual MessageDigestSpi * clone()
Returns a clone if the implementation supports being cloned.
virtual void engineUpdate(const std::vector< unsigned char > &input)=0
Update the digest using the specified Vector of Bytes.
virtual void engineUpdate(const unsigned char *input, int size, int offset, int length)=0
Updates the digest using the specified array of bytes, starting at the specified offset.
virtual bool isCloneable() const
Queries the SPI implementation and returns true if the SPI can be cloned.
friend class MessageDigest
Definition MessageDigestSpi.h:166
virtual int engineGetDigestLength()=0
Returns the digest length in bytes.
virtual std::vector< unsigned char > engineDigest()=0
Completes the hash computation by performing final operations such as padding.
virtual void engineUpdate(unsigned char input)=0
Updates the digest using the specified byte.
virtual int engineDigest(unsigned char *buffer, int size, int offset, int length)=0
Completes the hash computation by performing final operations such as padding.
virtual void engineUpdate(decaf::nio::ByteBuffer &input)=0
Update the digest using the specified ByteBuffer.
#define DECAF_API
Definition Config.h:29
Definition Engine.h:26
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25