Package system.security.policy
Class Hash
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.security.policy.EvidenceBase
-
- system.security.policy.Hash
-
- All Implemented Interfaces:
IJCOBridgeReflected
public class Hash extends EvidenceBase
The base .NET class managing System.Security.Policy.Hash, System.Security.Permissions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Security.Policy.Hash
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
assemblyFullName
Fully assembly qualified name: System.Security.Permissions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51static java.lang.String
assemblyShortName
Assembly name: System.Security.Permissionsstatic java.lang.String
className
Qualified class name: System.Security.Policy.Hashstatic JCType
classType
The type managed from JCOBridge.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Hash
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoHash
, a cast assert is made to check if types are compatible.static Hash
CreateMD5(byte[] md5)
static Hash
CreateMD5(JCORefOut dupParam0)
static Hash
CreateSHA1(byte[] sha1)
static Hash
CreateSHA1(JCORefOut dupParam0)
static Hash
CreateSHA256(byte[] sha256)
static Hash
CreateSHA256(JCORefOut dupParam0)
byte[]
GenerateHash(HashAlgorithm hashAlg)
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class Typebyte[]
getMD5()
void
GetObjectData(SerializationInfo info, StreamingContext context)
byte[]
getSHA1()
byte[]
getSHA256()
void
setJCOInstance(JCObject instance)
-
Methods inherited from class system.security.policy.EvidenceBase
Clone
-
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Security.Permissions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Security.Permissions- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Security.Policy.Hash- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Hash
public Hash(java.lang.Object instance) throws java.lang.Throwable
Internal constructor. Use with caution- Throws:
java.lang.Throwable
-
Hash
public Hash() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
Hash
public Hash(Assembly assembly) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classEvidenceBase
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classEvidenceBase
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classEvidenceBase
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classEvidenceBase
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classEvidenceBase
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classEvidenceBase
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static Hash cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoHash
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
Hash
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
GenerateHash
public byte[] GenerateHash(HashAlgorithm hashAlg) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CreateMD5
public static Hash CreateMD5(byte[] md5) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CreateMD5
public static Hash CreateMD5(JCORefOut dupParam0) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CreateSHA1
public static Hash CreateSHA1(byte[] sha1) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CreateSHA1
public static Hash CreateSHA1(JCORefOut dupParam0) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CreateSHA256
public static Hash CreateSHA256(byte[] sha256) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
CreateSHA256
public static Hash CreateSHA256(JCORefOut dupParam0) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetObjectData
public void GetObjectData(SerializationInfo info, StreamingContext context) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, CultureNotFoundException, ObjectDisposedException
-
getMD5
public byte[] getMD5() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getSHA1
public byte[] getSHA1() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getSHA256
public byte[] getSHA256() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-