Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"use strict";
const base32 = require('rfc4648').base32;
const base64url = require('rfc4648').base64url;
const ChaCha20 = require('xchacha20-js').ChaCha20;
const Constants = require('../constants');
const fs = require('fs-extra');
const Backend = require('../contract/backend');
const HChaCha20 = require('xchacha20-js').HChaCha20;
const Poly1305 = require('poly1305-js');
const {SodiumPlus, CryptographyKey} = require('sodium-plus');
const Util = require('../util');
const SymmetricKey = require('./key/symmetrickey');
const CryptoOperationException = require('../exception/cryptooperationexception');
let sodium;
const MAGIC_HEADER = "nacl:";
const NONCE_SIZE = 24;
const TAG_SIZE = 16;
"use strict";
const base32 = require('rfc4648').base32;
const base64url = require('rfc4648').base64url;
const Backend = require('../contract/backend');
const Constants = require('../constants');
const crypto = require('crypto');
const fs = require('fs-extra');
const SodiumPlus = require('sodium-plus').SodiumPlus;
const Util = require('../util');
const SymmetricKey = require('./key/symmetrickey');
const CryptoOperationException = require('../exception/cryptooperationexception');
let sodium;
const MAGIC_HEADER = "fips:";
const MAC_SIZE = 48;
const SALT_SIZE = 32;
const NONCE_SIZE = 16;