Compare commits
No commits in common. "v0.1.0-develop.76" and "v0.1.0-develop.75" have entirely different histories.
v0.1.0-dev
...
v0.1.0-dev
|
@ -1,10 +1,3 @@
|
|||
# [0.1.0-develop.76](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.75...v0.1.0-develop.76) (2023-11-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* more base64urlpad fixes ([0f4b978](https://git.lumeweb.com/LumeWeb/libs5/commit/0f4b9789401075ac783edd9bd91e4e3f417e4329))
|
||||
|
||||
# [0.1.0-develop.75](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.74...v0.1.0-develop.75) (2023-11-18)
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.76",
|
||||
"version": "0.1.0-develop.75",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.76",
|
||||
"version": "0.1.0-develop.75",
|
||||
"dependencies": {
|
||||
"@noble/curves": "^1.1.0",
|
||||
"@noble/hashes": "^1.3.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.76",
|
||||
"version": "0.1.0-develop.75",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"repository": {
|
||||
|
|
|
@ -19,7 +19,11 @@ export default abstract class Multibase {
|
|||
}
|
||||
bytes = base32.decode(str);
|
||||
} else if (data[0] === "u") {
|
||||
bytes = base64urlpad.decode(data);
|
||||
let str = data[0].toUpperCase() + data.substring(1);
|
||||
while (str.length % 4 !== 0) {
|
||||
str += "=";
|
||||
}
|
||||
bytes = base64urlpad.decode(str);
|
||||
} else if (data[0] === ":") {
|
||||
bytes = utf8ToBytes(data);
|
||||
} else {
|
||||
|
@ -38,7 +42,7 @@ export default abstract class Multibase {
|
|||
}
|
||||
|
||||
toBase64Url(): string {
|
||||
return `u${base64urlpad.encode(this.toBytes())}`;
|
||||
return `u${base64.encode(this.toBytes())}`;
|
||||
}
|
||||
|
||||
toBase58(): string {
|
||||
|
|
Loading…
Reference in New Issue