(length = 16)
| 86 | } |
| 87 | |
| 88 | function makeRandomHex(length = 16): string { |
| 89 | const bytes = new Uint8Array(length); |
| 90 | crypto.getRandomValues(bytes); |
| 91 | return Array.from(bytes, b => b.toString(16).padStart(2, "0")).join(""); |
| 92 | } |
| 93 | |
| 94 | export function isS3Configured(): boolean { |
| 95 | const { s3Endpoint, s3Bucket, s3Region, s3AccessKeyId, s3SecretAccessKey } = settings.store as S3Store; |