Package keyczar :: Module keys :: Class DsaPublicKey
[hide private]
[frames] | no frames]

Class DsaPublicKey

source code

object --+            
         |            
       Key --+        
             |        
 AsymmetricKey --+    
                 |    
         PublicKey --+
                     |
                    DsaPublicKey

Represents DSA public keys in an asymmetric DSA key pair.

Instance Methods [hide private]
 
__init__(self, params, x509, key, size=1024)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
boolean
Verify(self, msg, sig)
Return True if the signature corresponds to the message.
source code

Inherited from PublicKey: __str__

Inherited from PublicKey (private): _GetKeyString

Inherited from Key: Header

Inherited from Key (private): _Hash

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Static Methods [hide private]
DsaPublicKey
Read(key)
Reads a DSA public key from a JSON string representation of it.
source code
Properties [hide private]

Inherited from Key: hash, key_bytes, key_string, size

Inherited from object: __class__

Method Details [hide private]

__init__(self, params, x509, key, size=1024)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

Read(key)
Static Method

source code 

Reads a DSA public key from a JSON string representation of it.

Parameters:
  • key (string) - a JSON representation of a DSA public key
Returns: DsaPublicKey
a DSA public key

Verify(self, msg, sig)

source code 

Return True if the signature corresponds to the message.

Parameters:
  • msg (string) - message that has been signed
  • sig (string) - raw byte string of the signature formatted as an ASN.1 sequence of r and s
Returns: boolean
True if signature is valid for message. False otherwise.