mona-dish
    Preparing search index...

    Class ExpiringCrypto

    a class with timeout functionality which blocks decodes after a certain period of time if the message is not decoded by then We use hash as identifier generation after encryption to make sure a trace was possible

    The idea behind this is to have a generic wrapper which allows messages with dynamic encryption where keys/salts only exist for a certain period of time before expiring! That way someone who implements such a scheme does not have to take care about the bookkeeping mechanisms! Or you can use crypto mechanisms which do not have expiring keys and still expire them automatically

    I will leave it up to the system integrator to provide a rotating crypto class, because this is highly implementation dependent. But it helps to have a wrapper!

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Parameters

      • timeout: number

        timeout in milliseconds until a message is expired

      • parentCrypto: Crypto

        the embedded decorated crypto algorithm

      • hashSum: Hash

        hashshum implementation to generate a hash

      Returns ExpiringCrypto

    Methods

    • encode with a timeout hook installed calls the encode of the delegated object

      Parameters

      • data: any

      Returns any