activemq-cpp-3.8.2
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 
23 #include <decaf/nio/ByteBuffer.h>
25 
26 #include <vector>
27 
28 namespace decaf {
29 namespace security {
30 
31  class MessageDigest;
32 
48  public:
49 
51 
52  virtual ~MessageDigestSpi();
53 
60  virtual bool isCloneable() const;
61 
70  virtual MessageDigestSpi* clone();
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:97
Base class used as a Marker for all Security Provider Interface classes in the Decaf Security API...
Definition: SecuritySpi.h:32
This MessageDigest class provides applications the functionality of a message digest algorithm...
Definition: MessageDigest.h:71
#define DECAF_API
Definition: Config.h:29
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25
This class defines the Service Provider Interface (SPI) for the MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA.
Definition: MessageDigestSpi.h:47