- 2025-07-29 1.1.0 Se añade UtilsCert para manejo de certificados

- 2025-07-29 1.1.0 Se elimina función DescomponerCNsuscriptor de la clase crypt
This commit is contained in:
2025-07-31 09:30:48 +02:00
parent b12e07c8f9
commit afb7175a37
3 changed files with 2317 additions and 67 deletions

View File

@@ -564,71 +564,5 @@ Public Class crypt
Return Encoding.UTF8.GetString(ms.ToArray())
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