add all
This commit is contained in:
40
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/BasicTlsSrpIdentity.cs
vendored
Normal file
40
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/BasicTlsSrpIdentity.cs
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Tls
|
||||
{
|
||||
/// <summary>A basic SRP Identity holder.</summary>
|
||||
public class BasicTlsSrpIdentity
|
||||
: TlsSrpIdentity
|
||||
{
|
||||
protected readonly byte[] m_identity;
|
||||
protected readonly byte[] m_password;
|
||||
|
||||
public BasicTlsSrpIdentity(byte[] identity, byte[] password)
|
||||
{
|
||||
this.m_identity = Arrays.Clone(identity);
|
||||
this.m_password = Arrays.Clone(password);
|
||||
}
|
||||
|
||||
public BasicTlsSrpIdentity(string identity, string password)
|
||||
{
|
||||
this.m_identity = Strings.ToUtf8ByteArray(identity);
|
||||
this.m_password = Strings.ToUtf8ByteArray(password);
|
||||
}
|
||||
|
||||
public virtual byte[] GetSrpIdentity()
|
||||
{
|
||||
return m_identity;
|
||||
}
|
||||
|
||||
public virtual byte[] GetSrpPassword()
|
||||
{
|
||||
return m_password;
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
Reference in New Issue
Block a user