Home
last modified time | relevance | path

Searched refs:signature (Results 1 – 23 of 23) sorted by relevance

/libcore/luni/src/test/java/tests/targets/security/
DSignatureTestMD2withRSA.java38 Signature signature = Signature.getInstance("MD2withRSA"); in testSignature() local
45 Signature signature = Signature.getInstance("MD2WithRSA"); in testSignature() local
52 Signature signature = Signature.getInstance("MD2WITHRSA"); in testSignature() local
59 Signature signature = Signature.getInstance("MD2withRSAEncryption"); in testSignature() local
66 Signature signature = Signature.getInstance("MD2WithRSAEncryption"); in testSignature() local
73 Signature signature = Signature.getInstance("MD2WITHRSAENCRYPTION"); in testSignature() local
80 Signature signature = Signature.getInstance("MD2/RSA"); in testSignature() local
87 Signature signature = Signature.getInstance("1.2.840.113549.1.1.2"); in testSignature() local
100 Signature signature = Signature.getInstance("MD2withRSA"); in testSignature2() local
101 signature = Signature.getInstance("MD2WithRSA"); in testSignature2()
[all …]
/libcore/luni/src/main/java/java/security/
DSignedObject.java38 private byte[] signature; field in SignedObject
49 tmp = new byte[signature.length]; in readObject()
50 System.arraycopy(signature, 0, tmp, 0, signature.length); in readObject()
51 signature = tmp; in readObject()
89 signature = signingEngine.sign(); in SignedObject()
119 byte[] sig = new byte[signature.length]; in getSignature()
120 System.arraycopy(signature, 0, sig, 0, signature.length); in getSignature()
154 return verificationEngine.verify(signature); in verify()
DSignature.java421 public final boolean verify(byte[] signature) throws SignatureException { in verify() argument
425 return engineVerify(signature); in verify()
452 public final boolean verify(byte[] signature, int offset, int length) in verify() argument
457 if (signature == null || offset < 0 || length < 0 || in verify()
458 offset + length > signature.length) { in verify()
461 return engineVerify(signature, offset, length); in verify()
/libcore/luni/src/main/java/org/apache/harmony/security/pkcs10/
DCertificationRequest.java50 private byte[] signature; field in CertificationRequest
56 AlgorithmIdentifier algId, byte[] signature) { in CertificationRequest() argument
59 this.signature = signature.clone(); in CertificationRequest()
63 AlgorithmIdentifier algId, byte[] signature, byte[] encoding) { in CertificationRequest() argument
64 this(info, algId, signature); in CertificationRequest()
73 byte[] result = new byte[signature.length]; in getSignature()
74 System.arraycopy(signature, 0, result, 0, signature.length); in getSignature()
108 values[2] = new BitString(certReq.signature, 0);
/libcore/support/src/test/java/tests/security/
DSignatureHelper.java44 Signature signature = null; in test() local
46 signature = Signature.getInstance(algorithmName); in test()
52 signature.initSign(encryptKey); in test()
58 signature.update(plainData.getBytes()); in test()
65 signed = signature.sign(); in test()
71 signature.initVerify(decryptKey); in test()
77 signature.update(plainData.getBytes()); in test()
83 Assert.assertTrue("signature could not be verified", signature in test()
DAlgorithmParameterSignatureHelper.java46 Signature signature = null; in test() local
48 signature = Signature.getInstance(algorithmName); in test()
77 signature.initSign(keyPair.getPrivate()); in test()
83 signature.update(plainData.getBytes()); in test()
90 signed = signature.sign(); in test()
96 signature.initVerify(keyPair.getPublic()); in test()
102 signature.update(plainData.getBytes()); in test()
108 Assert.assertTrue("signature could not be verified", signature in test()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DSignatureSpiTest.java313 MySignature signature = new MySignature("dummy"); in testEngineInitSign_PrivateKey_SecureRandom() local
316 signature.initSign(null, null); in testEngineInitSign_PrivateKey_SecureRandom()
317 assertTrue("SPI method not called", signature in testEngineInitSign_PrivateKey_SecureRandom()
326 MySignature signature = new MySignature("dummy"); in testEngineSetParameter() local
329 signature.setParameter(null); in testEngineSetParameter()
332 signature in testEngineSetParameter()
340 MySignature signature = new MySignature("dummy"); in testEngineSign_BII() local
342 signature.initSign(new PrivateKey() { in testEngineSign_BII()
361 signature.sign(buf, 2, 1); in testEngineSign_BII()
362 assertTrue("SPI method not called", signature in testEngineSign_BII()
[all …]
DSignature2Test.java120 Signature signature = Signature.getInstance("DSA", providers[i]); in test_getInstanceLjava_lang_StringLjava_lang_String_java_security_Provider() local
121 assertEquals("DSA", signature.getAlgorithm()); in test_getInstanceLjava_lang_StringLjava_lang_String_java_security_Provider()
122 assertEquals(providers[i], signature.getProvider()); in test_getInstanceLjava_lang_StringLjava_lang_String_java_security_Provider()
448 byte[] signature = sig.sign(); in test_verify$B()
452 assertTrue("Sign/Verify does not pass", sig.verify(signature)); in test_verify$B()
462 byte[] signature = sig.sign(); in test_verify$BII()
466 assertTrue("Sign/Verify does not pass", sig.verify(signature, 0, in test_verify$BII()
467 signature.length)); in test_verify$BII()
470 sig.verify(null, 0, signature.length); in test_verify$BII()
476 sig.verify(signature, -5, signature.length); in test_verify$BII()
[all …]
DSignatureTest.java163 Signature signature = getTestSignature(); in testInitSignPrivateKey() local
164 signature.initSign(null); in testInitSignPrivateKey()
/libcore/luni/src/test/java/libcore/java/security/
DSignatureTest.java305 byte[] signature = sig.sign(); in test_Signature()
306 assertNotNull(sig.getAlgorithm(), signature); in test_Signature() local
307 assertTrue(sig.getAlgorithm(), signature.length > 0); in test_Signature()
311 assertTrue(sig.getAlgorithm(), sig.verify(signature)); in test_Signature()
315 assertTrue(sig.getAlgorithm(), sig.verify(signature)); in test_Signature()
323 sig.verify(signature); in test_Signature()
330 sig.verify(signature); in test_Signature()
996 byte[] signature = sig.sign(); in testSign_SHA1withRSA_CrtKeyWithPublicExponent_Success()
997 assertNotNull("Signature must not be null", signature); in testSign_SHA1withRSA_CrtKeyWithPublicExponent_Success()
999 Arrays.equals(signature, SHA1withRSA_Vector1Signature)); in testSign_SHA1withRSA_CrtKeyWithPublicExponent_Success()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DSignatureBenchmark.java63 private byte[] signature; field in SignatureBenchmark
81 this.signature = SIGNATURES.get(signatureAlgorithm); in setUp()
82 if (this.signature == null) { in setUp()
86 this.signature = signer.sign(); in setUp()
87 SIGNATURES.put(signatureAlgorithm, signature); in setUp()
125 verifier.verify(signature); in timeVerify()
/libcore/luni/src/main/java/org/apache/harmony/security/x509/
DTBSCertificate.java70 private final AlgorithmIdentifier signature; field in TBSCertificate
89 AlgorithmIdentifier signature, Name issuer, in TBSCertificate() argument
96 this.signature = signature; in TBSCertificate()
107 AlgorithmIdentifier signature, Name issuer, in TBSCertificate() argument
112 this(version, serialNumber, signature, issuer, validity, subject, in TBSCertificate()
135 return signature; in getSignature()
202 signature.dumpValue(sb); in dumpValue()
272 values[2] = tbs.signature;
DTBSCertList.java71 private final AlgorithmIdentifier signature; field in TBSCertList
194 private TBSCertList(int version, AlgorithmIdentifier signature, in TBSCertList() argument
199 this.signature = signature; in TBSCertList()
219 return signature; in getSignature()
273 && signature.equals(that.signature) in equals()
290 return ((version * 37 + signature.hashCode()) * 37 in hashCode()
298 signature.dumpValue(sb); in dumpValue()
359 values[1] = tbs.signature;
/libcore/luni/src/test/java/libcore/java/lang/reflect/
DOldAndroidClassTest.java145 String signature = method.toString(); in testClassGetMethodsNoDupes() local
147 int par = signature.indexOf('('); in testClassGetMethodsNoDupes()
148 int dot = signature.lastIndexOf('.', par); in testClassGetMethodsNoDupes()
150 signature = signature.substring(dot + 1); in testClassGetMethodsNoDupes()
152 assertFalse("Duplicate " + signature, set.contains(signature)); in testClassGetMethodsNoDupes()
153 set.add(signature); in testClassGetMethodsNoDupes()
192 private boolean hasMethod(Method[] methods, String signature) { in hasMethod() argument
194 if (method.toString().contains(signature)) { in hasMethod()
DMethodOverridesTest.java101 if (signature(method).equals("void visibility[] throws []")) { in testSubclassChangesVisibility()
118 if (signature(method).equals("void unchanged[] throws []")) { in testMoreVisibleSubclassChangesVisibility()
160 private String signature(Method method) { in signature() method in MethodOverridesTest
169 signatures.add(signature(method)); in signatures()
/libcore/luni/src/main/java/libcore/reflect/
DGenericSignatureParser.java123 public void parseForClass(GenericDeclaration genericDecl, String signature) { in parseForClass() argument
124 setInput(genericDecl, signature); in parseForClass()
154 String signature, Class<?>[] rawExceptionTypes) { in parseForMethod() argument
155 setInput(genericDecl, signature); in parseForMethod()
185 String signature, Class<?>[] rawExceptionTypes) { in parseForConstructor() argument
186 setInput(genericDecl, signature); in parseForConstructor()
215 String signature) { in parseForField() argument
216 setInput(genericDecl, signature); in parseForField()
/libcore/luni/src/main/native/
DvalueOf.cpp24 static jobject valueOf(JNIEnv* env, jclass c, const char* signature, const T& value) { in valueOf() argument
25 static jmethodID valueOfMethod = env->GetStaticMethodID(c, "valueOf", signature); in valueOf()
Djava_lang_System.cpp72 ScopedUtfChars signature(env, javaSignature); in System_setFieldImpl() local
73 if (signature.c_str() == NULL) { in System_setFieldImpl()
76 jfieldID fieldID = env->GetStaticFieldID(clazz, name.c_str(), signature.c_str()); in System_setFieldImpl()
/libcore/dex/src/main/java/com/android/dex/
DTableOfContents.java57 public byte[] signature; field in TableOfContents
65 signature = new byte[20]; in TableOfContents()
83 signature = headerIn.readByteArray(20); in readHeader()
169 out.write(signature); in writeHeader()
/libcore/luni/src/main/java/java/io/
DObjectStreamField.java105 ObjectStreamField(String signature, String name) { in ObjectStreamField() argument
110 this.typeString = signature.replace('.', '/').intern(); in ObjectStreamField()
DObjectStreamClass.java614 private static String descriptorForFieldSignature(String signature) { in descriptorForFieldSignature() argument
615 return signature.replace('.', '/'); in descriptorForFieldSignature()
626 private static String descriptorForSignature(String signature) { in descriptorForSignature() argument
627 return signature.substring(signature.indexOf("(")); in descriptorForSignature()
/libcore/luni/src/main/java/org/apache/harmony/security/utils/
DJarUtils.java68 public static Certificate[] verifySignature(InputStream signature, InputStream in verifySignature() argument
177 byte[] sfBytes = new byte[signature.available()]; in verifySignature()
178 signature.read(sfBytes); in verifySignature()
/libcore/luni/src/main/java/java/lang/
DSystem.java1114 private static native void setFieldImpl(String field, String signature, Object stream); in setFieldImpl() argument