/* Transport Security Layer (TLS)
- * Copyright (c) 2003 Carlos Guzmán Álvarez
+ * Copyright (c) 2003-2004 Carlos Guzman Alvarez
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
{
internal class TlsCipherSuite : CipherSuite
{
- #region CONSTRUCTORS
+ #region Constructors
public TlsCipherSuite(
short code, string name, CipherAlgorithmType cipherAlgorithmType,
#endregion
- #region MAC_GENERATION_METHOD
+ #region MAC Generation Methods
public override byte[] ComputeServerRecordMAC(TlsContentType contentType, byte[] fragment)
{
data.Write(this.Context.ReadSequenceNumber);
data.Write((byte)contentType);
- data.Write((short)this.Context.Protocol);
+ data.Write(this.Context.Protocol);
data.Write((short)fragment.Length);
data.Write(fragment);
data.Write(this.Context.WriteSequenceNumber);
data.Write((byte)contentType);
- data.Write((short)this.Context.Protocol);
+ data.Write(this.Context.Protocol);
data.Write((short)fragment.Length);
data.Write(fragment);
#endregion
- #region KEY_GENERATION_METODS
+ #region Key Generation Methods
public override void ComputeMasterSecret(byte[] preMasterSecret)
{
}
else
{
- this.Context.ClientWriteIV = new byte[0];
- this.Context.ServerWriteIV = new byte[0];
+ this.Context.ClientWriteIV = CipherSuite.EmptyArray;
+ this.Context.ServerWriteIV = CipherSuite.EmptyArray;
}
}
else