CryptUtilsSwappedAlphabet.ts 854 B

1234567891011121314151617181920212223242526
  1. import { inject, injectable } from 'inversify';
  2. import { ServiceIdentifiers } from '../container/ServiceIdentifiers';
  3. import { ICryptUtilsSwappedAlphabet } from '../interfaces/utils/ICryptUtilsSwappedAlphabet';
  4. import { IRandomGenerator } from '../interfaces/utils/IRandomGenerator';
  5. import { base64alphabetSwapped } from '../constants/Base64AlphabetSwapped';
  6. import { CryptUtils } from './CryptUtils';
  7. @injectable()
  8. export class CryptUtilsSwappedAlphabet extends CryptUtils implements ICryptUtilsSwappedAlphabet {
  9. /**
  10. * @type {string}
  11. */
  12. protected readonly base64Alphabet: string = base64alphabetSwapped;
  13. /**
  14. * @param {IRandomGenerator} randomGenerator
  15. */
  16. public constructor (
  17. @inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator
  18. ) {
  19. super(randomGenerator);
  20. }
  21. }