proxygen
TicketCipher.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
12 #include <folly/Optional.h>
13 #include <folly/futures/Future.h>
14 #include <folly/io/IOBuf.h>
15 
16 namespace fizz {
17 namespace server {
18 
22 class TicketCipher {
23  public:
24  virtual ~TicketCipher() = default;
25 
30  encrypt(ResumptionState resState) const = 0;
31 
39  decrypt(std::unique_ptr<folly::IOBuf> encryptedTicket) const = 0;
40 };
41 } // namespace server
42 } // namespace fizz
virtual folly::Future< folly::Optional< std::pair< Buf, std::chrono::seconds > > > encrypt(ResumptionState resState) const =0
virtual folly::Future< std::pair< PskType, folly::Optional< ResumptionState > > > decrypt(std::unique_ptr< folly::IOBuf > encryptedTicket) const =0
virtual ~TicketCipher()=default
Definition: Actions.h:16