Skip to content

AttributeErrors in SHA256 class functions when seed=None #55

@ackaplan11

Description

@ackaplan11

When you create a new SHA256 object using the constructor without parameters
sha256 = SHA256(),

the following functions will return AttributeErrors
sha256.jumpahead() --> AttributeError: 'NoneType' object has no attribute 'update'
sha256.next() --> 'AttributeError: NoneType' object has no attribute 'update'
sha256.random() --> AttributeError: 'NoneType' object has no attribute 'digest'
sha256.randint_trunc() --> AttributeError: 'NoneType' object has no attribute 'digest' -- (Depricated)
sha256.getrandbits() --> AttributeError: 'NoneType' object has no attribute 'digest'
sha256.randbelow_from_randbits() --> AttributeError: 'NoneType' object has no attribute 'digest'
sha256.randint() --> AttributeError: 'NoneType' object has no attribute 'digest'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions