- 2025-07-28 1.0.10 Nueva función DescomponerCNsuscriptor
This commit is contained in:
68
crypt.vb
68
crypt.vb
@@ -1,6 +1,7 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Security.Cryptography
|
Imports System.Security.Cryptography
|
||||||
Imports System.Text
|
Imports System.Text
|
||||||
|
Imports System.Text.RegularExpressions
|
||||||
|
|
||||||
Public Class crypt
|
Public Class crypt
|
||||||
Public Shared Function FEncS$(ByVal X$, ByVal Jco0$, ByVal Jcd0$, ByVal Xs0 As Long)
|
Public Shared Function FEncS$(ByVal X$, ByVal Jco0$, ByVal Jcd0$, ByVal Xs0 As Long)
|
||||||
@@ -560,4 +561,71 @@ Public Class crypt
|
|||||||
Return Encoding.UTF8.GetString(ms.ToArray())
|
Return Encoding.UTF8.GetString(ms.ToArray())
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function DescomponerCNsuscriptor(CNsuscriptor As String,
|
||||||
|
Optional ByRef nombre As String = Nothing,
|
||||||
|
Optional ByRef docIdentidad As String = Nothing,
|
||||||
|
Optional ByRef numPersonal As String = Nothing) As Boolean
|
||||||
|
|
||||||
|
nombre = CNsuscriptor
|
||||||
|
docIdentidad = Nothing
|
||||||
|
numPersonal = Nothing
|
||||||
|
|
||||||
|
If String.Compare(CNsuscriptor, "", False) = 0 Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim text As String = Nothing
|
||||||
|
Dim text2 As String = Nothing
|
||||||
|
Dim array() As String = Regex.Split(CNsuscriptor, " DI=")
|
||||||
|
|
||||||
|
If array.Length > 2 Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim text3 As String
|
||||||
|
|
||||||
|
If array.Length = 2 Then
|
||||||
|
text3 = array(0)
|
||||||
|
array = Regex.Split(array(1), " N=")
|
||||||
|
|
||||||
|
If array.Length > 2 Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
text = array(0)
|
||||||
|
If array.Length = 2 Then
|
||||||
|
text2 = array(1)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
array = Regex.Split(CNsuscriptor, " N=")
|
||||||
|
|
||||||
|
If array.Length > 2 Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
text3 = array(0)
|
||||||
|
If array.Length = 2 Then
|
||||||
|
text2 = array(1)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If String.IsNullOrWhiteSpace(text3) OrElse text3.Contains("=") Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If text IsNot Nothing AndAlso (String.IsNullOrWhiteSpace(text.Trim()) OrElse text.Contains("=")) Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If text2 IsNot Nothing AndAlso (String.IsNullOrWhiteSpace(text2.Trim()) OrElse text2.Contains("=")) Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
nombre = text3
|
||||||
|
docIdentidad = text
|
||||||
|
numPersonal = text2
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -16,11 +16,12 @@
|
|||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<PackageId>tsUtilidades</PackageId>
|
<PackageId>tsUtilidades</PackageId>
|
||||||
<PackageTags>net8.0, libreria</PackageTags>
|
<PackageTags>net8.0, libreria</PackageTags>
|
||||||
<Version>1.0.9</Version>
|
<Version>1.0.10</Version>
|
||||||
<Authors>Manuel</Authors>
|
<Authors>Manuel</Authors>
|
||||||
<Company>Tecnosis S.A</Company>
|
<Company>Tecnosis S.A</Company>
|
||||||
<Description>Utilidades varias Entity Framework compatibles con EF Core 8.</Description>
|
<Description>Utilidades Varias</Description>
|
||||||
<PackageReleaseNotes>
|
<PackageReleaseNotes>
|
||||||
|
- 2025-07-28 1.0.10 Nueva función DescomponerCNsuscriptor
|
||||||
- 2025-07-28 1.0.9 Correccion ObtenerValorDesdeNombre
|
- 2025-07-28 1.0.9 Correccion ObtenerValorDesdeNombre
|
||||||
- 2025-07-28 1.0.8 Correccion ObtenerValorDesdeNombre
|
- 2025-07-28 1.0.8 Correccion ObtenerValorDesdeNombre
|
||||||
- 2025-07-28 1.0.7 Nueva función de ObtenerValorDesdeNombre
|
- 2025-07-28 1.0.7 Nueva función de ObtenerValorDesdeNombre
|
||||||
|
|||||||
Reference in New Issue
Block a user