fix(android): overload both Cipher.init declarations, restore CRLF line endings
Delphi refuses a second declaration when the first is not marked overload, so the three-argument init was reported as too many parameters. Also adds Androidapi.Jni to silence the non-inlined TJavaArray.Length hints. My ASCII normalisation had rewritten the sources in LF, which RAD Studio flags on every unit; a .gitattributes rule now pins CRLF for Pascal sources so git does not undo it.
This commit is contained in:
@@ -31,3 +31,10 @@
|
|||||||
*.ico binary
|
*.ico binary
|
||||||
*.png binary
|
*.png binary
|
||||||
*.rar binary
|
*.rar binary
|
||||||
|
|
||||||
|
# RAD Studio exige CRLF dans les sources Pascal — sans cette regle, git les
|
||||||
|
# normalise en LF au commit et le compilateur le signale a chaque unite.
|
||||||
|
*.pas text eol=crlf
|
||||||
|
*.dpr text eol=crlf
|
||||||
|
*.dproj text eol=crlf
|
||||||
|
*.fmx text eol=crlf
|
||||||
|
|||||||
@@ -70,7 +70,9 @@ implementation
|
|||||||
|
|
||||||
{$IF DEFINED(ANDROID)}
|
{$IF DEFINED(ANDROID)}
|
||||||
uses
|
uses
|
||||||
Androidapi.JNIBridge, Androidapi.JNI.JavaTypes, Androidapi.Helpers;
|
// Androidapi.Jni : sans elle, TJavaArray.Length reste un appel non inline
|
||||||
|
// et le compilateur emet un avertissement a chaque usage.
|
||||||
|
Androidapi.Jni, Androidapi.JNIBridge, Androidapi.JNI.JavaTypes, Androidapi.Helpers;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
var
|
var
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ implementation
|
|||||||
|
|
||||||
{$IF DEFINED(ANDROID)}
|
{$IF DEFINED(ANDROID)}
|
||||||
uses
|
uses
|
||||||
Androidapi.JNIBridge, Androidapi.JNI.JavaTypes, Androidapi.Helpers;
|
Androidapi.Jni, Androidapi.JNIBridge, Androidapi.JNI.JavaTypes, Androidapi.Helpers;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
const
|
const
|
||||||
@@ -213,7 +213,9 @@ type
|
|||||||
[JavaSignature('javax/crypto/Cipher')]
|
[JavaSignature('javax/crypto/Cipher')]
|
||||||
JCipherX = interface(JObject)
|
JCipherX = interface(JObject)
|
||||||
['{3D2B1C4E-5F60-7B82-9DA4-192031425364}']
|
['{3D2B1C4E-5F60-7B82-9DA4-192031425364}']
|
||||||
procedure init(opmode: Integer; key: JKeyX); cdecl;
|
// Les DEUX surcharges doivent porter la directive : Delphi refuse une
|
||||||
|
// seconde declaration si la premiere ne l'a pas.
|
||||||
|
procedure init(opmode: Integer; key: JKeyX); cdecl; overload;
|
||||||
procedure init(opmode: Integer; key: JKeyX; params: JAlgorithmParameterSpecX); cdecl; overload;
|
procedure init(opmode: Integer; key: JKeyX; params: JAlgorithmParameterSpecX); cdecl; overload;
|
||||||
function doFinal(input: TJavaArray<Byte>): TJavaArray<Byte>; cdecl;
|
function doFinal(input: TJavaArray<Byte>): TJavaArray<Byte>; cdecl;
|
||||||
function getIV: TJavaArray<Byte>; cdecl;
|
function getIV: TJavaArray<Byte>; cdecl;
|
||||||
|
|||||||
Reference in New Issue
Block a user