rippled
Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Functions
ripple::cryptoconditions Namespace Reference

Namespaces

namespace  der
 
namespace  detail
 

Classes

class  Condition
 
struct  Fulfillment
 
class  PreimageSha256
 
class  PreimageSha256_test
 

Enumerations

enum class  Type : std::uint8_t {
  preimageSha256 = 0 , prefixSha256 = 1 , thresholdSha256 = 2 , rsaSha256 = 3 ,
  ed25519Sha256 = 4
}
 
enum class  error {
  generic = 1 , unsupported_type , unsupported_subtype , unknown_type ,
  unknown_subtype , fingerprint_size , incorrect_encoding , trailing_garbage ,
  buffer_empty , buffer_overfull , buffer_underfull , malformed_encoding ,
  short_preamble , unexpected_tag , long_tag , large_size ,
  preimage_too_long
}
 

Functions

 BEAST_DEFINE_TESTSUITE (PreimageSha256, conditions, ripple)
 
bool operator== (Condition const &lhs, Condition const &rhs)
 
bool operator!= (Condition const &lhs, Condition const &rhs)
 
std::error_code make_error_code (error ev)
 
bool match (Fulfillment const &f, Condition const &c)
 Determine whether the given fulfillment and condition match.
 
bool validate (Fulfillment const &f, Condition const &c, Slice m)
 Verify if the given message satisfies the fulfillment.
 
bool validate (Fulfillment const &f, Condition const &c)
 Verify a cryptoconditional trigger.
 
bool operator== (Fulfillment const &lhs, Fulfillment const &rhs)
 
bool operator!= (Fulfillment const &lhs, Fulfillment const &rhs)
 

Enumeration Type Documentation

◆ Type

Enumerator
preimageSha256 
prefixSha256 
thresholdSha256 
rsaSha256 
ed25519Sha256 

Definition at line 34 of file Condition.h.

◆ error

Enumerator
generic 
unsupported_type 
unsupported_subtype 
unknown_type 
unknown_subtype 
fingerprint_size 
incorrect_encoding 
trailing_garbage 
buffer_empty 
buffer_overfull 
buffer_underfull 
malformed_encoding 
short_preamble 
unexpected_tag 
long_tag 
large_size 
preimage_too_long 

Definition at line 28 of file error.h.

Function Documentation

◆ BEAST_DEFINE_TESTSUITE()

ripple::cryptoconditions::BEAST_DEFINE_TESTSUITE ( PreimageSha256  ,
conditions  ,
ripple   
)

◆ operator==() [1/2]

bool ripple::cryptoconditions::operator== ( Condition const &  lhs,
Condition const &  rhs 
)

Definition at line 102 of file Condition.h.

◆ operator!=() [1/2]

bool ripple::cryptoconditions::operator!= ( Condition const &  lhs,
Condition const &  rhs 
)

Definition at line 109 of file Condition.h.

◆ make_error_code()

std::error_code ripple::cryptoconditions::make_error_code ( error  ev)

Definition at line 130 of file error.cpp.

◆ match()

bool ripple::cryptoconditions::match ( Fulfillment const &  f,
Condition const &  c 
)

Determine whether the given fulfillment and condition match.

Definition at line 31 of file Fulfillment.cpp.

◆ validate() [1/2]

bool ripple::cryptoconditions::validate ( Fulfillment const &  f,
Condition const &  c,
Slice  m 
)

Verify if the given message satisfies the fulfillment.

Parameters
fThe fulfillment
cThe condition
mThe message
Note
the message is not relevant for some conditions and a fulfillment will successfully satisfy its condition for any given message.

Definition at line 44 of file Fulfillment.cpp.

◆ validate() [2/2]

bool ripple::cryptoconditions::validate ( Fulfillment const &  f,
Condition const &  c 
)

Verify a cryptoconditional trigger.

A cryptoconditional trigger is a cryptocondition with an empty message.

When using such triggers, it is recommended that the trigger be of type preimage, prefix or threshold. If a signature type is used (i.e. Ed25519 or RSA-SHA256) then the Ed25519 or RSA keys should be single-use keys.

Parameters
fThe fulfillment
cThe condition

Definition at line 50 of file Fulfillment.cpp.

◆ operator==() [2/2]

bool ripple::cryptoconditions::operator== ( Fulfillment const &  lhs,
Fulfillment const &  rhs 
)

Definition at line 97 of file Fulfillment.h.

◆ operator!=() [2/2]

bool ripple::cryptoconditions::operator!= ( Fulfillment const &  lhs,
Fulfillment const &  rhs 
)

Definition at line 105 of file Fulfillment.h.