summaryrefslogtreecommitdiff
path: root/src/client/scripts/2fa.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-01-30 04:37:25 +0900
committerGitHub <noreply@github.com>2020-01-30 04:37:25 +0900
commitf6154dc0af1a0d65819e87240f4385f9573095cb (patch)
tree699a5ca07d6727b7f8497d4769f25d6d62f94b5a /src/client/scripts/2fa.ts
parentAdd Event activity-type support (#5785) (diff)
downloadsharkey-f6154dc0af1a0d65819e87240f4385f9573095cb.tar.gz
sharkey-f6154dc0af1a0d65819e87240f4385f9573095cb.tar.bz2
sharkey-f6154dc0af1a0d65819e87240f4385f9573095cb.zip
v12 (#5712)
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com> Co-authored-by: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>
Diffstat (limited to 'src/client/scripts/2fa.ts')
-rw-r--r--src/client/scripts/2fa.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/scripts/2fa.ts b/src/client/scripts/2fa.ts
new file mode 100644
index 0000000000..e431361aac
--- /dev/null
+++ b/src/client/scripts/2fa.ts
@@ -0,0 +1,5 @@
+export function hexifyAB(buffer) {
+ return Array.from(new Uint8Array(buffer))
+ .map(item => item.toString(16).padStart(2, '0'))
+ .join('');
+}