MCPcopy Create free account
hub / github.com/PrismarineJS/node-minecraft-protocol / createCipher

Function createCipher

src/transforms/encryption.js:5–10  ·  view source on GitHub ↗
(secret)

Source from the content-addressed store, hash-verified

3const aesjs = require('aes-js')
4
5function createCipher (secret) {
6 if (crypto.getCiphers().includes('aes-128-cfb8')) {
7 return crypto.createCipheriv('aes-128-cfb8', secret, secret)
8 }
9 return new Cipher(secret)
10}
11
12function createDecipher (secret) {
13 if (crypto.getCiphers().includes('aes-128-cfb8')) {

Callers 1

setEncryptionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected