Crypto Lib
    Preparing search index...

    Function rotateKey

    • Rotate the key ring — the current key moves to previous and newKey becomes the current encryption key.

      Parameters

      Returns KeyRing

      A new key ring with the rotated keys.

      ring = rotateKey(ring, { version: "v2", key: "bb".repeat(32), activatedAt: new Date() });