class Sodium::Nonce
- Sodium::Nonce
- Reference
- Object
Overview
This class implements best effort nonce reuse detection when multithreading is disabled Race conditions may occur if using the same object in multiple Fibers with multithreading enabled.
Defined in:
sodium/nonce.crConstant Summary
-
NONCE_SIZE =
LibSodium::NONCE_SIZE.to_i
Constructors
Class Method Summary
Instance Method Summary
- #bytesize(*args, **options)
- #bytesize(*args, **options, &)
-
#dup
Returns a shallow copy of this object.
- #increment : Nil
- #random(random_source = Random::Secure) : Nil
-
#reusable : Bool
Only use with single use keys.
- #reusable=(val : Bool) : Bool
-
#to_slice : Bytes
Returns bytes
- #used! : Nil
- #used? : Bool
Constructor Detail
Class Method Detail
Instance Method Detail
def dup
#
Description copied from class Reference
Returns a shallow copy of this object.
This allocates a new object and copies the contents of
self
into it.