Initial LinkedSign platform

This commit is contained in:
2026-04-06 20:33:59 -05:00
commit 1074c7c9d2
159 changed files with 19072 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import * as FileSystem from 'expo-file-system';
import * as Sharing from 'expo-sharing';
export const downloadAndShareFile = async ({ url, token, filename }) => {
const targetUri = `${FileSystem.cacheDirectory}${filename}`;
const result = await FileSystem.downloadAsync(url, targetUri, {
headers: {
Authorization: `Bearer ${token}`,
},
});
if (await Sharing.isAvailableAsync()) {
await Sharing.shareAsync(result.uri);
}
return result.uri;
};
+10
View File
@@ -0,0 +1,10 @@
export const getPasswordChecks = (password = '') => ([
{ key: 'length', label: 'Al menos 8 caracteres', valid: password.length >= 8 },
{ key: 'upper', label: 'Una mayúscula', valid: /[A-Z]/.test(password) },
{ key: 'lower', label: 'Una minúscula', valid: /[a-z]/.test(password) },
{ key: 'number', label: 'Un número', valid: /\d/.test(password) },
{ key: 'special', label: 'Un carácter especial', valid: /[^A-Za-z0-9]/.test(password) },
]);
export const isPasswordStrong = (password = '') =>
getPasswordChecks(password).every((rule) => rule.valid);