- 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

2314
UtilsCert.vb Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -564,71 +564,5 @@ 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

View File

@@ -16,11 +16,13 @@
<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.11</Version> <Version>1.1.0</Version>
<Authors>Manuel</Authors> <Authors>Manuel</Authors>
<Company>Tecnosis S.A</Company> <Company>Tecnosis S.A</Company>
<Description>Utilidades Varias</Description> <Description>Utilidades Varias</Description>
<PackageReleaseNotes> <PackageReleaseNotes>
- 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
- 2025-07-28 1.0.11 Se modifica funcion SHA256 para que no use métodos obsoletos y para que admita un encoding diferente a unicode - 2025-07-28 1.0.11 Se modifica funcion SHA256 para que no use métodos obsoletos y para que admita un encoding diferente a unicode
- 2025-07-28 1.0.10 Nueva función DescomponerCNsuscriptor - 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