SyoSil ApS UVM Scoreboard  1.0.3.0
Protected Member Functions | List of all members
cl_syoscb_hash_md5 Class Reference

MD5 hash algorithm implementation. More...

+ Inheritance diagram for cl_syoscb_hash_md5:
+ Collaboration diagram for cl_syoscb_hash_md5:

Protected Member Functions

virtual tp_hash_digest do_hash (bit ser [])
 Hash API: See cl_syoscb_hash_base::do_hash for more details Expects a bitstream with a length which is a multiple of 512, which follows the below format, specified in RFC 1321: More...
 
virtual tp_hash_digest do_hash (bit ser [])
 Hash API: Returns the hash value of the given bitstream. More...
 

Additional Inherited Members

- Public Types inherited from cl_syoscb_hash_base< pk_syoscb::MD5_HASH_DIGEST_WIDTH >
typedef bit< HASH_DIGEST_WIDTH-1:0 > tp_hash_digest
 Typedef for a bitstream of HASH_DIGEST_WIDTH bits.
 
typedef bit< HASH_DIGEST_WIDTH-1:0 > tp_hash_digest
 Typedef for a bitstream of HASH_DIGEST_WIDTH bits.
 
- Public Member Functions inherited from cl_syoscb_hash_base< pk_syoscb::MD5_HASH_DIGEST_WIDTH >
virtual tp_hash_digest hash (cl_syoscb_item item)
  Hash API: Hashes a cl_syoscb_item, returning its hash value More...
 
virtual tp_hash_digest hash_str (string str)
  Hash API: Hashes a string, returning its hash value More...
 
- Protected Attributes inherited from cl_syoscb_hash_base< pk_syoscb::MD5_HASH_DIGEST_WIDTH >
cl_syoscb_cfg cfg
 Handle to the configuration object.
 
cl_syoscb_hash_packer packer
 Handle to a packer suited for this hash algorithm. More...
 

Detailed Description

MD5 hash algorithm implementation.

The class implements the hash API as defined by the hash base class.

Definition at line 3 of file cl_syoscb_hash_md5.svh.

Member Function Documentation

◆ do_hash() [1/2]

cl_syoscb_hash_md5::tp_hash_digest cl_syoscb_hash_md5::do_hash ( bit  ser[])
protectedvirtual

Hash API: See cl_syoscb_hash_base::do_hash for more details Expects a bitstream with a length which is a multiple of 512, which follows the below format, specified in RFC 1321:

Bits Information
0 - length of the serialized item-1 Serialized item
length of the serialized item - lentgh of the serialized item+6 Zeros
length of the serialized item+7 One
length of the serialized item+8 - (512*x-64) Zeros
last 64 bits length of the item modulo 2^64

A bitstream of this kind can be generated by packing with cl_syoscb_md5_packer, which automatically appends the required metadata to the end of the bitstream

Reimplemented from cl_syoscb_hash_base< pk_syoscb::MD5_HASH_DIGEST_WIDTH >.

Definition at line 71 of file cl_syoscb_hash_md5.svh.

◆ do_hash() [2/2]

virtual tp_hash_digest cl_syoscb_hash_md5::do_hash ( bit  ser[])
protectedvirtual

Hash API: Returns the hash value of the given bitstream.

The bitstream must comply with the chosen hash algorithm's requirements.

Parameters
serThe bitstream to generate the hash for
Returns
The hash of the input bitstream

Reimplemented from cl_syoscb_hash_base< pk_syoscb::MD5_HASH_DIGEST_WIDTH >.


The documentation for this class was generated from the following files:

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.3.0

Copyright 2014-2022 SyoSil ApS
All Rights Reserved Worldwide

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
doxygen
Doxygen Version: 1.8.14
Generated with IDV SV Filter Version: 2.6.3
Fri Sep 2 2022 14:41:06
Find a documentation bug? Report bugs to: scoreboard@syosil.com