Compare commits
3 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | afaa6995dc | |
Derrick Hammer | f14050a83d | |
Derrick Hammer | 0f4b978940 |
|
@ -1,3 +1,10 @@
|
|||
# [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.75",
|
||||
"version": "0.1.0-develop.76",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.75",
|
||||
"version": "0.1.0-develop.76",
|
||||
"dependencies": {
|
||||
"@noble/curves": "^1.1.0",
|
||||
"@noble/hashes": "^1.3.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.75",
|
||||
"version": "0.1.0-develop.76",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"repository": {
|
||||
|
|
|
@ -19,11 +19,7 @@ export default abstract class Multibase {
|
|||
}
|
||||
bytes = base32.decode(str);
|
||||
} else if (data[0] === "u") {
|
||||
let str = data[0].toUpperCase() + data.substring(1);
|
||||
while (str.length % 4 !== 0) {
|
||||
str += "=";
|
||||
}
|
||||
bytes = base64urlpad.decode(str);
|
||||
bytes = base64urlpad.decode(data);
|
||||
} else if (data[0] === ":") {
|
||||
bytes = utf8ToBytes(data);
|
||||
} else {
|
||||
|
@ -42,7 +38,7 @@ export default abstract class Multibase {
|
|||
}
|
||||
|
||||
toBase64Url(): string {
|
||||
return `u${base64.encode(this.toBytes())}`;
|
||||
return `u${base64urlpad.encode(this.toBytes())}`;
|
||||
}
|
||||
|
||||
toBase58(): string {
|
||||
|
|
Loading…
Reference in New Issue