public PuzzleSolution Solve(RsaKey key) { if (key == null) { throw new ArgumentNullException(nameof(key)); } return(key.SolvePuzzle(this)); }
public RsaPubKey(byte[] bytes) { if (bytes == null) { throw new ArgumentNullException(nameof(bytes)); } try { DerSequence seq2 = RsaKey.GetRSASequence(bytes); var s = new RsaPublicKeyStructure(seq2); _Key = new RsaKeyParameters(false, s.Modulus, s.PublicExponent); } catch (Exception) { throw new FormatException("Invalid RSA Key"); } }
public CryptoUtils(string rsaKeyPath, BitcoinSecret privateKeyEcdsa) { TumblerRsaKey = new NTumbleBit.RsaKey(File.ReadAllBytes(rsaKeyPath)); EcdsaKey = privateKeyEcdsa; }
public CryptoUtils(RsaKey rsaKey, BitcoinSecret privateKeyEcdsa) { TumblerRsaKey = rsaKey; EcdsaKey = privateKeyEcdsa; }