public static FromDER ( byte sig ) : |
||
sig | byte | |
Результат |
public ECDSASignature Sign(uint256 hash, bool useLowR = true) { AssertPrivateKey(); var signer = new DeterministicECDSA(useLowR); signer.setPrivateKey(PrivateKey); var sig = ECDSASignature.FromDER(signer.signHash(hash.ToBytes())); return(sig.MakeCanonical()); }
public virtual ECDSASignature Sign(byte[] hash) { AssertPrivateKey(); var signer = new DeterministicECDSA(); signer.setPrivateKey(PrivateKey); var sig = ECDSASignature.FromDER(signer.signHash(hash)); return(sig.MakeCanonical()); }
public ECDSASignature Sign(uint256 hash) { AssertPrivateKey(); var signer = new DeterministicECDSA(); signer.setPrivateKey(this.PrivateKey); ECDSASignature sig = ECDSASignature.FromDER(signer.signHash(hash.ToBytes())); return(sig.MakeCanonical()); }
public static bool IsValidDER(byte[] bytes) { try { ECDSASignature.FromDER(bytes); return(true); } catch (FormatException) { return(false); } catch (Exception) { return(false); } }
public static bool IsValidDER(byte[] bytes) { try { ECDSASignature.FromDER(bytes); return(true); } catch (FormatException) { return(false); } catch (Exception ex) { Utils.error("Unexpected exception in ECDSASignature.IsValidDER " + ex.Message); return(false); } }