![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@xrplf/isomorphic
Advanced tools
A collection of isomorphic and tree-shakeable crypto hashes and utils for xrpl.js
A collection of isomorphic implementations of crypto and utility functions.
Browser implementations of cryptographic functions use @noble/hashes
and crypto
for node .
All hash functions operate similarly to @noble/hashes
and have the following properties:
function hash(message: Uint8Array | string): Uint8Array;
hash(new Uint8Array([1, 3]));
hash('string') == hash(new TextEncoder().encode('string'));
All hash functions can be constructed via hash.create()
method:
Hash
subclass instance, which has update()
and digest()
methods.digest()
finalizes the hash and makes it no longer usablehash
.create()
.update(new Uint8Array([1, 3]))
.digest();
@xrplf/isomorphic/ripemd160
import { ripemd160 } from '@xrplf/isomorphic/ripemd160';
const hashA = ripemd160('abc');
const hashB = ripemd160
.create()
.update(Uint8Array.from([1, 2, 3]))
.digest();
@xrplf/isomorphic/sha256
import { sha256 } from '@xrplf/isomorphic/sha256';
const hashA = sha256('abc');
const hashB = sha256
.create()
.update(Uint8Array.from([1, 2, 3]))
.digest();
@xrplf/isomorphic/sha512
import { sha512 } from '@xrplf/isomorphic/sha512';
const hashA = sha512('abc');
const hashB = sha512
.create()
.update(Uint8Array.from([1, 2, 3]))
.digest();
@xrplf/isomorphic/utils
Create an UInt8Array of the supplied size
import { randomBytes } from @xrplf/isomorphic/utils
console.log(randomBytes(12)) // Uint8Array(12) [95, 236, 188, 55, 208, 128, 161, 249, 171, 57, 141, 7]
Convert an UInt8Array to hex.
import { bytesToHex } from @xrplf/isomorphic/utils
console.log(bytesToHex([222, 173, 190, 239])) // "DEADBEEF"
Convert hex to an UInt8Array.
import { hexToBytes } from @xrplf/isomorphic/utils
console.log(hexToBytes('DEADBEEF')) // [222, 173, 190, 239]
Converts hex to its string equivalent. Useful to read the Domain field and some Memos.
import { hexToString } from @xrplf/isomorphic/utils
console.log(hexToString('6465616462656566D68D')) // "deadbeef֍"
Converts a utf-8 to its hex equivalent. Useful for Memos.
import { stringToHex } from @xrplf/isomorphic/utils
console.log(stringToHex('deadbeef֍')) // "6465616462656566D68D"
@xrplf/isomorphic/ws
import WebSocket from '@xrplf/isomorphic/ws'
const socket = new WebSocket('wss://localhost:8080')
FAQs
A collection of isomorphic and tree-shakeable crypto hashes and utils for xrpl.js
We found that @xrplf/isomorphic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.