import { PersistedData, EncryptOptions, OnEncryptionError } from './types'; import { CachePersistor } from '.'; export default class Encryptor { _onError?: OnEncryptionError; secretKey: string; persistor: CachePersistor; constructor(persistor: CachePersistor, options: EncryptOptions); encrypt(data: PersistedData): PersistedData; decrypt(data: PersistedData): PersistedData; onError(error: Error): void; }