8/11/1
This commit is contained in:
47
secure_string_operations/lib/secure_string_operations.dart
Normal file
47
secure_string_operations/lib/secure_string_operations.dart
Normal file
@@ -0,0 +1,47 @@
|
||||
// File: lib/secure_string_operations.dart
|
||||
|
||||
library secure_string_operations;
|
||||
|
||||
class X {
|
||||
static String c(String a, Map<String, String> b) {
|
||||
StringBuffer c = StringBuffer();
|
||||
c.write(a);
|
||||
|
||||
String d = "Bl";
|
||||
c.write(b[d] ?? d);
|
||||
|
||||
StringBuffer e = StringBuffer();
|
||||
String f = c.toString();
|
||||
|
||||
for (int g = 0; g < f.length; g++) {
|
||||
String h = f[g];
|
||||
e.write(b[h] ?? h);
|
||||
}
|
||||
|
||||
return e.toString();
|
||||
}
|
||||
|
||||
static String r(String a, Map<String, String> b) {
|
||||
StringBuffer c = StringBuffer();
|
||||
String d = "Bl";
|
||||
int e = d.length;
|
||||
|
||||
for (int f = 0; f < a.length; f++) {
|
||||
String g = a[f];
|
||||
String h = b.keys.firstWhere(
|
||||
(i) => b[i] == g,
|
||||
orElse: () => g,
|
||||
);
|
||||
|
||||
c.write(h);
|
||||
}
|
||||
|
||||
String j = c.toString();
|
||||
|
||||
if (j.endsWith(d)) {
|
||||
j = j.substring(0, j.length - e);
|
||||
}
|
||||
|
||||
return j;
|
||||
}
|
||||
}
|
||||
5
secure_string_operations/pubspec.lock
Normal file
5
secure_string_operations/pubspec.lock
Normal file
@@ -0,0 +1,5 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages: {}
|
||||
sdks:
|
||||
dart: ">=2.12.0 <4.0.0"
|
||||
6
secure_string_operations/pubspec.yaml
Normal file
6
secure_string_operations/pubspec.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
name: secure_string_operations
|
||||
description: A package for secure string operations
|
||||
version: 1.0.0
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
Reference in New Issue
Block a user