signature

Define recursive signatures for modules

半世苍凉 提交于 2019-12-05 06:50:50
I know that it is possible to define recursive modules, does anyone know how to define recursive signatures? For instance, I would like to realize: module type AAA = sig module Bbb : BBB type 'a t val f : 'a Bbb.t -> 'a t end module type BBB = sig module Aaa : AAA type 'a t val g : 'a Aaa.t -> 'a t end Could anyone help? You can't, as far as I can tell. The closest solution is to limit the "recursive" bits to what is actually needed to express each signature separately: module type AA = sig module B : sig type t end type t val f : unit -> B.t end module type BB = sig module A : sig type t end

How to Embed Image in Outlook Signature?

房东的猫 提交于 2019-12-05 01:36:34
Is it possible to create an HTML email signature for Outlook 2003 or above that doesn't reference external images? That is, using those special "cid" reference but embed the image itself in the signature and not on the file system or network. This is for an web application that generates a "standard" email signature based on various input from a user. It has worked fine so far with a single "embedded" image. But a new feature is going to require the possible addition of multiple tiny images. Getting to user to save one email signature template and one image to the user's machine is about the

Signature.verify() is always returning false

谁说我不能喝 提交于 2019-12-04 21:13:01
When I am tring to verify the signature's using Signature class , the Signature.verify() method it is always returning false. my code is as below. package test; import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; import java.io.UnsupportedEncodingException; import java.math.BigInteger; import java.security.*; import java.security.spec.InvalidKeySpecException; import java.security.spec.RSAPublicKeySpec; import java.util.logging.Level; import java.util.logging.Logger; /* this method converts the string into hash using SHA1 encryption algorithm */ public class SignatureTest { static

Need and impossibility of having a type of a signature

泄露秘密 提交于 2019-12-04 20:33:29
I have defined 2 signature and 4 modules as follows, and it works fine: module type TRIANGLE = sig type 'a t val get ... val set ... ... end module type MATRIX = sig type 'a t val unionArrayArray: 'a TriangleArray.t -> 'a TriangleArray.t -> 'a t val unionListList: 'a TriangleList.t -> 'a TriangleList.t -> 'a t val unionArrayList: 'a TriangleArray.t -> 'a TriangleList.t -> 'a t val unionListArray: 'a TriangleList.t -> 'a TriangleArray.t -> 'a t ... end module rec MatrixArray: MATRIX = struct type 'a t = 'a array array ... end and MatrixList: MATRIX = struct type 'a t = 'a list list ... end and

What is the default signature algorithm of bouncycastle CMSSignedDataGenerator if not explicitly specified

核能气质少年 提交于 2019-12-04 19:13:14
I was wondering what signature algorithm (digestOID) BouncyCastle uses by default if you do not specify it explicitly like like in the code below: List certList = new ArrayList(); CMSTypedData msg = new CMSProcessableByteArray("Hello world!".getBytes()); certList.add(signCert); Store certs = new JcaCertStore(certList); CMSSignedDataGenerator gen = new CMSSignedDataGenerator(); ContentSigner sha1Signer = new JcaContentSignerBuilder("SHA1withRSA").setProvider("BC").build(signKP.getPrivate()); gen.addSignerInfoGenerator( new JcaSignerInfoGeneratorBuilder( new JcaDigestCalculatorProviderBuilder()

How to generate a signed PDF w/o green checkmark

孤者浪人 提交于 2019-12-04 15:57:37
I'm signing PDF's using iText. I'm including a graphic in the signature. This works, but the green checkmark (or yellow question mark) that shows when the document is verified interferes with the graphic I inserted, making the end result look ugly. It either shows up above or below the signature graphic, but I can't get it to disappear. Does anyone know how to fix this? sorry but I don't understand this. You want a valid signature but no possibility to see that the signature is valid? Doesn't make sense to me. Anyway, I think the green checkmark is rendered by Adobe Reader so you will have no

'selectedFilters' is not a valid keyword argument

痞子三分冷 提交于 2019-12-04 15:48:28
I use PyQt5 and I have an error when I try to save the file name : csv_file_list = QtWidgets.QFileDialog.getOpenFileName(self, 'Open file', '', '*.csv') fileName = csv_file_list fileName = QtWidgets.QFileDialog.getSaveFileName(self, 'Dialog Title', '/path/to/default/directory', selectedFilters='*.txt') if fileName: print (fileName) And it display me this error : 'selectedFilters' is not a valid keyword argument. I don't know if the error is here because of PyQt5 or not For various reasons, the C++ signatures don't always exactly match the PyQt signatures. This is probably the biggest weakness

How does Gmail recognize email signatures (alternatively, “What's the best way to recognize email signatures?”)

一曲冷凌霜 提交于 2019-12-04 14:22:03
问题 Gmail automatically greys text that looks like a signature. Anyone have any guesses how it does this? (I've noticed that it depends on the presence of the sender's name, but I think that's only part of the story). I ask because I'm working on a web application that has an email interface, and I'd like to remove users' signatures before displaying the contents of their emails. 回答1: Email signatures are supposed to be started with two dashes, a space, and a newline. See Wikipedia and RFC-3676

Android studio : Can not choose signature version

旧巷老猫 提交于 2019-12-04 12:44:41
问题 I want to build my app with V1 & V2 signature version. But both of them are greyed out. Can anyone please tell me how to make it avaiable to choose? [generate signature] 回答1: As described in the official document, Android 7.0 introduces APK Signature Scheme v2, a new app-signing scheme that offers faster app install times and more protection against unauthorized alterations to APK files. By default, Android Studio 2.2 and the Android Plugin for Gradle 2.2 sign your app using both APK

Certificate of sender expired before signature verify

人盡茶涼 提交于 2019-12-04 11:51:13
I m working on one project about certificates and digital signatures in Java, but i cant understand following situation. Certificates of sender and receiver of document was valid when signature is created. But in time, when receiver received document, certificate of sender had expired. Is that valid situation, so receiver can normally verify signature, or he cant? One more question. For what is used Non-repudiation key usage? A digital signature will remain cryptographically correct even if the certificate has expired, but verification of the signature will be invalid. An electronic