
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@wireapp/cbor
Advanced tools
Implementation of Concise Binary Object Representation (CBOR) data format (RFC7049).
This repository is part of the source code of Wire. You can find more information at wire.com or by contacting opensource@wire.com.
You can find the published source code at github.com/wireapp.
For licensing information, see the attached LICENSE file and the list of third-party licenses at wire.com/legal/licenses/.
yarn add @wireapp/cbor
import * as CBOR from '@wireapp/cbor';
const payload: Uint8Array = new Uint8Array([
255, 18, 15, 34, 210, 168, 165, 188, 81, 33, 34, 40, 73, 61, 149, 198, 154, 54, 128, 76, 191, 161, 58, 176, 45, 75, 1,
33, 80, 157, 28, 89,
]);
// Encoding
const encoder: CBOR.Encoder = new CBOR.Encoder();
const encoded: ArrayBuffer = encoder.object(1).u8(0).bytes(payload).get_buffer();
// Decoding
let decoded: Uint8Array;
const decoder: CBOR.Decoder = new CBOR.Decoder(encoded);
const properties: number = decoder.object();
for (let i = 0; i < properties; i++) {
switch (decoder.u8()) {
case 0:
decoded = new Uint8Array(decoder.bytes());
break;
default:
decoder.skip();
}
}
// Comparison
const isEqual = decoded.every((row, index) => {
return decoded[index] === payload[index];
});
console.log(isEqual); // true
FAQs
Implementation of Concise Binary Object Representation (CBOR) data format (RFC7049).
The npm package @wireapp/cbor receives a total of 474 weekly downloads. As such, @wireapp/cbor popularity was classified as not popular.
We found that @wireapp/cbor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.