This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable prefer-const */ | |
import md5 from 'blueimp-md5' | |
import bigInt from 'big-integer' | |
class MyRsa { | |
constructor () { | |
// this.n = BigInt('0x8686980c0f5a24c4b9d43020cd2c22703ff3f450756529058b1cf88f09b8602136477198a6e2683149659bd122c33592fdb5ad47944ad1ea4d36c6b172aad6338c3bb6ac6227502d010993ac967d1aef00f0c8e038de2e4d3bc2ec368af2e9f10a6f1eda4f7262f136420c07c331b871bf139f74f3010e3c4fe57df3afb71683') | |
// this.e = BigInt('0x10001') | |
this.n = bigInt('8686980c0f5a24c4b9d43020cd2c22703ff3f450756529058b1cf88f09b8602136477198a6e2683149659bd122c33592fdb5ad47944ad1ea4d36c6b172aad6338c3bb6ac6227502d010993ac967d1aef00f0c8e038de2e4d3bc2ec368af2e9f10a6f1eda4f7262f136420c07c331b871bf139f74f3010e3c4fe57df3afb71683', 16) | |
this.e = bigInt('10001', 16) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate, err error) { | |
... | |
const CERT_CHAIN_OPT_IN_WEAK_SIGNATURE = 0x00010000 // optional checking SHA1 certificate | |
err = syscall.CertGetCertificateChain(syscall.Handle(0), storeCtx, verifyTime, storeCtx.Store, para, CCERT_CHAIN_OPT_IN_WEAK_SIGNATURE|CERT_CHAIN_RETURN_LOWER_QUALITY_CONTEXTS, 0, &topCtx) | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_BCryptGenRandom stdFunction | |
var bcryptdll = []byte("Bcrypt.dll\000") | |
bcrypt := windowsLoadSystemLib(bcryptdll) | |
if bcrypt == 0 { | |
throw("Bcrypt.dll not found") | |
} | |
_BCryptGenRandom = windowsFindfunc(bcrypt, []byte("BCryptGenRandom\000")) | |