
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@toots/shine.js
Advanced tools
This package contains a build of the shine fixed-point mp3 encoder compiled for Javascript and wasm using emscripten-core/emscripten.
Using npm
:
npm install @toots/shine.js
Using yarn
:
yarn add @toots/shine.js
Using pnpm
:
pnpm install @toots/shine.js
In a HTML page:
When using webpack
, the package should point to the correct
libshine_browser.js
file automatically.
When using directly as a script, you can load the libshine_node.js
file as:
<script src="libshine_node.js"></script>
See: test/browser for an example.
The encoding API should be quite straight forward:
import { Shine } from "@toots/shine.js";
const exec = async () => {
await Shine.initialized;
shine = new Shine({
samplerate: 44100,
bitrate: 128,
channels: 2,
stereoModel: Shine.stereoModel.STEREO
});
// All the magic happens here
while (..) {
// data here is an array of channels.
// Channels must have the same number of samples
// and both be either Int16Array or Float32Array.
encoded = shine.encode(data);
...
}
// Close and get remaining data.
flushed = shine.close();
...
}
exec();
You can run the test suite located in test/
. Encoding rate above 1X
means that
the browser should be suitable for real-time encoding.
Results, as of December 30, 2022:
Chrome (108.0.5359.124
):
Executing encoding test
Got WAV file.
Encoding..
Done encoding.
File duration: 5.57 seconds
Encoding time: 0.08 seconds
Encoding rate: 67.96X
Executing rounds test
Encoding 50 buffers of 4096 samples
Done encoding
Total duration: 4.64
Encoding time: 0.03
Encoding rate: 160.00X
Firefox (108.0.1
):
Executing encoding test
Got WAV file.
Encoding..
Done encoding.
File duration: 5.57 seconds
Encoding time: 0.06 seconds
Encoding rate: 99.52X
Executing rounds test
Encoding 50 buffers of 4096 samples
Done encoding
Total duration: 4.64
Encoding time: 0.03
Encoding rate: 178.46X
Safari (16.2
):
Executing encoding test
Got WAV file.
Encoding..
Done encoding.
File duration: 5.57 seconds
Encoding time: 0.12 seconds
Encoding rate: 46.44X
Executing rounds test
Encoding 50 buffers of 4096 samples
Done encoding
Total duration: 4.64
Encoding time: 0.02
Encoding rate: 210.91X
NodeJS (v19.3.0
):
Executing encoding test
Got WAV file.
Encoding..
Done encoding.
File duration: 5.57 seconds
Encoding time: 0.06 seconds
Encoding rate: 94.45X
Executing rounds test
Encoding 50 buffers of 4096 samples
Done encoding
Total duration: 4.64
Encoding time: 0.03
Encoding rate: 178.46X
FAQs
Shine fixed-point mp3 encoder
We found that @toots/shine.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.